lanxin 3 týždňov pred
rodič
commit
6d9cd17a02

+ 12 - 8
scene/public/static/js/Hot.js

@@ -1066,7 +1066,12 @@ window.initHot = function (model) {
 
 
     setTitleElem() {
-      var title = this.info.title
+      const hotlist = window.i18n.t('hotlist')
+      var title = hotlist.find((item) => item.value === this?.info.title)?.title || this.info.title
+      // var title = localStorage.getItem('locale') + this.info.title
+
+      // console.log(currentHotlist, 'ppppxxxxxxxxxxxx')
+
       if (title) {
         if (!this.titleElem) {
           this.titleElem = new Label2D({ position: this.position, innerHTML: `<div>${title}</div>`, domElement: $("#hot")[0], shelterByModel: true })
@@ -1085,7 +1090,6 @@ window.initHot = function (model) {
     }
 
 
-
     setTitleDir() {
       this.titleElem && this.titleElem.elem.attr('pos', this.info.titlePos)
     }
@@ -1467,7 +1471,7 @@ window.initHot = function (model) {
     /* addToLoadQueue() {
         if (this.texType == 'photo') {
             Hot.loadQueue.includes(this) || Hot.loadQueue.push(this)
-
+  
         }
     } */
 
@@ -1727,19 +1731,19 @@ window.initHot = function (model) {
   window.Hot = Hot
 
   /* var ball = new THREE.Mesh(new THREE.SphereBufferGeometry(0.01),new THREE.MeshBasicMaterial({color:"#f00",depthTest:false,transparent:true}))
- var balls = []
- var addPoint = function(point){
+  var balls = []
+  var addPoint = function(point){
      console.log(point)
      var ball1 = ball.clone()
      model.add(ball1);
      ball1.position.copy(point)
      balls.push(ball1)
- }
- var addPoints =  function(points){ 
+  }
+  var addPoints =  function(points){ 
      balls.forEach(e=>model.remove(e))
      balls = []
      points.forEach(e=>addPoint(e))
- }  
+  }  
   */
 
   //判断是否是移动端,如果是给关闭按钮添加touchstart事件

scene/src/assets/images/icon/放大@2x.png → scene/src/assets/images/icon/full.png


scene/src/assets/images/icon/quanping.png → scene/src/assets/images/icon/fullx.png


BIN
scene/src/assets/img/mobileBg.png


+ 31 - 14
scene/src/components/welcome/index.vue

@@ -11,11 +11,19 @@
       <img ref="enBtn" src="../../assets/img/btnBg.png" alt="" />
       <p>English</p>
     </div>
-    <div class="btn btn2" @click.stop="$emit('close')" @click="changeLanguage('zh-hk')">
+    <div
+      class="btn btn2"
+      @click.stop="$emit('close')"
+      @click="changeLanguage('zh-hk')"
+    >
       <img ref="zhBtn" src="../../assets/img/btnBg.png" alt="" />
       <p>繁體中文</p>
     </div>
-    <div class="btn btn3" @click.stop="$emit('close')" @click="changeLanguage('pe')">
+    <div
+      class="btn btn3"
+      @click.stop="$emit('close')"
+      @click="changeLanguage('pe')"
+    >
       <img ref="peBtn" src="../../assets/img/btnBg.png" alt="" />
       <p>Português</p>
     </div>
@@ -29,14 +37,18 @@ export default {
   },
   methods: {
     changeLanguage(item) {
-      this.$root.$emit('change-language', {key : item});
-    }
+      this.$root.$emit("change-language", { key: item });
+    },
   },
   mounted() {
-    const curLang = localStorage.getItem('locale');
-    curLang === 'zh-hk' ? this.$refs.zhBtn.src = require(`../../assets/img/btnBg_ac.png`) :
-    curLang === 'en' ? this.$refs.enBtn.src = require(`../../assets/img/btnBg_ac.png`) :
-    curLang === 'pe' ? this.$refs.peBtn.src = require(`../../assets/img/btnBg_ac.png`) : '';
+    const curLang = localStorage.getItem("locale");
+    curLang === "zh-hk"
+      ? (this.$refs.zhBtn.src = require(`../../assets/img/btnBg_ac.png`))
+      : curLang === "en"
+      ? (this.$refs.enBtn.src = require(`../../assets/img/btnBg_ac.png`))
+      : curLang === "pe"
+      ? (this.$refs.peBtn.src = require(`../../assets/img/btnBg_ac.png`))
+      : "";
   },
 };
 </script>
@@ -75,7 +87,7 @@ export default {
       position: absolute;
       width: 100%;
       height: 100%;
-      top: -3px;
+      top: -2px;
       left: 0;
       display: flex;
       justify-content: center;
@@ -91,13 +103,13 @@ export default {
   .pcBg {
     width: 100%;
     height: 100%;
-    background-image: url('../../assets/img/pcBg.png');
+    background-image: url("../../assets/img/pcBg.png");
     background-size: 100% 100%;
   }
   .mobileBg {
     width: 100%;
     height: 100%;
-    background-image: url('../../assets/img/mobileBg.png');
+    background-image: url("../../assets/img/mobileBg.png");
     background-size: 100% 100%;
   }
 
@@ -105,14 +117,19 @@ export default {
   @media screen and (max-width: 1000px) {
     .btn {
       bottom: 26%;
-      opacity: 0;
       & > img {
-        width: 140px;
+        width: 115px;
       }
       & > p {
         font-size: 16px;
       }
     }
+    .btn2 {
+      transform: translate(-140%);
+    }
+    .btn3 {
+      transform: translateX(40%);
+    }
   }
 }
-</style>
+</style>

+ 53 - 53
scene/src/il8n.js

@@ -43,8 +43,8 @@ const messages = {
   //       value: '提出“一國兩制”,開啟回歸之路',
   //     },
   //     {
-  //       title: '基本法宣片',
-  //       value: '基本法宣片',
+  //       title: '基本法宣片',
+  //       value: '基本法宣片',
   //     },
   //     {
   //       title: '《澳門基本法》的起草及諮詢',
@@ -149,8 +149,8 @@ const messages = {
     },
     hotlist: [
       {
-        title: "基本法宣片",
-        value: "基本法宣片",
+        title: "基本法宣片",
+        value: "基本法宣片",
       },
       {
         title: "全面準確、堅定不移貫徹“一國兩制”方針",
@@ -364,19 +364,19 @@ const messages = {
     hotlist: [
       {
         title: "Basic Law Promotional Video",
-        value: "基本法宣片",
+        value: "基本法宣片",
       },
       {
         title: "Comprehensively and Accurately Uphold the Principle of 'One Country, Two Systems' Unswervingly",
-        value: "全面準確、堅定不移貫徹 “一國兩制” 方針",
+        value: "全面準確、堅定不移貫徹“一國兩制”方針",
       },
       {
         title: "President Xi Jinping's Visit to Macao in 2019",
-        value: "2019 年習近平主席訪澳",
+        value: "2019年習近平主席訪澳",
       },
       {
         title: "Visit to Macao by Xi Jinping, then Vice President of the People's Republic of China, in 2009",
-        value: "2009 年時任國家副主席習近平訪澳",
+        value: "2009年時任國家副主席習近平訪澳",
       },
       {
         title: "The Country is a Strong Backing for the Prosperity and Stability of the Macao SAR",
@@ -384,11 +384,11 @@ const messages = {
       },
       {
         title: "Implement the Central Government's Overall Governance Power and the Principle of 'Patriots Governing Macao'",
-        value: "落實中央全面管治權、落實 “愛國者治澳” 原則",
+        value: "落實中央全面管治權、落實“愛國者治澳”原則",
       },
       {
         title: "Align with National Development Plans and Write a New Chapter of 'One Country, Two Systems'",
-        value: "對接國家發展部署,譜寫 “一國兩制” 新篇章",
+        value: "對接國家發展部署,譜寫“一國兩制”新篇章",
       },
       {
         title: "Effectively Safeguard National Security and Consolidate the Foundation of Patriotism and Love for Macao",
@@ -404,7 +404,7 @@ const messages = {
       },
       {
         title: "President Xi Jinping's Visit to Macao in 2024",
-        value: "2024 年習近平主席訪澳"
+        value: "2024年習近平主席訪澳"
       },
       {
         title: "Scenery of Haojing (Macao)",
@@ -428,11 +428,11 @@ const messages = {
       },
       {
         title: "Putting Forward 'One Country, Two Systems' and Starting the Road to Reunification",
-        value: "提出 “一國兩制”,開啟回歸之路"
+        value: "提出“一國兩制”,開啟回歸之路"
       },
       {
         title: "The 'One Country, Two Systems' Policy",
-        value: "“一國兩制” 方針"
+        value: "“一國兩制”方針"
       },
       {
         title: "Drafting and Consultation of the Macao Basic Law",
@@ -448,7 +448,7 @@ const messages = {
       },
       {
         title: "President Xi Jinping's Visit to Macao in 2014",
-        value: "2014 年習近平主席訪澳"
+        value: "2014年習近平主席訪澳"
       },
       {
         title: "The Constitution of the People's Republic of China and the Macao Basic Law Jointly Form the Constitutional Basis of the SAR",
@@ -578,7 +578,7 @@ const messages = {
     hotlist: [
       {
         title: "Vídeo Promocional da Lei Básica",
-        value: "基本法宣片"
+        value: "基本法宣片"
       },
       {
         title: "Aplicar Integral e Firmmemente a Política de 'Um País, Dois Sistemas'",
@@ -606,7 +606,7 @@ const messages = {
       },
       {
         title: "Vigilar Eficazmente a Segurança Nacional e Consolidar as Raízes do Amor - pela - Pátria e Amor - por - Macau",
-        "value": "切實維護國家安全 鞏固愛國愛澳根基"
+        value: "切實維護國家安全 鞏固愛國愛澳根基"
       },
       {
         title: "O Essencial do Conceito Geral de Segurança Nacional",
@@ -614,151 +614,151 @@ const messages = {
       },
       {
         title: "Consolidar o Sistema Jurídico e o Meio de Execução para a Vigilância da Segurança Nacional em Macau",
-        "value": "健全澳門維護國家安全的法律制度和執行機制"
+        value: "健全澳門維護國家安全的法律制度和執行機制"
       },
       {
         title: "Visita do Presidente Xi Jinping a Macau em 2024",
-        "value": "2024年習近平主席訪澳"
+        value: "2024年習近平主席訪澳"
       },
       {
         title: "Aspecto de Hoeng Keng",
-        "value": "濠鏡風貌"
+        value: "濠鏡風貌"
       },
       {
         title: "Mudanças Profundas",
-        "value": "滄海桑田"
+        value: "滄海桑田"
       },
       {
         title: "Vida na Cidade Pequena",
-        "value": "小城生活"
+        value: "小城生活"
       },
       {
         title: "Viajar no Tempo e Recordar o Passado",
-        "value": "穿梭時空,回顧往昔"
+        value: "穿梭時空,回顧往昔"
       },
       {
         title: "Prefácio",
-        "value": "前言"
+        value: "前言"
       },
       {
         title: "Propor a Política de 'Um País, Dois Sistemas' e Abrir o Caminho para a Retorno",
-        "value": "提出“一國兩制”,開啟回歸之路"
+        value: "提出“一國兩制”,開啟回歸之路"
       },
       {
         title: "Política de 'Um País, Dois Sistemas'",
-        "value": "“一國兩制”方針"
+        value: "“一國兩制”方針"
       },
       {
         title: "Redação e Consulta da Lei Básica da RAEM",
-        "value": "《澳門基本法》的起草及諮詢"
+        value: "《澳門基本法》的起草及諮詢"
       },
       {
         title: "Aprovação e Promulgação da Lei Básica da RAEM",
-        "value": "《澳門基本法》的通過及頒佈 "
+        value: "《澳門基本法》的通過及頒佈 "
       },
       {
         title: "Retorno de Macau e Celebração Nacional",
-        "value": "澳門回歸,普天同慶"
+        value: "澳門回歸,普天同慶"
       },
       {
         title: "Visita do Presidente Xi Jinping a Macau em 2014",
-        "value": "2014年習近平主席訪澳"
+        value: "2014年習近平主席訪澳"
       },
       {
         title: "A Constituição da República Popular da China e a Lei Básica da RAEM Constituem Juntas a Base Constitucional da Região Especial",
-        "value": "《中華人民共和國憲法》與《澳門基本法》共同構成特區的憲制基礎"
+        value: "《中華人民共和國憲法》與《澳門基本法》共同構成特區的憲制基礎"
       },
       {
         title: "Redação da Constituição da República Popular da China",
-        "value": "《中華人民共和國憲法》的制定"
+        value: "《中華人民共和國憲法》的制定"
       },
       {
         title: "Sistema Político de Macau",
-        "value": "澳門的政治體制"
+        value: "澳門的政治體制"
       },
       {
         title: "Bandeira Nacional, Emblema Nacional e Hino Nacional",
-        "value": "國旗、國徽、國歌"
+        value: "國旗、國徽、國歌"
       },
       {
         title: "Fortalecer a Consciência de Vigilar a Segurança Nacional e Promover Continuamente a Educação do Amor - pela - Pátria e Amor - por - Macau",
-        "value": "增強維護國家安全意識,持之以恆推動愛國愛澳教育"
+        value: "增強維護國家安全意識,持之以恆推動愛國愛澳教育"
       },
       {
         title: "Dispositivos Eletrônicos",
-        "value": "電子裝置"
+        value: "電子裝置"
       },
       {
         title: "Acelerar o Desenvolvimento Económico Moderadamente Diversificado",
-        "value": "加快經濟適度多元發展"
+        value: "加快經濟適度多元發展"
       },
       {
         title: "Indústria de Turismo e Lazer Integrado",
-        "value": "綜合旅遊休閒業"
+        value: "綜合旅遊休閒業"
       },
       {
         title: "Indústria da Saúde e Bem - Estar TCM",
-        "value": "中醫藥大健康產業"
+        value: "中醫藥大健康產業"
       },
       {
         title: "Indústria Financeira Moderna",
-        "value": "現代金融業"
+        value: "現代金融業"
       },
       {
         title: "Indústria de Alta e Nova Tecnologia",
-        "value": "高新技術產業"
+        value: "高新技術產業"
       },
       {
         title: "Indústria de Feiras, Negócios, Cultura e Esporte",
-        "value": "會展商貿及文化體育產業"
+        value: "會展商貿及文化體育產業"
       },
       {
         title: "Dispositivos Eletrônicos I",
-        "value": "電子裝置一"
+        value: "電子裝置一"
       },
       {
         title: "Promover Com Integridade a Construção da Zona de Cooperação Profunda Hengqin - Macau",
-        "value": "全力推動橫琴粵澳深度合作區建設"
+        value: "全力推動橫琴粵澳深度合作區建設"
       },
       {
         title: "Desenvolver o Função da Plataforma China - Portugal e Ampliar Continuamente as Relações Externas",
-        "value": "發揮中葡平台功能,持續擴大對外交往"
+        value: "發揮中葡平台功能,持續擴大對外交往"
       },
       {
         title: "Panorâmica da Cidade de Macau",
-        "value": "澳門城市概況一覽"
+        value: "澳門城市概況一覽"
       },
       {
         title: "Um - Casa - Pass e Empresa - Pass",
-        "value": "一戶通、商社通"
+        value: "一戶通、商社通"
       },
       {
         title: "Melhorar o Nível de Governação e Perfeccionar a Construção Jurídica",
-        "value": "提升治理水平 完善法制建設"
+        value: "提升治理水平 完善法制建設"
       },
       {
         title: "Dispositivos Eletrônicos II",
-        "value": "電子裝置二"
+        value: "電子裝置二"
       },
       {
         title: "Fortalecer o Planejamento Urbano e Construir uma Cidade Habitável",
-        "value": "加強城市規劃 建設宜居城市"
+        value: "加強城市規劃 建設宜居城市"
       },
       {
         title: "Otimizar a Construção da Vida Civil e Promover a Prosperidade Cultural",
-        "value": "優化民生建設 促進文化繁榮"
+        value: "優化民生建設 促進文化繁榮"
       },
       {
         title: "Dispositivos Eletrônicos IV",
-        "value": "電子裝置四"
+        value: "電子裝置四"
       },
       {
         title: "Dispositivos Eletrônicos III",
-        "value": "電子裝置三"
+        value: "電子裝置三"
       },
       {
         title: "Desvendar e Dê - uma Olhada!",
-        "value": "揭開看看吧!"
+        value: "揭開看看吧!"
       }
     ]
   }

+ 14 - 9
scene/src/main.js

@@ -1,22 +1,22 @@
 import Vue from 'vue'
-import ElementUI from 'element-ui';
-import 'element-ui/lib/theme-chalk/index.css';
+import ElementUI from 'element-ui'
+import 'element-ui/lib/theme-chalk/index.css'
 import App from './App.vue'
 import axios from 'axios'
 import '@/mixins'
 import router from './router'
 import 'viewerjs/dist/viewer.css'
 import Viewer from 'v-viewer'
-import i18n from './il8n';
+import i18n from './il8n'
 // 重置场景样式
 import './assets/style/myBase.css'
 
-Vue.use(Viewer,{
+Vue.use(Viewer, {
   defaultOptions: {
-    navbar:false,
-    button:false,
-    maxZoomRatio:2,
-    zIndex:99999,
+    navbar: false,
+    button: false,
+    maxZoomRatio: 2,
+    zIndex: 99999,
     title: false
   }
 })
@@ -24,10 +24,15 @@ Vue.prototype.$http = axios
 
 
 Vue.config.productionTip = false
-Vue.use(ElementUI);
+Vue.use(ElementUI)
 
 new Vue({
   router,
   i18n,
   render: h => h(App)
 }).$mount('#app')
+
+
+window.i18n = i18n
+
+

+ 46 - 35
scene/src/views/gui/menu.vue

@@ -324,7 +324,12 @@
 
         <div class="toHomeBox" @click="handleFullscreen">
           <div class="hoverTit">{{ $t("operation.qp") }}</div>
-          <img src="../../assets/images/icon/quanping.png" alt="" />
+          <img
+            :src="
+              require(`../../assets/images/icon/full${isFull ? 'x' : ''}.png`)
+            "
+            alt=""
+          />
         </div>
 
         <div class="toHomeBox">
@@ -406,6 +411,7 @@ export default {
       ],
       readList: [],
       activeRead: this.$t("operation.readList0"),
+      isFull: false,
     };
   },
   watch: {},
@@ -418,45 +424,47 @@ export default {
         // document.title = "珠海高新区中共党史学习教育园地线上展厅";
       });
     });
-    console.log("$route.query", this.$route.query);
-    this.$http({
-      method: "post",
-      data: {
-        num: this.m,
-        type: "visit",
-      },
-      url: `https://sit-visitcommon.4dage.com/api/visit/trend/saveType`,
-    }).then((res) => {
-      this.getReadData();
-    });
-    this.updateReadList();
-    this.$root.$on('change-language', this.hanldlanguage);
-
+    // console.log("$route.query", this.$route.query);
+    // this.$http({
+    //   method: "post",
+    //   data: {
+    //     num: this.m,
+    //     type: "visit",
+    //   },
+    //   url: `https://sit-visitcommon.4dage.com/api/visit/trend/saveType`,
+    // }).then((res) => {
+    //   this.getReadData();
+    // });
+    // this.updateReadList();
+    this.$root.$on("change-language", this.hanldlanguage);
   },
   methods: {
     handleFullscreen() {
       if (!this.fullscreen) {
         this.fullscreenFn();
+        this.isFull = true;
       } else {
         this.exitFullscreen();
+        this.isFull = false;
       }
     },
-    updateReadList() {
-      this.readList = [
-        this.$t("operation.readList0"),
-        this.$t("operation.readList1"),
-        this.$t("operation.readList2"),
-        this.$t("operation.readList3"),
-      ];
-      // 保持当前选中的activeRead与语言一致
-      if (this.activeRead) {
-        const translated = this.readList.find(
-          (item) =>
-            this.$t(item) === this.activeRead || item === this.activeRead
-        );
-        this.activeRead = translated || this.readList[0];
-      }
-    },
+    // updateReadList() {
+    //   this.readList = [
+    //     this.$t("operation.readList0"),
+    //     this.$t("operation.readList1"),
+    //     this.$t("operation.readList2"),
+    //     this.$t("operation.readList3"),
+    //   ];
+    //   console.log("this.readList", this.readList);
+    //   // 保持当前选中的activeRead与语言一致
+    //   if (this.activeRead) {
+    //     const translated = this.readList.find(
+    //       (item) =>
+    //         this.$t(item) === this.activeRead || item === this.activeRead
+    //     );
+    //     this.activeRead = translated || this.readList[0];
+    //   }
+    // },
     fullscreenFn() {
       let element = document.body;
       this.fullscreen = true;
@@ -509,10 +517,13 @@ export default {
       this.$i18n.locale = item.key;
       this.language = item.key;
       localStorage.setItem("locale", item.key);
-      hotGroup.children.forEach(item => {
-        item.setTitleElem()
-      })
-      this.updateReadList();
+      // this.updateReadList();
+      this.$nextTick(() => {
+        hotGroup.children.forEach((item) => {
+          item.setTitleElem();
+        });
+      });
+      this.languageShow = false;
     },
     readClick(item) {
       console.log("item", item);