2 Commits eba9d422e0 ... 1579d9cd30

Author SHA1 Message Date
  windyeasy 1579d9cd30 chore: update version 3 months ago
  windyeasy a066555df7 feat: add tabbar page 3 months ago
6 changed files with 21 additions and 15 deletions
  1. 1 1
      package.json
  2. 2 2
      pages.config.ts
  3. 7 7
      src/pages.json
  4. 2 2
      src/pages/profile/index.vue
  5. 6 0
      src/service/request/index.ts
  6. 3 3
      src/types/uni-pages.d.ts

+ 1 - 1
package.json

@@ -1,7 +1,7 @@
 {
   "name": "hospital-mobile",
   "type": "commonjs",
-  "version": "2.4.3",
+  "version": "1.0.0",
   "description": "hospital-mobile",
   "author": {
     "name": "codercup",

+ 2 - 2
pages.config.ts

@@ -35,8 +35,8 @@ export default defineUniPages({
       {
         iconPath: 'static/tabbar/example.png',
         selectedIconPath: 'static/tabbar/exampleHL.png',
-        pagePath: 'pages/about/about',
-        text: '关于',
+        pagePath: 'pages/profile/index',
+        text: '我的',
       },
     ],
   },

+ 7 - 7
src/pages.json

@@ -32,28 +32,28 @@
       {
         "iconPath": "static/tabbar/example.png",
         "selectedIconPath": "static/tabbar/exampleHL.png",
-        "pagePath": "pages/about/index",
-        "text": "关于"
+        "pagePath": "pages/profile/index",
+        "text": "我的"
       }
     ]
   },
   "pages": [
     {
-      "path": "pages/index/index",
+      "path": "pages/profile/index",
       "type": "home",
       "style": {
         "navigationStyle": "custom",
-        "navigationBarTitleText": "首页"
+        "navigationBarTitleText": "我的"
       }
     },
     {
-      "path": "pages/about/index",
+      "path": "pages/index/index",
       "type": "home",
       "style": {
         "navigationStyle": "custom",
-        "navigationBarTitleText": "关于"
+        "navigationBarTitleText": "首页"
       }
     }
   ],
   "subPackages": []
-}
+}

+ 2 - 2
src/pages/about/index.vue → src/pages/profile/index.vue

@@ -3,12 +3,12 @@
 {
   style: {
     navigationStyle: 'custom',
-    navigationBarTitleText: '关于',
+    navigationBarTitleText: '我的',
   },
 }
 </route>
 <template>
-  <view>关于</view>
+  <view>我的</view>
 </template>
 
 <script lang="ts" setup></script>

+ 6 - 0
src/service/request/index.ts

@@ -137,6 +137,12 @@ class WdRequest {
           resolve(res)
         },
         fail: (error) => {
+          if (this.config?.interceptor?.responseErrorFn) {
+            error = this.config.interceptor.responseErrorFn(error)
+          }
+          if (config?.interceptor?.responseErrorFn) {
+            error = config?.interceptor?.responseErrorFn(error)
+          }
           reject(error)
         },
       })

+ 3 - 3
src/types/uni-pages.d.ts

@@ -4,13 +4,13 @@
 // Generated by vite-plugin-uni-pages
 
 interface NavigateToOptions {
-  url: "/pages/index/index" |
-       "/pages/about/index";
+  url: "/pages/profile/index" |
+       "/pages/index/index";
 }
 interface RedirectToOptions extends NavigateToOptions {}
 
 interface SwitchTabOptions {
-  url: "/pages/index/index" | "/pages/about/about"
+  url: "/pages/index/index" | "/pages/profile/index"
 }
 
 type ReLaunchOptions = NavigateToOptions | SwitchTabOptions;