feat: redesign discovery and messages tabs
This commit is contained in:
@@ -57,10 +57,27 @@ Page({
|
||||
},
|
||||
|
||||
onGoChat(e) {
|
||||
const { conversationId } = e.detail;
|
||||
const { conversationId, canSendMessage } = e.detail;
|
||||
if (!canSendMessage) {
|
||||
appStore.toastError('当前会话已停用,无法继续聊天');
|
||||
return;
|
||||
}
|
||||
wx.navigateTo({ url: to.chat(conversationId) });
|
||||
},
|
||||
|
||||
onShortcutTap(e) {
|
||||
const key = e.currentTarget.dataset.key;
|
||||
if (key === 'new-friends') {
|
||||
wx.switchTab({ url: ROUTE.TAB.DISCOVER });
|
||||
return;
|
||||
}
|
||||
if (key === 'system') {
|
||||
wx.navigateTo({ url: ROUTE.SETTINGS.NOTIFICATIONS });
|
||||
return;
|
||||
}
|
||||
wx.navigateTo({ url: ROUTE.MAIN.FATE_CENTER });
|
||||
},
|
||||
|
||||
onEmptyAction(e) {
|
||||
if (e.detail.event === 'home') {
|
||||
wx.switchTab({ url: ROUTE.TAB.HOME });
|
||||
|
||||
Reference in New Issue
Block a user