diff --git a/App.vue b/App.vue index 78fa9ed..dfce2dd 100644 --- a/App.vue +++ b/App.vue @@ -89,10 +89,15 @@ // url: `/pages/chatbox/chat` // }); // } - - uni.reLaunch({ - url: `/pages/chatbox/chat` - }); + let chat = { + type: 'GROUP', + targetId: extras.groupId, + showName: '加载中...', + headImage: '/static/image/kf.png', + }; + this.$store.dispatch('chatStore/openChat', chat); + let chatIdx = this.$store.getters['chatStore/findChatIdx'](chat) + uni.reLaunch({url: `/pages/chatbox/chat-box?chatIdx=${chatIdx}`}); } if(extras && extras.type && extras.type == 'privateMessage') { // 私信消息 @@ -108,8 +113,16 @@ // url: `/pages/chatbox/chat` // }); // } + let chat = { + type: 'PRIVATE', + targetId: extras.senderId, + showName: '加载中...', + headImage: '/static/image/kf.png', + }; + this.$store.dispatch('chatStore/openChat', chat); + let chatIdx = this.$store.getters['chatStore/findChatIdx'](chat) uni.reLaunch({ - url: `/pages/chatbox/chat` + url: `/pages/chatbox/chat-box?chatIdx=${chatIdx}` }); } })