Compare commits

..

No commits in common. '399f6131ce7196cc00315af1f065ce3334d7f994' and 'eb63a6e0108c206bc453d5933c1f8a2b754f52de' have entirely different histories.

@ -75,44 +75,44 @@
} }
else{ else{
// //
uni.navigateTo({ uni.reLaunch({
url: `/pages/book/booklist` url: `/pages/book/booklist`
}); });
} }
} }
if(extras && extras.type && extras.type == 'groupMessage') { if(extras && extras.type && extras.type == 'groupMessage') {
// //
let chat = { // let chat = {
type: 'GROUP', // type: 'GROUP',
targetId: extras.groupId, // targetId: extras.groupId,
showName: '加载中...', // showName: '...',
headImage: '/static/image/kf.png', // headImage: '/static/image/kf.png',
}; // };
this.$store.dispatch('chatStore/openChat', chat); // this.$store.dispatch('chatStore/openChat', chat);
let chatIdx = this.$store.getters['chatStore/findChatIdx'](chat); // let chatIdx = this.$store.getters['chatStore/findChatIdx'](chat);
uni.navigateTo({
url: `/pages/chatbox/chat-box?chatIdx=${chatIdx}`
});
// uni.reLaunch({ // uni.reLaunch({
// url: `/pages/chatbox/chat` // url: `/pages/chatbox/chat-box?chatIdx=${chatIdx}`
// }); // });
uni.reLaunch({
url: `/pages/chatbox/chat`
});
} }
if(extras && extras.type && extras.type == 'privateMessage') { if(extras && extras.type && extras.type == 'privateMessage') {
// //
let chat = { // let chat = {
type: 'PRIVATE', // type: 'PRIVATE',
targetId: extras.senderId, // targetId: extras.senderId,
showName: '加载中...', // showName: '...',
headImage: '/static/image/kf.png', // headImage: '/static/image/kf.png',
}; // };
this.$store.dispatch('chatStore/openChat', chat); // this.$store.dispatch('chatStore/openChat', chat);
let chatIdx = this.$store.getters['chatStore/findChatIdx'](chat) // let chatIdx = this.$store.getters['chatStore/findChatIdx'](chat)
uni.navigateTo({
url: `/pages/chatbox/chat-box?chatIdx=${chatIdx}`
});
// uni.reLaunch({ // uni.reLaunch({
// url: `/pages/chatbox/chat` // url: `/pages/chatbox/chat-box?chatIdx=${chatIdx}`
// }); // });
uni.reLaunch({
url: `/pages/chatbox/chat`
});
} }
if(!extras){ if(!extras){
@ -121,12 +121,6 @@
}); });
} }
} }
//
if (notificationEventType == 'notificationArrived') {
}
}); });
jpushModule.getRegistrationID(result => { jpushModule.getRegistrationID(result => {
console.log("极光推送--注册ID", result.registerID) console.log("极光推送--注册ID", result.registerID)

@ -205,9 +205,7 @@ export default {
this.scrollToBottom(); this.scrollToBottom();
this.needScrollToBottom = false; this.needScrollToBottom = false;
} }
this.setBadge();
}, },
methods: { methods: {
// Vuex actions // Vuex actions
...mapActions('chatStore', [ ...mapActions('chatStore', [
@ -224,22 +222,7 @@ export default {
]), ]),
...mapActions('friendStore', ['updateFriend']), ...mapActions('friendStore', ['updateFriend']),
...mapActions('groupStore', ['updateGroup']), ...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` // `this.chatStore.xxx`
onRecorderInput() { onRecorderInput() {
this.showRecord = true; this.showRecord = true;

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

Loading…
Cancel
Save