|
|
@@ -57,8 +57,10 @@ Page({
|
|
|
}
|
|
|
],
|
|
|
expectationPosition: ["普工", "客服", "销售", "服务员", "物流仓储", "司机", "才艺技能", "文员助理", "快递配送", "促销导购", "展会演出", "家教培训", "模特", "贸易采购", "厨师", "编辑", "线上推广", "设计", "技工", "保洁", "其它"],
|
|
|
- region: [], //省市区
|
|
|
- regionCode: [], //省市区code
|
|
|
+ region: {
|
|
|
+ code:[],
|
|
|
+ value:[]
|
|
|
+ }, //省市区
|
|
|
name: '',
|
|
|
expectationPositionIndex: 0,
|
|
|
salaryIndex: 0,
|
|
|
@@ -76,6 +78,31 @@ Page({
|
|
|
hpUserResumeId: hpUserResumeId
|
|
|
})
|
|
|
|
|
|
+ if (hpUserResumeId) {
|
|
|
+ let userResume = wx.getStorageSync('userResume')
|
|
|
+
|
|
|
+ this.data.region.code = this.data.region.code.concat(userResume.expectationProvinceId);
|
|
|
+ this.data.region.code = this.data.region.code.concat(userResume.expectationCityId);
|
|
|
+ this.data.region.code = this.data.region.code.concat(userResume.expectationCountryId);
|
|
|
+ var expectationArray = userResume.expectationPosition.split(",");
|
|
|
+ var lengthSalary = this.data.salaryList.length;
|
|
|
+ var salaryIndex;
|
|
|
+ for (var i = 0; i < lengthSalary;i++){
|
|
|
+ if (userResume.expectationSalary == this.data.salaryList[i].hightNum){
|
|
|
+ salaryIndex = i;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ console.log("ggg", this.data.region)
|
|
|
+ if (userResume.id) {
|
|
|
+ this.setData({
|
|
|
+ hpUserResumeId: userResume.id,
|
|
|
+ expectationPositionIndex: expectationArray,
|
|
|
+ salaryIndex: salaryIndex,
|
|
|
+ region: this.data.region
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
},
|
|
|
|
|
|
//改变薪资水平
|
|
|
@@ -92,10 +119,11 @@ Page({
|
|
|
},
|
|
|
//改变期望地点
|
|
|
bindRegionChange(e) {
|
|
|
- console.log('picker发送选择改变,携带值为', e.detail.value)
|
|
|
+ console.log('picker发送选择改变,携带值为', e.detail)
|
|
|
+ this.data.region.code = e.detail.code;
|
|
|
+ this.data.region.value = e.detail.value;
|
|
|
this.setData({
|
|
|
- region: e.detail.value,
|
|
|
- regionCode: e.detail.code
|
|
|
+ region: this.data.region
|
|
|
})
|
|
|
},
|
|
|
//提交
|
|
|
@@ -108,17 +136,16 @@ Page({
|
|
|
expectationPositionIndex,
|
|
|
salaryIndex,
|
|
|
region,
|
|
|
- regionCode,
|
|
|
hpUserResumeId,
|
|
|
salaryList
|
|
|
} = this.data
|
|
|
let paramsObj = {
|
|
|
expectationPosition: expectationPositionIndex,
|
|
|
expectationSalary: salaryList[salaryIndex].expectationSalary,
|
|
|
- expectationProvinceId: regionCode[0],
|
|
|
- expectationCityId: regionCode[1],
|
|
|
- expectationCountryId: regionCode[2],
|
|
|
- expectationAddress: region[0] + region[1] + region[2],
|
|
|
+ expectationProvinceId: region.code[0],
|
|
|
+ expectationCityId: region.code[1],
|
|
|
+ expectationCountryId: region.code[2],
|
|
|
+ expectationAddress: region.value[0] + region.value[1] + region.value[2],
|
|
|
user_id: app.globalData.userId,
|
|
|
user_token: app.globalData.userToken
|
|
|
}
|
|
|
@@ -136,7 +163,7 @@ Page({
|
|
|
let {
|
|
|
region
|
|
|
} = this.data
|
|
|
- if (region.length == 0) {
|
|
|
+ if (region.value.length == 0) {
|
|
|
showToast('请选择期望地点');
|
|
|
return false
|
|
|
}
|