From b9743fe26830fe73a7028cda98882395cf229c61 Mon Sep 17 00:00:00 2001 From: YeMingfei666 <1619116647@qq.com> Date: Thu, 4 Dec 2025 16:25:51 +0800 Subject: [PATCH] =?UTF-8?q?=E9=83=A8=E5=88=86=E9=97=AE=E9=A2=98=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/my-components/my-header-card.vue | 4 +++- pageChat/chat.vue | 13 +++++++++++-- pageChat/components/chat-item.vue | 18 +++++++++++++++--- pageChat/coupon-activity/index.vue | 3 ++- pageChat/index.vue | 8 +++++++- pageMarket/limitDiscount/index.vue | 2 +- pageRecharge/components/recharge-item.vue | 1 + store/chat.js | 9 +++++++++ 8 files changed, 49 insertions(+), 9 deletions(-) diff --git a/components/my-components/my-header-card.vue b/components/my-components/my-header-card.vue index c90ed12..38a96d1 100644 --- a/components/my-components/my-header-card.vue +++ b/components/my-components/my-header-card.vue @@ -2,7 +2,9 @@ - + + + {{ options.name }} diff --git a/pageChat/chat.vue b/pageChat/chat.vue index c6023f7..77ec76f 100644 --- a/pageChat/chat.vue +++ b/pageChat/chat.vue @@ -5,7 +5,7 @@ {{ groupInfo.name }} - (22人) + ({{membersRes.user_list.length}}人) @@ -298,6 +298,7 @@ function sendImg() { } else { } } + uni.hideLoading(); }, }); } @@ -389,12 +390,19 @@ async function getMsgList() { } const options = reactive({}); +const membersRes=reactive({ + user_list:[] +}) onLoad((opt) => { Object.assign(options, opt); init(); chatApi.messageMarkReadAll({ session_ids: options.session_id, }); + chatApi.groupMembers({ group_id: options.group_id }).then((res) => { + console.log(res); + membersRes.user_list=res.user_list||[] + }) // #ifdef H5 scrollView.safeAreaHeight = uni.getSystemInfoSync().safeArea.height; // #endif @@ -468,7 +476,8 @@ function confirmCoupon() { modalData.show = false; const couponJson = JSON.parse(res.couponJson); sendMsg({ - coupon: { ...couponJson, title: modalData.form.title }, + coupon: { ...couponJson, title: modalData.form.title,activity_id:res.id }, + chat_coupon_id:res.id, msg_type: 4, }); } else { diff --git a/pageChat/components/chat-item.vue b/pageChat/components/chat-item.vue index 278a8b4..597ee94 100644 --- a/pageChat/components/chat-item.vue +++ b/pageChat/components/chat-item.vue @@ -16,7 +16,7 @@ @click="previewVideo(item.video_url)" > - 发优惠券了!数量有限!快来领取吧! + {{ item.coupon.title }} @@ -26,8 +26,8 @@ 满{{item.coupon.fullAmount}}可用 - 优惠券名称叫什么 - 有效期:2002.1.22-2022.1.22 + {{item.coupon.couponName}} + 有效期:{{ returnTime(item.coupon) }} @@ -40,6 +40,18 @@ const props = defineProps({ default: () => {}, }, }); +function previewImage(url) { + uni.previewImage({ + urls: [url], + }); +} +function returnTime(coupon){ + let startTime = coupon.useStartTime; + let endTime = coupon.useEndTime; + if(startTime && endTime){ + return startTime.split(' ')[0] + '-' + endTime.split(' ')[0] + } +}