From 4898b385886794bf0663ec2d883ea808b78ae522 Mon Sep 17 00:00:00 2001
From: yangfeng <wanwan926_4@163.com>
Date: 星期三, 19 七月 2023 11:37:25 +0800
Subject: [PATCH] 接口联调相关api添加

---
 vue.config.js |   50 +++++++++++++++++++++++++++++++++++++++++++++-----
 1 files changed, 45 insertions(+), 5 deletions(-)

diff --git a/vue.config.js b/vue.config.js
index f67b0ac..aa616f6 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -3,17 +3,49 @@
 //   transpileDependencies: true
 // })
 const path = require("path")
-const getServerJson = require("./public/serverconfig")
-const devServer = require("./vue.develop.config")
-const { context } = getServerJson
+// 鍩虹璺緞 娉ㄦ剰鍙戝竷涔嬪墠瑕佸厛淇敼杩欓噷
+const publicPath = "/"
 function resolve(dir) {
   return path.join(__dirname, dir)
 }
 module.exports = {
-  publicPath: context,
+  publicPath,
   lintOnSave: false,
   productionSourceMap: false, // 濡傛灉浣犱笉闇�瑕佺敓浜х幆澧冪殑source map, 鍙互灏嗗叾璁剧疆涓篺alse 浠ュ姞閫熺敓浜х幆澧冩瀯寤�
-  devServer,
+  devServer: {
+    proxy: {
+      "/api/base": {
+        target: "http://192.168.20.118:8001",
+        ws: true,
+        changeOrigin: true
+      },
+      "/api/salesLeads": {
+        target: "http://192.168.20.118:8001",
+        ws: true,
+        changeOrigin: true
+      },
+      "/api/followRecord": {
+        target: "http://192.168.20.118:8001",
+        ws: true,
+        changeOrigin: true
+      },
+      "/api-s": {
+        target: "http://192.168.20.119:9081",
+        ws: true,
+        changeOrigin: true
+      },
+      "/api": {
+        target: "http://192.168.20.118:8001",
+        ws: true,
+        changeOrigin: true
+      }
+      // "/api-s": {
+      //   target: "http://192.168.20.113:9081",
+      //   ws: true,
+      //   changeOrigin: true,
+      // },
+    }
+  },
   transpileDependencies: [
     // 鍏煎IE11娴忚鍣�(鍏煎npm鍖呭拰cnpm鍖�)
     "crypto-js",
@@ -50,5 +82,13 @@
         symbolId: "icon-[name]"
       })
       .end()
+  },
+  css: {
+    loaderOptions: {
+      // 璁剧疆 scss 鍏敤鍙橀噺鏂囦欢
+      sass: {
+        additionalData: `@import "@/assets/style/variable.scss";`
+      }
+    }
   }
 }

--
Gitblit v1.8.0