Authored by 王水玲

Merge branch 'feature/safe' of git.yoho.cn:fe/yoho-shop-manage into feature/safe

... ... @@ -72,7 +72,7 @@ export default {
}).then(ret => {
if (ret.code === 200) {
this.loading = false;
Vue.prop('needUpdate', void 0);
Vue.$store.remove('needUpdate');
this.$router.push('/');
} else {
this.loading = false;
... ...
... ... @@ -47,8 +47,6 @@ export default {
if (isLogin && user) {
try {
user = crypto.aesDecrypt(user, Object);
Vue.prop('user', user);
Vue.prop('isLogin', true);
return Promise.all([
this.initPurview(Vue, user),
this.initConfig(Vue)
... ... @@ -83,7 +81,7 @@ export default {
}
// 需求修改密码去修改密码
if (Vue.$needUpdate) {
if (Vue.$store.get('needUpdate')) {
return next('/password.html');
}
... ... @@ -129,7 +127,7 @@ export default {
return false;
}
if (status === 403) {
Vue.prop('needUpdate', true);
Vue.$store.set('needUpdate', true);
return false;
}
return true;
... ...
... ... @@ -14,10 +14,9 @@ module.exports = (req, res, next) => {
}
});
}
if (req.session.needUpdate) {
if (req.path === '/Api/erp/update') {
return next();
}
if (req.session.needUpdate &&
req.path !== '/Api/erp/getPurview' &&
req.path !== '/Api/erp/update') {
return res.status(403).json({
code: 403,
message: '抱歉,您暂未修改密码!',
... ...