Quellcode durchsuchen

部分代码结构调整

chaooo vor 1 Jahr
Ursprung
Commit
2759456dde

+ 5 - 5
src/app.json

@@ -1,8 +1,11 @@
 {
   "pages": [
     "pages/index/main",
+    "pages/guide/main",
+    "pages/banner/none/main",
+    "pages/banner/joint/main",
+    "pages/banner/competition/main",
     "pages/start/main",
-    "pages/none/main",
     "pages/report/main",
     "pages/game_record/main",
     "pages/user_center/main",
@@ -12,10 +15,7 @@
     "pages/user_center/orders/main",
     "pages/user_center/vip/main",
     "pages/user_center/vip_code/main",
-    "pages/guide/main",
-    "pages/joint/main",
-    "pages/coupons/main",
-    "pages/competition/main"
+    "pages/coupons/main"
   ],
   "window": {
     "backgroundTextStyle": "light",

+ 4 - 4
src/components/index/banner.vue

@@ -21,19 +21,19 @@ export default {
         {
           id: 1,
           src: "https://img.shuimuai.com/mp/banner1_new.png",
-          url: "/pages/none/main",
+          url: "/pages/banner/none/main",
           button_text: "关于水母星球",
         },
         {
           id: 2,
           src: "https://img.shuimuai.com/FrbDe9MOSK7t4hxYkbXUNbek6fG8",
-          url: "/pages/competition/main",
+          url: "/pages/banner/competition/main",
           button_text: "参加比赛",
         },
         {
           id: 3,
           src: "https://img.shuimuai.com/banner_blue.png",
-          url: "/pages/joint/main",
+          url: "/pages/banner/joint/main",
           button_text: "我要联名",
         },
       ],
@@ -51,7 +51,7 @@ export default {
           let $res = res.data.data.pop();
           console.log("轮播图活动banner", $res);
           $this.banners[1].src = "https://img.shuimuai.com/" + ($res["img"] || "FrbDe9MOSK7t4hxYkbXUNbek6fG8");
-          $this.banners[1].url = "/pages/competition/main?activity_id=" + $res["activity_id"];
+          $this.banners[1].url = "/pages/banner/competition/main?activity_id=" + $res["activity_id"];
         } else {
           $this.banners.splice(1, 1);
         }

+ 6 - 6
src/pages/competition/index.vue → src/pages/banner/competition/index.vue

@@ -711,8 +711,8 @@
 </template>
 
 <script>
-import store from "../../store/competition";
-import { cal_down_time, formatTime } from "../../utils";
+import store from "../../../store/competition";
+import {cal_down_time, formatSeconds, formatTime} from "../../../utils";
 import {
   checkJoined,
   doEnroll,
@@ -722,10 +722,10 @@ import {
   getFinalsRanking,
   getJsSDK,
   getPromotionRanking,
-} from "../../requests/competition";
-import Toast from "../../../static/vant/toast/toast";
-import { reload_userinfo } from "../../utils/user";
-import { userDetail } from "../../requests/user";
+} from "../../../requests/competition";
+import Toast from "../../../../static/vant/toast/toast";
+import { reload_userinfo } from "../../../utils/user";
+import { userDetail } from "../../../requests/user";
 
 var $this;
 var $now = Math.round(new Date() / 1000);

+ 0 - 0
src/pages/competition/main.js → src/pages/banner/competition/main.js


+ 11 - 0
src/pages/banner/competition/main.json

@@ -0,0 +1,11 @@
+{
+  "usingComponents": {
+    "van-row": "/static/vant/row/index",
+    "van-col": "/static/vant/col/index",
+    "van-overlay": "/static/vant/overlay/index",
+    "van-toast": "/static/vant/toast/index",
+    "van-count-down": "/static/vant/count-down/index",
+    "van-sticky": "/static/vant/sticky/index",
+    "van-image": "/static/vant/image/index"
+  }
+}

+ 13 - 14
src/pages/joint/index.vue → src/pages/banner/joint/index.vue

@@ -6,27 +6,27 @@
        <!-- 填写表框 -->
        <div class="cover_input">
           <span class="title">联名邀请,免费测评专注力</span>
-          <input 
+          <input
           placeholder='请输入学校名称'
-          v-model="school" 
+          v-model="school"
           @input="textControl($event,'sch')"
           placeholder-style="font-size: 28rpx;color: #B0784F;"/>
 
-          <input 
+          <input
           placeholder='请输入学生'
-          v-model="student" 
+          v-model="student"
           @input="textControl($event,'stu')"
           placeholder-style="font-size: 28rpx;color: #B0784F;"/>
 
           <button class="cu-btn btn" @click="joint_test">免费测评</button>
        </div>
-       
+
        <!-- 滚动 -->
        <div class="cover_scroll">
-         <swiper 
+         <swiper
          class="swiper"
          easing-function="linear"
-         :circular="circular" 
+         :circular="circular"
          :indicator-dots="indicatorDots"
          :autoplay="autoplay"
          :interval="interval"
@@ -54,8 +54,7 @@
   </div>
 </template>
 <script>
-import { addJoint, getJoint } from "../../requests/competition";
-import Toast from "../../../static/vant/toast/toast";
+import {addJoint, getJoint} from "../../../requests/competition";
 
 var $this;
 export default {
@@ -91,8 +90,8 @@ export default {
              title: "请输入中文名",
              icon: "error",
            })
-        } 
-        
+        }
+
       } else{
         let $joint = {
           phone: wx.getStorageSync("phone"),
@@ -129,7 +128,7 @@ export default {
     close_pop() {
       $this.show = false;
     },
-    
+
     // textControl($e,watch) {
     //   console.log($e)
     //   const value = $e.mp.detail.value
@@ -141,7 +140,7 @@ export default {
     //       icon: "error",
     //     })
     //     watch == "sch" ? $this.school = "" : $this.student = ""
-    //   } 
+    //   }
     // },
   },
   mounted() {
@@ -266,4 +265,4 @@ input {
 /* .swiper-item{
   height:90rpx !important;
 }  */
-</style>
+</style>

+ 0 - 0
src/pages/joint/main.js → src/pages/banner/joint/main.js


+ 7 - 0
src/pages/banner/joint/main.json

@@ -0,0 +1,7 @@
+{
+    "usingComponents": {
+      "van-popup": "/static/vant/popup/index",
+      "van-overlay": "/static/vant/overlay/index",
+      "van-toast": "/static/vant/toast/index"
+    }
+  }

+ 0 - 0
src/pages/none/index.vue → src/pages/banner/none/index.vue


+ 0 - 0
src/pages/none/main.js → src/pages/banner/none/main.js


+ 12 - 0
src/pages/banner/none/main.json

@@ -0,0 +1,12 @@
+{
+  "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-toast": "/static/vant/toast/index",
+    "van-field": "/static/vant/field/index",
+    "van-count-down": "/static/vant/count-down/index"
+
+  }
+}

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

@@ -1,11 +0,0 @@
-{
-  "usingComponents": {
-    "van-row": "../../static/vant/row/index",
-    "van-col": "../../static/vant/col/index",
-    "van-overlay": "../../static/vant/overlay/index",
-    "van-toast": "../../static/vant/toast/index",
-    "van-count-down": "../../static/vant/count-down/index",
-    "van-sticky": "../../static/vant/sticky/index",
-    "van-image": "../../static/vant/image/index"
-  }
-}

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

@@ -158,7 +158,6 @@ export default {
 
 .line_container .title {
   font-size: 10px;
-  // font-family: PingFang SC;
   font-weight: 400;
   color: #6C6C6C;
   line-height: 24px;

+ 0 - 8
src/pages/joint/main.json

@@ -1,8 +0,0 @@
-{
-    "usingComponents": {
-      "van-popup": "../../../static/vant/popup/index",
-      "van-overlay": "../../../static/vant/overlay/index",
-      "van-toast": "../../../../static/vant/toast/index"
-    }
-  }
-  

+ 0 - 12
src/pages/none/main.json

@@ -1,12 +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-toast": "../../../static/vant/toast/index",
-    "van-field": "../../../static/vant/field/index",
-    "van-count-down":"../../../static/vant/count-down/index"
-
-  }
-}