提交 ec7cbabb3639767140d853be81d13d60133a3b5b

作者 guomingshu
1 个父辈 a79488a6

feat: fix bug

@@ -66,13 +66,13 @@ @@ -66,13 +66,13 @@
66 <view v-else> 66 <view v-else>
67 <view class="name"> 未登录 </view> 67 <view class="name"> 未登录 </view>
68 </view> 68 </view>
69 - <view v-if="doneRolesLength > 1"> 69 + <view v-if="doneRolesName">
70 <view class="identity" @click="handelChange"> 70 <view class="identity" @click="handelChange">
71 <u-icon 71 <u-icon
72 size="32rpx" 72 size="32rpx"
73 :label="doneRolesName" 73 :label="doneRolesName"
74 labelPos="right" 74 labelPos="right"
75 - labelSize="24rpx" 75 + labelSize="28rpx"
76 labelColor="#202131" 76 labelColor="#202131"
77 name="/static/img/home/changeAuth.png" 77 name="/static/img/home/changeAuth.png"
78 ></u-icon> 78 ></u-icon>
@@ -557,6 +557,8 @@ export default { @@ -557,6 +557,8 @@ export default {
557 }, 557 },
558 558
559 handelChange() { 559 handelChange() {
  560 + // 身份切换去除
  561 + return
560 let { roles = [] } = this.teacher; 562 let { roles = [] } = this.teacher;
561 563
562 if (roles.length < 2) { 564 if (roles.length < 2) {

677 Bytes | 宽: | 高:

760 Bytes | 宽: | 高:

  • 两方对比
  • 交换覆盖
  • 透明覆盖
@@ -132,9 +132,9 @@ const store = new Vuex.Store({ @@ -132,9 +132,9 @@ const store = new Vuex.Store({
132 let { 132 let {
133 teacher = {} 133 teacher = {}
134 } = state.vuex_user; 134 } = state.vuex_user;
135 - if (teacher && teacher.roles && teacher.roles.length > 0) {  
136 - let selectRoles = teacher.roles.filter(item => item.id == teacher.roleId);  
137 - return selectRoles[0].name 135 + if (teacher && teacher.roleName) {
  136 + // let selectRoles = teacher.roles.filter(item => item.id == teacher.roleId);
  137 + return teacher.roleName
138 } else { 138 } else {
139 return '' 139 return ''
140 } 140 }
注册登录 后发表评论