| | |
| | | console.log("点击推送消息:", msg); |
| | | console.log("解析后:", msg.payload.noticeId); |
| | | try { |
| | | confirmMessage(msg.payload.noticeId, 1).then(res => { |
| | | if (msg.payload.needMarkRead) { |
| | | confirmMessage(msg.payload.noticeId, 1).then(res => { |
| | | if (msg.payload.url) { |
| | | if (msg.payload.url.indexOf("/") === 0) { |
| | | uni.navigateTo({ |
| | | url: msg.payload.url, |
| | | }); |
| | | } else { |
| | | uni.navigateTo({ |
| | | url: "/" + msg.payload.url, |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | } else { |
| | | if (msg.payload.url) { |
| | | if (msg.payload.url.indexOf("/") === 0) { |
| | | uni.navigateTo({ |
| | |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | } catch (error) { |
| | | uni.showToast({ |
| | | title: "路径:" + msg.payload, |