From ec6413e24160dca2b43ab06aadabc94775ad98e2 Mon Sep 17 00:00:00 2001 From: lanzhihui <503792708@qq.com> Date: Mon, 30 Sep 2024 14:43:36 +0800 Subject: [PATCH] update --- src/pages/home/registration.wpy | 8 ++--- src/pages/users/degreeCertificate.wpy | 2 +- src/pages/users/selfTextarea.wpy | 2 +- src/pages/users/unmarri.wpy | 50 +++++++++++++++++++-------- src/pages/users/unmarriV2.wpy | 6 ++-- src/utils/util.js | 2 +- 6 files changed, 46 insertions(+), 24 deletions(-) diff --git a/src/pages/home/registration.wpy b/src/pages/home/registration.wpy index bad45cb..a1bf102 100644 --- a/src/pages/home/registration.wpy +++ b/src/pages/home/registration.wpy @@ -289,9 +289,9 @@ wepy.page({ if (!vm.sex) { return vm.$showToast('请选择你的性别') } - // if (!vm.mobile) { - // return vm.$showToast('请选择绑定手机号') - // } + if (!vm.mobile) { + return vm.$showToast('请选择绑定手机号') + } if (!vm.birthday) { return vm.$showToast('请选择你的生日') } @@ -308,7 +308,7 @@ wepy.page({ let data = { photo: vm.photo, nickname: vm.name, - mobile: vm.mobile || '15813393343', + mobile: vm.mobile, sex: vm.sex === '男' ? 1 : 2, belief: vm.belief, state: vm.emotion, diff --git a/src/pages/users/degreeCertificate.wpy b/src/pages/users/degreeCertificate.wpy index c0af780..7d6dbfd 100644 --- a/src/pages/users/degreeCertificate.wpy +++ b/src/pages/users/degreeCertificate.wpy @@ -165,7 +165,7 @@ manner: ['毕业证/学位证书照片', '国内学信网在线认证'], degreeIndex: '', mannerIndex: 0, - school: '999', + school: '', attestation: '', ShowDegree: false, init: false, diff --git a/src/pages/users/selfTextarea.wpy b/src/pages/users/selfTextarea.wpy index 0678b73..bcab35e 100644 --- a/src/pages/users/selfTextarea.wpy +++ b/src/pages/users/selfTextarea.wpy @@ -338,7 +338,7 @@ import base from '../../mixins/base' that.customHobbiesList = that.customHobbiesList.map(item => { return { title: item, - show: data.interest_label.includes(item.title) + show: data.interest_label.includes(item) } }) } else { diff --git a/src/pages/users/unmarri.wpy b/src/pages/users/unmarri.wpy index 5f6a579..5844fc0 100644 --- a/src/pages/users/unmarri.wpy +++ b/src/pages/users/unmarri.wpy @@ -27,7 +27,7 @@ 性别 - {{sex[sexIndex]}} + {{sex[sexIndex]}} 请选择 @@ -40,7 +40,7 @@ 身高 - {{statureList[statureIndex]}} + {{statureList[statureIndex]}} 请选择 @@ -52,7 +52,7 @@ 体重 - {{weightList[weightIndex]}} + {{weightList[weightIndex]}} 请选择 @@ -136,7 +136,7 @@ 年收入 - {{incomeList[incomeIndex]}} + {{incomeList[incomeIndex]}} 请选择 @@ -148,7 +148,7 @@ 信仰 - {{belief[beliefIndex]}} + {{belief[beliefIndex]}} 请选择 @@ -160,7 +160,7 @@ 期望结婚 - {{marriage[marriageIndex]}} + {{marriage[marriageIndex]}} 请选择 @@ -195,23 +195,31 @@ mixins: [base, https], data: { sex: ['男', '女'], - sexIndex: -1, + sexIndex: 0, + sexIndexSelect: false, selectSex: false, state: '', statureList: [], // 身高list - statureIndex: -1, // 默认160cm + statureIndex: 0, // 默认160cm + statureIndexSelect: false, weightList: [], // 体重list - weightIndex: -1, // 默认160cm - stateIndex: -1, + weightIndex: 0, // 默认160cm + weightIndexSelect: false, + stateIndex: 0, + stateIndexSelect: false, residentIndex: 0, degree: ['小学', '初中', '高中', '中专', '大专', '本科', '硕士', '博士', '其他'], - degreeIndex: -1, + degreeIndex: 0, + degreeIndexSelect: false, incomeList: ['5w以下', '5~10w', '10~15w', '15~30w', '30~50w', '50~100w', '100~500w', '500w以上'], - incomeIndex: -1, + incomeIndex: 0, + incomeIndexSelect: false, belief: ['基督教', '佛教', '伊斯兰教', '其他'], - beliefIndex: -1, + beliefIndex: 0, + beliefIndexSelect: false, marriage: ['半年内', '一年内', '两年内', '两年后'], - marriageIndex: -1, + marriageIndex: 0, + marriageIndexSelect: false, salary: [], salaryIndex: 0, region: ['', '', ''], @@ -354,20 +362,24 @@ }, 800) if (data.sex == 1) { that.sexIndex = 0 + that.sexIndexSelect = true } else if (data.sex == 2) { that.sexIndex = 1 + that.sexIndexSelect = true } else { } that.statureList.map((item, index) => { // console.log(item) if (parseInt(item) == result.stature) { that.statureIndex = index + that.statureIndexSelect = true } }) that.weightList.map((item, index) => { // console.log(parseInt(item)) if (parseInt(item) == result.weight) { that.weightIndex = index + that.weightIndexSelect = true } }) if (result.birthday) { @@ -382,21 +394,25 @@ that.degree.forEach((item, index, arr) => { if (result.degree == arr[index]) { that.degreeIndex = index + that.degreeIndexSelect = true } }) that.belief.forEach((item, index, arr) => { if (result.belief == arr[index]) { that.beliefIndex = index + that.beliefIndexSelect = true } }) that.marriage.forEach((item, index, arr) => { if (result.marry_by_time == arr[index]) { that.marriageIndex = index + that.marriageIndexSelect = true } }) that.incomeList.forEach((item, index, arr) => { if (result.income == arr[index]) { that.incomeIndex = index + that.incomeIndexSelect = true } }) that.industry = data.industry @@ -575,26 +591,32 @@ }, sexChange(e) { // 性别 this.sexIndex = e.$wx.detail.value + this.sexIndexSelect = true console.log(this.sexIndex) }, statureChange(e) { // 身高 this.statureIndex = e.$wx.detail.value + this.statureIndexSelect = true this.stature = this.statureList[this.statureIndex].split('cm')[0] console.log(this.stature) }, weightChange(e) { // 体重 this.weightIndex = e.$wx.detail.value + this.weightIndexSelect = true this.weight = this.weightList[this.weightIndex].split('kg')[0] console.log(this.weight) }, beliefChange(e) { this.beliefIndex = e.$wx.detail.value + this.beliefIndexSelect = true }, marriageChange(e) { this.marriageIndex = e.$wx.detail.value + this.marriageIndexSelect = true }, incomeChange(e) { // 年收入 this.incomeIndex = e.$wx.detail.value + this.incomeIndexSelect = true }, bindTips(text) { this.$showToast(text) diff --git a/src/pages/users/unmarriV2.wpy b/src/pages/users/unmarriV2.wpy index 5a0cccd..d65e99d 100644 --- a/src/pages/users/unmarriV2.wpy +++ b/src/pages/users/unmarriV2.wpy @@ -722,7 +722,7 @@ 认证中心 - + @@ -739,7 +739,7 @@ 基本资料 - + @@ -877,7 +877,7 @@ - + diff --git a/src/utils/util.js b/src/utils/util.js index 33a578d..b404447 100644 --- a/src/utils/util.js +++ b/src/utils/util.js @@ -52,7 +52,7 @@ const wx_login = () => { wx.setStorageSync('openid', (data.openid)) wx.setStorageSync('user_id', data.user.id) // 用户id wx.setStorageSync('mobile', data.user.mobile) // 用户手机号 - if (data.user.hidden_profile !== 'NONE') { // 资料是否关闭 + if (data.user.hidden_profile == 'ALLSEX') { // 资料是否关闭 wx.setStorageSync('logoutCode', 1) wx.redirectTo({url: '/pages/users/logoutDefault'}) }