From 8f8419c816dd9837e8a3264fc480abf928bbc93e Mon Sep 17 00:00:00 2001
From: WX <1377869194@qq.com>
Date: 星期三, 06 九月 2023 17:47:32 +0800
Subject: [PATCH] 修改菜单

---
 src/views/index.vue       |   11 ++++++++++-
 public/config/config.js   |    1 +
 src/assets/js/menuData.js |   20 ++++++++++++++++----
 src/assets/js/menuTool.js |   26 ++++++++++++++++----------
 4 files changed, 43 insertions(+), 15 deletions(-)

diff --git a/public/config/config.js b/public/config/config.js
index 62f76de..dbb4e39 100644
--- a/public/config/config.js
+++ b/public/config/config.js
@@ -12,6 +12,7 @@
 // const getTokenUrl = "http://10.101.5.98:8080/gettoken";
 
 const videoJS = "config/鐕曞北鐭冲寲绯荤粺鍔熻兘灞曠ず.mp4";
+const SMvideoJS = "config/绯荤粺璇存槑.mp4";
 //浜岀淮鐑姏鍥惧崐寰�
 const radius = 10;
 //鎶ヨ椋庡満绮掑瓙
diff --git a/src/assets/js/menuData.js b/src/assets/js/menuData.js
index d709a22..69c4fba 100644
--- a/src/assets/js/menuData.js
+++ b/src/assets/js/menuData.js
@@ -48,15 +48,21 @@
       backgroundy: "ycy.png",
       name: "棰勬祴鍒嗘瀽",
       child: [
+        // {
+        //   id: "b2",
+        //   num: 21,
+        //   isActive: true,
+        //   name: "瓒呮爣鐐归娴�",
+        // },
         {
-          id: "b2",
-          num: 21,
+          id: "b3",
+          num: 22,
           isActive: true,
           name: "瓒呮爣鐐归娴�",
         },
         {
-          id: "b3",
-          num: 22,
+          id: "b4",
+          num: 23,
           isActive: true,
           name: "姹℃煋鐗╂墿鏁h秼鍔�",
         },
@@ -176,6 +182,12 @@
           isActive: true,
           name: "鎿嶄綔鏂囨。",
         },
+        {
+          id: "e5",
+          num: 54,
+          isActive: true,
+          name: "绯荤粺璇存槑",
+        },
       ],
     },
 
diff --git a/src/assets/js/menuTool.js b/src/assets/js/menuTool.js
index bfa9b3a..dfe518d 100644
--- a/src/assets/js/menuTool.js
+++ b/src/assets/js/menuTool.js
@@ -43,7 +43,12 @@
           heading: -90,
         });
         break;
-
+      case "b4": //姹℃煋鐗╂墿鏁h秼鍔�
+        window.sgworld.Core.postMessage({ TypeG1: "Start" });
+        window.sgworld.Navigate.flyToPosition(115.95108, 39.7411754, 7200, {
+          heading: -90,
+        });
+        break;
       case "c2": //棰勮淇℃伅
         break;
       case "c3": //鎶ヨ淇℃伅
@@ -130,6 +135,9 @@
         break;
       case "b3": //姹℃煋鐗╂墿鏁h秼鍔挎竻闄�
         window.sgworld.Core.postMessage({ TypeG1: "Delete" });
+        break;
+      case "b4": //姹℃煋鐗╂墿鏁h秼鍔挎竻闄�
+        window.sgworld.Core.postMessage({ TypeG1: "End" });
         break;
       case "c1": //棰勮淇℃伅娓呴櫎鎶ヨ淇℃伅娓呴櫎
         this.closePoi();
@@ -230,7 +238,7 @@
     this.closePoi();
     this.YJlist.forEach((e) => {
       let ids = window.sgworld.Core.createRandomId();
-      this.createPoi(e, "img/yjd.png", ids, "locationName", "WY", -25);
+      this.createPoi(e, "img/yjd.png", ids, "name", "WY", -25);
       this.YJpoi.push(ids);
     });
   },
@@ -239,7 +247,7 @@
     this.closePoi();
     this.BJlist.forEach((e) => {
       let ids = window.sgworld.Core.createRandomId();
-      this.createPoi(e, "img/bjd.png", ids, "locationName", "WY", -25);
+      this.createPoi(e, "img/bjd.png", ids, "name", "WY", -25);
       this.BJpoi.push(ids);
     });
   },
@@ -372,6 +380,9 @@
       sgworld.Core.postMessage(
         `Type=wuranwu;Bool=true;Type2=zidingyi;Yearstart=${day[0]};Mouthstart=${day[1]};Daystart=${day[2]};Hourend=${Hour};Alpha=0.03;Speed=0.5;`
       );
+      // console.log(
+      //   `Type=wuranwu;Bool=true;Type2=zidingyi;Yearstart=${day[0]};Mouthstart=${day[1]};Daystart=${day[2]};Hourend=${Hour};Alpha=0.03;Speed=0.5;`
+      // );
     }
   },
   async bjthis(time) {
@@ -381,9 +392,7 @@
 
     var obj = {};
     this.BJlist = dt.result.reduce(function (item, next) {
-      obj[next.locationName]
-        ? ""
-        : (obj[next.locationName] = true && item.push(next));
+      obj[next.name] ? "" : (obj[next.name] = true && item.push(next));
       return item;
     }, []);
 
@@ -402,12 +411,9 @@
     // });
     var obj = {};
     this.YJlist = dt1.result.reduce(function (item, next) {
-      obj[next.locationName]
-        ? ""
-        : (obj[next.locationName] = true && item.push(next));
+      obj[next.name] ? "" : (obj[next.name] = true && item.push(next));
       return item;
     }, []);
-
     // this.YJtext = `${this.YJlist.length}鏉¢璀︿俊鎭痐;
     store.commit("getYJtext", this.YJlist);
     this.createYJpoi();
diff --git a/src/views/index.vue b/src/views/index.vue
index 5e319c9..2491790 100644
--- a/src/views/index.vue
+++ b/src/views/index.vue
@@ -67,7 +67,10 @@
         </div>
       </div>
     </transition>
-    <div class="video_box" v-show="checkMenuFlag == 'e3'">
+    <div
+      class="video_box"
+      v-show="checkMenuFlag == 'e3' || checkMenuFlag == 'e5'"
+    >
       <video
         :src="videoUrl"
         controls="controls"
@@ -223,6 +226,12 @@
           }config/鐕曞北鐭冲寲绯荤粺鍔熻兘鎿嶄綔鏂囨。.pdf`
         );
       }
+      if (res.id == "e3") {
+        videoUrl.value = window.location.href.split("#")[0] + videoJS;
+      }
+      if (res.id == "e5") {
+        videoUrl.value = window.location.href.split("#")[0] + SMvideoJS;
+      }
     };
 
     const toggleFK = (params) => {

--
Gitblit v1.9.3