Merge branch 'master' of https://e.coding.net/g-cphe0354/cashier/cashier-web into ymf_test
This commit is contained in:
commit
b1d175b108
|
|
@ -20,6 +20,13 @@ const AuthAPI = {
|
|||
},
|
||||
// 新增
|
||||
addunit(data: any) {
|
||||
console.log(data, '提示121');
|
||||
if (data.images.length == 0) {
|
||||
data.images = null
|
||||
}
|
||||
if (data.proGroupVo.length == 0) {
|
||||
data.proGroupVo = null
|
||||
}
|
||||
return request<any, Responseres>({
|
||||
url: `${baseURL}`,
|
||||
method: "post",
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ class WebSocketManager {
|
|||
this.sendMessage(this.initParams);
|
||||
this.clearTimer();
|
||||
this.timer = setInterval(() => {
|
||||
this.sendMessage({ type: "ping_interval", set: 'manage' });
|
||||
this.sendMessage({ type: "ping_interval", set: 'manage' }, false);
|
||||
}, 1000 * 10);
|
||||
};
|
||||
|
||||
|
|
@ -108,7 +108,7 @@ class WebSocketManager {
|
|||
this.autoConnect = true
|
||||
}
|
||||
|
||||
public sendMessage(message: any) {
|
||||
public sendMessage(message: any, isSendInitParams: boolean = true) {
|
||||
if (!this.client || !this.connected) {
|
||||
// ElMessage.error('发送失败,已重新连接,请重新操作');
|
||||
this.reconnect();
|
||||
|
|
@ -118,7 +118,7 @@ class WebSocketManager {
|
|||
this.disconnect();
|
||||
return
|
||||
}
|
||||
const msg = JSON.stringify({ ...this.initParams, ...message });
|
||||
const msg = JSON.stringify(isSendInitParams ? { ...this.initParams, ...message } : message);
|
||||
try {
|
||||
this.client?.send(msg);
|
||||
} catch (error) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue