Commit f38ea3db authored by 罗超's avatar 罗超

修改部分信息

parent 84360597
......@@ -3,15 +3,15 @@
<view class="course-item" v-if="currentCourse">
<view style="width:287rpx;">
<view class="course-name">
{{ currentCourse.CourseName}}
{{ currentCourse.CourseName?currentCourse.CourseName:'无课程信息'}}
</view>
<van-progress :percentage="calcPercentage(currentCourse)" :show-pivot="false" track-color="#EFEFEF" color="#282828"
stroke-width="5" />
<view class="course-progress">
上课进度 {{currentCourse.CompleteNum}}/{{currentCourse.TotalClassNum}}
上课进度 {{currentCourse.CompleteNum?currentCourse.CompleteNum:0}}/{{currentCourse.TotalClassNum?currentCourse.TotalClassNum:0}}
</view>
<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;">切换课程
</van-button>
</view>
......
<template>
<view class="userCard-box" v-if="currentErpUser">
<view class="index-header-userCard flex" @click="showChange=true">
<view class="userCard-box" >
<view v-if="currentErpUser" class="index-header-userCard flex" @click="showChange=true">
<view class="user-avatar" :style="{background:currentErpUser.bgColor}">
{{currentErpUser.AccountName.substring(0,1)}}
</view>
......@@ -13,9 +13,18 @@
</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
:show="showChange"
round
v-if="currentErpUser"
custom-style="height: 650rpx;width:650rpx"
>
<view class="user-change-box">
......@@ -56,17 +65,20 @@
erpUsers:[],
showChange:false,
});
data.erpUsers=uni.getStorageSync('ErpStus')
data.currentErpUser=uni.getStorageSync('erpUserInfo')
let userInfo=uni.getStorageSync('userInfo')
if(!data.currentErpUser){
data.erpUsers.forEach(x=>{
if(x.ClassInAccount==userInfo.Account){
data.currentErpUser=x
uni.setStorageSync('erpUserInfo',x)
}
})
if(data.erpUsers && data.erpUsers.length>0){
data.currentErpUser=uni.getStorageSync('erpUserInfo')
let userInfo=uni.getStorageSync('userInfo')
if(!data.currentErpUser){
data.erpUsers.forEach(x=>{
if(x.ClassInAccount==userInfo.Account){
data.currentErpUser=x
uni.setStorageSync('erpUserInfo',x)
}
})
}
}
let methods = {
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