Jelajahi Sumber

部分代码层级调整

chaooo 1 tahun lalu
induk
melakukan
e1e34fc7bf

+ 5 - 5
project.private.config.json

@@ -25,14 +25,14 @@
           "scene": null
         },
         {
-          "name": "pages/report/main",
-          "pathName": "pages/report/main",
+          "name": "pages/games/report/main",
+          "pathName": "pages/games/report/main",
           "query": "id=17700",
           "scene": null
         },
         {
-          "name": "pages/game_record/main",
-          "pathName": "pages/game_record/main",
+          "name": "pages/games/game_record/main",
+          "pathName": "pages/games/game_record/main",
           "query": "",
           "scene": null
         },
@@ -51,4 +51,4 @@
       ]
     }
   }
-}
+}

+ 4 - 4
src/app.json

@@ -1,13 +1,13 @@
 {
   "pages": [
     "pages/index/main",
-    "pages/guide/main",
+    "pages/banner/guide/main",
     "pages/banner/none/main",
     "pages/banner/joint/main",
     "pages/banner/competition/main",
-    "pages/start/main",
-    "pages/report/main",
-    "pages/game_record/main",
+    "pages/games/start/main",
+    "pages/games/report/main",
+    "pages/games/game_record/main",
     "pages/user_center/main",
     "pages/user_center/edit/main",
     "pages/user_center/edit/confirm_phone_first/main",

+ 1 - 1
src/components/connection/brains/connecting.vue

@@ -100,7 +100,7 @@ export default {
             cancelButtonText: "查看指引",
           }).catch(() => {
             mpvue.navigateTo({
-              url: "/pages/guide/main"
+              url: "/pages/banner/guide/main"
             })
           });
         }

+ 1 - 1
src/components/connection/toys/selected.vue

