From 8b8c89b60f77aa89768a9dbb18f175de7b64629e Mon Sep 17 00:00:00 2001 From: pengm <674192343@qq.com> Date: Wed, 4 Feb 2026 17:49:52 +0800 Subject: [PATCH] 阻止单据等接收消息 --- .idea/codeStyles/Project.xml | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .idea/codeStyles/codeStyleConfig.xml | 5 +++++ .idea/git_toolbox_blame.xml | 6 ++++++ .idea/prettier.xml | 6 ++++++ src/models/app.js | 20 ++++++++++++++++++-- src/utils/config.js | 2 +- 6 files changed, 94 insertions(+), 3 deletions(-) create mode 100644 .idea/codeStyles/Project.xml create mode 100644 .idea/codeStyles/codeStyleConfig.xml create mode 100644 .idea/git_toolbox_blame.xml create mode 100644 .idea/prettier.xml diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml new file mode 100644 index 0000000..6bc8cbf --- /dev/null +++ b/.idea/codeStyles/Project.xml @@ -0,0 +1,58 @@ + + + + \ No newline at end of file diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml new file mode 100644 index 0000000..79ee123 --- /dev/null +++ b/.idea/codeStyles/codeStyleConfig.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/.idea/git_toolbox_blame.xml b/.idea/git_toolbox_blame.xml new file mode 100644 index 0000000..7dc1249 --- /dev/null +++ b/.idea/git_toolbox_blame.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/.idea/prettier.xml b/.idea/prettier.xml new file mode 100644 index 0000000..b0c1c68 --- /dev/null +++ b/.idea/prettier.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/src/models/app.js b/src/models/app.js index d04d018..ea60358 100644 --- a/src/models/app.js +++ b/src/models/app.js @@ -649,6 +649,16 @@ export default { const msgObj = utils.isJSON(msgStr) ? JSON.parse(msgStr) : {}; const msgPopupData = utils.isNotEmptyArr(msgObj.popup) ? msgObj.popup : []; const msgHeadData = utils.isNotEmptyObject(msgObj.data) ? msgObj.data : []; + // 检查是否在 CommonBill 相关页面 + const isCommonBillPage = location.pathname.indexOf("/indexPage/commonBill") > -1 || + location.pathname.indexOf("/indexPage/commonCheckBill") > -1 || + location.pathname.indexOf("/indexPage/commonBillDeliver") > -1 || + location.pathname.indexOf("/indexPage/commonNewBill") > -1 || + location.pathname.indexOf("/indexPage/commonSubBill") > -1 || + location.pathname.indexOf("/indexPage/commonNewTabBill") > -1 || + location.pathname.indexOf("/indexPage/commonCostomTabBill") > -1 || + location.pathname.indexOf("/indexPage/commonNewListBill") > -1 || + location.pathname.indexOf("/indexPage/commonGroupBill") > -1; if (utils.isNotEmptyObject(msgHeadData)) { if (utils.isNotEmptyArr(msgPopupData)) { if (location.pathname.indexOf("/indexMobile") < 0) { @@ -675,9 +685,15 @@ export default { } commonFunc.sendWebSocketMessage(ws, "noAction", "usertodo", null, userinfo.sId, userinfo.sUserName, userinfo.sId, userinfo.sId); } - dispatch({ type: "app/saveMsgCount", payload: { msgCount: msgStr } }); + // 不在 CommonBill 相关页面时才更新消息计数,避免组件重新渲染 + if (!isCommonBillPage) { + dispatch({ type: "app/saveMsgCount", payload: { msgCount: msgStr } }); + } } else { - dispatch({ type: "app/saveMsgCount", payload: { msgCount: msgData.msg } }); + // 不在 CommonBill 相关页面时才更新消息计数,避免组件重新渲染 + if (!isCommonBillPage) { + dispatch({ type: "app/saveMsgCount", payload: { msgCount: msgData.msg } }); + } } } else if (rtmsg.action === "loginOut") { if (location.pathname.indexOf("/indexOee") > -1) { diff --git a/src/utils/config.js b/src/utils/config.js index 0af92a5..8fb1a44 100644 --- a/src/utils/config.js +++ b/src/utils/config.js @@ -9,7 +9,7 @@ const API = process.env.API; const bHttps = false; export const webSite = { faceAddress: isDev ? '//118.178.19.35:8088/xlyFace' : '//' + location.host + '/xlyFace', - ipAddress: localStorage.ipAddress ? localStorage.ipAddress : isDev ? '///118.178.19.35:8088/xlyEntry/' : '//' + location.host + '/xlyEntry/', + ipAddress: localStorage.ipAddress ? localStorage.ipAddress : isDev ? '//8.130.144.93:8088/xlyEntry/' : '//' + location.host + '/xlyEntry/', // ipAddress: localStorage.ipAddress ? localStorage.ipAddress : isDev ? '//118.178.19.35:8088/xlyEntry/' : '//' + location.host + '/xlyEntry/', // ipAddress: localStorage.ipAddress ? localStorage.ipAddress : isDev ? '//8.130.144.93:8088/xlyEntry/' : '//' + location.host + '/xlyEntry/', interfaceAddress: localStorage.apiAddress ? localStorage.apiAddress : isDev ? '//118.178.19.35:8088/xlyApi/' : '//' + location.host + '/xlyApi/', // 接口地址 -- libgit2 0.22.2