wenhongquan 7 ماه پیش
والد
کامیت
8476e89918
3فایلهای تغییر یافته به همراه7 افزوده شده و 3 حذف شده
  1. 2 1
      src/components/Map/map.vue
  2. 3 0
      src/utils/request.ts
  3. 2 2
      vite.config.ts

+ 2 - 1
src/components/Map/map.vue

@@ -111,7 +111,8 @@ const initMap = () => {
         mapObj.value = map;
 
         if (props.darkType) {
-            var styleName = "amap://styles/8b9b98f3e261fb3096f4425490da9c5d";
+            //var styleName = "amap://styles/8b9b98f3e261fb3096f4425490da9c5d";
+            var styleName = "amap://styles/darkblue";
             map.setMapStyle(styleName);
         }
         // 添加插件

+ 3 - 0
src/utils/request.ts

@@ -120,6 +120,9 @@ service.interceptors.response.use(
     if (res.request.responseType === 'blob' || res.request.responseType === 'arraybuffer') {
       return res.data;
     }
+    if(code === 1004){
+      return;
+    }
     if (code === 401) {
       // prettier-ignore
       if (!isRelogin.show) {

+ 2 - 2
vite.config.ts

@@ -26,8 +26,8 @@ export default defineConfig(({ mode, command }: ConfigEnv): UserConfig => {
       open: true,
       proxy: {
         [env.VITE_APP_BASE_API]: {
-          target: 'http://localhost:8080',
-          // target: 'https://khy.xiaole.vip/api',
+          // target: 'http://localhost:8080',
+          target: 'https://khy.xiaole.vip/api',
           changeOrigin: true,
           ws: true,
           rewrite: (path) => path.replace(new RegExp('^' + env.VITE_APP_BASE_API), '')