添加收藏茶室接口和完善茶室详情
This commit is contained in:
@ -32,7 +32,7 @@ const { onAuthRequired, onResponseRefreshToken } = createServerTokenAuthenticati
|
||||
}
|
||||
catch (error) {
|
||||
// 切换到登录页
|
||||
await uni.reLaunch({ url: '/pages/common/login/index' })
|
||||
await uni.reLaunch({ url: '/pages/login/login' })
|
||||
throw error
|
||||
}
|
||||
},
|
||||
@ -67,9 +67,7 @@ const alovaInstance = createAlova({
|
||||
// }
|
||||
// method.config.headers.token = token;
|
||||
|
||||
const userStore = useUserStore()
|
||||
const { token } = userStore.userInfo as unknown as IUserInfo
|
||||
|
||||
const token = uni.getStorageSync('token')
|
||||
if (!token) {
|
||||
toast.info('请先登录')
|
||||
router.switchTab('/pages/my/my', 500)
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
export enum ResultEnum {
|
||||
Success = 0, // 成功
|
||||
Error = 400, // 错误
|
||||
Unauthorized = 401, // 未授权
|
||||
Success = 1, // 成功
|
||||
Error = 0, // 错误
|
||||
Unauthorized = -1, // 未授权
|
||||
Forbidden = 403, // 禁止访问(原为forbidden)
|
||||
NotFound = 404, // 未找到(原为notFound)
|
||||
MethodNotAllowed = 405, // 方法不允许(原为methodNotAllowed)
|
||||
|
||||
Reference in New Issue
Block a user