Browse Source

新版改版

zjs_project 1 year ago
parent
commit
bfa20c5a2e

+ 13 - 1
src/components/krpanoVideo/index.vue

@@ -141,6 +141,12 @@
 					}else if(type=='canel'){
 						this.stopPetVideo()
 					}
+				}else if(tabIndex==3){
+					if(type=='add'){
+						this.playBgMusic(item.url)
+					}else if(type=='canel'){
+						this.stopBgMusic()
+					}
 				}
 			},
 			playVideo(url){
@@ -171,7 +177,13 @@
 				this.panoramicKrpano.call(`stopPetVideo()`);
 				console.warn("***playSceneName-stopPetVideo***")
 			},
-            panoramic() {
+            playBgMusic(url){
+				this.panoramicKrpano.call(`playBgMusic(${url})`);
+			},
+			stopBgMusic(url){
+				this.panoramicKrpano.call(`closeVoice()`);
+			},
+			panoramic() {
 				console.warn("***panoramicKrpano***",this.videoUrl)
                 this.panoramicKrpano = document.getElementById('panoramic');
 				if(this.bgUrl){

+ 17 - 0
src/components/krpanoVideo/panoramic.xml

@@ -211,6 +211,23 @@
 		    jscall('window.onvideoplay()');
 			<!-- set(hotspot[video].scale, 0.3); -->
 		</action>
+		<action name="playBgMusic">
+		    <!-- 播放背景音乐 -->
+		    ifnot(%2 == true, playsound(bgsnd, %1, true););
+		    if(%2 == true, pausesoundtoggle(bgsnd););
+		</action>
+		<!-- 关闭所有的声音 -->
+		<action name="closeVoice">
+		    pausesoundtoggle(bgsnd);
+		</action>
+		<!-- 播放音乐设置,引入插件 -->
+		<plugin name="soundinterface" 
+		    url="https://dm.static.elab-plus.com/soundinterface.swf"
+		    alturl="https://dm.static.elab-plus.com/soundinterface.js" 
+		    preload="true"
+		    keep="true"
+		    loop="false"
+		    ></plugin>
 		<!-- 引导图加载完成后 -->
 		<!-- <action name="suspendedPlay">
 		    set(hotspot[video].isVideoreadyType, true);

+ 4 - 4
src/components/newBottomCom/viewAI/viewAI.html

@@ -50,16 +50,16 @@
 	</div>
 	<!-- 音乐列表 -->
 	<div class="ai-people" v-else-if="tabIndex==3">
-		<div class="main rows">
-			<div :class="['item', petIndex==idx ? 'active': '']" v-for="(item, idx) in musicList"
+		<div class="main grid-view1">
+			<div :class="['item', musicIndex==idx ? 'active': '']" v-for="(item, idx) in musicList"
 				:key="idx" @click="selectAction(item,idx)">
-				<img class="itemImg" :src="item.icon"/>
+				<img class="itemImg" :src="item.icon?item.icon:'https://dm.static.elab-plus.com/miniProgram/ai-icon.png'"/>
 				<div class="item-name rows justify-center">{{item.value}}</div>
 			</div>
 		</div>
 	</div>
 	<div class="ai-tips">
-		点击添加到场景中,可调整大小和拖动到摆放位置
+		{{tabIndex==0?'点击添加到场景中,可调整大小和拖动到摆放位置':(tabIndex==1?'点击宠物添加到场景中,可调整大小和拖动到摆放位置':(tabIndex==3?'点击音乐添加到场景中':'点击红包添加到场景中,您的朋友将收到你的红包祝福'))}}
 	</div>
 	<div class="ai-bottom rows justify-center" @click.stop="mynavigateFuc">发布全景</div>
 </div>

+ 4 - 3
src/components/newBottomCom/viewAI/viewAI.scss

@@ -28,7 +28,8 @@
 		
 	}
 	.ai-tips{
-		position: relative;
+		position: absolute;
+		bottom: 160px;
 		width: 100%;
 		// padding-left: 40px;
 		font-family: "Verdana";
@@ -36,8 +37,8 @@
 		font-size: 26px;
 		color: #4e4e4e;
 		opacity: 0.5;
-		margin-bottom: 30px;
-		margin-top: 20px;
+		// margin-bottom: 30px;
+		// margin-top: 20px;
 		text-align:center;
 	}
 	.grid-view1 {

+ 10 - 0
src/components/newBottomCom/viewAI/viewAI.vue

@@ -21,6 +21,7 @@
 				selectIndex:-1,
 				peopleIndex:-1,
 				petIndex:-1,
+				musicIndex:-1,
 				specialIndex:0,
 				specialImg:'https://dm.static.elab-plus.com/miniProgram/ai-icon.png',
 			}
@@ -85,6 +86,12 @@
 						this.petIndex = -1;
 						return false
 					}
+				}else if(this.tabIndex==3){
+					if(this.musicIndex == index){//取消选中
+						this.aiPeopleChange(this.musicList[this.musicIndex],'canel')
+						this.musicIndex = -1;
+						return false
+					}
 				}
 				if(this.$parent.repeatFlag == true){
 					Toast({
@@ -98,6 +105,9 @@
 				}else if(this.tabIndex==1){
 					this.petIndex = index;
 					this.aiPeopleChange(this.rightList[this.petIndex],'add')
+				}else if(this.tabIndex==3){
+					this.musicIndex = index;
+					this.aiPeopleChange(this.musicList[this.musicIndex],'add')
 				}
 			},
 			// 获取瀑布流数据

+ 1 - 1
src/pages/webgl_rxdz_krpanovr/webgl_rxdz_krpanovr.html

@@ -14,7 +14,7 @@
 	<div class="slide-mask"></div>
 	<!-- 数字人大小滚动条 -->
 	<div class="slide-view columns rows-between" v-if="tabIndex==0 || tabIndex==1">
-		<div class="slide-tips">{{tabIndex==0?'数字人':'数字宠物'}}<br>大小</div>
+		<div class="slide-tips">{{tabIndex==0?'数字人':'宠物'}}<br>大小</div>
 		<div class="slide-word">放大</div>
 		<el-slider
 			class="rangeview"