Procházet zdrojové kódy

feat:支持无跳转切换点位

lanxin před 2 měsíci
rodič
revize
c1aa4852ee

+ 34 - 42
scene/public/index.html

@@ -1,56 +1,50 @@
-<!doctype html>
+<!DOCTYPE html>
 <html>
-
-<head>
-    <meta charset="utf-8">
-    <meta name="viewport"
-        content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, minimal-ui">
-    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+  <head>
+    <meta charset="utf-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, minimal-ui" />
+    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
     <title>众生百态——故宫博物院藏历代人物画特展(第三期)</title>
-    <meta name="description" content="四维时代">
-    <meta property="og:title" content="四维时代">
-    <meta property="og:description" content="四维时代">
-    <meta property="og:image:type" content="image/jpg">
-    <link rel="icon" type="image/png" sizes="32x32" href="./favicon.ico" class="keep">
+    <meta name="description" content="四维时代" />
+    <meta property="og:title" content="四维时代" />
+    <meta property="og:description" content="四维时代" />
+    <meta property="og:image:type" content="image/jpg" />
+    <link rel="icon" type="image/png" sizes="32x32" href="./favicon.ico" class="keep" />
     <link rel="stylesheet" href="<%= BASE_URL %><%= VUE_APP_STATIC_DIR %>/css/animate.min.css" />
     <link rel="stylesheet" href="<%= VUE_APP_STATIC_DIR %>/css/oldVer/main0.css" />
     <link rel="stylesheet" href="<%= VUE_APP_STATIC_DIR %>/css/main.css?v=2.25" />
     <!-- <link rel="stylesheet" href="<%= VUE_APP_STATIC_DIR %>/CAD/cad.css?v=2.25"/> -->
-    <style>
-    </style>
+    <style></style>
     <script>
-        var number = window.location.href.substring(window.location.href.indexOf("=") + 1);
-        if (number.indexOf("&") != -1) {
-            number = number.substring(0, number.indexOf("&"));
-        }
-        if (number.indexOf("#") != -1) {
-            number = number.substring(0, number.indexOf("#"));
-        }
+      var number = window.location.href.substring(window.location.href.indexOf("=") + 1);
+      if (number.indexOf("&") != -1) {
+        number = number.substring(0, number.indexOf("&"));
+      }
+      if (number.indexOf("#") != -1) {
+        number = number.substring(0, number.indexOf("#"));
+      }
     </script>
 
     <script class="build keep">
-        if (window.performance) {
-            window.navigationStart = window.performance.timing.navigationStart;
-        } else {
-            window.navigationStart = Date.now() + 300;
-        }
+      if (window.performance) {
+        window.navigationStart = window.performance.timing.navigationStart;
+      } else {
+        window.navigationStart = Date.now() + 300;
+      }
     </script>
 
     <script>
-        var _hmt = _hmt || [];
-        (function () {
-            var hm = document.createElement("script");
-            hm.src = "https://hm.baidu.com/hm.js?47372ca9bafbafe62cbd0d6f388a2b1e";
-            var s = document.getElementsByTagName("script")[0];
-            s.parentNode.insertBefore(hm, s);
-        })();
+      var _hmt = _hmt || [];
+      (function () {
+        var hm = document.createElement("script");
+        hm.src = "https://hm.baidu.com/hm.js?47372ca9bafbafe62cbd0d6f388a2b1e";
+        var s = document.getElementsByTagName("script")[0];
+        s.parentNode.insertBefore(hm, s);
+      })();
     </script>
+  </head>
 
-
-
-</head>
-
-<body>
+  <body>
     <div id="app"></div>
     <script src="<%= VUE_APP_STATIC_DIR %>/js/lib/jquery-2.1.1.min.js" class="build keep"></script>
     <script src="<%= VUE_APP_STATIC_DIR %>/js/lib/player-0.0.12.min.js" class="build keep"></script>
@@ -64,7 +58,5 @@
     <!-- <script src="<%= VUE_APP_STATIC_DIR %>/js/CAD/bundle.js"></script> -->
     <script src="<%= VUE_APP_STATIC_DIR %>/js/loadCAD.js"></script>
     <script src="./src/main.js"></script>
-
-</body>
-
-</html>
+  </body>
+</html>

+ 659 - 11
scene/public/static/data/data.json

@@ -41,7 +41,210 @@
         },
         "width": 500,
         "height": 920,
-        "rotate": -90
+        "rotate": -90,
+        "dotPos": [
+          {
+            "x": 105.5953141257373,
+            "y": -58.86897221101896,
+            "over": true
+          },
+          {
+            "x": -378.24319054648686,
+            "y": -23.128829602146013
+          },
+          {
+            "x": 101.24715049772018,
+            "y": 41.48822249015303
+          },
+          {
+            "x": 255.3752632235113,
+            "y": 113.83624535269153
+          },
+          {
+            "x": 132.35173355897405,
+            "y": 132.74470972867258
+          },
+          {
+            "x": 128.85972630700743,
+            "y": 193.61893223781894
+          },
+          {
+            "x": 252.30980147791166,
+            "y": 183.823549670553
+          },
+          {
+            "x": 247.78027721619176,
+            "y": 230.36383965213528
+          },
+          {
+            "x": 117.69846126314438,
+            "y": 268.3734979525
+          },
+          {
+            "x": 114.31904082845386,
+            "y": 296.4095224786989
+          },
+          {
+            "x": 113.40021926628172,
+            "y": 326.8324852554612
+          },
+          {
+            "x": 245.23441865782434,
+            "y": 310.9547460737596
+          },
+          {
+            "x": 113.74460058147253,
+            "y": 368.99706204247644
+          },
+          {
+            "x": 112.61751911943036,
+            "y": 427.58695173970153
+          },
+          {
+            "x": 111.94999306898458,
+            "y": 456.72060215822336
+          },
+          {
+            "x": 110.88032188452145,
+            "y": 522.7777811802104
+          },
+          {
+            "x": 247.48578137452787,
+            "y": 394.62174732014824
+          },
+          {
+            "x": 300.65956815836535,
+            "y": 464.5304081220116
+          },
+          {
+            "x": 187.57677268715165,
+            "y": 470.73663022435187
+          },
+          {
+            "x": 301.2458681071951,
+            "y": 560.8539783363668
+          },
+          {
+            "x": 249.52301460314982,
+            "y": 649.2997683783208
+          },
+          {
+            "x": 306.7045771089049,
+            "y": 718.6162547602024
+          },
+          {
+            "x": 189.40667406167827,
+            "y": 706.5307979697296
+          },
+          {
+            "x": 110.04746709069337,
+            "y": 612.4059587104462
+          },
+          {
+            "x": 110.21410554369714,
+            "y": 644.2953795632194
+          },
+          {
+            "x": 109.15218816159424,
+            "y": 672.1058664765267
+          },
+          {
+            "x": 109.75998181126708,
+            "y": 704.414517335965
+          },
+          {
+            "x": 109.06550627572682,
+            "y": 733.9344648833743
+          },
+          {
+            "x": 108.85096298368508,
+            "y": 762.2625168444642
+          },
+          {
+            "x": 108.75115186148955,
+            "y": 789.1612248524965
+          },
+          {
+            "x": 246.28248063791187,
+            "y": 774.6338852186761
+          },
+          {
+            "x": 214.75221181832472,
+            "y": 856.632542894393
+          },
+          {
+            "x": 250.1304426590326,
+            "y": 857.8546432966058
+          },
+          {
+            "x": 286.563095204769,
+            "y": 858.2208811469333
+          },
+          {
+            "x": 379.74811921680845,
+            "y": 792.0516866558509
+          },
+          {
+            "x": 383.5114533061844,
+            "y": 762.5566661052652
+          },
+          {
+            "x": 380.4358212234475,
+            "y": 698.4625460321681
+          },
+          {
+            "x": 380.2694800664928,
+            "y": 672.3292466025688
+          },
+          {
+            "x": 380.324455730481,
+            "y": 640.0242688199155
+          },
+          {
+            "x": 380.39665849525704,
+            "y": 611.2906004158763
+          },
+          {
+            "x": 378.38200369630584,
+            "y": 579.6723631787619
+          },
+          {
+            "x": 378.5069644572449,
+            "y": 516.7252192808622
+          },
+          {
+            "x": 380.59891622894776,
+            "y": 478.27871293733347
+          },
+          {
+            "x": 381.1358168234659,
+            "y": 448.5919807074316
+          },
+          {
+            "x": 380.7368133855344,
+            "y": 388.65013575383256
+          },
+          {
+            "x": 381.87881589522726,
+            "y": 329.9831649355283
+          },
+          {
+            "x": 381.59606324750064,
+            "y": 287.36758424460925
+          },
+          {
+            "x": 383.95516364186943,
+            "y": 255.16880474026914
+          },
+          {
+            "x": 376.32050468205915,
+            "y": 195.16447736276498
+          },
+          {
+            "x": 376.49375596339706,
+            "y": 131.9413757409093
+          }
+        ]
       },
       {
         "name": "午门",
@@ -74,14 +277,228 @@
           }
         ],
         "style": {
-          "top": "36%",
-          "left": "4.4%",
+          "top": "34.8%",
+          "left": "9.2%",
           "scaleX": "1",
           "scaleY": "1"
         },
