msgType: getMedicine,就弹出一个给药成功

This commit is contained in:
GranceWang 2024-08-12 17:01:31 +08:00
parent 5b6d849a6d
commit 41089bbd71
2 changed files with 5 additions and 2 deletions

View File

@ -328,8 +328,8 @@ export const useRemoteWsStore = defineStore("remoteWs", {
} else {
patient.medicineWS.send(JSON.stringify({msgType: "heartbeat"}))
}
// 抛出信息用于vue页面监听
const shouldCallBackList=['pong','unityRequestConnection','unityResponseConnection']
// 抛出信息用于vue页面监听msgType: getMedicine
const shouldCallBackList=['pong','unityRequestConnection','unityResponseConnection',"getMedicine"]
if (shouldCallBackList.includes(data.msgType)) {
cb(e)
}

View File

@ -318,6 +318,9 @@ watch(subscribeMedicineData,(newValue:any,oldValue:any)=>{
ElMessage.info('连接断开')
}
break;
case 'getMedicine':
ElMessage.success('给药成功')
break;
case 'pong':
timeDiffPing.value=newValue.msg;
break;