修改登录授权的问题
This commit is contained in:
@ -3,7 +3,7 @@ import Vue from 'vue'
|
|||||||
// Vue.use(MpvueRouterPatch)
|
// Vue.use(MpvueRouterPatch)
|
||||||
import {
|
import {
|
||||||
wxappAuth,
|
wxappAuth,
|
||||||
getUser
|
getUserInfo
|
||||||
} from "@/api/user";
|
} from "@/api/user";
|
||||||
import store from "../store";
|
import store from "../store";
|
||||||
import dayjs from "dayjs";
|
import dayjs from "dayjs";
|
||||||
|
@ -65,6 +65,7 @@ function baseRequest(options) {
|
|||||||
if (res.status !== 200) {
|
if (res.status !== 200) {
|
||||||
return Promise.reject({ msg: "请求失败", res, data });
|
return Promise.reject({ msg: "请求失败", res, data });
|
||||||
}
|
}
|
||||||
|
console.log(data.status)
|
||||||
if ([401, 403].indexOf(data.status) !== -1) {
|
if ([401, 403].indexOf(data.status) !== -1) {
|
||||||
handleLoginFailure();
|
handleLoginFailure();
|
||||||
return Promise.reject({ msg: res.data.msg, res, data, toLogin: true });
|
return Promise.reject({ msg: res.data.msg, res, data, toLogin: true });
|
||||||
|
Reference in New Issue
Block a user