Commit 2a704dcd authored by 季圣华's avatar 季圣华
Browse files

给管理员增加登录提示

parent e9bcdb21
...@@ -147,12 +147,18 @@ ...@@ -147,12 +147,18 @@
}) })
} }
}, },
loginSuccess () { loginSuccess (res) {
this.$router.push({ path: "/dashboard/analysis" }) this.$router.push({ path: "/dashboard/analysis" })
this.$notification.success({ this.$notification.success({
message: '欢迎', message: '欢迎',
description: `${timeFix()},欢迎回来`, description: `${timeFix()},欢迎回来`,
}); });
if(res.data && res.data.user) {
if(res.data.user.loginName === 'admin'){
let desc = 'admin只是平台运维用户,真正的管理员是租户(测试账号为jsh),admin不能编辑任何业务数据,只能配置平台菜单和创建租户'
this.$message.info(desc,30)
}
}
this.initMPropertyShort(); this.initMPropertyShort();
}, },
cmsFailed(err){ cmsFailed(err){
...@@ -179,7 +185,7 @@ ...@@ -179,7 +185,7 @@
if(res.data.msgTip == 'user can login'){ if(res.data.msgTip == 'user can login'){
Vue.ls.set('winBtnStrList', res.data.userBtn, 7 * 24 * 60 * 60 * 1000); Vue.ls.set('winBtnStrList', res.data.userBtn, 7 * 24 * 60 * 60 * 1000);
Vue.ls.set('roleType', res.data.roleType, 7 * 24 * 60 * 60 * 1000); Vue.ls.set('roleType', res.data.roleType, 7 * 24 * 60 * 60 * 1000);
this.loginSuccess() this.loginSuccess(res)
} else if(res.data.msgTip == 'user is not exist'){ } else if(res.data.msgTip == 'user is not exist'){
err.message = '用户不存在'; err.message = '用户不存在';
this.requestFailed(err) this.requestFailed(err)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment