From 9de72b886c0b99dad86bd1c8f8fb9883347a6de3 Mon Sep 17 00:00:00 2001 From: yanran200730 Date: Tue, 17 Jan 2023 09:24:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/project/fd/AppAnswer/Search.vue | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/src/project/fd/AppAnswer/Search.vue b/src/project/fd/AppAnswer/Search.vue index 99bfba96..d68afc64 100644 --- a/src/project/fd/AppAnswer/Search.vue +++ b/src/project/fd/AppAnswer/Search.vue @@ -13,7 +13,7 @@ {{ item.createUserId === user.id ? '我' : item.createUserName }} 于{{ item.createTime }} 提问 -

{{ item.content }}

+

@@ -41,7 +41,6 @@ return { search: { current: 1, - title: '', size: 10 }, content: '', @@ -94,9 +93,21 @@ }).then(res => { if (res.code == 0) { if (this.search.current > 1) { - this.list = [...this.list, ...res.data.records] + this.list = [...this.list, ...res.data.records.map(v => { + if (v.content.indexOf(this.content) > -1) { + v.content = v.content.replaceAll(this.content, `${this.content}`) + } + + return v + })] } else { - this.list = res.data.records + this.list = res.data.records.map(v => { + if (v.content.indexOf(this.content) > -1) { + v.content = v.content.replaceAll(this.content, `${this.content}`) + } + + return v + }) } uni.hideLoading() @@ -187,6 +198,11 @@ border-radius: 16px; background: #fff; + .keyworld { + font-style: normal; + color: #3975C6; + } + .item-bottom { display: flex; align-items: center;