mushencc 2 years ago
parent
commit
40f3ad7dd8
1 changed files with 44 additions and 0 deletions
  1. 44 0
      vue.config.js

+ 44 - 0
vue.config.js

@@ -0,0 +1,44 @@
+const axios_default_ip =
+  process.env.NODE_ENV == "dev"
+    ? "https://zhapi.qingyaokeji.com"//jiufang2.1
+    // http://192.168.0.125:8080
+    : process.env.NODE_ENV == "test-prd"
+      ? "https://zhapi.qingyaokeji.com" //
+      : process.env.NODE_ENV == "prd_other"
+        ? "http://121.37.173.82:82" //贝斯特
+        : "http://124.71.176.88:882";
+//http://hxy_api.qingyaokeji.com // 华信源
+//  http://124.71.176.88:882  //江山
+// 'http://121.41.102.225:82' :测试
+// http://124.71.176.88:70  下沙新地址
+//http://121.41.102.225:999 上线服务器
+process.env.VUE_APP_BASE_URL = axios_default_ip;
+module.exports = {
+  publicPath: "./",
+  outputDir: "dist",
+  assetsDir: "static",
+  indexPath: "index.html",
+  productionSourceMap: process.env.NODE_ENV === "development",
+  devServer: {
+    proxy: {
+      "/proxy": {
+        target: axios_default_ip,
+        ws: true, // proxy websockets
+        changeOrigin: true,
+        pathRewrite: {
+          "^/proxy": "", // rewrite path
+        },
+      },
+      "/postek/print": {
+        target: "http://192.168.1.110:888",
+        ws: true, // proxy websockets
+        changeOrigin: true,
+        // pathRewrite: {
+        //     '^/postek': '', // rewrite path
+        // },
+      },
+    },
+  },
+
+  lintOnSave: false, //禁用eslint  便于开发
+};