Files
xiezheng_h5/js/serve/search.js
2024-11-30 22:40:02 +08:00

28 lines
845 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

class SearchServe {
// data 是接口请求的参数,默认为空对象,表示这个接口不需要参数
async searchHot (data = {}) {
let http = new Ajax()
// suc的返回值ajax请求到的后端给我们的数据
return await http.get({
url: config.urlList.searchHot,
// data: data key 和 value 名字一样的时候,可以直接只写一个
data
})
}
async searchKey (data = {}) {
let http = new Ajax()
// suc的返回值ajax请求到的后端给我们的数据
return await http.get({
url: config.urlList.searchKey,
// data: data key 和 value 名字一样的时候,可以直接只写一个
data
})
}
}
let searchServe = new SearchServe