This commit is contained in:
Jane
2024-07-16 17:45:54 +08:00
parent ed38a065f9
commit 20f3694dc6
4 changed files with 6 additions and 3 deletions

View File

@@ -198,7 +198,7 @@ export default {
return uniqueID;
},
initWebSocket() {
this.websocket = new WebSocket('ws://localhost:8080/tool-tech-admin/websocket');
this.websocket = new WebSocket(process.env.VUE_APP_WS_URL);
this.websocket.onmessage = (event) => {
const msgStr = event.data;
console.log('上传进度=' + msgStr);
@@ -238,7 +238,7 @@ export default {
formData.append('docId', docId)
formData.append('requestId', this.generateUniqueID())
//自定义的接口也可以用ajax或者自己封装的接口
axios.post('http://localhost:8080/tool-tech-admin/document/upload', formData, {
axios.post(process.env.VUE_APP_BASE_API + '/document/upload', formData, {
headers: {
'Content-Type': 'multipart/form-data',
'Authorization': 'Bearer ' + getToken(),