Просмотр исходного кода

bug fix:对unity小游戏url传参的位置不应该是vue-router里传参的位置

任一存 1 год назад
Родитель
Сommit
2dba42b158
2 измененных файлов с 6 добавлено и 6 удалено
  1. 1 1
      game/README.md
  2. 5 5
      game/src/views/GameByUnity.vue

+ 1 - 1
game/README.md

@@ -19,4 +19,4 @@ https://sit-cnzhengquan.4dage.com/game/index.html#/
 
 助农课堂:有bug
 
-抗体大作战,积分
+unity游戏的按钮

+ 5 - 5
game/src/views/GameByUnity.vue

@@ -22,13 +22,13 @@ if (store.state.loginStatus) {
   gameUrlQuery = `?userId=${store.state.userInfo.id}&token=${store.state.token}`
 }
 const gameUrlMap = {
-  AntibodyBattle: `unity/antibody-battle/index.html#/`,
-  DisasterRelief: `unity/disaster-relief/index.html#/`,
-  EnviromentProtection: `unity/enviroment-protection/index.html#/`,
-  LostChildren: `unity/lost-children/index.html#/`,
+  AntibodyBattle: `unity/antibody-battle/index.html${gameUrlQuery}#/`,
+  DisasterRelief: `unity/disaster-relief/index.html${gameUrlQuery}#/`,
+  EnviromentProtection: `unity/enviroment-protection/index.html${gameUrlQuery}#/`,
+  LostChildren: `unity/lost-children/index.html${gameUrlQuery}#/`,
 }
 
-const gameUrl = gameUrlMap[route.query.gameName] + gameUrlQuery
+const gameUrl = gameUrlMap[route.query.gameName]
 
 </script>