gemercheung 2 éve
szülő
commit
591bbbdf66

+ 1 - 1
packages/qjkankan-editor/.env.testprod

@@ -7,4 +7,4 @@ VUE_APP_PROXY_URL_ROOT='https://test.4dkankan.com'
 VUE_APP_PROXY_URL='https://test.4dkankan.com/qjkankan/'
 VUE_APP_ORIGIN=
 VUE_APP_URL_FILL=/qjkankan
-VUE_APP_DEBBUG_FLAG=0515-01
+VUE_APP_DEBBUG_FLAG=0525-01

+ 1 - 1
packages/qjkankan-editor/someData.json

@@ -39,7 +39,7 @@
   "remindTime": 1,
   "status": 0,
   "isShowOpeningAnimation": false,
-  "openingAnimationType": "opa1",
+  "openingAnimationType": 1,
   "backgroundMusic": {
     "id": "",
     "name": "",

+ 23 - 8
packages/qjkankan-editor/src/views/base/openingAnimationSettings.vue

@@ -20,18 +20,16 @@
           :class="{ 'active-opening-type': info.openingAnimationType === item }"
           @click="info.openingAnimationType = item"
         >
-          {{ $i18n.t(`baseSetting.${item}`) }}
+          {{ $i18n.t(`baseSetting.opa${item}`) }}
         </button>
       </div>
       <div class="video-wrapper">
         <video
           ref="opvideo"
           :src="
-            require(`@/assets/videos/${
-              !info.openingAnimationType.match(/[\u3400-\u9FBF]/)
-                ? info.openingAnimationType
-                : 'opa1'
-            }_x264.mp4`)
+            require(`@/assets/videos/opa${fallbackOpeningAnimationType(
+              info.openingAnimationType
+            )}_x264.mp4`)
           "
           autoplay
           loop
@@ -63,7 +61,8 @@ export default {
       //   '水平巡游开场',
       //   '水晶球开场',
       // ],
-      openingTypeList: ["opa1", "opa2", "opa3", "opa4", "opa5"],
+      openingTypeList: [1, 2, 3, 4, 5],
+
       playing: true,
     };
   },
@@ -71,6 +70,18 @@ export default {
     ...mapGetters({
       info: "info",
     }),
+    fallbackOpeningAnimationType() {
+      return (val) => {
+        if (
+          !val ||
+          (typeof val === "string" && String(val).match(/[\u3400-\u9FBF]/))
+        ) {
+          return 1;
+        } else {
+          return val;
+        }
+      };
+    },
   },
   methods: {
     bofang() {
@@ -84,7 +95,11 @@ export default {
     if (this.info.isShowOpeningAnimation === undefined) {
       this.$set(this.info, "isShowOpeningAnimation", false);
     }
-    if (!this.info.openingAnimationType) {
+    if (
+      !this.info.openingAnimationType ||
+      (typeof this.info.openingAnimationType === "string" &&
+        this.info.openingAnimationType.match(/[\u3400-\u9FBF]/))
+    ) {
       this.$set(this.info, "openingAnimationType", this.openingTypeList[0]);
     }
 

+ 1 - 1
packages/qjkankan-view/package.json

@@ -1,6 +1,6 @@
 {
   "name": "@qjkankan/view",
-  "version": "1.2.0",
+  "version": "1.4.0",
   "private": true,
   "scripts": {
     "serve": "vue-cli-service serve --mode testdev",

+ 37 - 36
packages/qjkankan-view/public/showviewer/lib/krpano/skin/vtourskin.xml

@@ -430,21 +430,9 @@
 			); ););
 		);
 
-    if(%1 == 2,
-				<!-- 水平巡游开场 -->
-			copy(view.hlookat, get(lp_hlookat));
-			sub(view.hlookat, 360);
-			set(events[lp_events].onpreviewcomplete,
-			delayedcall(1,
-			if(lp_scene === xml.scene,
-			set(control.usercontrol, off);
-							tween(view.hlookat, get(lp_hlookat),
-			12.0, easeInOutSine,
-			animationComplete();
-			););););
-		);
+ 
 
-    if(%1 == 3,
+    if(%1 == 2,
 				<!-- 小行星巡游 -->
 			set(view.fov, 70);
 			set(view.vlookat, -40);
@@ -457,15 +445,42 @@
 			tween(view.fov, 150.0, 7.5, easeInOutSine);
 			delayedcall(animation2_1,7.6,
 			tween(view.fisheye, 0.0,3);
-									tween(view.vlookat, get(lp_vlookat), 3, easeInOutSine);
-									tween(view.fov, get(lp_fov), 3, easeInOutSine,
-											animationComplete();
-									);
-							);
-					);
+			tween(view.vlookat, get(lp_vlookat), 3, easeInOutSine);
+			tween(view.fov, get(lp_fov), 3, easeInOutSine,animationComplete(););
+			);
+		 );
+	);
+    if(%1 == 3,
+					<!-- 小行星缩放开场 -->
+				set(view.fov, 150);
+				set(view.vlookat, -65);
+				set(view.hlookat, get(lp_hlookat));
+				add(view.hlookat, 360);
+				tween(view.vlookat, 90.0, 9.5, easeInOutSine);
+				tween(view.hlookat, get(lp_hlookat), 9.5, easeInOutSine);
+				delayedcall(animation3_0,9.6,
+				tween(view.fisheye, 0.0,3);
+				tween(view.fov, get(lp_fov), 3, easeInOutSine);
+				delayedcall(0.5, tween(view.vlookat, get(lp_vlookat), 2.5, easeInOutSine););
+				delayedcall(0.1,animationComplete(););
+				);
 		);
 
