Revert "no message"

This reverts commit d560b2ae9d.
This commit is contained in:
2025-10-10 10:32:59 +08:00
parent d560b2ae9d
commit c37c97e97e
219 changed files with 0 additions and 20979 deletions

View File

@ -1,26 +0,0 @@
//设置请求和拦截响应器
export default function({
$axios,
app
}) {
// 请求拦截器
$axios.onRequest(config => {
// 如果用 token从 cookie 拿
const token = app.$cookies.get('token')
if (token) {
config.headers.Authorization = `Bearer ${token}` //鉴权方式这里使用的bearer
}
return config
}, error => Promise.reject(error))
// 响应拦截器
$axios.onResponse(response => {
if(response.code!=0){
return response
}
return response.data // 直接返回 data调用时不用再写 res.data
}, error => Promise.reject(error))
}