添加页面

This commit is contained in:
2025-11-05 17:07:17 +08:00
parent 328721e6e9
commit 886b27218c
29 changed files with 1691 additions and 829 deletions

View File

@@ -20,7 +20,7 @@ const request = config => {
if (getToken() && !isToken) {
config.header['Authorization'] = 'Bearer ' + getToken()
}
config.header['Authorization'] = 'Bearer ' + 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJsb2dpblR5cGUiOiJsb2dpbiIsImxvZ2luSWQiOiJzeXNfdXNlcjoxIiwicm5TdHIiOiI5aW9ycXdMYVp5aXFienBJOXdvVGlYc3R3V0xydkFqWSIsInVzZXJJZCI6MX0.lfsx6tcpSUYYenWmz8T7gsgc8_t1sFNif_e2nOBRRL4'
config.header['Authorization'] = 'Bearer ' + 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJsb2dpblR5cGUiOiJsb2dpbiIsImxvZ2luSWQiOiJzeXNfdXNlcjoxIiwicm5TdHIiOiJQSlUyVlJCc1E1aXRMMWgxdjNkcVh2eER1c2VVc0hvRiIsInVzZXJJZCI6MX0.z4Z2XqgXyU0GQU-i7Bsa5T-zCKApTxj1YQ73rk7bAVo'
// get请求映射params参数
if (config.params) {
let url = config.url + '?' + tansParams(config.params)
@@ -45,10 +45,9 @@ const request = config => {
return
}
const code = res.code || 200
console.log(code, 'const code = res.code || 200')
const msg = errorCode[code] || res.msg || errorCode['default']
const isShowModel = getApp().globalData.isShowModel
if (code === 200) {
if (code == 200) {
resolve(res)
}else if (code === 401) {
if(isShowModel === false) {
@@ -89,7 +88,6 @@ const request = config => {
resolve(res.data)
})
.catch(error => {
console.log(error, 'error')
let message = error.errMsg
if (message === 'Network Error') {
message = '网络出小差,请稍后再试'