罗世杰:feat:轮播图,分析统计、轮播消息接口接入

This commit is contained in:
LuoShijie
2023-11-14 23:11:39 +08:00
parent c21816d077
commit db21651d44
6 changed files with 75 additions and 34 deletions

View File

@@ -1,4 +1,4 @@
const serverHost = ''//http://xx.xxx.xx
const serverHost = 'https://spsp.feashow.com/api/'//http://xx.xxx.xx
const service = {
get(url, data) {
@@ -174,6 +174,26 @@ const apiService = {
resolve(service.putWithFormData(url, data))
})
},
// 获取轮播图
getBanner() {
const url = `/home/banner`
return new Promise((resolve, reject) => {
resolve(service.get(url))
})
},
// 获取热门信息
getHotInfo() {
const url = `/news/nlists/`
return new Promise((resolve, reject) => {
resolve(service.get(url))
})
},
getStat() {
const url = `/home/stat`
return new Promise((resolve, reject) => {
resolve(service.get(url))
})
}
}
export {
apiService,