优化:商户登录 区分商户类别 禁止跨类别登录
This commit is contained in:
parent
151ce626ce
commit
2b1531a213
|
|
@ -73,7 +73,8 @@ export default {
|
|||
login_bg: '',
|
||||
loginInfo:{
|
||||
account: '',
|
||||
password: ''
|
||||
password: '',
|
||||
merchant_type: '',
|
||||
},
|
||||
// 当前时间戳
|
||||
intervalId: '',
|
||||
|
|
@ -85,6 +86,17 @@ export default {
|
|||
},
|
||||
onLoad: function(options) {
|
||||
this.is_sys = options.is_sys;
|
||||
// merchant_type:商户类别:0=普通商户,1=酒道馆,2=供应商,3=烟酒店,4=超市,5=省公司门店,6=城市会客厅,7=惠民健康体检馆
|
||||
// is_sys:0=商户管理,1=平台管理,2=酒道馆管理,3=烟酒店管理,4=超市,5=省公司门店,6=城市会客厅管理,7=惠民健康体检馆管理
|
||||
switch (Number(this.is_sys)) {
|
||||
case 0:this.loginInfo.merchant_type = 0;break;// 商户管理
|
||||
case 2:this.loginInfo.merchant_type = 1;break;// 酒道馆管理
|
||||
case 3:this.loginInfo.merchant_type = 3;break;// 烟酒店管理
|
||||
case 4:this.loginInfo.merchant_type = 4;break;// 超市
|
||||
case 5:this.loginInfo.merchant_type = 5;break;// 省公司门店
|
||||
case 6:this.loginInfo.merchant_type = 6;break;// 城市会客厅管理
|
||||
case 7:this.loginInfo.merchant_type = 7;break;// 惠民健康体检馆管理
|
||||
}
|
||||
// 设置页面标题
|
||||
this.pageTitle = this.$util.getIsSysText(this.is_sys);
|
||||
uni.setNavigationBarTitle({
|
||||
|
|
@ -173,6 +185,12 @@ export default {
|
|||
// 登录弹框 - 关闭
|
||||
loginPopupClose(){
|
||||
this.$refs.loginPopup.close();
|
||||
// 判断:没有历史账号时 返回个人中心
|
||||
if(Object.values(this.loginHistory).length <= 0){
|
||||
uni.switchTab({
|
||||
url: '/pages/user/index',
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue