提交 aa0f611f 作者: Hao

新增聊天

父级 79476f75
......@@ -2,7 +2,7 @@
import axios from "axios";
let VUE_APP_API_URL = import.meta.env.VITE_USER_APP_API_URL;
const instance = axios.create({
baseURL: `http://${VUE_APP_API_URL}:8080`, // 设置基础 URL
baseURL: `${VUE_APP_API_URL}`, // 设置基础 URL
// baseURL:'/api',
timeout: 1000, // 设置请求超时时间
});
......
......@@ -162,7 +162,7 @@ export const upLoadHander = async (obj: any) => {
formData.append("biz", fileInfo.biz);
formData.append("file", newFile);
const uploadRes = await axios.post(
`http://${VUE_APP_API_URL}:8080/sys/common/upload`,
`${VUE_APP_API_URL}/sys/common/upload`,
formData,
{
headers: { ...obj.headers },
......
......@@ -579,7 +579,7 @@ const connectMsg = () => {
username: Date.now(),
})
let VUE_APP_API_URL = import.meta.env.VITE_USER_APP_API_URL
const toIp = `ws://${VUE_APP_API_URL}:8081?type=yk&code=${useUser.userInfo.username}&kf=${store.customerInfo.username}`
const toIp = `${VUE_APP_API_URL}?type=yk&code=${useUser.userInfo.username}&kf=${store.customerInfo.username}`
useUser.connect()
initWebSocket(toIp)
setTimeout(() => {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论