-        "width": 650,
-        "height": 200,
-        "rotate": 0
+        "width": 640,
+        "height": 235,
+        "rotate": 0,
+        "dotPos": [
+          {
+            "x": -34.16927919989378,
+            "y": 226.92024042982652
+          },
+          {
+            "x": 320.556701880844,
+            "y": 227.05682118378076
+          },
+          {
+            "x": 317.9438368023385,
+            "y": 184.60413477301685
+          },
+          {
+            "x": 486.7696136089443,
+            "y": 186.88333563127625
+          },
+          {
+            "x": 486.46958817025285,
+            "y": 153.19937144249812
+          },
+          {
+            "x": 528.6376123467246,
+            "y": 174.9811296489505
+          },
+          {
+            "x": 551.6245752871928,
+            "y": 175.9489107074144
+          },
+          {
+            "x": 593.6380531161318,
+            "y": 175.976225545095
+          },
+          {
+            "x": 632.3042884884344,
+            "y": 176.2084520617596
+          },
+          {
+            "x": 562.2543789990829,
+            "y": 131.32718098291713
+          },
+          {
+            "x": 577.1397627617135,
+            "y": 98.40145439682759
+          },
+          {
+            "x": 559.5002070716683,
+            "y": 69.99104812657934
+          },
+          {
+            "x": 606.8842784209014,
+            "y": 24.763362026771812
+          },
+          {
+            "x": 587.6374579874793,
+            "y": 24.33942768254814
+          },
+          {
+            "x": 567.7055559613433,
+            "y": 24.660599932358327
+          },
+          {
+            "x": 548.2504908731947,
+            "y": 24.610924608764904
+          },
+          {
+            "x": 529.7943495880695,
+            "y": 25.01091679608886
+          },
+          {
+            "x": 508.69000813534393,
+            "y": 26.23885171874089
+          },
+          {
+            "x": 439.5443559747282,
+            "y": 96.51634490101702
+          },
+          {
+            "x": 453.5453728027645,
+            "y": 27.02002661390735
+          },
+          {
+            "x": 431.92881771972174,
+            "y": 26.92905727229324
+          },
+          {
+            "x": 363.7862200011442,
+            "y": 27.44895407634456
+          },
+          {
+            "x": 334.6042079625623,
+            "y": 27.707154111666565
+          },
+          {
+            "x": 312.40364241043653,
+            "y": 27.248632344538223
+          },
+          {
+            "x": 288.7100352579545,
+            "y": 27.15066178282034
+          },
+          {
+            "x": 265.4691315691283,
+            "y": 27.05453650392051
+          },
+          {
+            "x": 301.74341931275234,
+            "y": 75.27082482327367
+          },
+          {
+            "x": 327.75155024897174,
+            "y": 75.17266624429388
+          },
+          {
+            "x": 391.71874522125,
+            "y": 96.62901124688206
+          },
+          {
+            "x": 342.53713527231093,
+            "y": 111.05367310918805
+          },
+          {
+            "x": 317.9395055682669,
+            "y": 111.36285005151979
+          },
+          {
+            "x": 292.8891661038611,
+            "y": 111.67771693892755
+          },
+          {
+            "x": 345.3507624950931,
+            "y": 133.94623430499203
+          },
+          {
+            "x": 325.88744962185586,
+            "y": 134.51607779775708
+          },
+          {
+            "x": 308.6877251297211,
+            "y": 135.0574938558483
+          },
+          {
+            "x": 289.6612516196027,
+            "y": 134.15838367939892
+          },
+          {
+            "x": 245.39544931673547,
+            "y": 90.97769142194564
+          },
+          {
+            "x": 197.09476470289803,
+            "y": 90.9951004635741
+          },
+          {
+            "x": 206.96609961532522,
+            "y": 25.642802108643902
+          },
+          {
+            "x": 182.94533991596956,
+            "y": 24.778380147858194
+          },
+          {
+            "x": 139.52925827324177,
+            "y": 23.66197628964995
+          },
+          {
+            "x": 121.09184159215266,
+            "y": 24.110178428917695
+          },
+          {
+            "x": 100.94618259511353,
+            "y": 23.50536760207956
+          },
+          {
+            "x": 84.07063680564876,
+            "y": 23.89613337531327
+          },
+          {
+            "x": 68.52733004201522,
+            "y": 24.091493002062673
+          },
+          {
+            "x": 39.01240307120926,
+            "y": 24.79718962733964
+          },
+          {
+            "x": 127.66187481357252,
+            "y": 100.22419137689408
+          },
+          {
+            "x": 32.582394194653126,
+            "y": 172.2266728851345
+          },
+          {
+            "x": 58.617250599176536,
+            "y": 172.85737194444937
+          },
+          {
+            "x": 83.45521476984102,
+            "y": 173.29423102168852
+          },
+          {
+            "x": 106.13718686931745,
+            "y": 173.24073332654342
+          },
+          {
+            "x": 130.67283719849124,
+            "y": 173.93863014293404
+          },
+          {
+            "x": 175.74704657511376,
+            "y": 180.04276367872387
+          }
+        ]
       },
       {
         "name": "东雁翅楼",
@@ -129,14 +546,245 @@
           }
         ],
         "style": {
-          "top": "22.8%",
-          "left": "18%",
+          "top": "7%",
+          "left": "19.3%",
           "scaleX": "1",
           "scaleY": "1"
         },
