|
@@ -24,7 +24,9 @@ const _sfc_main = {
|
|
|
selectedJob: null,
|
|
|
isPhoneValid: false,
|
|
|
isNameValid: false,
|
|
|
- isIdCardValid: false
|
|
|
+ isIdCardValid: false,
|
|
|
+ genderOptions: ["男", "女"],
|
|
|
+ genderIndex: 0
|
|
|
};
|
|
|
},
|
|
|
onLoad() {
|
|
@@ -215,6 +217,13 @@ const _sfc_main = {
|
|
|
});
|
|
|
return;
|
|
|
}
|
|
|
+ if (!this.formData.gender) {
|
|
|
+ common_vendor.index.showToast({
|
|
|
+ title: "请选择性别",
|
|
|
+ icon: "none"
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
if (!this.formData.phone.trim()) {
|
|
|
common_vendor.index.showToast({
|
|
|
title: "请输入手机号",
|
|
@@ -308,7 +317,8 @@ const _sfc_main = {
|
|
|
emergency_phone: this.formData.emergencyPhone,
|
|
|
relation: this.formData.relation, */
|
|
|
age: "20",
|
|
|
- job_id: this.selectedJobId
|
|
|
+ job_id: this.selectedJobId,
|
|
|
+ gender: this.formData.gender
|
|
|
};
|
|
|
api_user.fillUserInfo(submitData).then((res) => {
|
|
|
common_vendor.index.hideLoading();
|
|
@@ -359,6 +369,10 @@ const _sfc_main = {
|
|
|
validateIdCard() {
|
|
|
const idCardReg = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/;
|
|
|
this.isIdCardValid = idCardReg.test(this.formData.idCard);
|
|
|
+ },
|
|
|
+ genderChange(e) {
|
|
|
+ this.genderIndex = e.detail.value;
|
|
|
+ this.formData.gender = this.genderOptions[this.genderIndex];
|
|
|
}
|
|
|
}
|
|
|
};
|
|
@@ -399,10 +413,14 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
}, $data.formData.idCard ? common_vendor.e({
|
|
|
q: $data.isIdCardValid
|
|
|
}, $data.isIdCardValid ? {} : {}) : {}, {
|
|
|
- r: !$options.canSubmitSimple,
|
|
|
- s: common_vendor.o((...args) => $options.submitForm && $options.submitForm(...args)),
|
|
|
- t: $data.isAgreed,
|
|
|
- v: common_vendor.o((...args) => $options.toggleAgreement && $options.toggleAgreement(...args))
|
|
|
+ r: $data.formData.gender,
|
|
|
+ s: common_vendor.o((...args) => $options.genderChange && $options.genderChange(...args)),
|
|
|
+ t: $data.genderIndex,
|
|
|
+ v: $data.genderOptions,
|
|
|
+ w: !$options.canSubmitSimple,
|
|
|
+ x: common_vendor.o((...args) => $options.submitForm && $options.submitForm(...args)),
|
|
|
+ y: $data.isAgreed,
|
|
|
+ z: common_vendor.o((...args) => $options.toggleAgreement && $options.toggleAgreement(...args))
|
|
|
}) : {});
|
|
|
}
|
|
|
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
|