Bladeren bron

添加常驻的前往游戏入口页的按钮

任一存 1 jaar geleden
bovenliggende
commit
b29b01aa8a

File diff suppressed because it is too large
+ 1 - 1
public/relic-data/data.json


BIN
src/assets/images/btn-game-entry-page-1.png


BIN
src/assets/images/btn-game-entry-page-2.png


BIN
src/assets/images/btn-game-entry-page-3.png


BIN
src/assets/images/btn-game-entry-page-active-1.png


BIN
src/assets/images/btn-game-entry-page-active-2.png


BIN
src/assets/images/btn-game-entry-page-active-3.png


+ 24 - 16
src/views/PanoView.vue

@@ -28,9 +28,10 @@
         })"
       />
       <button
-        v-if="sceneIdx === 1"
-        class="ship-btn"
-        @click="showShipGame = true"
+        class="game-entry-page-btn"
+        @click="showGameEntryPage({
+          gameName: sceneIdx === 0 ? '广寒宫' : sceneIdx === 1 ? '聊城古船' : '多宝阁',
+        })"
       />
       <button
         v-if="sceneIdx === 0 && cameraIdx === 0"
@@ -408,6 +409,12 @@ const btnReturnHomeImgUrl = computed(() => {
 const btnReturnHomeActiveImgUrl = computed(() => {
   return `url(${process.env.VUE_APP_CLI_MODE === 'dev' ? '' : '../'}` + require(`@/assets/images/btn-return-home-active-${sceneIdx.value + 1}.png`) + ')'
 })
+const btnGameEntryPageImgUrl = computed(() => {
+  return `url(${process.env.VUE_APP_CLI_MODE === 'dev' ? '' : '../'}` + require(`@/assets/images/btn-game-entry-page-${sceneIdx.value + 1}.png`) + ')'
+})
+const btnGameEntryPageActiveImgUrl = computed(() => {
+  return `url(${process.env.VUE_APP_CLI_MODE === 'dev' ? '' : '../'}` + require(`@/assets/images/btn-game-entry-page-active-${sceneIdx.value + 1}.png`) + ')'
+})
 
 const btnOnTrack1ImgUrl = computed(() => {
   return `url(${process.env.VUE_APP_CLI_MODE === 'dev' ? '' : '../'}` + require(`@/assets/images/camera-btn-${sceneIdx.value + 1}-${cameraIdx.value + 1}-1.png`) + ')'
@@ -988,10 +995,11 @@ window.showIframe = (hotspotInfo) => {
   console.log('parent window: showIframe...')
   store.dispatch('openIframePage', hotspotInfo)
 }
-window.showGameEntryPage = function(hotspotInfo) {
+function showGameEntryPage(hotspotInfo) {
   console.log('parent window: showGameEntryPage. param: ', hotspotInfo)
   store.dispatch('openGameEntryPage', hotspotInfo)
 }
+window.showGameEntryPage = showGameEntryPage
 /**
  * end of iframe的逻辑
  */
@@ -1117,47 +1125,47 @@ onMounted(() => {
       width: 100%;
       height: 100%;
     }
-    >button.guide-btn{
+    >button.return-home{
       position: absolute;
       width: 77px;
       height: 77px;
-      top: 128px;
+      top: 43px;
       right: 51px;
-      background-image: url('@/assets/images/guide/tbn_help-min.png');
+      background-image: v-bind(btnReturnHomeImgUrl);
       background-size: cover;
       background-repeat: no-repeat;
       background-position: center center;
       z-index: 5;
+      &:hover{
+        background-image: v-bind(btnReturnHomeActiveImgUrl);
+      }
     }
-    >button.ship-btn{
+    >button.game-entry-page-btn{
       position: absolute;
       width: 77px;
       height: 77px;
       top: 128px;
       right: 51px;
-      background-image: url('@/assets/images/ship-game/tbn_game_boat-min.png');
+      background-image: v-bind(btnGameEntryPageImgUrl);
       background-size: cover;
       background-repeat: no-repeat;
       background-position: center center;
       z-index: 5;
       &:hover{
-        background-image: url('@/assets/images/ship-game/btn_game boat_hover_green-min.png');
+        background-image: v-bind(btnGameEntryPageActiveImgUrl);
       }
     }
-    >button.return-home{
+    >button.guide-btn{
       position: absolute;
       width: 77px;
       height: 77px;
-      top: 43px;
+      top: 213px;
       right: 51px;
-      background-image: v-bind(btnReturnHomeImgUrl);
+      background-image: url('@/assets/images/guide/tbn_help-min.png');
       background-size: cover;
       background-repeat: no-repeat;
       background-position: center center;
       z-index: 5;
-      &:hover{
-        background-image: v-bind(btnReturnHomeActiveImgUrl);
-      }
     }
     >.camera-desc{
       z-index: 7;