lyuis hai 7 meses
pai
achega
e7eca61063
Modificáronse 2 ficheiros con 14 adicións e 24 borrados
  1. 3 22
      comment/httpUrl.js
  2. 11 2
      vite.config.js

+ 3 - 22
comment/httpUrl.js

@@ -1,27 +1,8 @@
-const ROOTPATH = "https://www.bosszan.com/sqx_fast";
+const ROOTPATH = process.env.NODE_ENV !== 'development'?"https://www.bosszan.com/sqx_fast":"/sqx_fast";
 const ROOTPATH1 = "wss://www.bosszan.com/wss/websocket/"; //联系客服
 const ROOTPATH2 = "wss://www.bosszan.com/wss/chatSocket/"; //聊天
-const ROOTPATH3 = "https://yizhizan.edccc.cn/emoji/"; //表情
-const ROOTPATH4 = "https://yizhizan.edccc.cn/";
-
-// const ROOTPATH = "https://pc.aidezp.com/sqx_fast";
-// const ROOTPATH1 = "wss://pc.aidezp.com/wss/websocket/"; //联系客服
-// const ROOTPATH2 = "wss://pc.aidezp.com/wss/chatSocket/"; //聊天
-// const ROOTPATH3 = "https://pc.aidezp.com/emoji/"; //表情
-// const ROOTPATH4 = "https://pc.aidezp.com/";
-
-// const ROOTPATH = location.origin + "/sqx_fast";
-// const ROOTPATH1 = "wss://" + location.hostname + "/wss/websocket/"; //联系客服
-// const ROOTPATH2 = "wss://" + location.hostname + "/wss/chatSocket/"; //聊天
-// const ROOTPATH3 = "https://zhaopin.xianmaxiong.com/emoji/"; //表情
-// const ROOTPATH4 = location.origin + "/";
-
-// const ROOTPATH = "http://192.168.0.10:7155/sqx_fast";
-// const ROOTPATH1 = "wss://www.bosszan.com/wss/websocket/"; //联系客服
-// const ROOTPATH2 = "wss://www.bosszan.com/wss/chatSocket/"; //聊天
-// const ROOTPATH3 = "https://zhaopin.xianmaxiong.com/emoji/"; //表情
-// const ROOTPATH4 = "https://zppc.xianmaxiong.com/";
-
+const ROOTPATH3 = "https://yi-zhipin.oss-cn-hangzhou.aliyuncs.com/emoji/"; //表情
+const ROOTPATH4 = process.env.NODE_ENV !== 'development'?"https://www.bosszan.com/sqx_fast":"/sqx_fast";
 export {
 	ROOTPATH,
 	ROOTPATH1,

+ 11 - 2
vite.config.js

@@ -15,6 +15,15 @@ export default defineConfig({
 		}
 	},
 	server: {
-		host: '0.0.0.0'
-	}
+		host: '0.0.0.0',
+		port: 8081,
+		open: true,
+		proxy: {
+		  '^/sqx_fast': {
+			target: 'http://192.168.0.10:7155',
+			secure: false,
+			changeOrigin: true,
+		  }
+		}
+	  },
 })