@@ -105,7 +105,7 @@ export default {
     pageToPlay() {
       $this.$emit("gameStart", true);
       mpvue.navigateTo({
-        url: "/pages/start/main",
+        url: "/pages/games/start/main",
         success() {
           // 设置游戏状态为游戏中
           game_store.setters.setGameStatus(1);

+ 1 - 8
src/pages/guide/index.vue → src/pages/banner/guide/index.vue

@@ -10,7 +10,6 @@
   </div>
 </template>
 <script>
-var $this;
 export default {
   name: "guide_container",
   data() {
@@ -46,13 +45,7 @@ export default {
         }
       ]
     };
-  },
-  methods: {},
-  mounted() {
-  },
-  created() {
-    $this = this;
-  },
+  }
 };
 </script>
 <style scoped>

+ 0 - 0
src/pages/game_record/main.js → src/pages/banner/guide/main.js


+ 0 - 0
src/pages/guide/main.json → src/pages/banner/guide/main.json


+ 0 - 13
src/pages/game_record/main.json

@@ -1,13 +0,0 @@
-{
-  "usingComponents": {
-    "van-row": "../../static/vant/row/index",
-    "van-col": "../../static/vant/col/index",
-    "van-popup": "../../static/vant/popup/index",
-    "van-overlay": "../../static/vant/overlay/index",
-    "van-divider": "../../static/vant/divider/index",
-    "van-cell": "../../static/vant/cell/index",
-    "van-cell-group": "../../static/vant/cell-group/index",
-    "van-tab": "../../static/vant/tab/index",
-    "van-tabs": "../../static/vant/tabs/index"
-  }
-}

+ 3 - 3
src/pages/game_record/index.vue → src/pages/games/game_record/index.vue

@@ -52,8 +52,8 @@
 <script>
 
 
-import {gameList} from "../../requests/game";
-import {formatSeconds} from "../../utils";
+import {gameList} from "../../../requests/game";
+import {formatSeconds} from "../../../utils";
 
 var $this
 export default {
@@ -102,7 +102,7 @@ export default {
         mode = 2
       }
       mpvue.navigateTo({
-        url: `/pages/report/main?id=${$event}&mode=${mode}`
+        url: `/pages/games/report/main?id=${$event}&mode=${mode}`
       })
     },
     get_game_list($params = {}) {

+ 0 - 0
src/pages/guide/main.js → src/pages/games/game_record/main.js


+ 13 - 0
src/pages/games/game_record/main.json

@@ -0,0 +1,13 @@
+{
+  "usingComponents": {
+    "van-row": "/static/vant/row/index",
+    "van-col": "/static/vant/col/index",
+    "van-popup": "/static/vant/popup/index",
+    "van-overlay": "/static/vant/overlay/index",
+    "van-divider": "/static/vant/divider/index",
+    "van-cell": "/static/vant/cell/index",
+    "van-cell-group": "/static/vant/cell-group/index",
+    "van-tab": "/static/vant/tab/index",
+    "van-tabs": "/static/vant/tabs/index"
+  }
+}

+ 0 - 0
src/pages/report/index.vue → src/pages/games/report/index.vue


+ 8 - 8
src/pages/report/index_bak.vue → src/pages/games/report/index_bak.vue

@@ -325,7 +325,7 @@
             <title class="interfere_footer_logo"></title>专注力干扰
           </view>
         </view>
-      </view>  
+      </view>
 
       <!-- 调整能力分析 -->
       <view class="flex justify-center">
@@ -544,7 +544,7 @@
 
 <script>
 import mpvueEcharts from "mpvue-echarts";
-import echarts from "../../../static/echarts.min";
+import echarts from "../../../../static/echarts.min";
 import util, {
   filterPieData,
   formatSeconds,
@@ -555,10 +555,10 @@ import util, {
   interfereAction,
   getAdjustmentChartsOption,
   timestampToTimeS,
-} from "../../utils/index";
-import {gameDetail} from "../../requests/game";
-import game_store from "../../store/game";
-import Toast from "../../../static/vant/toast/toast";
+} from "../../../utils";
+import {gameDetail} from "../../../requests/game";
+import game_store from "../../../store/game";
+import Toast from "../../../../static/vant/toast/toast";
 
 var att_charts,
   // alpha_beta_charts,
@@ -641,7 +641,7 @@ function initRadarChart(canvas, width, height) {
   radar_charts.setOption(option);
 
   // 添加点击事件
-  radar_charts.on('click', function(params){    
+  radar_charts.on('click', function(params){
     if(params.name.indexOf("专注力平均值") != -1) {
       $this.radar_indication_type = 1
 
@@ -885,7 +885,7 @@ export default {
     },
     to_game_records() {
       mpvue.navigateTo({
-        url: "/pages/game_record/main",
+        url: "/pages/games/game_record/main",
       });
     },
     //  切换时间查看线 数据

+ 0 - 0
src/pages/report/main.js → src/pages/games/report/main.js


+ 11 - 0
src/pages/games/report/main.json

@@ -0,0 +1,11 @@
+{
+  "usingComponents": {
+    "van-row": "/static/vant/row/index",
+    "van-col": "/static/vant/col/index",
+    "van-popup": "/static/vant/popup/index",
+    "van-toast": "/static/vant/toast/index",
+    "van-tab": "/static/vant/tab/index",
+    "van-tabs": "/static/vant/tabs/index",
+    "van-count-down": "/static/vant/count-down/index"
+  }
+}

+ 6 - 6
src/pages/start/index.vue → src/pages/games/start/index.vue

@@ -168,15 +168,15 @@
 
 <script>
 import ble_store from "@/store/bluetooth";
-import util from "../../utils/index";
+import util from "../../../utils";
 import game_store from "@/store/game";
-import Toast from "../../../static/vant/toast/toast";
-import {gameAddLine, gameEnd} from "../../requests/game";
+import Toast from "../../../../static/vant/toast/toast";
+import {gameAddLine, gameEnd} from "../../../requests/game";
 import mpvueEcharts from "mpvue-echarts";
-import echarts from "../../../static/echarts.min";
+import echarts from "../../../../static/echarts.min";
 import {LogInDb} from "@/requests/log";
 import WechatLog from '@/utils/wechat_log'
-import {formatPlaySeconds, get_big_data} from "../../utils/game";
+import {formatPlaySeconds, get_big_data} from "../../../utils/game";
 
 let att_charts, med_charts, $this;
 
@@ -366,7 +366,7 @@ export default {
     },
     to_report() {
       mpvue.redirectTo({
-        url: "/pages/report/main?id=" + wx.getStorageSync("game_record_id"),
+        url: "/pages/games/report/main?id=" + wx.getStorageSync("game_record_id"),
         success() {
           $this.timeData = {};
           $this.attList = [];

+ 0 - 0
src/pages/start/main.js → src/pages/games/start/main.js


+ 13 - 0
src/pages/games/start/main.json

@@ -0,0 +1,13 @@
+{
+  "usingComponents": {
+    "van-row": "/static/vant/row/index",
+    "van-col": "/static/vant/col/index",
+    "van-toast": "/static/vant/toast/index",
+    "van-popup": "/static/vant/popup/index",
+    "van-dialog": "/static/vant/dialog/index",
+    "van-circle": "/static/vant/circle/index",
+    "van-tabs": "/static/vant/tabs/index",
+    "van-tab": "/static/vant/tab/index",
+    "van-notify": "/static/vant/notify/index"
+  }
+}

+ 1 - 1
src/pages/index/index.vue

@@ -100,7 +100,7 @@ export default {
       <div class="content">
         <van-row>
           <van-col span="12">
-            <img src="https://img.shuimuai.com/web/index_btn_chengjijilu.png" @click="pageTo('game_record')">
+            <img src="https://img.shuimuai.com/web/index_btn_chengjijilu.png" @click="pageTo('games/game_record')">
           </van-col>
           <van-col span="12">
             <img src="https://img.shuimuai.com/web/index_btn_gerenzhongxin.png" @click="pageTo('user_center')">

+ 0 - 11
src/pages/report/main.json

@@ -1,11 +0,0 @@
-{
-  "usingComponents": {
-    "van-row": "../../static/vant/row/index",
-    "van-col": "../../static/vant/col/index",
-    "van-popup": "../../static/vant/popup/index",
-    "van-toast": "../../static/vant/toast/index",
-    "van-tab": "../../static/vant/tab/index",
-    "van-tabs": "../../static/vant/tabs/index",
-    "van-count-down": "../../static/vant/count-down/index"
-  }
-}

+ 0 - 13
src/pages/start/main.json

@@ -1,13 +0,0 @@
-{
-  "usingComponents": {
-    "van-row": "../../static/vant/row/index",
-    "van-col": "../../static/vant/col/index",
-    "van-toast": "../../static/vant/toast/index",
-    "van-popup": "../../static/vant/popup/index",
-    "van-dialog": "../../static/vant/dialog/index",
-    "van-circle": "../../static/vant/circle/index",
-    "van-tabs": "../../static/vant/tabs/index",
-    "van-tab": "../../static/vant/tab/index",
-    "van-notify": "../../static/vant/notify/index"
-  }
-}

+ 1 - 1
src/utils/game.js

@@ -77,7 +77,7 @@ import {gameAddLine, gameEnd} from "../requests/game";
 
 function to_report() {
   mpvue.navigateTo({
-    url: "/pages/report/main?id=" + game_store.getters.getGameRecordId(),
+    url: "/pages/games/report/main?id=" + game_store.getters.getGameRecordId(),
     success() {
       wx.hideLoading()
       //设置游戏状态为 停止游戏