-    if(%1 == 4,
+   	if(%1 == 4,
+				<!-- 水平巡游开场 -->
+			copy(view.hlookat, get(lp_hlookat));
+			sub(view.hlookat, 360);
+			set(events[lp_events].onpreviewcomplete,
+			delayedcall(1,
+			if(lp_scene === xml.scene,
+			set(control.usercontrol, off);
+							tween(view.hlookat, get(lp_hlookat),
+			12.0, easeInOutSine,
+			animationComplete();
+			););););
+		);
+
+    if(%1 == 5,
 						<!-- 水晶球开场 -->
 				set(view.fov, 110);
 				set(view.hlookat, get(lp_hlookat));
@@ -482,21 +497,7 @@
 				animationComplete(););
 		);
 
-    if(%1 == 5,
-					<!-- 小行星缩放开场 -->
-				set(view.fov, 150);
-				set(view.vlookat, -65);
-				set(view.hlookat, get(lp_hlookat));
-				add(view.hlookat, 360);
-						tween(view.vlookat, 90.0, 9.5, easeInOutSine);
-						tween(view.hlookat, get(lp_hlookat), 9.5, easeInOutSine);
-						delayedcall(animation3_0,9.6,
-				tween(view.fisheye, 0.0,3);
-				tween(view.fov, get(lp_fov), 3, easeInOutSine);
-				delayedcall(0.5, tween(view.vlookat, get(lp_vlookat), 2.5, easeInOutSine););
-				delayedcall(0.1,animationComplete(););
-				);
-		);
+ 
 
 	</action>
 

+ 10 - 8
packages/qjkankan-view/src/pages/show.vue

@@ -41,13 +41,13 @@ import { useApp } from "@/app";
 import { useI18n, getLocale } from "@/i18n";
 const { t } = useI18n({ useScope: "global" });
 
-const fixOpening = {
-  opa1: 1,
-  opa2: 2,
-  opa3: 3,
-  opa4: 4,
-  opa5: 5,
-};
+// const fixOpening = {
+//   opa1: 1,
+//   opa2: 2,
+//   opa3: 3,
+//   opa4: 4,
+//   opa5: 5,
+// };
 
 const store = useStore();
 const show = ref(false);
@@ -190,7 +190,9 @@ onMounted(async () => {
           : 0,
         "autorotate.enabled": !!data.isAuto,
         "skin_settings.littleplanetintro":
-          fixOpening[data.openingAnimationType] || 1,
+          typeof data.openingAnimationType === "number"
+            ? data.openingAnimationType
+            : 1,
         "skin_settings.lptswitch": unref(isShowOpeningAnimation),
       },
       passQueryParameters: true,

+ 3 - 1
packages/qjkankan-view/src/pages/showMobile.vue

@@ -187,7 +187,9 @@ onMounted(async () => {
           : 0,
         "autorotate.enabled": !!data.isAuto,
         "skin_settings.littleplanetintro":
-          fixOpening[data.openingAnimationType] || 1,
+          typeof data.openingAnimationType === "number"
+            ? data.openingAnimationType
+            : 1,
         "skin_settings.lptswitch": unref(isShowOpeningAnimation),
       },
       passQueryParameters: true,