From eb5e1ea0c2bd919a3877d483c9eccf60701c3535 Mon Sep 17 00:00:00 2001 From: lanzhihui <503792708@qq.com> Date: Mon, 4 Nov 2024 18:06:46 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=87=E7=AD=BE=E9=87=8D=E5=A4=8D=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app.wpy | 2 +- src/pages/users/selfTextarea.wpy | 25 +++++++++++++------------ 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/src/app.wpy b/src/app.wpy index 21bf44b..d326e23 100644 --- a/src/app.wpy +++ b/src/app.wpy @@ -35,7 +35,7 @@ wepy.app({ } }, globalData: { - versions: 'v5.5.75', // 版本号 + versions: 'v5.5.76', // 版本号 navBarHeight: 0, // 导航栏高度 navRight: 0, // 胶囊距右方间距(方保持左、右间距一致) navTop: 0, // 胶囊距顶部间距 diff --git a/src/pages/users/selfTextarea.wpy b/src/pages/users/selfTextarea.wpy index c767fe3..79e235a 100644 --- a/src/pages/users/selfTextarea.wpy +++ b/src/pages/users/selfTextarea.wpy @@ -341,20 +341,21 @@ import base from '../../mixins/base' return !objectValue.includes(item) }) console.log(objectValue, newHobbies, 'newHobbies===') - that.customHobbiesList = that.customHobbiesList.map(item => { - return { - title: item, - show: data.interest_label.includes(item) - } - }) + if (newHobbies && newHobbies.length > 0) { - newHobbies = newHobbies.map(item => { - return { - title: item, - show: true - } - }) + // newHobbies = newHobbies.map(item => { + // return { + // title: item, + // show: true + // } + // }) that.customHobbiesList = [...new Set([...that.customHobbiesList, ...newHobbies])] + that.customHobbiesList = that.customHobbiesList.map(item => { + return { + title: item, + show: data.interest_label.includes(item) + } + }) } } else { that.customHobbiesList = that.customHobbiesList.map(item => {