|
@@ -190,6 +190,77 @@
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
+
|
|
|
+ <u-popup v-model="selectClassModal" @close="gradeValue = -1" mode="bottom" border-radius="40">
|
|
|
+ <view class="popup_box">
|
|
|
+ <view style="margin-bottom: 20rpx;">
|
|
|
+ <view class="line1"></view>
|
|
|
+ <view class="grade">选择班级</view>
|
|
|
+ </view>
|
|
|
+ <u-line color="#D6D6DB" />
|
|
|
+ <view>
|
|
|
+ <scroll-view scroll-y="true" style="height: 500rpx;">
|
|
|
+ <view>
|
|
|
+ <u-radio-group v-model="gradeValue" @change="radioGroupChange">
|
|
|
+ <view v-for="(item, index) in gradeList" :key="index">
|
|
|
+ <view style="display: flex;align-items: center;padding: 20rpx;">
|
|
|
+ <view>
|
|
|
+ <u-radio shape="circle" :name="index"
|
|
|
+ :disabled="item.studentNum > 0 && item.studentNum == item.studentUpper">
|
|
|
+ <view :class="item.checked?'white-box blue-box':'white-box'">
|
|
|
+ <view>
|
|
|
+ <view class="blackTxt">{{item.className}}</view>
|
|
|
+ <view class="redTxt" v-if="item.classEndTime">
|
|
|
+ 有效期至:{{$method.timestampToTime(item.classEndTime,true,true)}}
|
|
|
+ </view>
|
|
|
+ <view class="redTxt" v-if="item.classEndTime">
|
|
|
+ 本班还剩{{$method.GetRTime(item.classEndTime)}}天将结束学习</view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </u-radio>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </u-radio-group>
|
|
|
+ </view>
|
|
|
+ </scroll-view>
|
|
|
+ </view>
|
|
|
+ <view class="confrim-btn">
|
|
|
+ <view class="okBtn" @click="okPopup()">确定</view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </u-popup>
|
|
|
+
|
|
|
+ <u-modal v-model="showUserConfirmInfo" @confirm="confirmUserConfirm" ref="uModal" :async-close="true"
|
|
|
+ @cancel="cancelUserConfirm" :confirm-text="'确认' + (confirmCount > 0 ? '('+confirmCount+')' : '')"
|
|
|
+ :confirm-color="confirmCount > 0 ? '#999' : '#2979ff'" class="confirm-modal" title="实名验证确认"
|
|
|
+ cancel="取消" :show-cancel-button="true">
|
|
|
+ <view class="slot-content">
|
|
|
+ <view class="content">
|
|
|
+ 为避免个人信息不正确导致您的学习时长无效,请认真核对以下信息是否正确,如信息有误请取消当前操作,立刻联系020-38946666
|
|
|
+
|
|
|
+ <view class="msg-list">
|
|
|
+ <view class="item">
|
|
|
+ <text class="item__left">姓名:</text>
|
|
|
+ <text class="item__right">{{userInfo.realname}}</text>
|
|
|
+ </view>
|
|
|
+ <view class="item">
|
|
|
+ <text class="item__left">手机号:</text>
|
|
|
+ <text class="item__right">{{userInfo.telphone}}</text>
|
|
|
+ </view>
|
|
|
+ <view class="item">
|
|
|
+ <text class="item__left">身份号:</text>
|
|
|
+ <text class="item__right">{{userInfo.idCard}}</text>
|
|
|
+ </view>
|
|
|
+ <view class="item">
|
|
|
+ <u-checkbox v-model="confirmChecked" :label-disabled="false">确认个人信息无误</u-checkbox>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ </view>
|
|
|
+ </u-modal>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
@@ -214,14 +285,14 @@ export default {
|
|
|
gradeList: [],
|
|
|
gradeValue: -1,
|
|
|
sysTime: 0,
|
|
|
- courseLists: [],
|
|
|
- questionLists: [], // 题库
|
|
|
+ courseLists: [], // 课程列表
|
|
|
+ questionLists: [], // 题库列表
|
|
|
paramQ: {
|
|
|
pageNum: 1,
|
|
|
pageSize: 50
|
|
|
},
|
|
|
queitemIndex:'',
|
|
|
- livingLists: [],
|
|
|
+ livingLists: [], // 直播列表
|
|
|
allLoading: false, // 加载样式
|
|
|
}
|
|
|
},
|
|
@@ -238,7 +309,7 @@ export default {
|
|
|
},
|
|
|
computed: {
|
|
|
allCourse() {
|
|
|
- return this.courseLists.length || this.gradeList.length || this.livingLists.length ? true : false
|
|
|
+ return this.courseLists.length || this.questionLists.length || this.livingLists.length ? true : false
|
|
|
}
|
|
|
},
|
|
|
onLoad() {
|
|
@@ -324,21 +395,21 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
// 查询用户拥有的商品/课程列表/course/goodsList
|
|
|
- getcourseList() {
|
|
|
- this.$api.courseGoodsList(this.paramC).then(res => {
|
|
|
- if (res.data.code == 200) {
|
|
|
- this.courseLists = res.data.rows || []
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
+ // getcourseList() {
|
|
|
+ // this.$api.courseGoodsList(this.paramC).then(res => {
|
|
|
+ // if (res.data.code == 200) {
|
|
|
+ // this.courseLists = res.data.rows || []
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // },
|
|
|
// 题库列表
|
|
|
- getlistQuestion() {
|
|
|
- this.$api.listGoodsUserQuestion(this.paramQ).then(res => {
|
|
|
- if (res.data.code == 200) {
|
|
|
- this.questionLists = res.data.rows || []
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
+ // getlistQuestion() {
|
|
|
+ // this.$api.listGoodsUserQuestion(this.paramQ).then(res => {
|
|
|
+ // if (res.data.code == 200) {
|
|
|
+ // this.questionLists = res.data.rows || []
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // },
|
|
|
commonSystemTime() {
|
|
|
return new Promise(resolve => {
|
|
|
this.$api.commonSystemTime().then(res => {
|
|
@@ -408,6 +479,25 @@ export default {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
+ var confirmDetail = true;
|
|
|
+ if (item.educationName == '继续教育') {
|
|
|
+ if(item.officialName && item.businessName == '二级' && item.projectName == '建造师') {
|
|
|
+ confirmDetail = await this.userConfirmInfoDetail()
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if(!confirmDetail) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ this.itemIndex = index
|
|
|
+ if (item.gradeStatus == 1 && item.status == 1 && (item.serviceEndTime > this.sysTime) && (item
|
|
|
+ .classEndTime && (item.classEndTime < this.sysTime)) && (item.periodStatus == 0 || item
|
|
|
+ .periodStatus == -1) && item.studyCount > 0) {
|
|
|
+ this.selectClass(item, index)
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
// /course/goodsRebuildStatus查询用户商品重修状态
|
|
|
let rebuildStatus = await this.courseGoodsRebuildStatus(item.goodsId, item.gradeId)
|
|
|
|
|
@@ -555,6 +645,54 @@ export default {
|
|
|
url:'/pages2/bank/question_detail?id='+item.goodsId+'&orderGoodsId='+item.orderGoodsId
|
|
|
})
|
|
|
},
|
|
|
+ radioGroupChange(e) {
|
|
|
+ console.log(e)
|
|
|
+ },
|
|
|
+ okPopup() {
|
|
|
+ if (this.gradeValue == -1) {
|
|
|
+ uni.showToast({
|
|
|
+ icon: 'none',
|
|
|
+ title: '请选择班级'
|
|
|
+ })
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ this.$api.changeGrade({
|
|
|
+ goodsId: this.selectItem.goodsId,
|
|
|
+ gradeId: this.gradeValue,
|
|
|
+ oldGradeId: this.selectItem.gradeId,
|
|
|
+ orderGoodsId: this.selectItem.orderGoodsId,
|
|
|
+ userId: this.selectItem.userId
|
|
|
+ }).then(res => {
|
|
|
+ if (res.data.code == 200) {
|
|
|
+ if (this.itemIndex !== '') {
|
|
|
+ this.refreshByIndex();
|
|
|
+ }
|
|
|
+ this.selectClassModal = false;
|
|
|
+ uni.showToast({
|
|
|
+ title: '选班成功'
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ uni.showToast({
|
|
|
+ icon: 'none',
|
|
|
+ title: res.data.msg
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ /**
|
|
|
+ * 返回刷新之前进入的课程数据
|
|
|
+ */
|
|
|
+ refreshByIndex() {
|
|
|
+ let self = this;
|
|
|
+ this.$api.courseGoodsList({
|
|
|
+ pageNum: this.itemIndex + 1,
|
|
|
+ pageSize: 1
|
|
|
+ }).then(res => {
|
|
|
+ if (res.data.code == 200) {
|
|
|
+ this.$set(this.goodsList, this.itemIndex, res.data.rows[0])
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
}
|
|
|
}
|
|
|
</script>
|