|
@@ -27,7 +27,7 @@ Page({
|
|
|
emali:'',
|
|
|
mobile:'',
|
|
|
birthday:'1990-01-01',
|
|
|
- sex:0,
|
|
|
+ gender:0,
|
|
|
nowAddress:'',
|
|
|
registeredAddress:'',
|
|
|
highestEducation:0,
|
|
@@ -63,6 +63,7 @@ Page({
|
|
|
this.setData({
|
|
|
endDate:endDate,
|
|
|
type:options.type,
|
|
|
+ recruitsId:options.id,
|
|
|
})
|
|
|
},
|
|
|
|
|
@@ -86,6 +87,9 @@ Page({
|
|
|
}
|
|
|
|
|
|
var openId = wx.getStorageSync("openId")
|
|
|
+ this.setData({
|
|
|
+ openId:openId
|
|
|
+ })
|
|
|
await this.getUserInfo(openId);
|
|
|
},
|
|
|
|
|
@@ -131,7 +135,7 @@ Page({
|
|
|
changeSex: function (e) {
|
|
|
|
|
|
this.setData({
|
|
|
- sex: e.detail.value
|
|
|
+ gender: e.detail.value
|
|
|
})
|
|
|
},
|
|
|
changeEducation: function (e) {
|
|
@@ -169,8 +173,9 @@ Page({
|
|
|
success (res) {
|
|
|
// tempFilePath可以作为img标签的src属性显示图片
|
|
|
console.log(res.tempFiles);
|
|
|
+ var path = res.tempFiles[0].path
|
|
|
self.setData({
|
|
|
- resumeFile:res.tempFiles[0].path,
|
|
|
+ resumeFile:path,
|
|
|
resumeFileName:res.tempFiles[0].name
|
|
|
})
|
|
|
}
|
|
@@ -182,12 +187,7 @@ Page({
|
|
|
params['openid'] = openId;
|
|
|
var info = await recruitApi.infoUser(params);
|
|
|
console.log(info);
|
|
|
- if(info.birthday){
|
|
|
- this.setData({
|
|
|
- birthday:info.birthday,
|
|
|
- })
|
|
|
- }
|
|
|
-
|
|
|
+
|
|
|
var highestEducation = info.highestEducation?info.highestEducation:0;
|
|
|
var jobStatus = info.jobStatus?info.jobStatus:0;
|
|
|
var nowSalary = info.nowSalary?info.nowSalary:0;
|
|
@@ -195,10 +195,11 @@ Page({
|
|
|
var learningModality = info.learningModality?info.learningModality:0;
|
|
|
var birthday = info.birthday?info.birthday:'1990-01-01';
|
|
|
this.setData({
|
|
|
+ userId:info.userId,
|
|
|
name:info.name,
|
|
|
email:info.email,
|
|
|
mobile:info.mobile,
|
|
|
- sex:info.sex,
|
|
|
+ gender:info.gender,
|
|
|
birthday:birthday,
|
|
|
nowAddress:info.nowAddress,
|
|
|
registeredAddress:info.registeredAddress,
|
|
@@ -212,7 +213,7 @@ Page({
|
|
|
resumeFile:info.resumeFile,
|
|
|
})
|
|
|
},
|
|
|
- saveResume: function(){
|
|
|
+ saveResume: async function(){
|
|
|
if(!this.data.name){
|
|
|
wx.showToast({
|
|
|
title: '请输入姓名',
|
|
@@ -241,11 +242,12 @@ Page({
|
|
|
}
|
|
|
|
|
|
var params = {
|
|
|
+ userId:this.data.userId,
|
|
|
name:this.data.name,
|
|
|
email:this.data.email,
|
|
|
mobile:this.data.mobile,
|
|
|
birthday:this.data.birthday,
|
|
|
- sex:this.data.sex,
|
|
|
+ gender:this.data.gender,
|
|
|
nowAddress:this.data.nowAddress,
|
|
|
registeredAddress:this.data.registeredAddress,
|
|
|
highestEducation:this.data.highestEducation,
|
|
@@ -257,8 +259,39 @@ Page({
|
|
|
hopeSalary:this.data.hopeSalary,
|
|
|
resumeFile:this.data.resumeFile,
|
|
|
};
|
|
|
- var res = recruitApi.saveUser(params);
|
|
|
- console.log(res);
|
|
|
+ await recruitApi.saveUser(params);
|
|
|
+
|
|
|
+ if(this.data.type ==2){
|
|
|
+ await recruitApi.deliveryRecruit(this.data.openId,this.data.recruitsId);
|
|
|
+ wx.showToast({
|
|
|
+ title: '投递成功',
|
|
|
+ icon: 'success',
|
|
|
+ success:function(){
|
|
|
+ setTimeout(() => {
|
|
|
+ wx.navigateBack({
|
|
|
+ delta: 2
|
|
|
+ })
|
|
|
+ }, 1000);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ wx.showToast({
|
|
|
+ title: '保存成功',
|
|
|
+ icon: 'success',
|
|
|
+ success:function(){
|
|
|
+ setTimeout(() => {
|
|
|
+ wx.navigateBack({
|
|
|
+ delta: 2
|
|
|
+ })
|
|
|
+ }, 1000);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
|
|
|
})
|