|
@@ -25,7 +25,7 @@
|
|
|
<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="text-score">20</view>
|
|
|
+ <view class="text-score">{{credit}}</view>
|
|
|
<view class="course-btn-box">
|
|
|
<view @click="goBack" class="return-btn"></view>
|
|
|
<view @click="goNext" class="continue-btn"></view>
|
|
@@ -48,6 +48,7 @@
|
|
|
import {
|
|
|
getVideoAuth,
|
|
|
getVideoAuthYk,
|
|
|
+ videoWancheng
|
|
|
} from "@/api/shipin.js"
|
|
|
import tipMiddleDialog from '@/components/dialog/tipMiddleDialog.vue';
|
|
|
import {
|
|
@@ -68,6 +69,7 @@
|
|
|
hideFlag: 'show',
|
|
|
videoId: "", //阿里云视频id
|
|
|
cardId: '',
|
|
|
+ credit: '',
|
|
|
nianji: '',
|
|
|
zhangId: '',
|
|
|
seekTime: '',
|
|
@@ -82,12 +84,7 @@
|
|
|
},
|
|
|
onLoad(options) {
|
|
|
if (!cacheManager.get('auth')) {
|
|
|
- console.log(
|
|
|
- JSON.parse( options.youkePageData)
|
|
|
-
|
|
|
- );
|
|
|
const youkeData = JSON.parse( options.youkePageData)
|
|
|
-
|
|
|
// 游客
|
|
|
this.videoId = youkeData.jieList[0].videoId
|
|
|
this.nianji = youkeData.nianji
|
|
@@ -129,6 +126,7 @@
|
|
|
console.log(this.pageData);
|
|
|
this.videoId = this.pageData.videoId
|
|
|
this.jieName = this.pageData.jieName
|
|
|
+ this.credit = this.pageData.credit
|
|
|
this.progressMarkers = this.pageData.jiedianList
|
|
|
this.getLive(); //获取播放凭证
|
|
|
},
|
|
@@ -159,7 +157,22 @@
|
|
|
})
|
|
|
},
|
|
|
playEnd(data) {
|
|
|
- this.$refs.popupRef.open();
|
|
|
+ const AuthCode = getUserIdentity();
|
|
|
+ console.log(AuthCode);
|
|
|
+ if(AuthCode =='Visitor'){
|
|
|
+ return false
|
|
|
+ }else {
|
|
|
+ this.$refs.popupRef.open();
|
|
|
+ let req = {
|
|
|
+ credit:this.credit,
|
|
|
+ jieId:this.jieId,
|
|
|
+
|
|
|
+ }
|
|
|
+ videoWancheng(req).then(res=>{
|
|
|
+
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
},
|
|
|
goBack() {
|
|
|
this.$refs.popupRef.close();
|
|
@@ -177,8 +190,13 @@
|
|
|
toast("请前往付费!")
|
|
|
return false
|
|
|
}
|
|
|
-
|
|
|
+ // debugger
|
|
|
Number(this.jieId++)
|
|
|
+
|
|
|
+ let currentObject = this.cacheZhangInfo.jieList.find(item => item.jieId == this.jieId);
|
|
|
+ this.pageData = {
|
|
|
+ ...currentObject
|
|
|
+ }
|
|
|
// lastFlag是否是本章最后一节,0否1是 type,1视频,2试题
|
|
|
if (this.pageData.lastFlag == 1 && this.pageData.type == 2) {
|
|
|
uni.redirectTo({
|