feat:完善功能

This commit is contained in:
zjc
2024-12-27 18:06:19 +08:00
parent f906515858
commit cb35986d1a
6 changed files with 50 additions and 255 deletions

View File

@@ -7,3 +7,12 @@ export function getWeatherApi() {
method: 'get'
})
}
// 核心景区视频
export function getVideoListApi(data) {
return request({
url: '/api/video/list',
method: 'get',
params: data
})
}

View File

@@ -106,19 +106,7 @@ const instance = axios.create({
*/
instance.interceptors.request.use(
(config) => {
// 规范写法 不可随意自定义
let urlParams = {}
if (config.params) {
urlParams = {
...config.params
}
}
config.url = config.url + '?' + qs.stringify(urlParams)
if (
config.data &&
config.headers['Content-Type'] === 'application/x-www-form-urlencoded;charset=UTF-8'
)
if (config.data && config.headers['Content-Type'] === 'application/json";charset=UTF-8')
config.data = qs.stringify(config.data)
return config
},