Commit f38ea3db authored by 罗超's avatar 罗超

修改部分信息

parent 84360597
...@@ -3,15 +3,15 @@ ...@@ -3,15 +3,15 @@
<view class="course-item" v-if="currentCourse"> <view class="course-item" v-if="currentCourse">
<view style="width:287rpx;"> <view style="width:287rpx;">
<view class="course-name"> <view class="course-name">
{{ currentCourse.CourseName}} {{ currentCourse.CourseName?currentCourse.CourseName:'无课程信息'}}
</view> </view>
<van-progress :percentage="calcPercentage(currentCourse)" :show-pivot="false" track-color="#EFEFEF" color="#282828" <van-progress :percentage="calcPercentage(currentCourse)" :show-pivot="false" track-color="#EFEFEF" color="#282828"
stroke-width="5" /> stroke-width="5" />
<view class="course-progress"> <view class="course-progress">
上课进度 {{currentCourse.CompleteNum}}/{{currentCourse.TotalClassNum}} 上课进度 {{currentCourse.CompleteNum?currentCourse.CompleteNum:0}}/{{currentCourse.TotalClassNum?currentCourse.TotalClassNum:0}}
</view> </view>
<view class="course-opera"> <view class="course-opera">
<van-button @click="exchangeItemHandler" class-prefix="iconfont" icon=" icon-qiehuan1" round type="default" size="mini" <van-button @click="exchangeItemHandler" v-if="currentCourse.CourseName" class-prefix="iconfont" icon=" icon-qiehuan1" round type="default" size="mini"
custom-style="color:#E23B4A;font-size: 24rpx;padding-left:10rpx;padding-right:10px;">切换课程 custom-style="color:#E23B4A;font-size: 24rpx;padding-left:10rpx;padding-right:10px;">切换课程
</van-button> </van-button>
</view> </view>
......
<template> <template>
<view class="userCard-box" v-if="currentErpUser"> <view class="userCard-box" >
<view class="index-header-userCard flex" @click="showChange=true"> <view v-if="currentErpUser" class="index-header-userCard flex" @click="showChange=true">
<view class="user-avatar" :style="{background:currentErpUser.bgColor}"> <view class="user-avatar" :style="{background:currentErpUser.bgColor}">
{{currentErpUser.AccountName.substring(0,1)}} {{currentErpUser.AccountName.substring(0,1)}}
</view> </view>
...@@ -13,9 +13,18 @@ ...@@ -13,9 +13,18 @@
</view> </view>
</view> </view>
</view> </view>
<view v-else class="index-header-userCard flex">
<view class="user-avatar" style="background-color: gray;"></view>
<view>
<view class="user-change-text">
点击进行关联账号绑定
</view>
</view>
</view>
<van-popup <van-popup
:show="showChange" :show="showChange"
round round
v-if="currentErpUser"
custom-style="height: 650rpx;width:650rpx" custom-style="height: 650rpx;width:650rpx"
> >
<view class="user-change-box"> <view class="user-change-box">
...@@ -56,17 +65,20 @@ ...@@ -56,17 +65,20 @@
erpUsers:[], erpUsers:[],
showChange:false, showChange:false,
}); });
data.erpUsers=uni.getStorageSync('ErpStus') data.erpUsers=uni.getStorageSync('ErpStus')
data.currentErpUser=uni.getStorageSync('erpUserInfo') if(data.erpUsers && data.erpUsers.length>0){
let userInfo=uni.getStorageSync('userInfo') data.currentErpUser=uni.getStorageSync('erpUserInfo')
if(!data.currentErpUser){ let userInfo=uni.getStorageSync('userInfo')
data.erpUsers.forEach(x=>{ if(!data.currentErpUser){
if(x.ClassInAccount==userInfo.Account){ data.erpUsers.forEach(x=>{
data.currentErpUser=x if(x.ClassInAccount==userInfo.Account){
uni.setStorageSync('erpUserInfo',x) data.currentErpUser=x
} uni.setStorageSync('erpUserInfo',x)
}) }
})
}
} }
let methods = { let methods = {
closeChangeUserHandler(){ closeChangeUserHandler(){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment