Browse Source

feat: test

gemercheung 1 year ago
parent
commit
188b6d406a

+ 6 - 1
packages/qjkankan-kankan-view/src/components/Controls/tours.mobile.vue

@@ -347,7 +347,7 @@ watch(isOpenTours, () => {
   openTours();
 });
 
-watch(isPlay, () => {
+watch(isPlay, (nv, ov) => {
   window.parent.postMessage(
     {
       source: "qjkankan",
@@ -358,6 +358,11 @@ watch(isPlay, () => {
     },
     "*"
   );
+  if (ov && !nv) {
+    console.log("tour-kk-isPlay", isPlay.value);
+    store.commit("setMode", "panorama");
+    store.commit("setFlying", false);
+  }
 });
 
 onMounted(() => {

+ 3 - 3
packages/qjkankan-kankan-view/src/components/Controls/tours.vue

@@ -345,7 +345,7 @@ watch(isOpenTours, () => {
   openTours();
 });
 
-watch(isPlay, () => {
+watch(isPlay, (nv, ov) => {
   window.parent.postMessage(
     {
       source: "qjkankan",
@@ -356,8 +356,8 @@ watch(isPlay, () => {
     },
     "*"
   );
-  if (!isPlay.value) {
-    console.log("tour-kk-isPlay", isPlay);
+  if (ov && !nv) {
+    console.log("tour-kk-isPlay", isPlay.value);
     store.commit("setMode", "panorama");
     store.commit("setFlying", false);
   }