Browse Source

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

wangxy 5 tháng trước cách đây
mục cha
commit
c1d0f6ac02
2 tập tin đã thay đổi với 13 bổ sung6 xóa
  1. 3 3
      components/questionJiexi/questionJiexi.vue
  2. 10 3
      pages/study/lookShipin.vue

+ 3 - 3
components/questionJiexi/questionJiexi.vue

@@ -105,7 +105,7 @@
 		mounted() {
 			console.log("renderScript1")
 			// 在适合的生命周期,通过script和link标签引入播放器sdk、css
-			this.loadWebPlayerSDK()
+			
 		},
 		data() {
 			return {
@@ -121,7 +121,7 @@
 			receiveMsg(newValue, oldValue, ownerInstance, instance) {
 				if (newValue) {
 					this.playAuth = newValue
-					this.playAli()
+					this.loadWebPlayerSDK()
 				}
 			},
 			videoIdFun(newValue, oldValue, ownerInstance, instance) {
@@ -222,7 +222,7 @@
 					s_tag.src = 'https://g.alicdn.com/de/prismplayer/2.9.6/aliplayer-min.js';
 					s_tag.charset = 'utf-8';
 					s_tag.onload = () => {
-						//	this.checkValue();
+						this.playAli()
 						resolve();
 					}
 					document.body.appendChild(s_tag);

+ 10 - 3
pages/study/lookShipin.vue

@@ -119,6 +119,8 @@
 				this.cacheZhangInfo = cacheManager.get('zhangInfo')
 
 				let currentObject = this.cacheZhangInfo.jieList.find(item => item.jieId == options.jieId);
+				
+				console.log(currentObject);
 				this.shipinTitle = this.cacheZhangInfo.numberStr + ' ' + this.cacheZhangInfo.zhangName
 
 				this.pageData = {
@@ -244,7 +246,7 @@
 		mounted() {
 			console.log("renderScript1")
 			// 在适合的生命周期,通过script和link标签引入播放器sdk、css
-			this.loadWebPlayerSDK()
+		//	this.loadWebPlayerSDK()
 		},
 		data() {
 			return {
@@ -269,7 +271,8 @@
 				if (newValue) {
 					this.playAuth = ''
 					this.playAuth = newValue
-					this.playAli()
+					this.loadWebPlayerSDK()
+				
 				}
 			},
 			videoIdFun(newValue, oldValue, ownerInstance, instance) {
@@ -329,6 +332,9 @@
 				// console.log(this.videoId);
 				// console.log(this.playAuth);
 				//配置播放器
+				if(!this.playAuth){
+					return false;
+				}
 				var player = new Aliplayer({
 					id: "wgy-player-test",
 					"vid": this.videoId,
@@ -408,7 +414,8 @@
 					s_tag.src = 'https://g.alicdn.com/de/prismplayer/2.9.6/aliplayer-min.js';
 					s_tag.charset = 'utf-8';
 					s_tag.onload = () => {
-						//	this.playAli()
+					//	console.log(this.playAuth);
+						this.playAli()
 						resolve();
 					}
 					document.body.appendChild(s_tag);