Bläddra i källkod

Merge branch 'dev' of http://120.79.166.78:19005/zhongzheng-edu/saas_miniprogram into dev

xiexaing 1 år sedan
förälder
incheckning
03b71d9eb5

+ 7 - 0
common/httpList/course.js

@@ -194,6 +194,13 @@ export default {
 		});
 	},
 	
+	orderGetViewSign(data) {
+		return myRequest({
+			url: "/order/getViewSign/"+data,
+			method: "get",
+		});
+	},
+	
 	courseSkipPort(data) {
 		return myRequest({
 			url: "/course/skipPort",

+ 1 - 1
components/myPlayer2/tcPlayer.vue

@@ -86,7 +86,7 @@
 				}
 				const TCPlayer = window.TCPlayer;
 				console.log("腾讯视频是否自动播放", this.autoplay)
-				console.log("腾讯视频是否允许拖拽进度条", this.progressControl)
+				console.log("腾讯视频是否允许拖拽进度条", this.progressControl) 
 				this.$api.tcVideoSign(this.fileId).then(async (res) => {
 							console.log("请求腾讯视频参数", res)
 								let option = {

+ 32 - 24
pages3/polyv/detail.vue

@@ -360,30 +360,7 @@
 				option = JSON.parse(decodeURIComponent(option.obj));
 			}
 			// 请求商品类型并判断是否是小程序环境
-			this.$api.orderGetViewSign(Number(option.orderGoodsId)).then((res) => {
-				this.playSource = res.data.data.viewSign;
-				if (this.playSource == 2) {
-					// #ifdef MP-WEIXIN
-					this.$api
-						.courseSkipPort()
-						.then((res2) => {
-							console.log("详情页请求的域名", res2.data.data.domain, res2.data.data.skipPort)
-							let obj = {
-								skipPort: res2.data.data.skipPort,
-								...option
-							}
-							let webViewUrl = encodeURIComponent(
-								res2.data.data.domain +
-								'/pages3/polyv/detail?obj=' +
-								JSON.stringify(obj))
-							uni.redirectTo({
-								url: `/pages5/webview/detaillink?url=${webViewUrl}`
-							})
-						})
-					return;
-					// #endif
-				}
-			})
+			await this.orderGetViewSign(option)
 			if (option.isOther) {
 				this.showMark = true;
 				return;
@@ -475,6 +452,36 @@
 		mounted() {},
 		methods: {
 			...mapMutations(["updateChapterOpen", "updateLiveLast"]),
+			orderGetViewSign(option) {
+				return new Promise(resolve => {
+					this.$api.orderGetViewSign(Number(option.orderGoodsId)).then((res) => {
+						this.playSource = res.data.data.viewSign;
+						if (this.playSource == 2) {
+							// #ifdef MP-WEIXIN
+							this.$api
+								.courseSkipPort()
+								.then((res2) => {
+									console.log("详情页请求的域名", res2.data.data.domain, res2.data.data
+										.skipPort)
+									let obj = {
+										skipPort: res2.data.data.skipPort,
+										...option
+									}
+									let webViewUrl = encodeURIComponent(
+										res2.data.data.domain +
+										'/pages3/polyv/detail?obj=' +
+										JSON.stringify(obj))
+									uni.redirectTo({
+										url: `/pages5/webview/detaillink?url=${webViewUrl}`
+									})
+								})
+							return;
+							// #endif
+						}
+						resolve()
+					})
+				})
+			},
 			// 进行学习后,保存标识,用于检查是否二建15天提示弹窗弹出
 			saveLoaclCheckClass() {
 				let ary = uni.getStorageSync("loaclCheckClass") || []
@@ -502,6 +509,7 @@
 					this.isAllowSeek = "on";
 					// #endif
 				}
+				console.log("进入:", this.playSource, this.isAllowSeek)
 				this.photoList = [];
 				this.courseList = [];
 				this.photoConfig = false;

+ 1 - 0
pages5/webview/detaillink.vue

@@ -21,6 +21,7 @@
 		},
 		onLoad(option) {
 			this.url = decodeURIComponent(option.url);
+			console.log(this.url,'url')
 			// #ifdef H5
 			metaSetScalable();
 			// #endif