|
@@ -24,7 +24,7 @@
|
|
|
</view>
|
|
|
<uni-popup ref="popupRef" :animation="false" :is-mask-click="false"
|
|
|
mask-background-color="rgba(255, 255, 255, 0.6);">
|
|
|
- <view class="course-score-dialog">
|
|
|
+ <view :class="courseClass">
|
|
|
<view class="text-score">{{credit}}</view>
|
|
|
<view class="course-btn-box">
|
|
|
<view @click="goBack" class="return-btn"></view>
|
|
@@ -76,14 +76,16 @@
|
|
|
zhangId: '',
|
|
|
seekTime: '',
|
|
|
jieId: '',
|
|
|
+ courseClass: '',
|
|
|
shipinTitle: '',
|
|
|
cacheZhangInfo: {},
|
|
|
- cacheCurrentZhangIndex:'',
|
|
|
+ cacheCurrentZhangIndex: '',
|
|
|
YouKeContent: '您当前是游客身份,登录后才能浏览内容,现在去登录?'
|
|
|
}
|
|
|
},
|
|
|
components: {
|
|
|
- tipMiddleDialog,svipDialog
|
|
|
+ tipMiddleDialog,
|
|
|
+ svipDialog
|
|
|
},
|
|
|
onLoad(options) {
|
|
|
if (!cacheManager.get('auth')) {
|
|
@@ -116,9 +118,9 @@
|
|
|
toast('数据错误,缓存丢失/ jieId丢失')
|
|
|
return false
|
|
|
}
|
|
|
- this.cacheCurrentZhangIndex = cacheManager.get('auth').currentZhang
|
|
|
+ this.cacheCurrentZhangIndex = cacheManager.get('auth').currentZhang
|
|
|
this.cacheZhangInfo = cacheManager.get('zhangInfo')
|
|
|
-
|
|
|
+
|
|
|
// let zhang = this.cacheZhangInfo.zhangList.find(zhang => zhang.zhangId == this.zhangId);
|
|
|
// if (!zhang) {
|
|
|
// return
|
|
@@ -134,18 +136,18 @@
|
|
|
this.videoId = this.pageData.videoId
|
|
|
this.jieName = this.pageData.jieName
|
|
|
this.credit = this.pageData.credit
|
|
|
- this.progressMarkers = this.pageData.jiedianList||[]
|
|
|
+ this.progressMarkers = this.pageData.jiedianList || []
|
|
|
this.getLive(); //获取播放凭证
|
|
|
},
|
|
|
goNextZhang() {
|
|
|
let that = this
|
|
|
cacheManager.updateObject('auth', {
|
|
|
- currentZhang:this.cacheCurrentZhangIndex+1
|
|
|
+ currentZhang: this.cacheCurrentZhangIndex + 1
|
|
|
})
|
|
|
this.cacheZhangInfo = cacheManager.get('zhangInfo')
|
|
|
- let zhang = this.cacheZhangInfo.zhangList[this.cacheCurrentZhangIndex+1]
|
|
|
+ let zhang = this.cacheZhangInfo.zhangList[this.cacheCurrentZhangIndex + 1]
|
|
|
uni.redirectTo({
|
|
|
- url: '/pages/study/lookShipin?jieId=' + zhang.jieList[0].jieId
|
|
|
+ url: '/pages/study/lookShipin?jieId=' + zhang.jieList[0].jieId
|
|
|
})
|
|
|
},
|
|
|
playEnd(data) {
|
|
@@ -154,15 +156,24 @@
|
|
|
if (AuthCode == 'Visitor') {
|
|
|
return false
|
|
|
} else {
|
|
|
- this.$refs.popupRef.open();
|
|
|
- let req = {
|
|
|
- credit: this.credit,
|
|
|
- jieId: this.jieId,
|
|
|
|
|
|
- }
|
|
|
- videoWancheng(req).then(res => {
|
|
|
+ let currentJieData = cacheManager.getCurrentJieData('zhangInfo', this.cacheCurrentZhangIndex, this.jieId)
|
|
|
+ if (currentJieData.studyFlag == 1) {
|
|
|
+ // 学完一遍
|
|
|
+ this.courseClass = 'course-finish-dialog'
|
|
|
+ this.$refs.popupRef.open();
|
|
|
+ } else {
|
|
|
+ cacheManager.updateJieStatus('zhangInfo', this.cacheCurrentZhangIndex, this.jieId)
|
|
|
+ this.courseClass = 'course-score-dialog'
|
|
|
+ this.$refs.popupRef.open();
|
|
|
+ let req = {
|
|
|
+ credit: this.credit,
|
|
|
+ jieId: this.jieId,
|
|
|
+ }
|
|
|
+ videoWancheng(req).then(res => {
|
|
|
|
|
|
- })
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
},
|
|
@@ -184,7 +195,8 @@
|
|
|
}
|
|
|
// debugger
|
|
|
Number(this.jieId++)
|
|
|
- let currentObject =this.cacheZhangInfo.zhangList[this.cacheCurrentZhangIndex].jieList.find(item => item.jieId == this.jieId);
|
|
|
+ let currentObject = this.cacheZhangInfo.zhangList[this.cacheCurrentZhangIndex].jieList.find(item =>
|
|
|
+ item.jieId == this.jieId);
|
|
|
this.pageData = {
|
|
|
...currentObject
|
|
|
}
|
|
@@ -238,12 +250,14 @@
|
|
|
|
|
|
})
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
|
|
|
},
|
|
|
- svipConfirm(){
|
|
|
- uni.redirectTo({ url: '/pages/pay/svip' })
|
|
|
+ svipConfirm() {
|
|
|
+ uni.redirectTo({
|
|
|
+ url: '/pages/pay/svip'
|
|
|
+ })
|
|
|
},
|
|
|
ykConfirm() {
|
|
|
uni.redirectTo({
|