任一存 1 anno fa
parent
commit
95fe73a905
2 ha cambiato i file con 7 aggiunte e 6 eliminazioni
  1. 6 6
      game/src/router/index.js
  2. 1 0
      game/src/views/GameByUnity.vue

+ 6 - 6
game/src/router/index.js

@@ -81,11 +81,11 @@ const router = createRouter({
   routes
 })
 
-router.beforeEach((to, from) => {
-  // 生产环境下强制每次都从首页进入
-  if (process.env.NODE_ENV === 'production' && !from.name && to.name !== 'HomeView') {
-    return '/'
-  }
-})
+// router.beforeEach((to, from) => {
+//   // 生产环境下强制每次都从首页进入
+//   if (process.env.NODE_ENV === 'production' && !from.name && to.name !== 'HomeView') {
+//     return '/'
+//   }
+// })
 
 export default router

+ 1 - 0
game/src/views/GameByUnity.vue

@@ -1,6 +1,7 @@
 <template>
   <div class="game-by-unity">
     <iframe
+      allow="fullscreen"
       :src="gameUrl"
       frameborder="0"
     />