소스 검색

refactor: 调整首页与工作台的路由配置与默认跳转页

1.  注释原首页tabbar配置,将工作台设为默认tab页
2.  调整登录成功后跳转路径从首页改为工作台
3.  临时注释快捷打卡入口组件
huoyi 2 주 전
부모
커밋
752947adad
4개의 변경된 파일27개의 추가작업 그리고 25개의 파일을 삭제
  1. 12 11
      src/components/custom-tabbar.vue
  2. 11 10
      src/pages.json
  3. 2 2
      src/pages/login.vue
  4. 2 2
      src/pages/work/index.vue

+ 12 - 11
src/components/custom-tabbar.vue

@@ -13,11 +13,17 @@ export default {
13 13
   data() {
14 14
     return {
15 15
       list: [
16
-        {
17
-          pagePath: "pages/home-new/index",
18
-          iconPath: "/static/images/tabbar/home.png",
19
-          selectedIconPath: "/static/images/tabbar/home_.png",
20
-          text: "首页"
16
+        // {
17
+        //   pagePath: "pages/home-new/index",
18
+        //   iconPath: "/static/images/tabbar/home.png",
19
+        //   selectedIconPath: "/static/images/tabbar/home_.png",
20
+        //   text: "首页"
21
+        // },
22
+         {
23
+          pagePath: "pages/work/index",
24
+          iconPath: "/static/images/tabbar/work.png",
25
+          selectedIconPath: "/static/images/tabbar/work_.png",
26
+          text: "工作台"
21 27
         },
22 28
         {
23 29
           pagePath: "pages/myToDoList/index",
@@ -25,12 +31,7 @@ export default {
25 31
           selectedIconPath: "/static/images/tabbar/message_.png",
26 32
           text: "消息"
27 33
         },
28
-        {
29
-          pagePath: "pages/work/index",
30
-          iconPath: "/static/images/tabbar/work.png",
31
-          selectedIconPath: "/static/images/tabbar/work_.png",
32
-          text: "工作台"
33
-        },
34
+       
34 35
         {
35 36
           pagePath: "pages/mine/index",
36 37
           iconPath: "/static/images/tabbar/mine.png",

+ 11 - 10
src/pages.json

@@ -366,11 +366,17 @@
366 366
     "paddingBottom": "0px",
367 367
     "marginBottom": "0px",
368 368
     "list": [
369
+      // {
370
+      //   "pagePath": "pages/home-new/index",
371
+      //   "iconPath": "static/images/tabbar/home.png",
372
+      //   "selectedIconPath": "static/images/tabbar/home_.png",
373
+      //   "text": "首页"
374
+      // },
369 375
       {
370
-        "pagePath": "pages/home-new/index",
371
-        "iconPath": "static/images/tabbar/home.png",
372
-        "selectedIconPath": "static/images/tabbar/home_.png",
373
-        "text": "首页"
376
+        "pagePath": "pages/work/index",
377
+        "iconPath": "static/images/tabbar/work.png",
378
+        "selectedIconPath": "static/images/tabbar/work_.png",
379
+        "text": "工作台"
374 380
       },
375 381
       {
376 382
         "pagePath": "pages/myToDoList/index",
@@ -378,12 +384,7 @@
378 384
         "selectedIconPath": "/static/images/tabbar/message_.png",
379 385
         "text": "消息"
380 386
       },
381
-      {
382
-        "pagePath": "pages/work/index",
383
-        "iconPath": "static/images/tabbar/work.png",
384
-        "selectedIconPath": "static/images/tabbar/work_.png",
385
-        "text": "工作台"
386
-      },
387
+      
387 388
       {
388 389
         "pagePath": "pages/mine/index",
389 390
         "iconPath": "static/images/tabbar/mine.png",

+ 2 - 2
src/pages/login.vue

@@ -78,7 +78,7 @@ export default {
78 78
   onLoad() {
79 79
     //#ifdef H5
80 80
     if (getToken()) {
81
-      this.$tab.reLaunch('/pages/home-new/index')
81
+      this.$tab.reLaunch('/pages/work/index')
82 82
     }
83 83
     this.getStorage()
84 84
     //#endif
@@ -164,7 +164,7 @@ export default {
164 164
       this.$store.dispatch('GetInfo').then(res => {
165 165
         // 登录成功后调用showMessageTabRedDot更新消息tab红点状态
166 166
         showMessageTabRedDot()
167
-        this.$tab.reLaunch('/pages/home-new/index')
167
+        this.$tab.reLaunch('/pages/work/index')
168 168
       })
169 169
     }
170 170
   }

+ 2 - 2
src/pages/work/index.vue

@@ -8,13 +8,13 @@
8 8
       </view>
9 9
 
10 10
       <!-- 快捷打卡入口 -->
11
-      <view class="quick-checkin" @click="goToAttendance">
11
+      <!-- <view class="quick-checkin" @click="goToAttendance">
12 12
         <view class="checkin-left">
13 13
           <uni-icons type="calendar-filled" size="30" color="#409EFF"></uni-icons>
14 14
           <text class="checkin-text">快速打卡</text>
15 15
         </view>
16 16
         <uni-icons type="arrowright" size="20" color="#999"></uni-icons>
17
-      </view>
17
+      </view> -->
18 18
 
19 19
 
20 20