first commit

This commit is contained in:
2024-11-29 20:54:53 +08:00
commit 55df3d398c
42 changed files with 1857 additions and 0 deletions

35
js/serve/home.js Normal file
View File

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

14
js/serve/info.js Normal file
View File

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

28
js/serve/search.js Normal file
View File

@@ -0,0 +1,28 @@
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

25
js/serve/tag.js Normal file
View File

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