|
@@ -7,19 +7,14 @@ Page({
|
|
*/
|
|
*/
|
|
data: {
|
|
data: {
|
|
endDate:'',
|
|
endDate:'',
|
|
- // birth:'1990-01-01',
|
|
|
|
- // date:'1990-01-01',
|
|
|
|
- // sex: 0,
|
|
|
|
|
|
+ fileColor:"",
|
|
array: ["保密", "男", "女"],
|
|
array: ["保密", "男", "女"],
|
|
educationArray: ["小学", "初中", "高中","中技(中专、技校、职高)","大专","本科","硕士研究生","MBA","博士研究生","保密"],
|
|
educationArray: ["小学", "初中", "高中","中技(中专、技校、职高)","大专","本科","硕士研究生","MBA","博士研究生","保密"],
|
|
- // highestEducation: 0,
|
|
|
|
|
|
+
|
|
schoolTypeArray: ["","全国普通高等院校非全日制","全国普通高等院校全日制", "成人高等教育", "统招专升本","其他","自学考试","非统招专升本","海外留学生"],
|
|
schoolTypeArray: ["","全国普通高等院校非全日制","全国普通高等院校全日制", "成人高等教育", "统招专升本","其他","自学考试","非统招专升本","海外留学生"],
|
|
- // learningModality: 0,
|
|
|
|
statusArray: ["","正在主动找工作","可以考虑工作机会", "目前不想找工作"],
|
|
statusArray: ["","正在主动找工作","可以考虑工作机会", "目前不想找工作"],
|
|
- // jobStatus: 0,
|
|
|
|
moneyArray: ["","1000以下","1000-2000", "2001-4000", "4001-6000","6001-8000","8001-10000","10001-15000","15001-25000","25001-30000","30001-50000","50001以上","面议"],
|
|
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,
|
|
|
|
|
|
+ nowMoneyArray: ["","1000以下","1000-2000", "2001-4000", "4001-6000","6001-8000","8001-10000","10001-15000","15001-25000","25001-30000","30001-50000","50001以上"],
|
|
type:1,//1保存简历 2保存简历+投递简历)
|
|
type:1,//1保存简历 2保存简历+投递简历)
|
|
saveTitle:'保存',
|
|
saveTitle:'保存',
|
|
|
|
|
|
@@ -40,13 +35,15 @@ Page({
|
|
resumeFile:'',
|
|
resumeFile:'',
|
|
resumeFileName:'在微信聊天中选择附件',
|
|
resumeFileName:'在微信聊天中选择附件',
|
|
resumeFileNow:'',
|
|
resumeFileNow:'',
|
|
|
|
+
|
|
|
|
+ isChooseFile:false,
|
|
},
|
|
},
|
|
|
|
|
|
/**
|
|
/**
|
|
* 生命周期函数--监听页面加载
|
|
* 生命周期函数--监听页面加载
|
|
*/
|
|
*/
|
|
onLoad: function (options) {
|
|
onLoad: function (options) {
|
|
- console.log(options)
|
|
|
|
|
|
+
|
|
if(options.type ==2){
|
|
if(options.type ==2){
|
|
this.setData({
|
|
this.setData({
|
|
saveTitle:'确认投递'
|
|
saveTitle:'确认投递'
|
|
@@ -91,7 +88,14 @@ Page({
|
|
this.setData({
|
|
this.setData({
|
|
openId:openId
|
|
openId:openId
|
|
})
|
|
})
|
|
- await this.getUserInfo(openId);
|
|
|
|
|
|
+ if(!this.data.isChooseFile){
|
|
|
|
+ await this.getUserInfo(openId);
|
|
|
|
+ }else{
|
|
|
|
+ this.setData({
|
|
|
|
+ isChooseFile:false
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+
|
|
},
|
|
},
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -128,6 +132,32 @@ Page({
|
|
onShareAppMessage: function () {
|
|
onShareAppMessage: function () {
|
|
|
|
|
|
},
|
|
},
|
|
|
|
+
|
|
|
|
+ bindInputName: function (e) {
|
|
|
|
+ this.setData({
|
|
|
|
+ name: e.detail.value
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ bindInputEmail: function (e) {
|
|
|
|
+ this.setData({
|
|
|
|
+ email: e.detail.value
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ bindInputMobile: function (e) {
|
|
|
|
+ this.setData({
|
|
|
|
+ mobile: e.detail.value
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ bindInputNowAddress: function (e) {
|
|
|
|
+ this.setData({
|
|
|
|
+ nowAddress: e.detail.value
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ bindInputRegisteredAddress: function (e) {
|
|
|
|
+ this.setData({
|
|
|
|
+ registeredAddress: e.detail.value
|
|
|
|
+ })
|
|
|
|
+ },
|
|
changeBirth: function (e) {
|
|
changeBirth: function (e) {
|
|
this.setData({
|
|
this.setData({
|
|
birthday: e.detail.value
|
|
birthday: e.detail.value
|
|
@@ -156,6 +186,16 @@ Page({
|
|
jobStatus: e.detail.value
|
|
jobStatus: e.detail.value
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+ bindInputTakeProfessionally:function(e){
|
|
|
|
+ this.setData({
|
|
|
|
+ takeProfessionally: e.detail.value
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ bindInputHopeProfessionally:function(e){
|
|
|
|
+ this.setData({
|
|
|
|
+ hopeProfessionally: e.detail.value
|
|
|
|
+ })
|
|
|
|
+ },
|
|
changeNowMoney:function(e){
|
|
changeNowMoney:function(e){
|
|
this.setData({
|
|
this.setData({
|
|
nowSalary: e.detail.value
|
|
nowSalary: e.detail.value
|
|
@@ -167,21 +207,53 @@ Page({
|
|
})
|
|
})
|
|
},
|
|
},
|
|
chooseEnclosure:function(){
|
|
chooseEnclosure:function(){
|
|
|
|
+ this.setData({
|
|
|
|
+ isChooseFile:true
|
|
|
|
+ })
|
|
var self =this;
|
|
var self =this;
|
|
wx.chooseMessageFile({
|
|
wx.chooseMessageFile({
|
|
count: 1,
|
|
count: 1,
|
|
type: 'file',
|
|
type: 'file',
|
|
success (res) {
|
|
success (res) {
|
|
// tempFilePath可以作为img标签的src属性显示图片
|
|
// tempFilePath可以作为img标签的src属性显示图片
|
|
- console.log(res.tempFiles[0].path);
|
|
|
|
-
|
|
|
|
|
|
+ self.uploadFile(res.tempFiles[0].path)
|
|
self.setData({
|
|
self.setData({
|
|
- resumeFileNow: res.tempFiles[0].path,
|
|
|
|
resumeFileName:res.tempFiles[0].name
|
|
resumeFileName:res.tempFiles[0].name
|
|
})
|
|
})
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+ uploadFile: function(temFile){
|
|
|
|
+ var self = this;
|
|
|
|
+ wx.uploadFile({
|
|
|
|
+ url: "https://oapi.shpr.top/open/upload/upload-pic", //上传的路径
|
|
|
|
+ filePath:temFile, //刚刚在data保存的文件路径
|
|
|
|
+ name: 'file', //后台获取的凭据
|
|
|
|
+ formData: {
|
|
|
|
+ 'basePath': 'recruit'
|
|
|
|
+ },
|
|
|
|
+ success (res){
|
|
|
|
+ const result = JSON.parse(res.data)
|
|
|
|
+ self.setData({
|
|
|
|
+ resumeFileNow:result.data.destPath,
|
|
|
|
+ fileColor:"#000",
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ // downloadFile:function(e){
|
|
|
|
+ // var url = e.currentTarget.dataset.url;
|
|
|
|
+ // wx.downloadFile({
|
|
|
|
+ // url: url, //仅为示例,并非真实的资源
|
|
|
|
+ // success (res) {
|
|
|
|
+ // // 只要服务器有响应数据,就会把响应内容写入文件并进入 success 回调,业务需要自行判断是否下载到了想要的内容
|
|
|
|
+ // if (res.statusCode === 200) {
|
|
|
|
+
|
|
|
|
+ // }
|
|
|
|
+ // }
|
|
|
|
+ // })
|
|
|
|
+ // },
|
|
getUserInfo: async function(openId) {
|
|
getUserInfo: async function(openId) {
|
|
|
|
|
|
var params = {}
|
|
var params = {}
|
|
@@ -195,6 +267,8 @@ Page({
|
|
var hopeSalary = info.hopeSalary?info.hopeSalary:0;
|
|
var hopeSalary = info.hopeSalary?info.hopeSalary:0;
|
|
var learningModality = info.learningModality?info.learningModality:0;
|
|
var learningModality = info.learningModality?info.learningModality:0;
|
|
var birthday = info.birthday?info.birthday:'1990-01-01';
|
|
var birthday = info.birthday?info.birthday:'1990-01-01';
|
|
|
|
+ var fileColor = info.resumeFileName?'#000':'#c2c6da';
|
|
|
|
+ var resumeFileName = info.resumeFileName?info.resumeFileName:'';
|
|
this.setData({
|
|
this.setData({
|
|
userId:info.userId,
|
|
userId:info.userId,
|
|
name:info.name,
|
|
name:info.name,
|
|
@@ -212,30 +286,13 @@ Page({
|
|
nowSalary:nowSalary,
|
|
nowSalary:nowSalary,
|
|
hopeSalary:hopeSalary,
|
|
hopeSalary:hopeSalary,
|
|
resumeFile:info.resumeFile,
|
|
resumeFile:info.resumeFile,
|
|
|
|
+ resumeFileNow:info.resumeFile,
|
|
|
|
+ resumeFileName:resumeFileName,
|
|
|
|
+ fileColor:fileColor,
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
|
|
-
|
|
|
|
saveResume: async function(){
|
|
saveResume: async function(){
|
|
-
|
|
|
|
-// console.log(this.data.resumeFileNow);
|
|
|
|
-// wx.uploadFile({
|
|
|
|
-// url: "http://oapi.shpr.top:81/open/upload/upload-pic", //上传的路径
|
|
|
|
-// filePath:this.data.resumeFileNow, //刚刚在data保存的文件路径
|
|
|
|
-// name: 'file', //后台获取的凭据
|
|
|
|
-// formData: {
|
|
|
|
-// 'basePath': 'recruit'
|
|
|
|
-// },
|
|
|
|
-// success (res){
|
|
|
|
-// const data = res.data
|
|
|
|
-// console.log(data);
|
|
|
|
-// //do something
|
|
|
|
-// }
|
|
|
|
-// })
|
|
|
|
-
|
|
|
|
-return;
|
|
|
|
-
|
|
|
|
-
|
|
|
|
if(!this.data.name){
|
|
if(!this.data.name){
|
|
wx.showToast({
|
|
wx.showToast({
|
|
title: '请输入姓名',
|
|
title: '请输入姓名',
|
|
@@ -254,7 +311,15 @@ return;
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
|
|
- if(!this.data.resumeFile){
|
|
|
|
|
|
+ if(!this.data.mobile){
|
|
|
|
+ wx.showToast({
|
|
|
|
+ title: '请输入手机号',
|
|
|
|
+ icon: 'none',
|
|
|
|
+ duration: 1000
|
|
|
|
+ })
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ if(!this.data.resumeFileNow){
|
|
wx.showToast({
|
|
wx.showToast({
|
|
title: '请上传附件',
|
|
title: '请上传附件',
|
|
icon: 'none',
|
|
icon: 'none',
|
|
@@ -279,7 +344,8 @@ return;
|
|
hopeProfessionally:this.data.hopeProfessionally,
|
|
hopeProfessionally:this.data.hopeProfessionally,
|
|
nowSalary:this.data.nowSalary,
|
|
nowSalary:this.data.nowSalary,
|
|
hopeSalary:this.data.hopeSalary,
|
|
hopeSalary:this.data.hopeSalary,
|
|
- resumeFile:this.data.resumeFile,
|
|
|
|
|
|
+ resumeFile:this.data.resumeFileNow,
|
|
|
|
+ resumeFileName:this.data.resumeFileName,
|
|
};
|
|
};
|
|
await recruitApi.saveUser(params);
|
|
await recruitApi.saveUser(params);
|
|
|
|
|