|
|
@@ -40,8 +40,9 @@ export default function ({ $axios, redirect, req, ...args }) {
|
|
|
const data = res.data;
|
|
|
// 不跳转到login的页面reg list
|
|
|
const excludePath = ['/user/register', '/cert/type/:id', '/type/vip/', '/cert/', '/user/:id'];
|
|
|
+ const includePath = ['/user/register', '/cert/type/:id', '/type/vip/', '/cert/', '/user/:id'];
|
|
|
const needLogin = path => {
|
|
|
- let result = true;
|
|
|
+ let result = false;
|
|
|
excludePath.forEach(reg => {
|
|
|
reg = reg.replace(/:id/, '');
|
|
|
if (RegExp(reg).test(path)) {
|
|
|
@@ -54,9 +55,10 @@ export default function ({ $axios, redirect, req, ...args }) {
|
|
|
if(data.status === 1) {
|
|
|
return res;
|
|
|
} else if(data.status === -99) {
|
|
|
- if (req && req.url && needLogin(req.url)) {
|
|
|
- redirect('/?loginbox=show');
|
|
|
- }
|
|
|
+ console.log(req && req.url)
|
|
|
+ // if (req && req.url && needLogin(req.url)) {
|
|
|
+ // redirect('/?loginbox=show');
|
|
|
+ // }
|
|
|
return res;
|
|
|
} else {
|
|
|
Vue.prototype.$message.error(data.info);
|