Compare commits

...

2 Commits

Author SHA1 Message Date
zouyanyan 399f6131ce Merge branch 'main' of https://www.sanduolantoyoga.com/xiaoning/yogaApp
3 weeks ago
zouyanyan c8d3934771 upbug
3 weeks ago

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

@ -205,7 +205,9 @@ export default {
this.scrollToBottom(); this.scrollToBottom();
this.needScrollToBottom = false; this.needScrollToBottom = false;
} }
this.setBadge();
}, },
methods: { methods: {
// Vuex actions // Vuex actions
...mapActions('chatStore', [ ...mapActions('chatStore', [
@ -222,7 +224,22 @@ 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;

@ -303,11 +303,6 @@
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