Procházet zdrojové kódy

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

1.  注释原首页tabbar配置,将工作台设为默认tab页
2.  调整登录成功后跳转路径从首页改为工作台
3.  临时注释快捷打卡入口组件
huoyi před 2 týdny
rodič
revize
752947adad
4 změnil soubory, kde provedl 27 přidání a 25 odebrání
  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
   data() {
13
   data() {
14
     return {
14
     return {
15
       list: [
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
           pagePath: "pages/myToDoList/index",
29
           pagePath: "pages/myToDoList/index",
@@ -25,12 +31,7 @@ export default {
25
           selectedIconPath: "/static/images/tabbar/message_.png",
31
           selectedIconPath: "/static/images/tabbar/message_.png",
26
           text: "消息"
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
           pagePath: "pages/mine/index",
36
           pagePath: "pages/mine/index",
36
           iconPath: "/static/images/tabbar/mine.png",
37
           iconPath: "/static/images/tabbar/mine.png",

+ 11 - 10
src/pages.json

@@ -366,11 +366,17 @@
366
     "paddingBottom": "0px",
366
     "paddingBottom": "0px",
367
     "marginBottom": "0px",
367
     "marginBottom": "0px",
368
     "list": [
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
         "pagePath": "pages/myToDoList/index",
382
         "pagePath": "pages/myToDoList/index",
@@ -378,12 +384,7 @@
378
         "selectedIconPath": "/static/images/tabbar/message_.png",
384
         "selectedIconPath": "/static/images/tabbar/message_.png",
379
         "text": "消息"
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
         "pagePath": "pages/mine/index",
389
         "pagePath": "pages/mine/index",
389
         "iconPath": "static/images/tabbar/mine.png",
390
         "iconPath": "static/images/tabbar/mine.png",

+ 2 - 2
src/pages/login.vue

@@ -78,7 +78,7 @@ export default {
78
   onLoad() {
78
   onLoad() {
79
     //#ifdef H5
79
     //#ifdef H5
80
     if (getToken()) {
80
     if (getToken()) {
81
-      this.$tab.reLaunch('/pages/home-new/index')
81
+      this.$tab.reLaunch('/pages/work/index')
82
     }
82
     }
83
     this.getStorage()
83
     this.getStorage()
84
     //#endif
84
     //#endif
@@ -164,7 +164,7 @@ export default {
164
       this.$store.dispatch('GetInfo').then(res => {
164
       this.$store.dispatch('GetInfo').then(res => {
165
         // 登录成功后调用showMessageTabRedDot更新消息tab红点状态
165
         // 登录成功后调用showMessageTabRedDot更新消息tab红点状态
166
         showMessageTabRedDot()
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
       </view>
8
       </view>
9
 
9
 
10
       <!-- 快捷打卡入口 -->
10
       <!-- 快捷打卡入口 -->
11
-      <view class="quick-checkin" @click="goToAttendance">
11
+      <!-- <view class="quick-checkin" @click="goToAttendance">
12
         <view class="checkin-left">
12
         <view class="checkin-left">
13
           <uni-icons type="calendar-filled" size="30" color="#409EFF"></uni-icons>
13
           <uni-icons type="calendar-filled" size="30" color="#409EFF"></uni-icons>
14
           <text class="checkin-text">快速打卡</text>
14
           <text class="checkin-text">快速打卡</text>
15
         </view>
15
         </view>
16
         <uni-icons type="arrowright" size="20" color="#999"></uni-icons>
16
         <uni-icons type="arrowright" size="20" color="#999"></uni-icons>
17
-      </view>
17
+      </view> -->
18
 
18
 
19
 
19
 
20
 
20