Ver código fonte

Merge remote-tracking branch 'origin/2024鹅状元' into 2024鹅状元

# Conflicts:
#	pages/my/telDialog.vue
wangxy 4 meses atrás
pai
commit
aa5f8a0f31
3 arquivos alterados com 41 adições e 12 exclusões
  1. 12 0
      api/shipin.js
  2. 3 4
      pages/my/telDialog.vue
  3. 26 8
      pages/study/lookShipin.vue

+ 12 - 0
api/shipin.js

@@ -24,3 +24,15 @@ export function getVideoAuthYk(data = {}) {
     timeout: 20000
   })
 }
+
+export function videoWancheng(data = {}) {
+  return request({
+    'url': '/app/user/wancheng',
+    headers: {
+      isToken: true
+    },
+    method: 'post',
+    data,
+    timeout: 20000
+  })
+}

+ 3 - 4
pages/my/telDialog.vue

@@ -104,8 +104,7 @@
 				if (this.bindObj.isDisabled === true) {
 					toast("请输入正确的手机号!")
 					return
-				} else {
-					console.log(this.sliderObj)
+				}else{
 					this.startCountdown();
 					this.getMessage();
 					this.myflag++;
@@ -272,8 +271,8 @@
 					ownerInstance.callMethod('receiveRenderData', {
 						sessionId: this.sessionId,
 						sig: this.sig,
-						token: this.token,
-					});
+						token: this.token
+					})
 				} else {
 					toast("请先完成滑块验证!")
 				}

+ 26 - 8
pages/study/lookShipin.vue

@@ -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({