|
|
@ -2,6 +2,14 @@ |
|
|
|
<view class="pageBgImg"> |
|
|
|
<view class="status_bar"></view> |
|
|
|
<view class="card"> |
|
|
|
<view class="cut_row" @click.stop="showRole=true" v-if="list.length>1"> |
|
|
|
<view class="flex-b"> |
|
|
|
<view class="cut_icon"> |
|
|
|
<image src="@/static/images/userCenter/cut.png" mode=""></image> |
|
|
|
</view> |
|
|
|
<view class="cut_text">切换身份</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="qcode" @click="$goPage('/pages/userCenter/scanCode/scanCode')"> |
|
|
|
<image src="@/static/images/coach/ic_erweima.png" mode=""></image> |
|
|
|
</view> |
|
|
@ -19,6 +27,8 @@ |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
<u-action-sheet :actions="list" title="请选择您要登录的角色" :show="showRole" @select="selectClick" ></u-action-sheet> |
|
|
|
|
|
|
|
<UserTab name ='我的'></UserTab> |
|
|
|
</view> |
|
|
|
</template> |
|
|
@ -27,40 +37,66 @@ |
|
|
|
export default { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
tabData: [] |
|
|
|
tabData: [], |
|
|
|
list: [], |
|
|
|
showRole: false |
|
|
|
} |
|
|
|
}, |
|
|
|
onLoad() { |
|
|
|
if(this.identity=='实操教练') { |
|
|
|
this.tabData = [ |
|
|
|
// {text: '待结算记录', icon: require('../../../static/images/coach/ic_daijiesuan.png'), id: 1, url: '/pages/userCenter/settled/settled'}, |
|
|
|
// {text: '指标充值记录', icon: require('../../../static/images/coach/ic_zhibiao.png'), id: 2, url: '/pages/userCenter/indicatorRecharge/indicatorRecharge'}, |
|
|
|
{text: '我的车辆', icon: require('../../../static/images/coach/ic_cheliang.png'), id: 3, url: '/pages/userCenter/myCar/myCar'}, |
|
|
|
{text: '考场信息', icon: require('../../../static/images/coach/ic_changdi.png'), id: 4, url: '/pages/userCenter/examinInfo/examinInfo'}, |
|
|
|
{text: '学员评价', icon: require('../../../static/images/coach/ic_pingjia.png'), id: 5, url: '/pages/userCenter/studentComment/studentComment'}, |
|
|
|
{text: '教学数据', icon: require('../../../static/images/coach/ic_shuju.png'), id: 6, url: '/pages/userCenter/teachingData/teachingData'}, |
|
|
|
// {text: '学员退款', icon: require('../../../static/images/coach/ic_tuikuan.png'), id: 7, url: '/pages/userCenter/refund/refund'}, |
|
|
|
] |
|
|
|
}else if(this.identity=='校长') { |
|
|
|
this.tabData = [ |
|
|
|
{text: '我的车辆', icon: require('../../../static/images/coach/ic_cheliang.png'), id: 3, url: '/pages/userCenter/myCar/myCar'}, |
|
|
|
{text: '教学数据', icon: require('../../../static/images/coach/ic_shuju.png'), id: 6, url: '/pages/userCenter/teachingData/teachingData'}, |
|
|
|
{text: '学员评价', icon: require('../../../static/images/coach/ic_pingjia.png'), id: 5, url: '/pages/userCenter/studentComment/studentComment'}, |
|
|
|
{text: '学员退款', icon: require('../../../static/images/coach/ic_tuikuan.png'), id: 7, url: '/pages/userCenter/refund/refund'}, |
|
|
|
] |
|
|
|
}else if(this.identity=='考场模拟教练') { |
|
|
|
this.tabData = [ |
|
|
|
{text: '我的车辆', icon: require('../../../static/images/coach/ic_cheliang.png'), id: 3, url: '/pages/userCenter/myCar/myCar'}, |
|
|
|
{text: '学员评价', icon: require('../../../static/images/coach/ic_pingjia.png'), id: 5, url: '/pages/userCenter/studentComment/studentComment'}, |
|
|
|
] |
|
|
|
} |
|
|
|
console.log('我的页面') |
|
|
|
|
|
|
|
this.initMenu() |
|
|
|
this.roleListFn() |
|
|
|
}, |
|
|
|
onShow() { |
|
|
|
uni.hideTabBar(); |
|
|
|
this.getIpAddress() |
|
|
|
// this.getIpAddress() |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
initMenu() { |
|
|
|
if(this.identity=='实操教练') { |
|
|
|
this.tabData = [ |
|
|
|
// {text: '待结算记录', icon: require('../../../static/images/coach/ic_daijiesuan.png'), id: 1, url: '/pages/userCenter/settled/settled'}, |
|
|
|
// {text: '指标充值记录', icon: require('../../../static/images/coach/ic_zhibiao.png'), id: 2, url: '/pages/userCenter/indicatorRecharge/indicatorRecharge'}, |
|
|
|
{text: '我的车辆', icon: require('../../../static/images/coach/ic_cheliang.png'), id: 3, url: '/pages/userCenter/myCar/myCar'}, |
|
|
|
{text: '考场信息', icon: require('../../../static/images/coach/ic_changdi.png'), id: 4, url: '/pages/userCenter/examinInfo/examinInfo'}, |
|
|
|
{text: '学员评价', icon: require('../../../static/images/coach/ic_pingjia.png'), id: 5, url: '/pages/userCenter/studentComment/studentComment'}, |
|
|
|
{text: '教学数据', icon: require('../../../static/images/coach/ic_shuju.png'), id: 6, url: '/pages/userCenter/teachingData/teachingData'}, |
|
|
|
// {text: '学员退款', icon: require('../../../static/images/coach/ic_tuikuan.png'), id: 7, url: '/pages/userCenter/refund/refund'}, |
|
|
|
] |
|
|
|
}else if(this.identity=='校长') { |
|
|
|
this.tabData = [ |
|
|
|
{text: '我的车辆', icon: require('../../../static/images/coach/ic_cheliang.png'), id: 3, url: '/pages/userCenter/myCar/myCar'}, |
|
|
|
{text: '教学数据', icon: require('../../../static/images/coach/ic_shuju.png'), id: 6, url: '/pages/userCenter/teachingData/teachingData'}, |
|
|
|
{text: '学员评价', icon: require('../../../static/images/coach/ic_pingjia.png'), id: 5, url: '/pages/userCenter/studentComment/studentComment'}, |
|
|
|
{text: '学员退款', icon: require('../../../static/images/coach/ic_tuikuan.png'), id: 7, url: '/pages/userCenter/refund/refund'}, |
|
|
|
] |
|
|
|
}else if(this.identity=='考场模拟教练') { |
|
|
|
this.tabData = [ |
|
|
|
{text: '我的车辆', icon: require('../../../static/images/coach/ic_cheliang.png'), id: 3, url: '/pages/userCenter/myCar/myCar'}, |
|
|
|
{text: '学员评价', icon: require('../../../static/images/coach/ic_pingjia.png'), id: 5, url: '/pages/userCenter/studentComment/studentComment'}, |
|
|
|
] |
|
|
|
} |
|
|
|
}, |
|
|
|
// 切换角色 |
|
|
|
selectClick(item) { |
|
|
|
this.showRole = false |
|
|
|
this.$store.commit('upDateIdentity', item.name) |
|
|
|
this.initMenu() |
|
|
|
uni.switchTab({ |
|
|
|
url: '/pages/tabbar/index/index' |
|
|
|
}) |
|
|
|
}, |
|
|
|
roleListFn() { |
|
|
|
this.list = [] |
|
|
|
if(this.role.length<=1) return |
|
|
|
let roleObj = this.$store.state.user.vuex_role |
|
|
|
this.role.forEach((item)=>{ |
|
|
|
let obj = { |
|
|
|
name: roleObj[item] |
|
|
|
} |
|
|
|
this.list.push(obj) |
|
|
|
}) |
|
|
|
}, |
|
|
|
goPage() {}, |
|
|
|
|
|
|
|
getIpAddress() { |
|
|
@ -93,9 +129,22 @@ |
|
|
|
width: 76rpx; |
|
|
|
height: 76rpx; |
|
|
|
position: absolute; |
|
|
|
right: 16rpx; |
|
|
|
top: 50%; |
|
|
|
transform: translateY(-50%); |
|
|
|
right: 24rpx; |
|
|
|
bottom: 24rpx; |
|
|
|
} |
|
|
|
.cut_row { |
|
|
|
display: flex; |
|
|
|
justify-content: flex-end; |
|
|
|
margin-bottom: 6rpx; |
|
|
|
.cut_icon { |
|
|
|
width: 24rpx; |
|
|
|
height: 24rpx; |
|
|
|
} |
|
|
|
.cut_text { |
|
|
|
font-size: 24rpx; |
|
|
|
color: $themC; |
|
|
|
margin-left: 5rpx; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|