给管理员增加登录提示

This commit is contained in:
季圣华
2021-08-22 13:30:16 +08:00
parent e9bcdb21b3
commit 2a704dcdb5

View File

@@ -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只是平台运维用户真正的管理员是租户(测试账号为jshadmin不能编辑任何业务数据只能配置平台菜单和创建租户'
this.$message.info(desc,30)
}
}
this.initMPropertyShort(); this.initMPropertyShort();
}, },
cmsFailed(err){ cmsFailed(err){
@@ -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)