作者 Lijianheng

update

... ... @@ -8,8 +8,31 @@ Page({
* 页面的初始数据
*/
data: {
array:['小学','初中'],
index: 0,
eduIndex:0,
edu:[],
education_name:'',
yearIndex:0,
year:['1年','2年','3年','5年','10年','10年以上'],
gender: true,
status: true,
// 完善简历传参
resume_name: '',
resume_sex: '',
resume_mobile: '',
resume_birthday: '',
resume_education_id: '',
resume_exp: '',
resume_is_bejob: '',
resume_home: '',
resume_brief: '',
// array:['小学','初中'],
// index: 0,
array2: ['1年','2年'],
index2: 0,
... ... @@ -79,62 +102,13 @@ Page({
],
currentTab: 0,
// 地区选择
// areabar: [{
// area: '不限'
// },
// {
// area: '河西'
// },
// {
// area: '河东'
// },
// {
// area: '和平'
// },
// {
// area: '河东万达广场'
// }
// ],
areaTab: 0,
//岗位选择(大类别)
// jobbar: [{
// job: '不限'
// },
// {
// job: '热门'
// },
// {
// job: '餐饮'
// },
// {
// job: '旅行/酒店'
// },
// {
// job: '休闲'
// }
// ],
jobTab: 0,
//岗位选择(小类别)
// probar: [{
// pro: '不限'
// },
// {
// pro: '热门'
// },
// {
// pro: '餐饮'
// },
// {
// pro: '旅行/酒店'
// },
// {
// pro: '休闲'
// }
// ],
proTab: 0,
// 推荐排序
sortbar: [{
... ... @@ -152,54 +126,9 @@ Page({
],
sortTab: 0,
// 筛选(学历)
// screenbar: [{
// screen: '不限'
// },
// {
// screen: '小学及以下'
// },
// {
// screen: '初中'
// },
// {
// screen: '高中'
// },
// {
// screen: '中专/技校'
// },
// {
// screen: '大专'
// },
// {
// screen: '本科'
// },
// {
// screen: '硕士'
// },
// {
// screen: '博士'
// },
// ],
screenTab: 0,
// 筛选(酬薪范围)
// scopebar: [{
// scope: '不限'
// },
// {
// scope: '3000以下'
// },
// {
// scope: '3000~5000'
// },
// {
// scope: '5000~8000'
// },
// {
// scope: '8000以上'
// },
// ],
scopeTab: 0,
// 设置隐藏显示功能
... ... @@ -212,6 +141,8 @@ Page({
// 时间
date: '',
},
... ... @@ -258,18 +189,76 @@ Page({
})
},
// 切换性别类型
switch_a() {
this.setData({
gender: !this.data.gender,
})
let gender = this.data.gender;
if (gender == true) {
this.setData({
resume_sex: 1
})
} else {
this.setData({
resume_sex: 2
})
}
},
// 切换在职状态类型
switch_b(){
this.setData({
status:!this.data.status,
})
let status = this.data.status;
if(status == true){
this.setData({
resume_is_bejob: 1
})
}else {
this.setData({
resume_is_bejob: 2
})
}
},
// 学历
bindEdu: function (e) {
console.log('picker发送选择改变,携带值为', e.detail.value)
this.setData({
index: e.detail.value
eduIndex: e.detail.value,
// education_name: this.data.edu[e.detail.value].education_name,
})
},
// 工作年限
bindPickerChange: function (e) {
bindYear: function (e) {
console.log('picker发送选择改变,携带值为', e.detail.value)
this.setData({
index: e.detail.value
yearIndex: e.detail.value
})
},
// 获取真实姓名
realName(e){
let resume_name = e.detail.value
this.setData({
resume_name:resume_name
})
},
// 获取手机号码
realMobile(e){
let resume_mobile = e.detail.value
this.setData({
resume_mobile: resume_mobile
})
},
// 获取家乡地址
realHome(e){
let resume_home = e.detail.value
this.setData({
resume_home: resume_home
})
},
... ... @@ -314,7 +303,7 @@ Page({
// 获取值
that.setData({
// education_name: res.data,
edu: res.data
})
console.log(that.education_name)
... ... @@ -340,7 +329,12 @@ Page({
// 获取值
that.setData({
resume: res.data,
// date: res.data.birthday,
resume_name: res.data.resume_name,
resume_mobile: res.data.resume_mobile,
resume_home: res.data.resume_home,
array: res.data.education_name,
// personal: res.data
// jobs: res.data,
... ... @@ -353,8 +347,6 @@ Page({
})
},
getJobs() {
let that = this;
let url = 'index/job/jobs';
... ... @@ -413,8 +405,6 @@ Page({
})
},
navbarTap: function(e) {
console.log(88)
let that = this;
... ... @@ -526,12 +516,41 @@ Page({
})
},
// 报名成功
// regSuccess(){
// wx.navigateTo({
// url: '/pages/regSuccess/regSuccess',
// })
// },
// 点击完成简历
saveResume() {
let that = this;
let url = 'index/user/save_resume';
// 通过parmas传值给后端
let params = {
// city: that.data.city,
resume_name: that.data.resume_name,
resume_sex: that.data.resume_sex,
resume_mobile: that.data.resume_mobile,
resume_birthday: that.data.resume_birthday,
resume_education_id: that.data.resume_education_id,
resume_exp: that.data.resume_exp,
resume_is_bejob: that.data.resume_is_bejob,
resume_home: that.data.resume_home,
resume_brief: that.data.resume_brief,
}
let header = {
"XX-Token": wx.getStorageSync('token'),
"XX-Device-Type": 'wxapp'
}
app.post(url, params, header).then((res) => {
console.log(res);
that.setData({
// city_1: res.data
})
}).catch((err) => {
})
},
... ...
... ... @@ -339,20 +339,21 @@
<!-- 真实姓名 -->
<view class='mask2_item'>
<view class='mask2_item_left'>真实姓名</view>
<view class='mask2_item_right'>{{resume.user_nickname}}</view>
<!-- <view class='mask2_item_right'>{{resume.user_nickname}}</view> -->
<input class='mask2_item_right' bindinput='realName' value='{{resume.user_nickname}}'></input>
</view>
<!-- 性别 -->
<view class='mask2_item'>
<view class='mask2_item_left'>性别</view>
<view class='mask2_item_select'>
<view class='mask2_select_left color_select'>男</view>
<view class='mask2_select_right'>女</view>
<view class='mask2_select_left {{gender==true?"color_select":""}}' bindtap='switch_a'>男</view>
<view class='mask2_select_right {{gender==false?"color_select":""}}' bindtap='switch_a'>女</view>
</view>
</view>
<!-- 手机号 -->
<view class='mask2_item'>
<view class='mask2_item_left'>手机号</view>
<input class='mask2_item_right' >{{resume.resume_mobile}}</input>
<input class='mask2_item_right' bindinput='realMobile' value='{{resume.resume_mobile}}'></input>
</view>
<!-- 出生日期 -->
<view class='mask2_item birth'>
... ... @@ -373,15 +374,15 @@
<!-- 家乡 -->
<view class='mask2_item'>
<view class='mask2_item_left'>家乡</view>
<input placeholder='请输入您的家乡'>{{resume.resume_home}}</input>
<input placeholder='请输入您的家乡' bingtap='realHome' value='{{resume.resume_home}}'></input>
</view>
<!-- 最高学历 -->
<view class='mask2_item birth'>
<view class='mask2_item_left'>学历</view>
<picker bindchange="bindEdu" value="{{index}}" range="{{array}}">
<picker bindchange="bindEdu" value="{{eduIndex}}" range="{{edu}}" range-key='education_name'>
<view class='mask2_item_date'>
<view class='mask2_item_date_text'>{{array[index]}}</view>
<view class='mask2_item_date_text'>{{edu[eduIndex].education_name}}</view>
<view class='mask2_item_date_icon'>
<image src='../../img/right.png'></image>
</view>
... ... @@ -392,9 +393,9 @@
<!-- 工作年限 -->
<view class='mask2_item birth'>
<view class='mask2_item_left'>工作年限</view>
<picker bindchange="bindYear" value="{{index2}}" range="{{array2}}">
<picker bindchange="bindYear" value="{{yearIndex}}" range="{{year}}">
<view class='mask2_item_date'>
<view class='mask2_item_date_text'>{{array2[index2]}}</view>
<view class='mask2_item_date_text'>{{year[yearIndex]}}</view>
<view class='mask2_item_date_icon'>
<image src='../../img/right.png'></image>
</view>
... ... @@ -406,13 +407,13 @@
<view class='mask2_item'>
<view class='mask2_item_left'>是否在职</view>
<view class='mask2_item_select'>
<view class='mask2_select_left color_select'>在职</view>
<view class='mask2_select_right'>离职</view>
<view class='mask2_select_left {{status==true?"color_select":""}}' bindtap='switch_b'>在职</view>
<view class='mask2_select_right {{status==false?"color_select":""}}' bindtap='switch_b'>离职</view>
</view>
</view>
<!-- 完成按钮 -->
<view class='bottom'>
<view class='bottom' bindtap='saveResume'>
完成
</view>
... ...
... ... @@ -205,13 +205,9 @@ Page({
// 切换薪资类型
switch_a() {
this.setData({
status: !this.data.status,
})
let status = this.data.status;
if (status == true) {
this.setData({
money_type: 1
... ...