限制只有教师角色才显示做市商角色切换下拉框

master
Qian 4 years ago
parent f1bc15c42d
commit 4ea9391e3d
  1. 8
      src/components/common/header.vue
  2. 5
      src/pages/yyyflogin.vue

@ -184,7 +184,10 @@
</el-dropdown>
</li>
<!-- 角色切换-->
<li class="menu-item" v-if="userData != '' && userData != undefined">
<li
class="menu-item"
v-if="userData != '' && userData != undefined && isTeacher == true"
>
<el-dropdown
@command="switchRole"
trigger="click"
@ -337,6 +340,8 @@ export default {
mins: 0,
sec: 0,
setIntervalInt: 0,
//
isTeacher: false,
};
},
@ -364,6 +369,7 @@ export default {
},
});
} else {
this.isTeacher = localStorage.getItem('userType') == 1 ? true : false;
//
this.reqType = localStorage.getItem('reqType');
//

@ -21,6 +21,8 @@ export default {
pass: null,
//0 1 2
reqType: null,
//:012
userType: null,
};
},
@ -29,6 +31,7 @@ export default {
this.startLoading();
let params = this.parseUrl();
this.reqType = params.reqType;
this.userType = params.userType;
//
if (
!$.isEmptyObject(params) &&
@ -144,6 +147,8 @@ export default {
//0 1 2
localStorage.setItem('reqType', self.reqType);
//
localStorage.setItem('userType', self.userType);
if (self.reqType == 0) {
//
localStorage.setItem('remainingTime', res.data.data.remainingTime);

Loading…
Cancel
Save