|
@@ -84,10 +84,16 @@
|
|
|
<!-- <view class="live_icon">直播</view> -->
|
|
|
</view>
|
|
|
<view class="rights">
|
|
|
-
|
|
|
- <view class="learn_progress">
|
|
|
+ <template
|
|
|
+ v-if="item.gradeStatus == 1 && item.status == 1 && (item.serviceEndTime > sysTime) && (item.serviceStartTime < sysTime) && (item.classEndTime && (item.classEndTime < sysTime)) && (item.periodStatus == 0 || item.periodStatus == -1) && item.studyCount > 0">
|
|
|
+ <view class="enter_into" @click.stop="selectClass(item,index)">
|
|
|
+ 选班重学
|
|
|
+ </view>
|
|
|
+ </template>
|
|
|
+ <view v-else class="learn_progress">
|
|
|
<view class="progress_up">
|
|
|
<!-- <image src="/static/icon/wk_icon3.png" class="wk_icon"></image> -->
|
|
|
+ <!-- 学习进度 (已做试卷+已做节)/(试卷数+节数) -->
|
|
|
<view>
|
|
|
学习进度:{{ item.stuAllNum+item.recordNum }}/{{ item.secAllNum+item.examNum }}
|
|
|
</view>
|
|
@@ -104,6 +110,167 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
+
|
|
|
+ <!-- 不在学习服务期 -->
|
|
|
+ <template v-if="item.serviceStartTime && (sysTime < item.serviceStartTime || sysTime > item.serviceEndTime)">
|
|
|
+ <view class="class-warm" v-if="item.gradeId != 0 && item.gradeStatus == 1">
|
|
|
+ <view class="class-warm__text">
|
|
|
+ <view class="date">
|
|
|
+ 不在学习服务期,不可以学习了哦
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <template v-else>
|
|
|
+ <!-- 班级有效期过了 -->
|
|
|
+ <template v-if="item.classEndTime && (item.classEndTime < sysTime) ">
|
|
|
+ <view class="class-warm">
|
|
|
+ <u-icon class="class-warm__icon" size="30" color="#FF3B30" name="error-circle-fill">
|
|
|
+ </u-icon>
|
|
|
+ <view class="class-warm__text">
|
|
|
+ <view class="date">班级有效期:{{$method.timestampToTime(item.classStartTime,true,true)}} - {{$method.timestampToTime(item.classEndTime,true,true)}}</view>
|
|
|
+ <view class="state">班级状态:已过期,有疑问请联系 <text @click="call()">020-87085982</text></view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <!-- 班级有效期之前 -->
|
|
|
+ <template v-else-if="item.classStartTime && (item.classStartTime > sysTime) ">
|
|
|
+ <view class="class-warm">
|
|
|
+ <u-icon class="class-warm__icon" size="30" color="#FF3B30" name="error-circle-fill">
|
|
|
+ </u-icon>
|
|
|
+ <view class="class-warm__text">
|
|
|
+ <view class="date">班级有效期:{{$method.timestampToTime(item.classStartTime,true,true)}} -
|
|
|
+ {{$method.timestampToTime(item.classEndTime,true,true)}}</view>
|
|
|
+ <view class="state">班级状态:未到学习时间,有疑问请联系 <text @click="call()">020-87085982</text></view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <!-- 在班级有效期之间或者没有班级有效期 -->
|
|
|
+ <template v-else>
|
|
|
+ <view class="class-warm"
|
|
|
+ v-if="item.gradeId != 0 && item.gradeStatus == 1 && item.classStatus != null">
|
|
|
+ <view class="class-warm__text">
|
|
|
+ <view class="date">
|
|
|
+ 班级状态:
|
|
|
+ <text v-if="item.classStatus == 1">已开班</text>
|
|
|
+ <text v-if="item.classStatus == 0">未开班</text>
|
|
|
+ </view>
|
|
|
+ <view class="state" v-if="item.classStatus == 0">教务处正在为您开通班级,请耐心等待</view>
|
|
|
+ <view class="state"
|
|
|
+ v-if="item.classStatus == 1 && item.classStartTime && item.classEndTime">
|
|
|
+ 班级有效期:{{$method.timestampToTime(item.classStartTime,true,true)}}-{{$method.timestampToTime(item.classEndTime,true,true)}}
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <!-- 学时审核状态不可审核 -->
|
|
|
+ <template v-if="item.periodStatus == -1 || item.periodStatus == 2">
|
|
|
+ <view class="class-warm" v-if="item.classStatus == 1 || item.classStatus === null">
|
|
|
+ <view class="class-warm__text">
|
|
|
+ <view class="date">
|
|
|
+ <template
|
|
|
+ v-if="sysTime >= item.serviceStartTime && sysTime <= item.serviceEndTime">
|
|
|
+ 学习状态:
|
|
|
+ <text v-if="item.stuAllNum+item.recordNum == 0">未学习</text>
|
|
|
+ <text
|
|
|
+ v-else-if="item.stuAllNum+item.recordNum > 0 && item.stuAllNum+item.recordNum < item.secAllNum+item.examNum">学习中</text>
|
|
|
+ <text v-else-if="item.stuAllNum+item.recordNum >= item.secAllNum+item.examNum">已学完</text>
|
|
|
+ </template>
|
|
|
+ <template v-else>
|
|
|
+ <template v-if="item.serviceStartTime">已过学习服务期,不可以学习了哦!</template>
|
|
|
+ </template>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <!-- 学时审核状态可以审核 -->
|
|
|
+ <template v-if="item.periodStatus != -1">
|
|
|
+ <view class="class-warm">
|
|
|
+ <view class="class-warm__text">
|
|
|
+ <view class="date">
|
|
|
+ <text v-if="item.periodStatus == 0">机构审核:学时审核不通过</text>
|
|
|
+ <!-- <text v-else-if="item.periodStatus == 2">学时待审核</text> -->
|
|
|
+ <text v-else-if="item.periodStatus == 3">学时审核中</text>
|
|
|
+ <text v-else-if="item.periodStatus == 1">
|
|
|
+ <text v-if="item.periodPlush > 0">学时已上报注册中心</text>
|
|
|
+ <text v-else>机构审核:学时审核通过</text>
|
|
|
+ </text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <view class="class-warm" v-if="item.subscribeId != null && item.periodStatus == 1">
|
|
|
+ <view class="class-warm__text">
|
|
|
+ <view class="date">
|
|
|
+ <view v-if="item.subExamStatus === null">待预约考试</view>
|
|
|
+ <view
|
|
|
+ v-else-if="item.subExamStatus === 0 && sysTime < $method.TimeTotimestamp(
|
|
|
+ $method.timestampToTime(item.subApplySiteExamTime, true) +
|
|
|
+ ' ' +
|
|
|
+ item.subApplySiteStartTime
|
|
|
+ )">
|
|
|
+ 待考试,考试时间:
|
|
|
+ {{
|
|
|
+ $method.timestampToTime(item.subApplySiteExamTime, true) +
|
|
|
+ " " +
|
|
|
+ item.subApplySiteStartTime
|
|
|
+ }}
|
|
|
+ -
|
|
|
+ {{
|
|
|
+ $method.timestampToTime(item.subApplySiteExamTime, true) +
|
|
|
+ " " +
|
|
|
+ item.subApplySiteEndTime
|
|
|
+ }}
|
|
|
+ </view>
|
|
|
+ <view v-else-if="item.subExamStatus === 0">待出考试结果</view>
|
|
|
+ <view v-else-if="item.subExamStatus === 1">
|
|
|
+ <text v-if="item.subResult === null">待出考试结果</text>
|
|
|
+ <text v-if="item.subResult === 0">考试结果:不通过,需补考</text>
|
|
|
+ <text
|
|
|
+ v-else-if="item.subResult === 1">考试结果:通过,考试成绩为{{item.subPerformance}}</text>
|
|
|
+ </view>
|
|
|
+ <view v-else-if="item.subExamStatus === 2">缺考,无成绩,需补考</view>
|
|
|
+ <view v-else-if="item.subExamStatus === 3">作弊,无成绩,需补考</view>
|
|
|
+ <view v-else-if="item.subExamStatus === 4">替考,无成绩,需补考</view>
|
|
|
+
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ </template>
|
|
|
+
|
|
|
+
|
|
|
+ </template>
|
|
|
+ <!-- 预约考试 进入刷题-->
|
|
|
+ <template
|
|
|
+ v-if="item.gradeStatus == 1 && item.status == 1 && (item.serviceEndTime > sysTime) && (item.serviceStartTime < sysTime) && (item.classEndTime && (item.classEndTime < sysTime)) && (item.periodStatus == 0 || item.periodStatus == -1) && item.studyCount > 0">
|
|
|
+ </template>
|
|
|
+ <template v-else>
|
|
|
+ <template v-for="(appoint,appointIndex) in item.examApplyGoodsList">
|
|
|
+ <view class="box_progress" :key="appointIndex" v-if="item.applyStatus === 1 && !( sysTime <= item.serviceStartTime || sysTime >= item.serviceEndTime || (item.classStartTime && sysTime <= item.classStartTime) || (item.classEndTime && sysTime >= item.classEndTime) || item.learningStatus == 2 || item.classStatus == 0 || (item.learningStatus == 3 && sysTime < item.learningTimeStart))">
|
|
|
+ <view style="flex:1;margin-right:10rpx;">
|
|
|
+ <text style="color: #333333;">{{ appoint.applyName }}</text>
|
|
|
+ </view>
|
|
|
+ <view>
|
|
|
+ <u-button :plain="true" type="primary" size="mini" @click.stop="appointment(item,appoint)">预约考试
|
|
|
+ </u-button>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </template>
|
|
|
+ <view class="box_progress" v-if="item.beforeStatus === 1 && !( sysTime <= item.serviceStartTime || sysTime >= item.serviceEndTime || (item.classStartTime && sysTime <= item.classStartTime) || (item.classEndTime && sysTime >= item.classEndTime) || item.learningStatus == 2 || item.classStatus == 0 || (item.learningStatus == 3 && sysTime < item.learningTimeStart))">
|
|
|
+ <view style="flex:1;margin-right:10rpx;">
|
|
|
+ <text style="color: #2979ff;">{{ item.beforeName }}</text>
|
|
|
+ </view>
|
|
|
+ <view>
|
|
|
+ <u-button type="primary" size="mini" @click="appBeforeAddress(item.goodsId,item)">进入刷题</u-button>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </template>
|
|
|
|
|
|
</view>
|
|
|
</view>
|
|
@@ -190,7 +357,7 @@
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
-
|
|
|
+ <!-- 弹窗 -->
|
|
|
<u-popup v-model="selectClassModal" @close="gradeValue = -1" mode="bottom" border-radius="40">
|
|
|
<view class="popup_box">
|
|
|
<view style="margin-bottom: 20rpx;">
|
|
@@ -231,6 +398,7 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</u-popup>
|
|
|
+ <!-- <select-class :selectClassModal.sync="selectClassModal" :gradeList="gradeList" @okPopup="okPopup()" @closeModal="closeModal()"></select-class> -->
|
|
|
|
|
|
<u-modal v-model="showUserConfirmInfo" @confirm="confirmUserConfirm" ref="uModal" :async-close="true"
|
|
|
@cancel="cancelUserConfirm" :confirm-text="'确认' + (confirmCount > 0 ? '('+confirmCount+')' : '')"
|
|
@@ -266,6 +434,7 @@
|
|
|
|
|
|
<script>
|
|
|
var curTime = new Date().getTime() // 当前时间的时间戳
|
|
|
+import {mapGetters,mapActions} from 'vuex'
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
@@ -308,6 +477,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
|
+ ...mapGetters(['userInfo']),
|
|
|
allCourse() {
|
|
|
return this.courseLists.length || this.questionLists.length || this.livingLists.length ? true : false
|
|
|
}
|
|
@@ -322,6 +492,7 @@ export default {
|
|
|
this.sysTime = +this.$method.timest()
|
|
|
},
|
|
|
methods: {
|
|
|
+ ...mapActions(['getUserInfo']),
|
|
|
bgShow(liveTime, watchStatus) {
|
|
|
let value = liveTime * 1000
|
|
|
if (curTime > value) { // 判断当前时间和直播开始时间
|
|
@@ -366,8 +537,8 @@ export default {
|
|
|
getCourseLiveQues() {
|
|
|
this.allLoading = true
|
|
|
let arrs = [
|
|
|
- this.$api.courseGoodsList(this.paramC), // 查询用户拥有的商品/课程列表/course/goodsList
|
|
|
- this.$api.listGoodsUserQuestion(this.paramQ), // 题库列表
|
|
|
+ this.$api.listUserVideoLive(this.paramC), // 查询用户拥有视频+直播商品 /goods/listUserVideoLive
|
|
|
+ this.$api.listUserFreeUnionBuyGoodsList(this.paramQ), // 查询用户拥有免费+自购题库商品 /bank/question/listUserFreeUnionBuyGoodsList
|
|
|
this.$api.getgoodsLiveList({
|
|
|
pageNum: 1,
|
|
|
pageSize: 3 // 默认3条
|
|
@@ -394,22 +565,6 @@ export default {
|
|
|
// this.$u.toast('请重新刷新请求')
|
|
|
})
|
|
|
},
|
|
|
- // 查询用户拥有的商品/课程列表/course/goodsList
|
|
|
- // 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 || []
|
|
|
- // }
|
|
|
- // })
|
|
|
- // },
|
|
|
commonSystemTime() {
|
|
|
return new Promise(resolve => {
|
|
|
this.$api.commonSystemTime().then(res => {
|
|
@@ -648,7 +803,11 @@ export default {
|
|
|
radioGroupChange(e) {
|
|
|
console.log(e)
|
|
|
},
|
|
|
- okPopup() {
|
|
|
+ // closeModal() {
|
|
|
+ // this.selectClassModal = false
|
|
|
+ // },
|
|
|
+ okPopup(value) {
|
|
|
+ // this.gradeValue = value
|
|
|
if (this.gradeValue == -1) {
|
|
|
uni.showToast({
|
|
|
icon: 'none',
|
|
@@ -683,16 +842,105 @@ export default {
|
|
|
* 返回刷新之前进入的课程数据
|
|
|
*/
|
|
|
refreshByIndex() {
|
|
|
- let self = this;
|
|
|
- this.$api.courseGoodsList({
|
|
|
+ this.$api.listUserVideoLive({
|
|
|
pageNum: this.itemIndex + 1,
|
|
|
pageSize: 1
|
|
|
}).then(res => {
|
|
|
if (res.data.code == 200) {
|
|
|
- this.$set(this.goodsList, this.itemIndex, res.data.rows[0])
|
|
|
+ this.$set(this.courseLists, this.itemIndex, res.data.rows[0])
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ confirmUserConfirm() {
|
|
|
+ this.$refs.uModal.clearLoading();
|
|
|
+ if(this.confirmCount <= 0) {
|
|
|
+ if(this.confirmChecked) {
|
|
|
+ let infoJson = {
|
|
|
+ realname:this.userInfo.realname,
|
|
|
+ idCard:this.userInfo.idCard,
|
|
|
+ telphone:this.userInfo.telphone
|
|
|
+ }
|
|
|
+ this.$api.userConfirminfo({
|
|
|
+ orderGoodsId:this.activeItem.orderGoodsId,
|
|
|
+ infoJson:JSON.stringify(infoJson)
|
|
|
+ }).then(res => {
|
|
|
+ if(res.data.data.pushInfo) {
|
|
|
+ uni.showToast({
|
|
|
+ icon:'none',
|
|
|
+ title:'提交成功'
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ uni.showModal({
|
|
|
+ showCancel:false,
|
|
|
+ title:'提示',
|
|
|
+ content:'开通信息推送不成功,无法进入学习,请联系020-87085982!'
|
|
|
+ })
|
|
|
+ }
|
|
|
+ this.showUserConfirmInfo = false;
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ uni.showToast({
|
|
|
+ icon:'none',
|
|
|
+ title:'请勾选确认个人信息无误'
|
|
|
+ })
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ cancelUserConfirm() {
|
|
|
+ clearInterval(this.confirmTimer)
|
|
|
+ },
|
|
|
+ call() {
|
|
|
+ uni.makePhoneCall({
|
|
|
+ phoneNumber: '020-87085982' //仅为示例
|
|
|
+ })
|
|
|
+ },
|
|
|
+ appointment(item,appoint) {
|
|
|
+ var data = {
|
|
|
+ goodsId: item.goodsId,
|
|
|
+ gradeId: item.gradeId,
|
|
|
+ applyId:appoint.applyId,
|
|
|
+ orderGoodsId:item.orderGoodsId
|
|
|
+ };
|
|
|
+ this.$api.getApplysubscribe(data).then(res => {
|
|
|
+ if (res.data.code === 500) {
|
|
|
+ uni.showModal({
|
|
|
+ showCancel: false,
|
|
|
+ content: res.data.msg
|
|
|
+ });
|
|
|
+ }
|
|
|
+ if (res.data.code === 200) {
|
|
|
+ this.$navTo.togo('/pages2/appointment/index', {
|
|
|
+ goodsId: item.goodsId,
|
|
|
+ gradeId: item.gradeId,
|
|
|
+ orderGoodsId: item.orderGoodsId,
|
|
|
+ applyId:appoint.applyId
|
|
|
+ });
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
+ appBeforeAddress(goodsId,item) {
|
|
|
+ this.$api.appBeforeAddress({
|
|
|
+ // goodsId,
|
|
|
+ orderGoodsId:item.orderGoodsId
|
|
|
+ }).then(res => {
|
|
|
+ if (res.data.code == 200) {
|
|
|
+ uni.navigateToMiniProgram({
|
|
|
+ appId: res.data.data.url,
|
|
|
+ success(res) {
|
|
|
+ // 打开成功
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ uni.showModal({
|
|
|
+ title:'提示',
|
|
|
+ content:res.data.msg,
|
|
|
+ showCancel:false,
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
}
|
|
|
}
|
|
|
</script>
|