feature: 每个客户端独立处理后端发送的系统消息

This commit is contained in:
wanli
2023-10-18 15:24:29 +08:00
committed by kanzihuang
parent 361eafedae
commit ccfc6bd1df
26 changed files with 171 additions and 95 deletions

View File

@@ -1,6 +1,6 @@
import Api from '@/common/Api';
import config from '@/common/config';
import { getToken } from '@/common/utils/storage';
import { joinClientParams } from '@/common/utils/storage';
export const machineApi = {
// 获取权限列表
@@ -33,7 +33,7 @@ export const machineApi = {
cpFile: Api.newPost('/machines/{machineId}/files/{fileId}/cp'),
renameFile: Api.newPost('/machines/{machineId}/files/{fileId}/rename'),
mvFile: Api.newPost('/machines/{machineId}/files/{fileId}/mv'),
uploadFile: Api.newPost('/machines/{machineId}/files/{fileId}/upload?token={token}'),
uploadFile: Api.newPost('/machines/{machineId}/files/{fileId}/upload?' + joinClientParams()),
fileContent: Api.newGet('/machines/{machineId}/files/{fileId}/read'),
createFile: Api.newPost('/machines/{machineId}/files/{id}/create-file'),
// 修改文件内容
@@ -63,5 +63,5 @@ export const cronJobApi = {
};
export function getMachineTerminalSocketUrl(machineId: any) {
return `${config.baseWsUrl}/machines/${machineId}/terminal?token=${getToken()}`;
return `${config.baseWsUrl}/machines/${machineId}/terminal?${joinClientParams()}`;
}