兴趣爱好自定义标签展示处理,期望对方文字修改,完成基础资料后缓存数据更新

This commit is contained in:
lanzhihui 2024-10-16 18:11:22 +08:00
parent bcbd1a0552
commit 9670c89121
3 changed files with 21 additions and 2 deletions

View File

@ -238,7 +238,7 @@ wepy.page({
belief: '',
beliefList: ['基督教', '佛教', '伊斯兰教', '其他'],
beliefIndex: 3,
beliefIndex: 0,
jumpString: 'basicData',
throttle: true,
unionid: '',
@ -323,6 +323,10 @@ wepy.page({
}
vm.$put({url: `${service.host}/user/register/profile`, data}).then(({code, data}) => {
if (code == 0) {
let userInfo = wx.getStorageSync('userInfo')
console.log(userInfo, '===')
userInfo.is_base_profile = true
wx.setStorageSync('userInfo', userInfo)
wx.switchTab({url: '/pages/tabBar/home'})
}
wx.hideLoading()

View File

@ -335,12 +335,27 @@ import base from '../../mixins/base'
show: data.interest_label.includes(item.title)
}
})
let objectValue = that.hobbiesList.map(item => { return item.title })
let newHobbies = data.interest_label.filter(item => {
console.log(objectValue.includes(item), 'obj===')
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
}
})
that.customHobbiesList = [...new Set([...that.customHobbiesList, ...newHobbies])]
}
} else {
that.customHobbiesList = that.customHobbiesList.map(item => {
return {

View File

@ -823,7 +823,7 @@
</view>
<view class="u_bas">
<view class="m_basLst f-fbc">
<span class="font_28 color-333 bold">期望对方</span>
<span class="font_28 color-333 bold">期望结婚</span>
<span style="margin-right: 12rpx;">{{mylibs.marry_by_time || '--'}}</span>
</view>
</view>