-        "width": 280,
-        "height": 680,
-        "rotate": 90
+        "width": 480,
+        "height": 950,
+        "rotate": 90,
+        "dotPos": [
+          {
+            "x": -21.64125982619908,
+            "y": 34.82983397101899
+          },
+          {
+            "x": 86.93572057680929,
+            "y": 38.982293189985576,
+            "over": true
+          },
+          {
+            "x": 234.47528675303994,
+            "y": 104.37257831071764
+          },
+          {
+            "x": 100.16754499138125,
+            "y": 123.00017775149082
+          },
+          {
+            "x": 100.0960895364506,
+            "y": 196.54424884789245
+          },
+          {
+            "x": 234.86595820498349,
+            "y": 192.92793758807832
+          },
+          {
+            "x": 240.87675378549412,
+            "y": 245.16511837602602
+          },
+          {
+            "x": 99.74395895722401,
+            "y": 281.83236531304624
+          },
+          {
+            "x": 99.54304691448839,
+            "y": 309.06011932945216
+          },
+          {
+            "x": 99.63915294151772,
+            "y": 332.90475036926694
+          },
+          {
+            "x": 99.08760008697364,
+            "y": 357.37703380826366
+          },
+          {
+            "x": 99.85506316566946,
+            "y": 376.7159206085288
+          },
+          {
+            "x": 228.77445252522296,
+            "y": 376.7159206085288
+          },
+          {
+            "x": 230.65189372618062,
+            "y": 406.24008275144627
+          },
+          {
+            "x": 99.00957704579675,
+            "y": 420.69246789855265
+          },
+          {
+            "x": 99.28030124306981,
+            "y": 451.2069704189709
+          },
+          {
+            "x": 99.15107474148712,
+            "y": 485.9747460623544
+          },
+          {
+            "x": 100.99210591728173,
+            "y": 541.5444749698111
+          },
+          {
+            "x": 101.62347615856802,
+            "y": 573.781123770443
+          },
+          {
+            "x": 233.54586769196368,
+            "y": 506.7069181706068
+          },
+          {
+            "x": 236.50105426864675,
+            "y": 539.068240055748
+          },
+          {
+            "x": 238.43176568110104,
+            "y": 629.1895755479666
+          },
+          {
+            "x": 100.58670209677001,
+            "y": 623.9233708429178
+          },
+          {
+            "x": 101.80092615923974,
+            "y": 661.6116135168735
+          },
+          {
+            "x": 99.81784307636296,
+            "y": 701.1423076338235
+          },
+          {
+            "x": 100.53764831125457,
+            "y": 730.2608393890313
+          },
+          {
+            "x": 99.91386089301176,
+            "y": 757.6167772238992
+          },
+          {
+            "x": 101.08927523124306,
+            "y": 786.9699418209058
+          },
+          {
+            "x": 236.75398898304942,
+            "y": 759.3095342089473
+          },
+          {
+            "x": 100.86102621582654,
+            "y": 816.4766578385174
+          },
+          {
+            "x": 125.93887312056265,
+            "y": 841.4808370085245
+          },
+          {
+            "x": 100.2743138835249,
+            "y": 861.1840500458711
+          },
+          {
+            "x": 232.57609398108795,
+            "y": 861.4414480122332
+          },
+          {
+            "x": 350.8039157163673,
+            "y": 859.5878626318301
+          },
+          {
+            "x": 321.5418529823673,
+            "y": 841.7998023585193
+          },
+          {
+            "x": 350.3493674121568,
+            "y": 815.8568920475171
+          },
+          {
+            "x": 355.1499709389088,
+            "y": 771.2297659115985
+          },
+          {
+            "x": 355.91724906723374,
+            "y": 744.1386638156516
+          },
+          {
+            "x": 355.99520117048985,
+            "y": 720.5711223564709
+          },
+          {
+            "x": 355.10650696204505,
+            "y": 689.1749700382995
+          },
+          {
+            "x": 355.5614846610251,
+            "y": 662.195381222766
+          },
+          {
+            "x": 355.4181216818485,
+            "y": 636.929470585449
+          },
+          {
+            "x": 355.37265033241664,
+            "y": 610.7182042869745
+          },
+          {
+            "x": 355.35593499840314,
+            "y": 586.3295558082878
+          },
+          {
+            "x": 355.4257442386573,
+            "y": 546.6913001918562
+          },
+          {
+            "x": 355.6046700750513,
+            "y": 473.2341475208036
+          },
+          {
+            "x": 355.09564564134456,
+            "y": 449.97732313945136
+          },
+          {
+            "x": 355.22039971314916,
+            "y": 394.3827806695166
+          },
+          {
+            "x": 355.5781456898566,
+            "y": 346.33212158201974
+          },
+          {
+            "x": 355.670583771465,
+            "y": 317.5373701972797
+          },
+          {
+            "x": 355.3422647350608,
+            "y": 290.725964529052
+          },
+          {
+            "x": 355.38278308228683,
+            "y": 266.8355559260896
+          },
+          {
+            "x": 347.75320988760893,
+            "y": 200.4878946340897
+          },
+          {
+            "x": 349.01168243779665,
+            "y": 119.1833219114455
+          },
+          {
+            "x": 426.2901491039752,
+            "y": 23.741903611850868
+          },
+          {
+            "x": 819.3949962039683,
+            "y": -52.78729193943306
+          }
+        ],
+        "coverUrl": [
+          "cover_1.svg",
+          "cover_2.svg"
+        ]
       }
     ]
   },

