zouyanyan 3 weeks ago
parent b42c72344c
commit c8d3934771

@ -75,44 +75,44 @@
}
else{
//
uni.reLaunch({
uni.navigateTo({
url: `/pages/book/booklist`
});
}
}
if(extras && extras.type && extras.type == 'groupMessage') {
//
// 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);
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.navigateTo({
url: `/pages/chatbox/chat-box?chatIdx=${chatIdx}`
});
// uni.reLaunch({
// url: `/pages/chatbox/chat-box?chatIdx=${chatIdx}`
// url: `/pages/chatbox/chat`
// });
uni.reLaunch({
url: `/pages/chatbox/chat`
});
}
if(extras && extras.type && extras.type == 'privateMessage') {
//
// 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)
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.navigateTo({
url: `/pages/chatbox/chat-box?chatIdx=${chatIdx}`
});
// uni.reLaunch({
// url: `/pages/chatbox/chat-box?chatIdx=${chatIdx}`
// url: `/pages/chatbox/chat`
// });
uni.reLaunch({
url: `/pages/chatbox/chat`
});
}
if(!extras){
@ -121,6 +121,12 @@
});
}
}
//
if (notificationEventType == 'notificationArrived') {
}
});
jpushModule.getRegistrationID(result => {
console.log("极光推送--注册ID", result.registerID)

@ -205,7 +205,9 @@ export default {
this.scrollToBottom();
this.needScrollToBottom = false;
}
this.setBadge();
},
methods: {
// Vuex actions
...mapActions('chatStore', [
@ -222,7 +224,22 @@ export default {
]),
...mapActions('friendStore', ['updateFriend']),
...mapActions('groupStore', ['updateGroup']),
// app
setBadge() {
var count = myCache("massageCount")?myCache("massageCount"):-1;
if (count > 0) {
// app
//#ifdef APP-PLUS
plus.runtime.setBadgeNumber(count);
//#endif
} else {
// app
//#ifdef APP-PLUS
plus.runtime.setBadgeNumber(-1);
//#endif
}
},
// `this.chatStore.xxx`
onRecorderInput() {
this.showRecord = true;

@ -302,12 +302,7 @@
//
checkupdate();
},
mounted() {
if(this.userid==""||this.userid=="0"){
this.$refs.loginId.open();
}
},
},
onPullDownRefresh() {
console.log('onPullDownRefresh');
setTimeout(()=>{

Loading…
Cancel
Save