Explorar o código

fix:打包问题

needcode %!s(int64=2) %!d(string=hai) anos
pai
achega
a48f4dfecd

+ 3 - 3
src/App.vue

@@ -23,10 +23,10 @@ export default <any>{
 
 view {
   box-sizing: border-box;
-  --color-primary: #347DFF;
-  --color-warning: #FF9900;
+  --color-primary: #347dff;
+  --color-warning: #ff9900;
   --color-gray: #666666;
-  --color-sec: #F7F7F7;
+  --color-sec: #f7f7f7;
 }
 
 image {

+ 2 - 2
src/api/auth.ts

@@ -116,7 +116,7 @@ export function refresh(): Promise<string> {
           errMsg: "请登录",
         });
         uni.reLaunch({
-          url: "/pages/map/index",
+          url: "/pages/map/map",
         });
       } else {
         getApp<any>().globalData.token = "";
@@ -141,7 +141,7 @@ export function refresh(): Promise<string> {
             } else {
               if (data.code === 21005) {
                 uni.reLaunch({
-                  url: "/pages/map/index",
+                  url: "/pages/map/map",
                 });
               }
               reject({

+ 3 - 3
src/custom-tab-bar/index.js

@@ -9,7 +9,7 @@ Component({
     tabIndex: -1,
     tabs: [
       {
-        path: "/pages/map/index",
+        path: "/pages/map/map",
         text: "充电地图",
       },
       {
@@ -17,11 +17,11 @@ Component({
         text: "扫码充电",
       },
       {
-        path: "/pages/list/index",
+        path: "/pages/list/list",
         text: "电站列表",
       },
       {
-        path: "/pages/user/index",
+        path: "/pages/user/user",
         text: "个人中心",
       },
     ],

+ 1 - 1
src/pages-user/profile/profile.vue

@@ -204,7 +204,7 @@ const logoutUser = () => {
             clearToken();
             setTimeout(() => {
               uni.reLaunch({
-                url: "/pages/map/index",
+                url: "/pages/map/map",
               });
             }, 1500);
           })

+ 10 - 6
src/pages.json

@@ -1,16 +1,20 @@
 {
+  "entryPagePath": "pages/map/map",
   "pages": [
     {
-      "path": "pages/map/index",
+      "path": "pages/index/index"
+    },
+    {
+      "path": "pages/map/map",
       "style": {
         "disableScroll": true
       }
     },
     {
-      "path": "pages/list/index"
+      "path": "pages/list/list"
     },
     {
-      "path": "pages/user/index"
+      "path": "pages/user/user"
     }
   ],
   "subPackages": [
@@ -120,13 +124,13 @@
     "custom": true,
     "list": [
       {
-        "pagePath": "pages/map/index"
+        "pagePath": "pages/map/map"
       },
       {
-        "pagePath": "pages/list/index"
+        "pagePath": "pages/list/list"
       },
       {
-        "pagePath": "pages/user/index"
+        "pagePath": "pages/user/user"
       }
     ]
   }

+ 7 - 4
src/pages/index/index.vue

@@ -3,9 +3,12 @@
 </template>
 
 <script setup lang="ts">
-import { ref } from 'vue'
-const title = ref('Hello')
+import { onLoad } from "@dcloudio/uni-app";
+onLoad(() => {
+  uni.switchTab({
+    url: "/pages/map/map",
+  });
+});
 </script>
 
-<style>
-</style>
+<style></style>

+ 0 - 0
src/pages/list/index.vue → src/pages/list/list.vue


+ 0 - 0
src/pages/map/index.vue → src/pages/map/map.vue


+ 0 - 0
src/pages/user/index.vue → src/pages/user/user.vue


+ 1 - 1
src/utils/http.ts

@@ -77,7 +77,7 @@ class Http {
             clearToken();
             setTimeout(() => {
               uni.reLaunch({
-                url: "/pages/map/index",
+                url: "/pages/map/map",
               });
             }, 1000);
             throw {

+ 1 - 1
src/wxcomponents/navigation-bar/index.js

@@ -17,7 +17,7 @@ Component({
     },
     homePath: {
       type: String,
-      value: '/pages/map/index'
+      value: '/pages/map/map'
     },
     placeholder: {
       type: Boolean,