|
@@ -1,4 +1,5 @@
|
|
|
-// pages/resume/resume.js
|
|
|
+import recruitApi from '../../api/recruit'
|
|
|
+const app = getApp()
|
|
|
Page({
|
|
|
|
|
|
/**
|
|
@@ -6,21 +7,38 @@ Page({
|
|
|
*/
|
|
|
data: {
|
|
|
endDate:'',
|
|
|
- birth:'1990-01-01',
|
|
|
- date:'',
|
|
|
- sex: 0,
|
|
|
+ // birth:'1990-01-01',
|
|
|
+ // date:'1990-01-01',
|
|
|
+ // sex: 0,
|
|
|
array: ["保密", "男", "女"],
|
|
|
- educationArray: ["小学", "初中", "高中","中技(中专、技校、职高)","大专","本科","硕士研究生","MBA","博士研究生"],
|
|
|
- educationIndex: 0,
|
|
|
- schoolTypeArray: ["","全国普通高等院校非全日制","全国普通高等院校全日制", "成人高等教育", "统招专升本","自学考试","非统招专升本","海外留学生"],
|
|
|
- schoolTypeIndex: 0,
|
|
|
+ educationArray: ["小学", "初中", "高中","中技(中专、技校、职高)","大专","本科","硕士研究生","MBA","博士研究生","保密"],
|
|
|
+ // highestEducation: 0,
|
|
|
+ schoolTypeArray: ["","全国普通高等院校非全日制","全国普通高等院校全日制", "成人高等教育", "统招专升本","其他","自学考试","非统招专升本","海外留学生"],
|
|
|
+ // learningModality: 0,
|
|
|
statusArray: ["","正在主动找工作","可以考虑工作机会", "目前不想找工作"],
|
|
|
- statusIndex: 0,
|
|
|
- moneyArray: ["","1000以下","1000-2000", "2001-4000", "4001-6000","6001-8000","8001-10000","10001-15000","15001-25000","25001-30000","30001-50000","50001-70000","70001-100000","100001以上","面议"],
|
|
|
- nowMoneyIndex:0,
|
|
|
- expectMoneyIndex:0,
|
|
|
+ // jobStatus: 0,
|
|
|
+ moneyArray: ["","1000以下","1000-2000", "2001-4000", "4001-6000","6001-8000","8001-10000","10001-15000","15001-25000","25001-30000","30001-50000","50001以上","面议"],
|
|
|
+ // nowMoneyIndex:0,
|
|
|
+ // expectMoneyIndex:0,
|
|
|
type:1,//1保存简历 2保存简历+投递简历)
|
|
|
- saveTitle:'保存'
|
|
|
+ saveTitle:'保存',
|
|
|
+
|
|
|
+ name:'',
|
|
|
+ emali:'',
|
|
|
+ mobile:'',
|
|
|
+ birthday:'1990-01-01',
|
|
|
+ sex:0,
|
|
|
+ nowAddress:'',
|
|
|
+ registeredAddress:'',
|
|
|
+ highestEducation:0,
|
|
|
+ learningModality:0,
|
|
|
+ takeProfessionally:'',
|
|
|
+ jobStatus:0,
|
|
|
+ hopeProfessionally:'',
|
|
|
+ nowSalary:0,
|
|
|
+ hopeSalary:0,
|
|
|
+ resumeFile:'',
|
|
|
+ resumeFileName:'在微信聊天中选择附件',
|
|
|
},
|
|
|
|
|
|
/**
|
|
@@ -43,7 +61,8 @@ Page({
|
|
|
var d = new Date();
|
|
|
var endDate = d.getFullYear() + '-' + (d.getMonth() + 1) + '-' + d.getDate()
|
|
|
this.setData({
|
|
|
- endDate
|
|
|
+ endDate:endDate,
|
|
|
+ type:options.type,
|
|
|
})
|
|
|
},
|
|
|
|
|
@@ -57,9 +76,17 @@ Page({
|
|
|
/**
|
|
|
* 生命周期函数--监听页面显示
|
|
|
*/
|
|
|
- onShow: function () {
|
|
|
-
|
|
|
-
|
|
|
+ onShow: async function () {
|
|
|
+ const isAuth = await app.isAuth()
|
|
|
+ if (!isAuth) {
|
|
|
+ wx.redirectTo({
|
|
|
+ url: '/pages/prompt/prompt?page=' + this.route+"?type="+this.data.type,
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ var openId = wx.getStorageSync("openId")
|
|
|
+ await this.getUserInfo(openId);
|
|
|
},
|
|
|
|
|
|
/**
|
|
@@ -98,38 +125,140 @@ Page({
|
|
|
},
|
|
|
changeBirth: function (e) {
|
|
|
this.setData({
|
|
|
- birth: e.detail.value
|
|
|
+ birthday: e.detail.value
|
|
|
})
|
|
|
},
|
|
|
changeSex: function (e) {
|
|
|
- console.log(e.detail)
|
|
|
+
|
|
|
this.setData({
|
|
|
sex: e.detail.value
|
|
|
})
|
|
|
},
|
|
|
changeEducation: function (e) {
|
|
|
- console.log(e.detail)
|
|
|
this.setData({
|
|
|
- educationIndex: e.detail.value
|
|
|
+ highestEducation: e.detail.value
|
|
|
})
|
|
|
},
|
|
|
|
|
|
changeSchoolType: function (e) {
|
|
|
|
|
|
this.setData({
|
|
|
- schoolTypeIndex: e.detail.value
|
|
|
+ learningModality: e.detail.value
|
|
|
+ })
|
|
|
+ },
|
|
|
+ changeStatus:function(e){
|
|
|
+ this.setData({
|
|
|
+ jobStatus: e.detail.value
|
|
|
+ })
|
|
|
+ },
|
|
|
+ changeNowMoney:function(e){
|
|
|
+ this.setData({
|
|
|
+ nowSalary: e.detail.value
|
|
|
+ })
|
|
|
+ },
|
|
|
+ changeExpectMoney:function(e){
|
|
|
+ this.setData({
|
|
|
+ hopeSalary: e.detail.value
|
|
|
})
|
|
|
},
|
|
|
-
|
|
|
chooseEnclosure:function(){
|
|
|
+ var self =this;
|
|
|
wx.chooseMessageFile({
|
|
|
- count: 10,
|
|
|
+ count: 1,
|
|
|
type: 'file',
|
|
|
success (res) {
|
|
|
// tempFilePath可以作为img标签的src属性显示图片
|
|
|
- const tempFilePaths = res.tempFiles
|
|
|
+ console.log(res.tempFiles);
|
|
|
+ self.setData({
|
|
|
+ resumeFile:res.tempFiles[0].path,
|
|
|
+ resumeFileName:res.tempFiles[0].name
|
|
|
+ })
|
|
|
}
|
|
|
})
|
|
|
+ },
|
|
|
+ getUserInfo: async function(openId) {
|
|
|
+
|
|
|
+ var params = {}
|
|
|
+ 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;
|
|
|
+ var hopeSalary = info.hopeSalary?info.hopeSalary:0;
|
|
|
+ var learningModality = info.learningModality?info.learningModality:0;
|
|
|
+ var birthday = info.birthday?info.birthday:'1990-01-01';
|
|
|
+ this.setData({
|
|
|
+ name:info.name,
|
|
|
+ email:info.email,
|
|
|
+ mobile:info.mobile,
|
|
|
+ sex:info.sex,
|
|
|
+ birthday:birthday,
|
|
|
+ nowAddress:info.nowAddress,
|
|
|
+ registeredAddress:info.registeredAddress,
|
|
|
+ highestEducation:highestEducation,
|
|
|
+ learningModality:learningModality,
|
|
|
+ takeProfessionally:info.takeProfessionally,
|
|
|
+ jobStatus:jobStatus,
|
|
|
+ hopeProfessionally:info.hopeProfessionally,
|
|
|
+ nowSalary:nowSalary,
|
|
|
+ hopeSalary:hopeSalary,
|
|
|
+ resumeFile:info.resumeFile,
|
|
|
+ })
|
|
|
+ },
|
|
|
+ saveResume: function(){
|
|
|
+ if(!this.data.name){
|
|
|
+ wx.showToast({
|
|
|
+ title: '请输入姓名',
|
|
|
+ icon: 'none',
|
|
|
+ duration: 1000
|
|
|
+ })
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ if(!this.data.email){
|
|
|
+ wx.showToast({
|
|
|
+ title: '请输入邮箱',
|
|
|
+ icon: 'none',
|
|
|
+ duration: 1000
|
|
|
+ })
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ if(!this.data.resumeFile){
|
|
|
+ wx.showToast({
|
|
|
+ title: '请上传附件',
|
|
|
+ icon: 'none',
|
|
|
+ duration: 1000
|
|
|
+ })
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ var params = {
|
|
|
+ name:this.data.name,
|
|
|
+ email:this.data.email,
|
|
|
+ mobile:this.data.mobile,
|
|
|
+ birthday:this.data.birthday,
|
|
|
+ sex:this.data.sex,
|
|
|
+ nowAddress:this.data.nowAddress,
|
|
|
+ registeredAddress:this.data.registeredAddress,
|
|
|
+ highestEducation:this.data.highestEducation,
|
|
|
+ learningModality:this.data.learningModality,
|
|
|
+ takeProfessionally:this.data.takeProfessionally,
|
|
|
+ jobStatus:this.data.jobStatus,
|
|
|
+ hopeProfessionally:this.data.hopeProfessionally,
|
|
|
+ nowSalary:this.data.nowSalary,
|
|
|
+ hopeSalary:this.data.hopeSalary,
|
|
|
+ resumeFile:this.data.resumeFile,
|
|
|
+ };
|
|
|
+ var res = recruitApi.saveUser(params);
|
|
|
+ console.log(res);
|
|
|
}
|
|
|
|
|
|
})
|