+ 11 - 1
scene/src/View.vue

@@ -23,6 +23,7 @@ export default {
       mode: "",
       label: "",
       sceneList: [],
+      id: "",
     };
   },
 
@@ -32,7 +33,7 @@ export default {
       flyInModel: "flyInModel",
     }),
     sceneUrl() {
-      return `./index.html?m=${this.sceneNum}#/`;
+      return `./index.html?m=${this.sceneNum}&id=${this.id}#/`;
     },
   },
   methods: {
@@ -48,6 +49,10 @@ export default {
       localStorage.setItem("flyInModel", true);
       this.show = false;
 
+      if (this.id) {
+        this.id = "";
+      }
+
       // document.title = this.label + "——" + scene.name;
       setTimeout(() => {
         this.show = true;
@@ -78,6 +83,11 @@ export default {
     };
     window.setUrl = (num) => {
       this.changeScene({ num });
+      this.id = "";
+    };
+    window.setUrlWithId = (num, id) => {
+      this.changeScene({ num });
+      this.id = id;
     };
   },
 };

+ 3 - 0
scene/src/assets/image/icon/cover/cover_1.svg

@@ -0,0 +1,3 @@
+<svg width="805" height="1064" viewBox="0 0 805 1064" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path opacity="0.4" d="M547 787H361V887H227V161H547V787Z" fill="#926060"/>
+</svg>

+ 3 - 0
scene/src/assets/image/icon/cover/cover_2.svg

@@ -0,0 +1,3 @@
+<svg width="805" height="1064" viewBox="0 0 805 1064" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path opacity="0.4" d="M535 997H239V887H361V787H535V997Z" fill="#926060"/>
+</svg>

binární
scene/src/assets/image/map/1.jpg


binární
scene/src/assets/image/map/2.jpg


binární
scene/src/assets/image/map/3.jpg


+ 17 - 7
scene/src/views/gui/components/layerMap.vue

@@ -41,10 +41,10 @@
                   d="M334.4,0v653.5l110.6,0.9v119.5h219.4V505.7L411.3,506l1.1-295l253.1-0.3L664.4,0H334.4z"
                 />
               </svg> -->
-              <!-- <img src="../../../assets/image/icon/new-icon/test.svg" alt="" /> -->
-
+              <img v-for="(i, index) in info.coverUrl" v-show="unit == index + 1 && info.coverUrl.length > 0" :style="{ position: 'absolute', top: `-${info.style.top}`, left: `-${info.style.left}`, width: '100%', height: '100%' }" :src="require(`../../../assets/image/icon/cover/${i}`)" alt="" />
               <div class="point-list">
-                <div class="tool_map_point" v-show="isPointShow(id)" :pano-id="id" @click="goPano(id)" :class="{ current: panoId == id, over: i.over }" :style="`transform:translate(${i.x}px,${i.y}px);`" v-for="(i, id, index) in points">
+                <!-- 线上goPano(id) data.json就id+1 -->
+                <div class="tool_map_point" v-show="isPointShow(id)" :pano-id="id" @click="goPano(id + 1)" :class="{ current: panoId == id + 1, over: i.over }" :style="`transform:translate(${i.x}px,${i.y}px);`" v-for="(i, id, index) in points">
                   <p class="tips">点位{{ id }}</p>
                 </div>
               </div>
@@ -131,6 +131,7 @@ export default {
       sceneList: [],
       info: null,
       sceneNum: "KJ-t-tHpdpKvb0ew",
+      selectedNum: "",
     };
   },
   //监听属性 类似于data概念
@@ -149,21 +150,28 @@ export default {
     isPointShow(id) {
       console.log(this.info.id);
       // 根据场景码筛选
-      if (this.info.num === "KJ-CmveHNimLmQ" && id < 3) {
+      if (this.info.num === "KJ-CmveHNimLmQ" && id < 2) {
+        return false;
+      }
+
+      if (this.info.num === "KJ-tFrdXMNCWx2" && (id == 54 || id == 0)) {
         return false;
       }
       return true;
     },
 
     changeScene(scene) {
-      this.sceneNum = scene.num;
+      this.selectedNum = scene.num;
       this.unit = 0;
       this.info = this.sceneList.find((item) => item.num === scene.num) || {};
       console.log(this.info);
-      window.parent.window.setUrl(this.sceneNum);
-      // this.$emit("getPoints", this.info);
+      // window.parent.window.setUrl(this.sceneNum);
+      this.$emit("getPoints", this.info);
     },
     goPano(id) {
+      if (this.selectedNum !== this.sceneNum) {
+        window.parent.window.setUrlWithId(this.selectedNum, id);
+      }
       player.blackToPano({ pano: player.model.panos.get(id) });
       this.$emit("close");
       // this.panoId = id;
@@ -204,6 +212,7 @@ export default {
         this.unit = 0;
       } else {
         this.unit = unit;
+        console.log(this.unit, "当前单元");
       }
     },
   },
@@ -214,6 +223,7 @@ export default {
     getExhibitionInfoAPI().then((res) => {
       let m = common.getURLParam("m") || "";
       this.sceneNum = m;
+      this.selectedNum = m;
       let id = 0;
       res.forEach((item, index) => {
         item.sceneList.forEach((j, j_index) => {

+ 33 - 7
scene/src/views/gui/menu.vue

@@ -477,6 +477,7 @@ export default {
         },
       ],
       mapVisible: false,
+      idMatch: "",
     };
   },
   watch: {
@@ -526,6 +527,13 @@ export default {
         this.isFullscreen = !this.isFullscreen;
       });
     });
+    if (!this.tourList.length) {
+      this.$nextTick(() => {
+        this.leftButtons.splice(5, 1);
+      });
+    }
+    this.idMatch = window.location.href.match(/[?&]id=(\d+)/);
+    console.log(this.idMatch, "idMatch[1]");
     getExhibitionInfoAPI().then((res) => {
       let m = common.getURLParam("m") || "";
       this.sceneNum = m;
@@ -554,6 +562,8 @@ export default {
           if (this.mode == "dollhouse") {
             $(".cad").hide();
             $(".minimap-controls").hide();
+            console.log(this.mode, "44444444444444");
+            this.idMatch && player.blackToPano({ pano: player.model.panos.get(this.idMatch[1]) });
           } else {
             $(".cad").show();
             $(".minimap-controls").show();
@@ -627,14 +637,20 @@ export default {
       let points = manage.initMapPanoPos(w, h, rotate);
       console.log(points);
 
-      if (this.points) {
-        Object.keys(this.points).forEach((id) => {
-          if (this.points[id]?.over && points[id]) {
-            points[id].over = true;
-          }
-        });
+      // if (this.points) {
+      //   Object.keys(this.points).forEach((id) => {
+      //     if (this.points[id]?.over && points[id]) {
+      //       points[id].over = true;
+      //     }
+      //   });
+      // }
+      if (info.dotPos) {
+        const newPoints = info.dotPos.map((item) => new THREE.Vector2(item.x, item.y));
+        console.log("dotPos", newPoints);
+        this.setData({ points: newPoints });
+      } else {
+        this.setData({ points });
       }
-      this.setData({ points });
     },
     goScene(type) {
       window.tourPlayCtl.go(type === "prev" ? -1 : 1);
@@ -699,10 +715,20 @@ export default {
         case "map":
           if (player.mode == "dollhouse") {
             player.FlyToMode("panorama");
+            console.log(this.mode, "00000000000000000");
             this.mode = "panorama";
           } else if (player.mode == "panorama") {
             player.FlyToMode("dollhouse");
+            this.idMatch = null;
+            console.log(this.mode, "222222222222222");
             this.mode = "dollhouse";
+            // const idMatch = window.location.href.match(/[?&]id=(\d+)/);
+            // if (idMatch) {
+            //   console.log(idMatch[1], "11111111111111111");
+            //   setTimeout(() => {
+            //     player.blackToPano({ pano: player.model.panos.get(idMatch[1]) });
+            //   }, 5000);
+            // }
           }
           window.parent.window.setMode(this.mode);
           break;