|
|
@@ -49,22 +49,22 @@ http.interceptor.request((config, cancel) => {
|
|
|
|
|
|
// 响应拦截器
|
|
|
http.interceptor.response(response => {
|
|
|
- // if (response.data.code == '11011' || response.data.code == '11012') {
|
|
|
- // uni.showModal({
|
|
|
- // content: "登录过期,请重新登录",
|
|
|
- // complete: (res) => {
|
|
|
- // if (res.confirm) {
|
|
|
- // uni.reLaunch({
|
|
|
- // url: "/pagesA/loginNew/loginNew"
|
|
|
- // })
|
|
|
- // } else {
|
|
|
- // uni.reLaunch({
|
|
|
- // url: "/pagesA/loginNew/loginNew"
|
|
|
- // })
|
|
|
- // }
|
|
|
- // },
|
|
|
- // });
|
|
|
- // }
|
|
|
+ if (response.data.code == '11011' || response.data.code == '11012') {
|
|
|
+ uni.showModal({
|
|
|
+ content: "登录过期,请重新登录",
|
|
|
+ complete: (res) => {
|
|
|
+ if (res.confirm) {
|
|
|
+ uni.reLaunch({
|
|
|
+ url: "/pagesA/loginNew/loginNew"
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ uni.reLaunch({
|
|
|
+ url: "/pagesA/loginNew/loginNew"
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ });
|
|
|
+ }
|
|
|
console.log(response, '接口打印了>>>')
|
|
|
return response; // 正常返回响应
|
|
|
|