|
@@ -14,10 +14,10 @@ Page({
|
|
|
marriage: '',
|
|
|
assetHouse: '',
|
|
|
assetHouseArea: '',
|
|
|
- assetHouseLoan: '',
|
|
|
+ // assetHouseLoan: '',
|
|
|
assetCar: '',
|
|
|
assetCarValue: '',
|
|
|
- assetCarLoan: '',
|
|
|
+ // assetCarLoan: '',
|
|
|
constellation: '',
|
|
|
workStatus: '',
|
|
|
companyNature: '',
|
|
@@ -28,19 +28,19 @@ Page({
|
|
|
},
|
|
|
educationArr: [],
|
|
|
incomeArr: [],
|
|
|
- nativePlaceArr: ['外地', '本地', '咋的都行'],
|
|
|
- marriageArr: ["不行", "行", '咋的都行'],
|
|
|
+ nativePlaceArr: [],
|
|
|
+ marriageArr: [],
|
|
|
constellationArr: [],
|
|
|
workStatusArr: [],
|
|
|
assetHouseArr: ['租房', '购房', '咋的都行'],
|
|
|
assetHouseAreaArr: [],
|
|
|
- assetHouseLoanArr: ['有', '没有', '咋的都行'],
|
|
|
- assetCarArr: ['有', '没有', '咋的都行'],
|
|
|
+ // assetHouseLoanArr: ['有', '没有', '咋的都行'],
|
|
|
+ assetCarArr: ['咋的都行','有', '没有'],
|
|
|
assetCarValueArr: [],
|
|
|
- assetCarLoanArr: ['不行', '行', '咋的都行'],
|
|
|
+ // assetCarLoanArr: ['不行', '行', '咋的都行'],
|
|
|
companyNatureArr: [],
|
|
|
parentAssetsArr: [],
|
|
|
- compositionArr: ['老几都行', '必须独苗一根'],
|
|
|
+ compositionArr: [],
|
|
|
isCommonArr: ['愿意', '不愿意', '咋的都行']
|
|
|
},
|
|
|
ageMinChange(e) {
|
|
@@ -84,24 +84,16 @@ Page({
|
|
|
nativePlacePicker(e) {
|
|
|
let nativePlace = 'form.nativePlace';
|
|
|
this.setData({
|
|
|
- nativePlaceLabel: this.data.nativePlaceArr[e.detail.value]
|
|
|
+ nativePlaceLabel: this.data.nativePlaceArr[e.detail.value],
|
|
|
+ [nativePlace]: this.data.nativePlaceArrValue[e.detail.value],
|
|
|
})
|
|
|
- if (e.detail.value != 2) {
|
|
|
- this.setData({
|
|
|
- [nativePlace]: e.detail.value
|
|
|
- })
|
|
|
- }
|
|
|
},
|
|
|
marriageChange(e) {
|
|
|
let marriage = 'form.marriage';
|
|
|
this.setData({
|
|
|
- marriageLabel: this.data.marriageArr[e.detail.value]
|
|
|
+ marriageLabel: this.data.marriageArr[e.detail.value],
|
|
|
+ [marriage]: this.data.marriageArrValue[e.detail.value]
|
|
|
})
|
|
|
- if (e.detail.value != 2) {
|
|
|
- this.setData({
|
|
|
- [marriage]: e.detail.value
|
|
|
- })
|
|
|
- }
|
|
|
},
|
|
|
assetHousePickerChange(e) {
|
|
|
let assetHouse = 'form.assetHouse';
|
|
@@ -121,27 +113,30 @@ Page({
|
|
|
[assetHouseArea]: this.data.assetHouseAreaArrValue[e.detail.value]
|
|
|
})
|
|
|
},
|
|
|
- assetHouseLoanPickerChange(e) {
|
|
|
- let assetHouseLoan = 'form.assetHouseLoan';
|
|
|
- this.setData({
|
|
|
- assetHouseLoanLabel: this.data.assetHouseLoanArr[e.detail.value]
|
|
|
- })
|
|
|
- if (e.detail.value != 2) {
|
|
|
- this.setData({
|
|
|
- [assetHouseLoan]: e.detail.value
|
|
|
- })
|
|
|
- }
|
|
|
- },
|
|
|
+ // assetHouseLoanPickerChange(e) {
|
|
|
+ // let assetHouseLoan = 'form.assetHouseLoan';
|
|
|
+ // this.setData({
|
|
|
+ // assetHouseLoanLabel: this.data.assetHouseLoanArr[e.detail.value]
|
|
|
+ // })
|
|
|
+ // if (e.detail.value != 2) {
|
|
|
+ // this.setData({
|
|
|
+ // [assetHouseLoan]: e.detail.value
|
|
|
+ // })
|
|
|
+ // }
|
|
|
+ // },
|
|
|
assetCarPickerChange(e) {
|
|
|
+ console.log(e.detail.value)
|
|
|
+ console.log(this.data.assetCarArr[e.detail.value])
|
|
|
let assetCar = 'form.assetCar';
|
|
|
this.setData({
|
|
|
- assetCarLabel: this.data.assetCarArr[e.detail.value]
|
|
|
+ assetCarLabel: this.data.assetCarArr[e.detail.value],
|
|
|
+ [assetCar]: e.detail.value
|
|
|
})
|
|
|
- if (e.detail.value != 2) {
|
|
|
- this.setData({
|
|
|
- [assetCar]: e.detail.value
|
|
|
- })
|
|
|
- }
|
|
|
+ // if (e.detail.value != 2) {
|
|
|
+ // this.setData({
|
|
|
+ // [assetCar]: e.detail.value
|
|
|
+ // })
|
|
|
+ // }
|
|
|
},
|
|
|
assetCarValuePickerChange(e) {
|
|
|
let assetCarValue = 'form.assetCarValue'
|
|
@@ -150,17 +145,17 @@ Page({
|
|
|
[assetCarValue]: this.data.assetCarValueArrValue[e.detail.value]
|
|
|
})
|
|
|
},
|
|
|
- assetCarLoanPickerChange(e) {
|
|
|
- let assetCarLoan = 'form.assetCarLoan';
|
|
|
- this.setData({
|
|
|
- assetCarLoanLabel: this.data.assetCarLoanArr[e.detail.value]
|
|
|
- })
|
|
|
- if (e.detail.value != 2) {
|
|
|
- this.setData({
|
|
|
- [assetCarLoan]: e.detail.value
|
|
|
- })
|
|
|
- }
|
|
|
- },
|
|
|
+ // assetCarLoanPickerChange(e) {
|
|
|
+ // let assetCarLoan = 'form.assetCarLoan';
|
|
|
+ // this.setData({
|
|
|
+ // assetCarLoanLabel: this.data.assetCarLoanArr[e.detail.value]
|
|
|
+ // })
|
|
|
+ // if (e.detail.value != 2) {
|
|
|
+ // this.setData({
|
|
|
+ // [assetCarLoan]: e.detail.value
|
|
|
+ // })
|
|
|
+ // }
|
|
|
+ // },
|
|
|
constellationPicker(e) {
|
|
|
console.log(e.detail.value)
|
|
|
const items = this.data.constellationArr;
|
|
@@ -200,10 +195,27 @@ Page({
|
|
|
})
|
|
|
},
|
|
|
companyNaturePicker: function (e) {
|
|
|
+ // let companyNature = 'form.companyNature'
|
|
|
+ // this.setData({
|
|
|
+ // companyNatureLabel: this.data.companyNatureArr[e.detail.value],
|
|
|
+ // [companyNature]: this.data.companyNatureArrValue[e.detail.value]
|
|
|
+ // })
|
|
|
+ console.log(e.detail.value)
|
|
|
+ const items = this.data.companyNatureArr;
|
|
|
+ const values = e.detail.value;
|
|
|
+ for (let i = 0, lenI = items.length; i < lenI; ++i) {
|
|
|
+ items[i].checked = false
|
|
|
+ for (let j = 0, lenJ = values.length; j < lenJ; ++j) {
|
|
|
+ if (items[i].value === values[j]) {
|
|
|
+ items[i].checked = true
|
|
|
+ break
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
let companyNature = 'form.companyNature'
|
|
|
this.setData({
|
|
|
- companyNatureLabel: this.data.companyNatureArr[e.detail.value],
|
|
|
- [companyNature]: this.data.companyNatureArrValue[e.detail.value]
|
|
|
+ companyNatureArr: this.data.companyNatureArr,
|
|
|
+ [companyNature]: e.detail.value
|
|
|
})
|
|
|
},
|
|
|
parentAssetsPicker(e) {
|
|
@@ -216,8 +228,8 @@ Page({
|
|
|
compositionPicker(e) {
|
|
|
let composition = 'form.composition'
|
|
|
this.setData({
|
|
|
- [composition]: e.detail.value,
|
|
|
- compositionLabel: this.data.compositionArr[e.detail.value],
|
|
|
+ [composition]: this.data.compositionArrValue[e.detail.value],
|
|
|
+ compositionLabel: this.data.compositionArr[e.detail.value]
|
|
|
})
|
|
|
},
|
|
|
isCommonPicker(e) {
|
|
@@ -228,53 +240,53 @@ Page({
|
|
|
})
|
|
|
},
|
|
|
getInfos() {
|
|
|
+ wx.showLoading();
|
|
|
wx.request({
|
|
|
url: app.globalData.publicUrl + '/wx/member/' + this.data.openid + '/standard',
|
|
|
method: "get",
|
|
|
success: (res) => {
|
|
|
console.log(res.data.standard, '我是获取的信息')
|
|
|
-
|
|
|
- let ageMin = 'form.ageMin';
|
|
|
- let ageMax = 'form.ageMax';
|
|
|
- let heightMin = 'form.heightMin';
|
|
|
- let heightMax = 'form.heightMax';
|
|
|
- let income = 'form.income';
|
|
|
- let nativePlace = 'form.nativePlace';
|
|
|
- let education = 'form.education';
|
|
|
- let marriage = 'form.marriage';
|
|
|
- let assetHouse = 'form.assetHouse';
|
|
|
- let assetHouseArea = 'form.assetHouseArea';
|
|
|
- let assetHouseLoan = 'form.assetHouseLoan';
|
|
|
- let assetCar = 'form.assetCar';
|
|
|
- let assetCarValue = 'form.assetCarValue';
|
|
|
- let assetCarLoan = 'form.assetCarLoan';
|
|
|
- let constellation = 'form.constellation';
|
|
|
- let workStatus = 'form.workStatus';
|
|
|
- let companyNature = 'form.companyNature';
|
|
|
- let composition = 'form.composition';
|
|
|
- let parentAssets = 'form.parentAssets';
|
|
|
- let isCommon = 'form.isCommon';
|
|
|
- let id = 'form.id'
|
|
|
- if (res.data.standard) {
|
|
|
+ let ageMin = 'form.ageMin';
|
|
|
+ let ageMax = 'form.ageMax';
|
|
|
+ let heightMin = 'form.heightMin';
|
|
|
+ let heightMax = 'form.heightMax';
|
|
|
+ let income = 'form.income';
|
|
|
+ let nativePlace = 'form.nativePlace';
|
|
|
+ let education = 'form.education';
|
|
|
+ let marriage = 'form.marriage';
|
|
|
+ let assetHouse = 'form.assetHouse';
|
|
|
+ let assetHouseArea = 'form.assetHouseArea';
|
|
|
+ // let assetHouseLoan = 'form.assetHouseLoan';
|
|
|
+ let assetCar = 'form.assetCar';
|
|
|
+ let assetCarValue = 'form.assetCarValue';
|
|
|
+ // let assetCarLoan = 'form.assetCarLoan';
|
|
|
+ let constellation = 'form.constellation';
|
|
|
+ let workStatus = 'form.workStatus';
|
|
|
+ let companyNature = 'form.companyNature';
|
|
|
+ let composition = 'form.composition';
|
|
|
+ let parentAssets = 'form.parentAssets';
|
|
|
+ let isCommon = 'form.isCommon';
|
|
|
+ let id = 'form.id'
|
|
|
+ if (res.data.standard) {
|
|
|
this.setData({
|
|
|
[ageMin]: res.data.standard.ageMin,
|
|
|
[ageMax]: res.data.standard.ageMax,
|
|
|
[heightMin]: res.data.standard.heightMin,
|
|
|
[heightMax]: res.data.standard.heightMax,
|
|
|
- nativePlaceLabel: this.data.nativePlaceArr[res.data.standard.nativePlace],
|
|
|
- [nativePlace]: res.data.standard.nativePlace,
|
|
|
- marriageLabel: this.data.marriageArr[res.data.standard.marriage],
|
|
|
- [marriage]: res.data.standard.marriage,
|
|
|
+ // nativePlaceLabel: this.data.nativePlaceArr[res.data.standard.nativePlace],
|
|
|
+ // [nativePlace]: res.data.standard.nativePlace,
|
|
|
+ // marriageLabel: this.data.marriageArr[res.data.standard.marriage],
|
|
|
+ // [marriage]: res.data.standard.marriage,
|
|
|
assetHouseLabel: this.data.assetHouseArr[res.data.standard.assetHouse],
|
|
|
[assetHouse]: res.data.standard.assetHouse,
|
|
|
assetHouseAreaLabel: this.data.assetHouseAreaArr[res.data.standard.assetHouseArea],
|
|
|
[assetHouseArea]: res.data.standard.assetHouseArea,
|
|
|
- assetHouseLoanLabel: this.data.assetHouseLoanArr[res.data.standard.assetHouseLoan],
|
|
|
- [assetHouseLoan]: res.data.standard.assetHouseLoan,
|
|
|
+ // assetHouseLoanLabel: this.data.assetHouseLoanArr[res.data.standard.assetHouseLoan],
|
|
|
+ // [assetHouseLoan]: res.data.standard.assetHouseLoan,
|
|
|
assetCarLabel: this.data.assetCarArr[res.data.standard.assetCar],
|
|
|
[assetCar]: res.data.standard.assetCar,
|
|
|
- assetCarLoanLabel: this.data.assetCarLoanArr[res.data.standard.assetCarLoan],
|
|
|
- [assetCarLoan]: res.data.standard.assetCarLoan,
|
|
|
+ // assetCarLoanLabel: this.data.assetCarLoanArr[res.data.standard.assetCarLoan],
|
|
|
+ // [assetCarLoan]: res.data.standard.assetCarLoan,
|
|
|
compositionLabel: this.data.compositionArr[res.data.standard.composition],
|
|
|
[composition]: res.data.standard.composition,
|
|
|
isCommonLabel: this.data.isCommonArr[res.data.standard.isCommon],
|
|
@@ -282,15 +294,47 @@ Page({
|
|
|
[id]: res.data.standard.id
|
|
|
})
|
|
|
}
|
|
|
- tool.formDetails('he_education').then(result => {
|
|
|
+ tool.formDetails('he_is_no').then(result => {
|
|
|
+ this.setData({
|
|
|
+ nativePlaceArr: ['咋的都行'].concat(result[0]),
|
|
|
+ nativePlaceArrValue: ['0'].concat(result[1]),
|
|
|
+ })
|
|
|
+ if (res.data.standard.nativePlace) {
|
|
|
+ for (let i = 0; i < ['0'].concat(result[1]).length; i++) {
|
|
|
+ if (res.data.standard.nativePlace == ['0'].concat(result[1])[i]) {
|
|
|
+ this.setData({
|
|
|
+ nativePlaceLabel: ['咋的都行'].concat(result[0])[i],
|
|
|
+ [nativePlace]: res.data.standard.nativePlace
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ tool.formDetails('he_divorce').then(result => {
|
|
|
console.log(result)
|
|
|
this.setData({
|
|
|
- educationArr: ['咋的都行'].concat(result[0]),
|
|
|
- educationArrValue: [''].concat(result[1]),
|
|
|
+ marriageArr: ['咋的都行'].concat(result[0]),
|
|
|
+ marriageArrValue: ['0'].concat(result[1]),
|
|
|
})
|
|
|
- if (res.data.standard) {
|
|
|
+ if (res.data.standard.marriage) {
|
|
|
for (let i = 0; i < [''].concat(result[1]).length; i++) {
|
|
|
- if (res.data.standard.education == [''].concat(result[1])[i]) {
|
|
|
+ if (res.data.standard.marriage == ['0'].concat(result[1])[i]) {
|
|
|
+ this.setData({
|
|
|
+ marriageLabel: ['咋的都行'].concat(result[0])[i],
|
|
|
+ [marriage]: res.data.standard.marriage
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ tool.formDetails('he_education').then(result => {
|
|
|
+ this.setData({
|
|
|
+ educationArr: ['咋的都行'].concat(result[0]),
|
|
|
+ educationArrValue: ['0'].concat(result[1]),
|
|
|
+ })
|
|
|
+ if (res.data.standard.education) {
|
|
|
+ for (let i = 0; i < ['0'].concat(result[1]).length; i++) {
|
|
|
+ if (res.data.standard.education == ['0'].concat(result[1])[i]) {
|
|
|
this.setData({
|
|
|
educationLabel: ['咋的都行'].concat(result[0])[i],
|
|
|
[education]: res.data.standard.education
|
|
@@ -302,11 +346,11 @@ Page({
|
|
|
tool.formDetails('he_income').then(result => {
|
|
|
this.setData({
|
|
|
incomeArr: ['咋的都行'].concat(result[0]),
|
|
|
- incomeArrValue: [''].concat(result[1])
|
|
|
+ incomeArrValue: ['0'].concat(result[1])
|
|
|
})
|
|
|
if (res.data.standard) {
|
|
|
for (let i = 0; i < [''].concat(result[1]).length; i++) {
|
|
|
- if (res.data.standard.income == [''].concat(result[1])[i]) {
|
|
|
+ if (res.data.standard.income == ['0'].concat(result[1])[i]) {
|
|
|
this.setData({
|
|
|
incomeLabel: ['咋的都行'].concat(result[0])[i],
|
|
|
[income]: res.data.standard.income
|
|
@@ -318,11 +362,11 @@ Page({
|
|
|
tool.formDetails('he_asset_house_area').then(result => {
|
|
|
this.setData({
|
|
|
assetHouseAreaArr: ['咋的都行'].concat(result[0]),
|
|
|
- assetHouseAreaArrValue: [''].concat(result[1])
|
|
|
+ assetHouseAreaArrValue: ['0'].concat(result[1])
|
|
|
})
|
|
|
if (res.data.standard) {
|
|
|
for (let i = 0; i < [''].concat(result[1]).length; i++) {
|
|
|
- if (res.data.standard.assetHouseArea == [''].concat(result[1])[i]) {
|
|
|
+ if (res.data.standard.assetHouseArea == ['0'].concat(result[1])[i]) {
|
|
|
this.setData({
|
|
|
assetHouseAreaLabel: ['咋的都行'].concat(result[0])[i],
|
|
|
[assetHouseArea]: res.data.standard.assetHouseArea
|
|
@@ -334,11 +378,11 @@ Page({
|
|
|
tool.formDetails('he_asset_car_value').then(result => {
|
|
|
this.setData({
|
|
|
assetCarValueArr: ['咋的都行'].concat(result[0]),
|
|
|
- assetCarValueArrValue: [''].concat(result[1])
|
|
|
+ assetCarValueArrValue: ['0'].concat(result[1])
|
|
|
})
|
|
|
if (res.data.standard) {
|
|
|
for (let i = 0; i < [''].concat(result[1]).length; i++) {
|
|
|
- if (res.data.standard.assetCarValue == [''].concat(result[1])[i]) {
|
|
|
+ if (res.data.standard.assetCarValue == ['0'].concat(result[1])[i]) {
|
|
|
this.setData({
|
|
|
assetCarValueLabel: ['咋的都行'].concat(result[0])[i],
|
|
|
[assetCarValue]: res.data.standard.assetCarValue
|
|
@@ -421,21 +465,56 @@ Page({
|
|
|
workStatusArr: workStatusArr,
|
|
|
workStatusArrLabel: result[0],
|
|
|
workStatusArrValue: result[1],
|
|
|
-
|
|
|
})
|
|
|
-
|
|
|
})
|
|
|
tool.formDetails('he_company_nature').then(result => {
|
|
|
+ let companyNatureArr = result[0].map((item, index) => {
|
|
|
+ return Object.assign({}, {
|
|
|
+ 'name': item,
|
|
|
+ 'value': item,
|
|
|
+ 'checked': false
|
|
|
+ })
|
|
|
+ })
|
|
|
+ if (res.data.standard.companyNature) {
|
|
|
+ let rescompanyNature = res.data.standard.companyNature.split(",");
|
|
|
+ let recompanyNatureIndexArr = [];
|
|
|
+ for (let i = 0; i < rescompanyNature.length; i++) {
|
|
|
+ for (let j = 0; j < result[1].length; j++) {
|
|
|
+ if (rescompanyNature[i] == result[1][j]) {
|
|
|
+ recompanyNatureIndexArr.push(i)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ let rescompanyNatureLabel = [];
|
|
|
+ for (let i = 0; i < recompanyNatureIndexArr.length; i++) {
|
|
|
+ rescompanyNatureLabel.push(result[0][recompanyNatureIndexArr[i]])
|
|
|
+ }
|
|
|
+ for (let i = 0; i < rescompanyNatureLabel.length; i++) {
|
|
|
+ if (rescompanyNatureLabel[i] == companyNatureArr[i].value) {
|
|
|
+ companyNatureArr[i].checked = true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.setData({
|
|
|
+ [companyNature]: rescompanyNatureLabel
|
|
|
+ })
|
|
|
+ }
|
|
|
this.setData({
|
|
|
- companyNatureArr: result[0],
|
|
|
- companyNatureArrValue: result[1]
|
|
|
+ companyNatureArr: companyNatureArr,
|
|
|
+ companyNatureArrLabel: result[0],
|
|
|
+ companyNatureArrValue: result[1],
|
|
|
})
|
|
|
- if (res.data.standard) {
|
|
|
+ })
|
|
|
+ tool.formDetails('he_composition_agree').then(result => {
|
|
|
+ this.setData({
|
|
|
+ compositionArr: ['咋的都行'].concat(result[0]),
|
|
|
+ compositionArrValue: ['0'].concat(result[1])
|
|
|
+ })
|
|
|
+ if (res.data.standard.composition) {
|
|
|
for (let i = 0; i < [''].concat(result[1]).length; i++) {
|
|
|
- if (res.data.standard.companyNature == [''].concat(result[1])[i]) {
|
|
|
+ if (res.data.standard.composition == ['0'].concat(result[1])[i]) {
|
|
|
this.setData({
|
|
|
- companyNatureLabel: ['咋的都行'].concat(result[0])[i],
|
|
|
- [companyNature]: res.data.standard.companyNature
|
|
|
+ compositionLabel: ['咋的都行'].concat(result[0])[i],
|
|
|
+ [composition]: res.data.standard.composition
|
|
|
})
|
|
|
}
|
|
|
}
|
|
@@ -444,11 +523,11 @@ Page({
|
|
|
tool.formDetails('he_parent_assets').then(result => {
|
|
|
this.setData({
|
|
|
parentAssetsArr: ['咋的都行'].concat(result[0]),
|
|
|
- parentAssetsArrValue: [''].concat(result[1])
|
|
|
+ parentAssetsArrValue: ['0'].concat(result[1])
|
|
|
})
|
|
|
if (res.data.standard) {
|
|
|
for (let i = 0; i < [''].concat(result[1]).length; i++) {
|
|
|
- if (res.data.standard.parentAssets == [''].concat(result[1])[i]) {
|
|
|
+ if (res.data.standard.parentAssets == ['0'].concat(result[1])[i]) {
|
|
|
this.setData({
|
|
|
parentAssetsLabel: ['咋的都行'].concat(result[0])[i],
|
|
|
[parentAssets]: res.data.standard.parentAssets
|
|
@@ -457,20 +536,23 @@ Page({
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
-
|
|
|
+ },
|
|
|
+ complete: () => {
|
|
|
+ wx.hideLoading()
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
formSubmit(e) {
|
|
|
const params = e.detail.value
|
|
|
//校验表单
|
|
|
- // if (!this.WxValidate.checkForm(params)) {
|
|
|
- // const error = this.WxValidate.errorList[0]
|
|
|
- // this.showModal(error)
|
|
|
- // return false
|
|
|
- // }
|
|
|
+ if (!this.WxValidate.checkForm(params)) {
|
|
|
+ const error = this.WxValidate.errorList[0]
|
|
|
+ this.showModal(error)
|
|
|
+ return false
|
|
|
+ }
|
|
|
let constellation = 'form.constellation'
|
|
|
let workStatus = 'form.workStatus'
|
|
|
+ let companyNature='form.companyNature'
|
|
|
let indexArr = [];
|
|
|
for (let i = 0; i < params.constellation.length; i++) {
|
|
|
indexArr.push(this.data.constellationArrLabel.indexOf(params.constellation[i]))
|
|
@@ -497,9 +579,23 @@ Page({
|
|
|
str2 += value2[i] + ','
|
|
|
}
|
|
|
|
|
|
+ let indexArr3 = [];
|
|
|
+ for (let i = 0; i < params.companyNature.length; i++) {
|
|
|
+ indexArr3.push(this.data.companyNatureArrLabel.indexOf(params.companyNature[i]))
|
|
|
+ }
|
|
|
+ let value3 = [];
|
|
|
+ for (let i = 0; i < indexArr3.length; i++) {
|
|
|
+ value3.push(this.data.companyNatureArrValue[indexArr3[i]])
|
|
|
+ }
|
|
|
+ let str3 = '';
|
|
|
+ for (let i = 0; i < value3.length; i++) {
|
|
|
+ str3 += value3[i] + ','
|
|
|
+ }
|
|
|
+
|
|
|
this.setData({
|
|
|
[constellation]: str.slice(0, str.length - 1),
|
|
|
- [workStatus]: str2.slice(0, str2.length - 1)
|
|
|
+ [workStatus]: str2.slice(0, str2.length - 1),
|
|
|
+ [companyNature]:str3.slice(0, str3.length - 1)
|
|
|
})
|
|
|
console.log(this.data.form)
|
|
|
wx.request({
|
|
@@ -517,7 +613,7 @@ Page({
|
|
|
showCancel: false,
|
|
|
success(res) {
|
|
|
if (res.confirm) {
|
|
|
- wx.switchTab({
|
|
|
+ wx.redirectTo({
|
|
|
url: '/pages/index/index',
|
|
|
})
|
|
|
}
|
|
@@ -566,18 +662,18 @@ Page({
|
|
|
assetHouseArea: {
|
|
|
required: true
|
|
|
},
|
|
|
- assetHouseLoan: {
|
|
|
- required: true
|
|
|
- },
|
|
|
+ // assetHouseLoan: {
|
|
|
+ // required: true
|
|
|
+ // },
|
|
|
assetCar: {
|
|
|
required: true
|
|
|
},
|
|
|
assetCarValue: {
|
|
|
required: true
|
|
|
},
|
|
|
- assetCarLoan: {
|
|
|
- required: true
|
|
|
- },
|
|
|
+ // assetCarLoan: {
|
|
|
+ // required: true
|
|
|
+ // },
|
|
|
constellation: {
|
|
|
required: true
|
|
|
},
|
|
@@ -599,69 +695,73 @@ Page({
|
|
|
}
|
|
|
const messages = {
|
|
|
ageMin: {
|
|
|
- required: '请输入您能接受的最小年纪'
|
|
|
+ required: '请输入您能接受的最小年纪呦'
|
|
|
},
|
|
|
ageMax: {
|
|
|
- required: '请输入您能接受的最大年纪'
|
|
|
+ required: '请输入您能接受的最大年纪呦'
|
|
|
},
|
|
|
heightMin: {
|
|
|
- required: '请输入您能接受的最低身高'
|
|
|
+ required: '请输入您能接受的最低身高呦'
|
|
|
},
|
|
|
heightMax: {
|
|
|
- required: '请输入您能接受的最高身高'
|
|
|
+ required: '请输入您能接受的最高身高呦'
|
|
|
},
|
|
|
education: {
|
|
|
- required: '请输入您能接受的教育程度'
|
|
|
+ required: '请输入您能接受的教育程度呦'
|
|
|
},
|
|
|
income: {
|
|
|
- required: '请选择您能接受的收入'
|
|
|
+ required: '请选择您能接受的收入呦'
|
|
|
},
|
|
|
nativePlace: {
|
|
|
- required: '请选择本地或者外地'
|
|
|
+ required: '请选择本地或者外地呦'
|
|
|
},
|
|
|
marriage: {
|
|
|
- required: '请选择您能接受的婚姻状态'
|
|
|
+ required: '请选择您能接受的婚姻状态呦'
|
|
|
},
|
|
|
assetHouse: {
|
|
|
- required: '请选择您可以接受的房子状态'
|
|
|
+ required: '请选择您可以接受的房子状态呦'
|
|
|
},
|
|
|
assetHouseArea: {
|
|
|
- required: '请选择您可以接受的房子面积'
|
|
|
- },
|
|
|
- assetHouseLoan: {
|
|
|
- required: '请选择您可以接受的房子是否有贷款'
|
|
|
+ required: '请选择您可以接受的房子面积呦'
|
|
|
},
|
|
|
+ // assetHouseLoan: {
|
|
|
+ // required: '请选择您可以接受的房子是否有贷款'
|
|
|
+ // },
|
|
|
assetCar: {
|
|
|
- required: '请选择您可以接受的车子状态'
|
|
|
+ required: '请选择您可以接受的车子状态呦'
|
|
|
},
|
|
|
assetCarValue: {
|
|
|
- required: '请选择您可以接受的车子价值'
|
|
|
- },
|
|
|
- assetCarLoan: {
|
|
|
- required: '请选择您是否可以接受的车子有贷款'
|
|
|
+ required: '请选择您可以接受的车子价值呦'
|
|
|
},
|
|
|
+ // assetCarLoan: {
|
|
|
+ // required: '请选择您是否可以接受的车子有贷款'
|
|
|
+ // },
|
|
|
constellation: {
|
|
|
- required: '请选择您的优先选择星座'
|
|
|
+ required: '请选择您的优先选择星座呦'
|
|
|
},
|
|
|
workStatus: {
|
|
|
- required: '请选择您能接受的工作状态'
|
|
|
+ required: '请选择您能接受的工作状态呦'
|
|
|
},
|
|
|
companyNature: {
|
|
|
- required: '请选择您能接受的单位性质'
|
|
|
+ required: '请选择您能接受的单位性质呦'
|
|
|
},
|
|
|
parentAssets: {
|
|
|
- required: '请选择您能接受的父母状态'
|
|
|
+ required: '请选择您能接受的父母经济状态呦'
|
|
|
},
|
|
|
composition: {
|
|
|
- required: '请选择您可以接受的家庭构成'
|
|
|
+ required: '请选择您可以接受的家庭构成呦'
|
|
|
},
|
|
|
isCommon: {
|
|
|
- required: '请选择您是否接受与父母同住'
|
|
|
+ required: '请选择您是否接受与父母同住呦'
|
|
|
}
|
|
|
}
|
|
|
this.WxValidate = new WxValidate(rules, messages)
|
|
|
},
|
|
|
async onLoad(options) {
|
|
|
+
|
|
|
+ // tool.formDetails('he_composition_agree').then(result => {
|
|
|
+ // console.log(result)
|
|
|
+ // })
|
|
|
this.initValidate()
|
|
|
tool.openidStatus().then(result => {
|
|
|
this.setData({
|