| | |
| | | createConnect(userId, userName, count = 0, limit = 3) { |
| | | // 登录建立连接时,需要重新获取http地址,可能会变更 |
| | | this.wsUrl = CommonUtils.httpFormatWs(); |
| | | //this.wsUrl = uni.getStorageSync("serverUrl") + "WebSocketHandler.ashx" |
| | | // 缓存用户信息(用于重连) |
| | | this.currentUserId = userId; |
| | | this.currentUserName = userName; |
| | |
| | | // 处理业务消息 |
| | | if (message.Type === "MessageUnRead") { // 未读消息 |
| | | let payload = { |
| | | pagePath: "/pages/ZLGL/OA_WorkLink/OA_WorkLinkBillList", |
| | | pagePath: "/pages/ZLGL/OA_WorkLink/OA_WorkLinkBillQuery", |
| | | itemId: 0 |
| | | } |
| | | const content = JSON.parse(message.Content); |
| | |
| | | } else if (message.Type === "Message") { |
| | | const content = JSON.parse(message.Content) |
| | | let payload = { |
| | | pagePath: "/pages/ZLGL/OA_WorkLink/OA_WorkLinkBillList", |
| | | pagePath: "/pages/ZLGL/OA_WorkLink/OA_WorkLinkBillQuery", |
| | | itemId: 0 |
| | | } |
| | | this.showTaskTip(content[0]["内容"], payload, content[0]["主题"]); |