123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852 |
- import WxValidate from '../../utils/WxValidate.js';
- const app = require('../../utils/util.js');
- const tool = require('../../utils/tool.js');
- Page({
- data: {
- form: {
- ageMin: '',
- ageMax: '',
- heightMin: '',
- heightMax: '',
- education: '',
- income: '',
- nativePlace: '',
- marriage: '',
- assetHouse: '',
- assetHouseArea: '',
- // assetHouseLoan: '',
- assetCar: '',
- assetCarValue: '',
- // assetCarLoan: '',
- constellation: '',
- workStatus: '',
- companyNature: '',
- parentAssets: '',
- composition: '',
- isCommon: '',
- id: ''
- },
- educationArr: [],
- incomeArr: [],
- nativePlaceArr: [],
- marriageArr: [],
- constellationArr: [],
- workStatusArr: [],
- assetHouseArr: ['咋的都行','租房', '购房'],
- assetHouseAreaArr: [],
- // assetHouseLoanArr: ['有', '没有', '咋的都行'],
- assetCarArr: ['咋的都行','有', '没有'],
- assetCarValueArr: [],
- // assetCarLoanArr: ['不行', '行', '咋的都行'],
- companyNatureArr: [],
- parentAssetsArr: [],
- compositionArr: [],
- isCommonArr: ['愿意', '不愿意', '咋的都行']
- },
- ageMinChange(e) {
- let ageMin = 'form.ageMin'
- this.setData({
- [ageMin]: e.detail.value
- })
- },
- ageMaxChange(e) {
- let ageMax = 'form.ageMax'
- this.setData({
- [ageMax]: e.detail.value
- })
- },
- heightMinChange(e) {
- let heightMin = 'form.heightMin'
- this.setData({
- [heightMin]: e.detail.value
- })
- },
- heightMaxChange(e) {
- let heightMax = 'form.heightMax'
- this.setData({
- [heightMax]: e.detail.value
- })
- },
- educationPicker(e) {
- let education = 'form.education'
- this.setData({
- educationLabel: this.data.educationArr[e.detail.value],
- [education]: this.data.educationArrValue[e.detail.value]
- })
- },
- incomePicker(e) {
- let income = 'form.income'
- this.setData({
- incomeLabel: this.data.incomeArr[e.detail.value],
- [income]: this.data.incomeArrValue[e.detail.value]
- })
- },
- nativePlacePicker(e) {
- let nativePlace = 'form.nativePlace';
- this.setData({
- nativePlaceLabel: this.data.nativePlaceArr[e.detail.value],
- [nativePlace]: this.data.nativePlaceArrValue[e.detail.value],
- })
- },
- marriageChange(e) {
- let marriage = 'form.marriage';
- this.setData({
- marriageLabel: this.data.marriageArr[e.detail.value],
- [marriage]: this.data.marriageArrValue[e.detail.value]
- })
- },
- assetHousePickerChange(e) {
- let assetHouse = 'form.assetHouse'
- this.setData({
- assetHouseLabel: this.data.assetHouseArr[e.detail.value],
- [assetHouse]: this.data.assetHouseArrValue[e.detail.value]
- })
- // let assetHouse = 'form.assetHouse';
- // this.setData({
- // assetHouseLabel: this.data.assetHouseArr[e.detail.value]
- // })
- // if (e.detail.value != 2) {
- // this.setData({
- // [assetHouse]: e.detail.value
- // })
- // }
- },
- assetHouseAreaPickerChange(e) {
- let assetHouseArea = 'form.assetHouseArea'
- this.setData({
- assetHouseAreaLabel: this.data.assetHouseAreaArr[e.detail.value],
- [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
- // })
- // }
- // },
- 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],
- [assetCar]: e.detail.value
- })
- // if (e.detail.value != 2) {
- // this.setData({
- // [assetCar]: e.detail.value
- // })
- // }
- },
- assetCarValuePickerChange(e) {
- let assetCarValue = 'form.assetCarValue'
- this.setData({
- assetCarValueLabel: this.data.assetCarValueArr[e.detail.value],
- [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
- // })
- // }
- // },
- constellationPicker(e) {
- console.log(e.detail.value)
- const items = this.data.constellationArr;
- 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 constellation = 'form.constellation'
- this.setData({
- constellationArr: this.data.constellationArr,
- [constellation]: e.detail.value
- })
- },
- workStatusChange(e) {
- console.log(e.detail.value)
- const items = this.data.workStatusArr;
- 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 workStatus = 'form.workStatus'
- this.setData({
- workStatusArr: this.data.workStatusArr,
- [workStatus]: e.detail.value
- })
- },
- 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({
- companyNatureArr: this.data.companyNatureArr,
- [companyNature]: e.detail.value
- })
- },
- parentAssetsPicker(e) {
- let parentAssets = 'form.parentAssets'
- this.setData({
- parentAssetsLabel: this.data.parentAssetsArr[e.detail.value],
- [parentAssets]: this.data.parentAssetsArrValue[e.detail.value]
- })
- },
- compositionPicker(e) {
- let composition = 'form.composition'
- this.setData({
- [composition]: this.data.compositionArrValue[e.detail.value],
- compositionLabel: this.data.compositionArr[e.detail.value]
- })
- },
- isCommonPicker(e) {
- let isCommon = 'form.isCommon'
- this.setData({
- [isCommon]: e.detail.value,
- isCommonLabel: this.data.isCommonArr[e.detail.value]
- })
- },
- getInfos() {
- wx.showLoading();
- wx.request({
- url: app.globalData.publicUrl + '/wx/member/' + this.data.openid + '/standard',
- method: "get",
- success: (res) => {
- console.log(res, '我是获取的信息')
- 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.code==0) {
- 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,
- // 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,
- 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,
- compositionLabel: this.data.compositionArr[res.data.standard.composition],
- [composition]: res.data.standard.composition,
- isCommonLabel: this.data.isCommonArr[res.data.standard.isCommon],
- [isCommon]: res.data.standard.isCommon,
- [id]: res.data.standard.id
- })
- }
- tool.formDetails('he_is_no').then(result => {
- this.setData({
- nativePlaceArr: ['咋的都行'].concat(result[0]),
- nativePlaceArrValue: ['0'].concat(result[1]),
- })
- if (res.data.code==0) {
- 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({
- marriageArr: ['咋的都行'].concat(result[0]),
- marriageArrValue: ['0'].concat(result[1]),
- })
- if (res.data.code==0) {
- for (let i = 0; i < [''].concat(result[1]).length; 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 => {
- let oArr=[];
- for(let i=0;i<result[0].length;i++){
- oArr.push(result[0][i].concat('以上'))
- }
- this.setData({
- educationArr: ['咋的都行'].concat(oArr),
- educationArrValue: ['0'].concat(result[1]),
- })
- if (res.data.code==0) {
- 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(oArr)[i],
- [education]: res.data.standard.education
- })
- }
- }
- }
- })
- tool.formDetails('he_income').then(result => {
- this.setData({
- incomeArr: ['咋的都行'].concat(result[0]),
- incomeArrValue: ['0'].concat(result[1])
- })
- if (res.data.code==0) {
- for (let i = 0; i < [''].concat(result[1]).length; i++) {
- if (res.data.standard.income == ['0'].concat(result[1])[i]) {
- this.setData({
- incomeLabel: ['咋的都行'].concat(result[0])[i],
- [income]: res.data.standard.income
- })
- }
- }
- }
- })
- tool.formDetails('he_asset_house').then(result => {
- this.setData({
- assetHouseArr: ['咋的都行'].concat(result[0]),
- assetHouseArrValue: ['0'].concat(result[1])
- })
- if (res.data.code==0) {
- for (let i = 0; i < [''].concat(result[1]).length; i++) {
- if (res.data.standard.assetHouse == ['0'].concat(result[1])[i]) {
- this.setData({
- assetHouseLabel: ['咋的都行'].concat(result[0])[i],
- [assetHouse]: res.data.standard.assetHouse
- })
- }
- }
- }
- // if (res.data.code==0) {
- // for (let i = 0; i < result[0].length; i++) {
- // if (result[1][i] == res.data.info.assetHouse) {
- // this.setData({
- // assetHouseLabel: result[0][i],
- // [assetHouse]: result[1][i],
- // })
- // }
- // }
- // }
- })
- tool.formDetails('he_asset_house_area').then(result => {
- this.setData({
- assetHouseAreaArr: ['咋的都行'].concat(result[0]),
- assetHouseAreaArrValue: ['0'].concat(result[1])
- })
- if (res.data.code==0) {
- for (let i = 0; i < [''].concat(result[1]).length; i++) {
- if (res.data.standard.assetHouseArea == ['0'].concat(result[1])[i]) {
- this.setData({
- assetHouseAreaLabel: ['咋的都行'].concat(result[0])[i],
- [assetHouseArea]: res.data.standard.assetHouseArea
- })
- }
- }
- }
- })
- tool.formDetails('he_asset_car_value').then(result => {
- this.setData({
- assetCarValueArr: ['咋的都行'].concat(result[0]),
- assetCarValueArrValue: ['0'].concat(result[1])
- })
- if (res.data.code==0) {
- for (let i = 0; i < [''].concat(result[1]).length; i++) {
- if (res.data.standard.assetCarValue == ['0'].concat(result[1])[i]) {
- this.setData({
- assetCarValueLabel: ['咋的都行'].concat(result[0])[i],
- [assetCarValue]: res.data.standard.assetCarValue
- })
- }
- }
- }
- })
- tool.formDetails('he_astrology').then(result => {
- let constellationArr = result[0].map((item, index) => {
- return Object.assign({}, {
- 'name': item,
- 'value': item,
- 'checked': false
- })
- })
- console.log(result);
- if (res.data.code==0&&res.data.standard.constellation) {
- let resComposition = res.data.standard.constellation.split(",");
- let resCompositionIndexArr = [];
- for (let i = 0; i < resComposition.length; i++) {
- for (let j = 0; j < result[1].length; j++) {
- if (resComposition[i] == result[1][j]) {
- resCompositionIndexArr.push(i)
- }
- }
- }
- let resCompositionLabel = [];
- for (let i = 0; i < resCompositionIndexArr.length; i++) {
- resCompositionLabel.push(result[0][resCompositionIndexArr[i]])
- }
- for (let i = 0; i < resCompositionLabel.length; i++) {
- if (resCompositionLabel[i] == constellationArr[i].value) {
- constellationArr[i].checked = true;
- }
- }
- this.setData({
- [constellation]: resCompositionLabel
- })
- }
- this.setData({
- constellationArr: constellationArr,
- constellationArrLabel: result[0],
- constellationArrValue: result[1],
- })
- })
- tool.formDetails('he_work_status').then(result => {
- let workStatusArr = result[0].map((item, index) => {
- return Object.assign({}, {
- 'name': item,
- 'value': item,
- 'checked': false
- })
- })
- if (res.data.code==0&&res.data.standard.workStatus) {
- let resWorkStatus = res.data.standard.workStatus.split(",");
- let resWorkStatusIndexArr = [];
- for (let i = 0; i < resWorkStatus.length; i++) {
- for (let j = 0; j < result[1].length; j++) {
- if (resWorkStatus[i] == result[1][j]) {
- resWorkStatusIndexArr.push(i)
- }
- }
- }
- let resWorkStatusLabel = [];
- for (let i = 0; i < resWorkStatusIndexArr.length; i++) {
- resWorkStatusLabel.push(result[0][resWorkStatusIndexArr[i]])
- }
- for (let i = 0; i < resWorkStatusLabel.length; i++) {
- if (resWorkStatusLabel[i] == workStatusArr[i].value) {
- workStatusArr[i].checked = true;
- }
- }
- this.setData({
- [workStatus]: resWorkStatusLabel
- })
- }
- this.setData({
- 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.code==0&&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: companyNatureArr,
- companyNatureArrLabel: result[0],
- companyNatureArrValue: result[1],
- })
- })
- tool.formDetails('he_composition_agree').then(result => {
- this.setData({
- compositionArr: ['咋的都行'].concat(result[0]),
- compositionArrValue: ['0'].concat(result[1])
- })
- if (res.data.code==0) {
- for (let i = 0; i < [''].concat(result[1]).length; i++) {
- if (res.data.standard.composition == ['0'].concat(result[1])[i]) {
- this.setData({
- compositionLabel: ['咋的都行'].concat(result[0])[i],
- [composition]: res.data.standard.composition
- })
- }
- }
- }
- })
- tool.formDetails('he_parent_assets').then(result => {
- this.setData({
- parentAssetsArr: ['咋的都行'].concat(result[0]),
- parentAssetsArrValue: ['0'].concat(result[1])
- })
- if (res.data.code==0) {
- for (let i = 0; i < [''].concat(result[1]).length; i++) {
- if (res.data.standard.parentAssets == ['0'].concat(result[1])[i]) {
- this.setData({
- parentAssetsLabel: ['咋的都行'].concat(result[0])[i],
- [parentAssets]: res.data.standard.parentAssets
- })
- }
- }
- }
- })
- },
- 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
- }
- 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]))
- }
- let value = [];
- for (let i = 0; i < indexArr.length; i++) {
- value.push(this.data.constellationArrValue[indexArr[i]])
- }
- let str = '';
- for (let i = 0; i < value.length; i++) {
- str += value[i] + ','
- }
- let indexArr2 = [];
- for (let i = 0; i < params.workStatus.length; i++) {
- indexArr2.push(this.data.workStatusArrLabel.indexOf(params.workStatus[i]))
- }
- let value2 = [];
- for (let i = 0; i < indexArr2.length; i++) {
- value2.push(this.data.workStatusArrValue[indexArr2[i]])
- }
- let str2 = '';
- for (let i = 0; i < value2.length; i++) {
- 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),
- [companyNature]:str3.slice(0, str3.length - 1)
- })
- console.log(this.data.form)
- wx.request({
- url: app.globalData.publicUrl + '/wx/member/' + this.data.openid + '/standard',
- method: "POST",
- header: {
- 'content-type': 'application/x-www-form-urlencoded',
- },
- data: this.data.form,
- success: (res) => {
- console.log(res)
- if (res.data.code == 0) {
- wx.showModal({
- title: '上传成功',
- showCancel: false,
- success(res) {
- if (res.confirm) {
- wx.redirectTo({
- url: '/pages/index/index',
- })
- }
- }
- });
- }
- }
- })
- },
- showModal(error) {
- wx.showModal({
- content: error.msg,
- showCancel: false,
- })
- },
- //验证函数
- initValidate() {
- const rules = {
- ageMin: {
- required: true
- },
- ageMax: {
- required: true
- },
- heightMin: {
- required: true
- },
- heightMax: {
- required: true
- },
- education: {
- required: true
- },
- income: {
- required: true
- },
- nativePlace: {
- required: true
- },
- marriage: {
- required: true
- },
- assetHouse: {
- required: true
- },
- // assetHouseArea: {
- // required: true
- // },
- assetCar: {
- required: true
- },
- // assetCarValue: {
- // required: true
- // },
- constellation: {
- required: true
- },
- workStatus: {
- required: true
- },
- companyNature: {
- required: true
- },
- parentAssets: {
- required: true
- },
- composition: {
- required: true
- },
- isCommon: {
- required: true
- }
- }
- const messages = {
- ageMin: {
- required: '请输入您能接受的最小年纪呦'
- },
- ageMax: {
- required: '请输入您能接受的最大年纪呦'
- },
- heightMin: {
- required: '请输入您能接受的最低身高呦'
- },
- heightMax: {
- required: '请输入您能接受的最高身高呦'
- },
- education: {
- required: '请输入您能接受的教育程度呦'
- },
- income: {
- required: '请选择您能接受的收入呦'
- },
- nativePlace: {
- required: '请选择本地或者外地呦'
- },
- marriage: {
- required: '请选择您能接受的婚姻状态呦'
- },
- assetHouse: {
- required: '请选择您可以接受的房子状态呦'
- },
- // assetHouseArea: {
- // required: '请选择您可以接受的房子面积呦'
- // },
- // assetHouseLoan: {
- // required: '请选择您可以接受的房子是否有贷款'
- // },
- assetCar: {
- required: '请选择您可以接受的车子状态呦'
- },
- // assetCarValue: {
- // required: '请选择您可以接受的车子价值呦'
- // },
- // assetCarLoan: {
- // required: '请选择您是否可以接受的车子有贷款'
- // },
- constellation: {
- required: '请选择您的优先选择星座呦'
- },
- workStatus: {
- required: '请选择您能接受的工作状态呦'
- },
- companyNature: {
- required: '请选择您能接受的单位性质呦'
- },
- parentAssets: {
- required: '请选择您能接受的父母经济状态呦'
- },
- composition: {
- required: '请选择您可以接受的家庭构成呦'
- },
- isCommon: {
- 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({
- openid: result[0],
- sessionkey: result[1]
- })
- // this.getForm();
- this.getInfos();
- })
- },
- /**
- * 生命周期函数--监听页面初次渲染完成
- */
- onReady: function () {
- },
- /**
- * 生命周期函数--监听页面显示
- */
- onShow: function () {
- },
- /**
- * 生命周期函数--监听页面隐藏
- */
- onHide: function () {
- },
- /**
- * 生命周期函数--监听页面卸载
- */
- onUnload: function () {
- },
- /**
- * 页面相关事件处理函数--监听用户下拉动作
- */
- onPullDownRefresh: function () {
- },
- /**
- * 页面上拉触底事件的处理函数
- */
- onReachBottom: function () {
- },
- /**
- * 用户点击右上角分享
- */
- onShareAppMessage: function () {
- }
- })
|