|
@@ -23,21 +23,22 @@
|
|
|
<view class="personal">
|
|
|
<view class="body-input u-flex-col u-row-center ">
|
|
|
<text class="input-title">姓名</text>
|
|
|
- <u--input customStyle="padding:0 !important" type="text" placeholder="请填写您的真实姓名" border
|
|
|
- placeholderClass='input-style' v-model="from.name"></u--input>
|
|
|
+ <u-input customStyle="padding:0 !important" type="text" placeholder="请填写您的真实姓名" border
|
|
|
+ placeholderClass='input-style' v-model="user.name"></u-input>
|
|
|
</view>
|
|
|
<view class="body-input u-flex-col u-row-center" @click="sexShow = true">
|
|
|
<text class="input-title">性别</text>
|
|
|
- <u--input :disabled="true" disabledColor="#fff" customStyle="padding:0 !important" type="text"
|
|
|
+ <u-input :disabled="true" disabledColor="#fff" customStyle="padding:0 !important" type="text"
|
|
|
placeholder="请选择您的性别" border placeholderClass='input-style' suffixIcon="arrow-right"
|
|
|
- suffixIconStyle="font-size: 32rpx;font-weight: 400;color: #CACACA;" v-model="sexvalue"></u--input>
|
|
|
+ suffixIconStyle="font-size: 32rpx;font-weight: 400;color: #CACACA;"
|
|
|
+ v-model="user.sexvalue"></u-input>
|
|
|
</view>
|
|
|
<view class="body-input u-flex-col u-row-center" @click="birthdayBtn">
|
|
|
<text class="input-title">出生年月</text>
|
|
|
<u--input :disabled="true" disabledColor="#fff" customStyle="padding:0 !important" type="text"
|
|
|
placeholder="请选择您的出生年月" border placeholderClass='input-style' suffixIcon="arrow-right"
|
|
|
suffixIconStyle="font-size: 32rpx;font-weight: 400;color: #CACACA;"
|
|
|
- v-model="from.birthday"></u--input>
|
|
|
+ v-model="user.birthday"></u--input>
|
|
|
</view>
|
|
|
<view class="body-input u-flex-col u-row-center" style="height: 128rpx;">
|
|
|
<view class="u-flex u-row-between ">
|
|
@@ -45,49 +46,51 @@
|
|
|
<text class="input-title">求职身份</text>
|
|
|
</view>
|
|
|
<u-subsection :list="list" :current="current" @change="sectionChange"
|
|
|
- v-model="from.job_role"></u-subsection>
|
|
|
+ v-model="user.job_role"></u-subsection>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="body-input u-flex-col u-row-center" @click="cityShow = true">
|
|
|
<text class="input-title">户口所在地</text>
|
|
|
<u--input :disabled="true" disabledColor="#fff" customStyle="padding:0 !important" type="text"
|
|
|
placeholder="请选择您的户口所在地" border placeholderClass='input-style' suffixIcon="arrow-right"
|
|
|
- suffixIconStyle="font-size: 32rpx;font-weight: 400;color: #CACACA;" v-model="city1"></u--input>
|
|
|
+ suffixIconStyle="font-size: 32rpx;font-weight: 400;color: #CACACA;" v-model="user.city1"></u--input>
|
|
|
</view>
|
|
|
<view class="body-input u-flex-col u-row-center" @click="jobShow = true">
|
|
|
<text class="input-title">当前求职状态</text>
|
|
|
<u--input :disabled="true" disabledColor="#fff" customStyle="padding:0 !important" type="text"
|
|
|
placeholder="请选择您当前求职状态" border placeholderClass='input-style' suffixIcon="arrow-right"
|
|
|
- suffixIconStyle="font-size: 32rpx;font-weight: 400;color: #CACACA;" v-model="job"></u--input>
|
|
|
+ suffixIconStyle="font-size: 32rpx;font-weight: 400;color: #CACACA;" v-model="user.job"></u--input>
|
|
|
</view>
|
|
|
<view class="body-input u-flex-col u-row-center" @click="workBtn">
|
|
|
<text class="input-title">参加工作时间</text>
|
|
|
<u--input :disabled="true" disabledColor="#fff" customStyle="padding:0 !important" type="text"
|
|
|
placeholder="请选择您参加工作的时间" border placeholderClass='input-style' suffixIcon="arrow-right"
|
|
|
suffixIconStyle="font-size: 32rpx;font-weight: 400;color: #CACACA;"
|
|
|
- v-model="from.job_time"></u--input>
|
|
|
+ v-model="user.job_time"></u--input>
|
|
|
</view>
|
|
|
<view class="body-input u-flex-col u-row-center">
|
|
|
<text class="input-title">邮箱</text>
|
|
|
<u--input customStyle="padding:0 !important" type="text" placeholder="请填写(选填)" border
|
|
|
- placeholderClass='input-style' v-model="from.email"></u--input>
|
|
|
+ placeholderClass='input-style' v-model="user.email"></u--input>
|
|
|
</view>
|
|
|
<view class="body-input u-flex-col u-row-center">
|
|
|
<text class="input-title">手机号</text>
|
|
|
<u--input customStyle="padding:0 !important" type="text" placeholder="请填写" border
|
|
|
- placeholderClass='input-style' v-model="from.mobile"></u--input>
|
|
|
+ placeholderClass='input-style' v-model="user.mobile"></u--input>
|
|
|
</view>
|
|
|
<view class="body-input u-flex-col u-row-center" @click="maritalShow = true">
|
|
|
<text class="input-title">婚姻状态</text>
|
|
|
<u--input :disabled="true" disabledColor="#fff" customStyle="padding:0 !important" type="text"
|
|
|
placeholder="请选择(选填)" border placeholderClass='input-style' suffixIcon="arrow-right"
|
|
|
- suffixIconStyle="font-size: 32rpx;font-weight: 400;color: #CACACA;" v-model="status"></u--input>
|
|
|
+ suffixIconStyle="font-size: 32rpx;font-weight: 400;color: #CACACA;"
|
|
|
+ v-model="user.status"></u--input>
|
|
|
</view>
|
|
|
<view class="body-input u-flex-col u-row-center" @click="politicsShow = true">
|
|
|
<text class="input-title">政治面貌</text>
|
|
|
<u--input :disabled="true" disabledColor="#fff" customStyle="padding:0 !important" type="text"
|
|
|
placeholder="请选择(选填)" border placeholderClass='input-style' suffixIcon="arrow-right"
|
|
|
- suffixIconStyle="font-size: 32rpx;font-weight: 400;color: #CACACA;" v-model="politics"></u--input>
|
|
|
+ suffixIconStyle="font-size: 32rpx;font-weight: 400;color: #CACACA;"
|
|
|
+ v-model="user.politics"></u--input>
|
|
|
</view>
|
|
|
<view class="button" @click="next">
|
|
|
保存
|
|
@@ -103,8 +106,8 @@
|
|
|
@cancel='close()'></u-picker>
|
|
|
<u-datetime-picker ref="picker" title="出生日期" :minDate="minDate" @confirm="birthdayConfirm" :show="birthdayShow"
|
|
|
mode="date" @cancel='close()'></u-datetime-picker>
|
|
|
- <u-datetime-picker ref="pickers" title="参加工作时间" :minDate="minDate1" @confirm="workConfirm" :show="workShow" mode="date"
|
|
|
- @cancel='close()'></u-datetime-picker>
|
|
|
+ <u-datetime-picker ref="pickers" title="参加工作时间" :minDate="minDate1" @confirm="workConfirm" :show="workShow"
|
|
|
+ mode="date" @cancel='close()'></u-datetime-picker>
|
|
|
<u-picker ref="uPicker" keyName="name" title="户口所在地" :defaultIndex="indexs" :show="cityShow" :columns="cityList"
|
|
|
@confirm="cityconfirm" @cancel="cityShow = false" @change="changeHandler"></u-picker>
|
|
|
</view>
|
|
@@ -121,7 +124,6 @@
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
-
|
|
|
addressData: {
|
|
|
id: "",
|
|
|
province: "",
|
|
@@ -139,8 +141,6 @@
|
|
|
cityid: "", //市数据
|
|
|
areaid: "", //区数据
|
|
|
indexs: [], //默认地区下标
|
|
|
-
|
|
|
-
|
|
|
//选择器状态
|
|
|
sexShow: false, //性别
|
|
|
birthdayShow: false, //出生年月
|
|
@@ -149,17 +149,7 @@
|
|
|
workShow: false, //工作时间
|
|
|
cityShow: false, //户口所在地
|
|
|
jobShow: false, //工作显示
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- // 列表数据
|
|
|
- sexvalue: "", //性别传的值
|
|
|
- status: "", //婚姻状态
|
|
|
- politics: "", //政治面貌
|
|
|
- city1: "", //地址
|
|
|
- job: "",
|
|
|
- from: {
|
|
|
+ user: {
|
|
|
name: "",
|
|
|
sex: "",
|
|
|
birthday: "",
|
|
@@ -177,7 +167,12 @@
|
|
|
political_status_id: "", //政治面貌
|
|
|
marital_status_id: "", //婚姻状态
|
|
|
job_status_id: "", //求职
|
|
|
- email: "" //邮箱
|
|
|
+ email: "", //邮箱
|
|
|
+ sexvalue: "",
|
|
|
+ city1: "",
|
|
|
+ politics: "",
|
|
|
+ status: "",
|
|
|
+ job: "",
|
|
|
},
|
|
|
minDate: "",
|
|
|
minDate1: "",
|
|
@@ -205,10 +200,19 @@
|
|
|
this.getpolitics()
|
|
|
this.getmarital()
|
|
|
this.AllArea()
|
|
|
- this.getJob()
|
|
|
+ this.getJob()
|
|
|
+ if(uni.getStorageSync('from')) {
|
|
|
+ this.user = uni.getStorageSync("from")
|
|
|
+ if (this.user.job == "student") {
|
|
|
+ this.current = 0
|
|
|
+ }else{
|
|
|
+ this.current = 1
|
|
|
+ }
|
|
|
+ }
|
|
|
+ console.log(this.user);
|
|
|
},
|
|
|
methods: {
|
|
|
- workBtn(){
|
|
|
+ workBtn() {
|
|
|
this.workShow = true
|
|
|
this.$refs.pickers.innerValue = new Date(1672502400000).getTime()
|
|
|
},
|
|
@@ -337,24 +341,26 @@
|
|
|
// 选择器
|
|
|
// 求职身份选择器
|
|
|
sectionChange(index) {
|
|
|
+ console.log(index);
|
|
|
this.current = index;
|
|
|
if (index == 0) {
|
|
|
- this.from.job_role = "student"
|
|
|
+ this.user.job_role = "student"
|
|
|
} else {
|
|
|
- this.from.job_role = "employee"
|
|
|
+ this.user.job_role = "employee"
|
|
|
}
|
|
|
},
|
|
|
//性别选择器确认
|
|
|
sexConfirm(e) {
|
|
|
+ console.log(e);
|
|
|
if (e.value[0] == '男') {
|
|
|
- this.sexvalue = "男",
|
|
|
- this.from.sex = "male"
|
|
|
+ this.user.sexvalue = "男",
|
|
|
+ this.user.sex = "male"
|
|
|
} else if (e.value[0] == "女") {
|
|
|
- this.sexvalue = "女",
|
|
|
- this.from.sex = "female"
|
|
|
+ this.user.sexvalue = "女",
|
|
|
+ this.user.sex = "female"
|
|
|
} else {
|
|
|
- this.sexvalue = "保密",
|
|
|
- this.from.sex = "secret"
|
|
|
+ this.user.sexvalue = "保密",
|
|
|
+ this.user.sex = "secret"
|
|
|
}
|
|
|
this.sexShow = false
|
|
|
},
|
|
@@ -368,41 +374,41 @@
|
|
|
async birthdayConfirm(e) {
|
|
|
const timeFormat = uni.$u.timeFormat;
|
|
|
let timeValue = await timeFormat(e.value, 'yyyy-mm-dd');
|
|
|
- this.from.birthday = timeValue;
|
|
|
+ this.user.birthday = timeValue;
|
|
|
this.birthdayShow = false
|
|
|
},
|
|
|
//政治面貌
|
|
|
politicsConfirm(e) {
|
|
|
- this.from.political_status_id = e.value[0].id
|
|
|
- this.politics = e.value[0].name
|
|
|
+ this.user.political_status_id = e.value[0].id
|
|
|
+ this.user.politics = e.value[0].name
|
|
|
this.politicsShow = false;
|
|
|
},
|
|
|
//婚姻状态
|
|
|
maritalConfirm(e) {
|
|
|
- this.from.marital_status_id = e.value[0].id
|
|
|
- this.status = e.value[0].name
|
|
|
+ this.user.marital_status_id = e.value[0].id
|
|
|
+ this.user.status = e.value[0].name
|
|
|
this.maritalShow = false
|
|
|
},
|
|
|
//参加工作时间
|
|
|
async workConfirm(e) {
|
|
|
const timeFormat = uni.$u.timeFormat;
|
|
|
let timeValue = await timeFormat(e.value, 'yyyy-mm-dd');
|
|
|
- this.from.job_time = timeValue;
|
|
|
+ this.user.job_time = timeValue;
|
|
|
this.workShow = false
|
|
|
},
|
|
|
//户口地址
|
|
|
cityconfirm(e) {
|
|
|
let a = e.value[0].name + e.value[1].name + e.value[2].name
|
|
|
let ids = String(e.value[0].id) + String(e.value[1].id) + String(e.value[2].id)
|
|
|
- this.from.domicile_city_id = e.value[1].id
|
|
|
- this.from.domicile_province_id = e.value[0].id
|
|
|
+ this.user.domicile_city_id = e.value[1].id
|
|
|
+ this.user.domicile_province_id = e.value[0].id
|
|
|
// this.city1 = e.value.join("")
|
|
|
- this.city1 = a
|
|
|
+ this.user.city1 = a
|
|
|
this.cityShow = false
|
|
|
},
|
|
|
jobConfirm(e) {
|
|
|
- this.job = e.value[0].name
|
|
|
- this.from.job_status_id = e.value[0].id
|
|
|
+ this.user.job = e.value[0].name
|
|
|
+ this.user.job_status_id = e.value[0].id
|
|
|
this.jobShow = false
|
|
|
},
|
|
|
//关闭模态框
|
|
@@ -416,45 +422,40 @@
|
|
|
this.jobShow = false
|
|
|
},
|
|
|
next() {
|
|
|
- if (!this.from.name) {
|
|
|
+ if (!this.user.name) {
|
|
|
this.$u.toast("请填写姓名")
|
|
|
return
|
|
|
}
|
|
|
- if (!this.sexvalue) {
|
|
|
+ if (!this.user.sexvalue) {
|
|
|
this.$u.toast("请选择性别")
|
|
|
return
|
|
|
}
|
|
|
- if (!this.from.birthday) {
|
|
|
- this.$u.toast("请选择出生年月")
|
|
|
- return
|
|
|
- }
|
|
|
- if (!this.city1) {
|
|
|
- this.$u.toast("请选择户口所在地")
|
|
|
- return
|
|
|
- }
|
|
|
- if (!this.job) {
|
|
|
- this.$u.toast("请选择当前求职状态")
|
|
|
- return
|
|
|
- }
|
|
|
- if (!this.from.job_time) {
|
|
|
- this.$u.toast("请选择工作时间")
|
|
|
- return
|
|
|
- }
|
|
|
- if (!this.$u.test.mobile(this.from.mobile)) {
|
|
|
- this.$u.toast("请输入正确的手机号")
|
|
|
- return
|
|
|
- }
|
|
|
- if (uni.$u.test.email(this.from.email)) {
|
|
|
- this.$u.toast("请输入正确的邮箱号")
|
|
|
- return
|
|
|
- }
|
|
|
- profile({
|
|
|
- ...this.from
|
|
|
- }).then(res => {
|
|
|
-
|
|
|
- })
|
|
|
-
|
|
|
- uni.setStorageSync("from",this.from)
|
|
|
+ // if (!this.user.birthday) {
|
|
|
+ // this.$u.toast("请选择出生年月")
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+ // if (!this.user.city1) {
|
|
|
+ // this.$u.toast("请选择户口所在地")
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+ // if (!this.user.job) {
|
|
|
+ // this.$u.toast("请选择当前求职状态")
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+ // if (!this.user.job_time) {
|
|
|
+ // this.$u.toast("请选择工作时间")
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+ // if (!this.$u.test.mobile(this.user.mobile)) {
|
|
|
+ // this.$u.toast("请输入正确的手机号")
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+ // if (!this.$u.test.email(this.user.email)) {
|
|
|
+ // this.$u.toast("请输入正确的邮箱号")
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+
|
|
|
+ uni.setStorageSync("from", this.user)
|
|
|
|
|
|
uni.navigateTo({
|
|
|
url: '../pagesA/userinfo'
|