完善预定页面
This commit is contained in:
@ -106,11 +106,6 @@ const alovaInstance = createAlova({
|
||||
return response
|
||||
}
|
||||
|
||||
if (statusCode === ResultEnum.Unauthorized) {
|
||||
useUserStore().removeUserInfo()
|
||||
uni.navigateTo({ url: '/pages/login/mobile' })
|
||||
}
|
||||
|
||||
// 处理 HTTP 状态码错误
|
||||
// if (statusCode !== 200) {
|
||||
// const errorMessage = ShowMessage(statusCode) || `HTTP请求错误[${statusCode}]`
|
||||
@ -122,6 +117,8 @@ const alovaInstance = createAlova({
|
||||
// 处理业务逻辑错误
|
||||
const { code, msg, data } = rawData as IResponse
|
||||
if (code === ResultEnum.Unauthorized) {
|
||||
useUserStore().removeUserInfo()
|
||||
|
||||
if (config.meta?.toast !== false) {
|
||||
toast.info(msg)
|
||||
router.switchTab('/pages/my/my')
|
||||
@ -131,7 +128,7 @@ const alovaInstance = createAlova({
|
||||
|
||||
if (code === ResultEnum.Success) {
|
||||
if (config.meta?.toast !== false && msg) {
|
||||
toast.info(msg)
|
||||
if (msg !== '查询成功') toast.info(msg)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user