|
@@ -35,18 +35,9 @@ const $http = (url, data, methods) => {
|
|
// duration: 2000
|
|
// duration: 2000
|
|
// })
|
|
// })
|
|
uni.removeStorageSync('token')
|
|
uni.removeStorageSync('token')
|
|
- uni.showModal({
|
|
|
|
- title: '提示',
|
|
|
|
- content: '您未登录或登录失效!',
|
|
|
|
- confirmText: '去登录',
|
|
|
|
- success(res) {
|
|
|
|
- if (res.confirm) {
|
|
|
|
- uni.navigateTo({
|
|
|
|
- url: "/pages/login/index"
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
|
|
+ uni.navigateTo({
|
|
|
|
+ url: "/pages/login/index"
|
|
|
|
+ })
|
|
} else if (res.data && res.data.code !== 0 && res.data.code !== 1016 && res.data.code !== 1018) {
|
|
} else if (res.data && res.data.code !== 0 && res.data.code !== 1016 && res.data.code !== 1018) {
|
|
uni.showToast({
|
|
uni.showToast({
|
|
title: res.data.msg || '请求错误,请重试。',
|
|
title: res.data.msg || '请求错误,请重试。',
|