From f9337ceb2519b7269adee1e3acd66ed84dc96248 Mon Sep 17 00:00:00 2001 From: zengBin Date: Tue, 8 Oct 2024 10:24:03 +0800 Subject: [PATCH] update --- src/components/cuCustom.wpy | 2 +- src/pages/news/chitchat.wpy | 3 +- src/pages/news/groupChitchat.wpy | 3 +- src/pages/news/newsSearch.wpy | 117 +++++++++++++++++++++++++++++++ src/pages/tabBar/home.wpy | 7 +- src/pages/tabBar/news.wpy | 77 ++++++++++++-------- 6 files changed, 173 insertions(+), 36 deletions(-) create mode 100644 src/pages/news/newsSearch.wpy diff --git a/src/components/cuCustom.wpy b/src/components/cuCustom.wpy index 3ed89f3..4841482 100644 --- a/src/components/cuCustom.wpy +++ b/src/components/cuCustom.wpy @@ -38,7 +38,7 @@ }, searchName: { type: String, - default: '搜索...' + default: '搜索昵称' } }, data: { diff --git a/src/pages/news/chitchat.wpy b/src/pages/news/chitchat.wpy index 00faffc..0760d23 100644 --- a/src/pages/news/chitchat.wpy +++ b/src/pages/news/chitchat.wpy @@ -786,6 +786,7 @@ wepy.page({ vm.$showToast('请输入聊天内容') return } + let msg = vm.msg if (/\[[^\]]+\]/.test(vm.msg)) { vm.msg = vm.transitionMsg(vm.msg) } @@ -807,7 +808,7 @@ wepy.page({ app.globalData.nim.msg.sendTextMsg({ scene: 'p2p', to: vm.otherUserId, - body: vm.msg, + body: msg, isSend: 0, onSendBefore: function (msg) { console.log('get msg before', msg) diff --git a/src/pages/news/groupChitchat.wpy b/src/pages/news/groupChitchat.wpy index aa1d283..522688c 100644 --- a/src/pages/news/groupChitchat.wpy +++ b/src/pages/news/groupChitchat.wpy @@ -1057,9 +1057,8 @@ wepy.page({ vm.lastTime = format(item.time) // 获取成员头像后再循环获取数据 app.globalData.nim.user.getUsersNameCardFromServer({ - accounts: [item.from] + accounts: [`${item.id}`] }).then((res) => { - item.avatar = res[0].avatar if (index + 1 == data.length) { vm.lastMsgId = data[data.length - 1].id vm.beginTime = data[data.length - 1].time diff --git a/src/pages/news/newsSearch.wpy b/src/pages/news/newsSearch.wpy new file mode 100644 index 0000000..f720a76 --- /dev/null +++ b/src/pages/news/newsSearch.wpy @@ -0,0 +1,117 @@ + + + + + +{ +navigationBarTitleText: '', +enablePullDownRefresh: true, +backgroundColorTop: '#ffffff', +backgroundColorBottom: '#ffffff', +usingComponents: { } +} + diff --git a/src/pages/tabBar/home.wpy b/src/pages/tabBar/home.wpy index 101f698..4f2a142 100644 --- a/src/pages/tabBar/home.wpy +++ b/src/pages/tabBar/home.wpy @@ -281,7 +281,7 @@ page { }