master
wangxia 2 years ago
parent e487f59caf
commit 32b013f94f

@ -1,8 +1,8 @@
App({
globalData: {
userInfo: null,
// ip: 'https://test.renminshitang.com.cn/daotian/api_dev',
ip: "https://daotian.matripe.com.cn",
ip: 'https://test.renminshitang.com.cn/daotian/api_dev',
// ip: "https://daotian.matripe.com.cn",
// ip: 'http://localhost:8001',
sessionId: "",
header: {

@ -4,9 +4,10 @@ var dateUtil = require("../../utils/dateUtil.js");
var dateTimePicker = require("../../utils/dateTimePicker.js");
Component({
data: {
disabled:false,
idCardImageUrl:"",
idCardNum:"",
disabled: false,
idCardImageUrl: "",
idCardNum: "",
tel:'',
dateTime: "",
currentTime: dateUtil.formatDateYMD(mydate.toLocaleDateString()),
copyTime: dateUtil.formatDateYMD(mydate.toLocaleDateString()),
@ -87,18 +88,22 @@ Component({
},
info: {
type: Object,
value: {},
value: {
},
}
},
ready () {
let that = this;
console.log(this.data.info);
console.log('this.data.info',this.data.info);
for (let i = 16; i < 70; i++) {
that.data.ageArray.push(i);
}
this.setData({
ageArray: that.data.ageArray
ageArray: that.data.ageArray,
info: that.data.info,
tel:app.globalData.loginUserInfo.tel
})
let hour = new Date().getHours();
@ -176,33 +181,33 @@ Component({
["userInfo.age"]: parseInt(e.detail.value) + 16,
});
},
formSubmit(e) {
formSubmit (e) {
let that = this;
console.log(e.detail.value);
if(e.detail.value.userName == ""){
if (e.detail.value.userName == "") {
wx.showToast({
icon: "none",
title: "请输入姓名",
});
icon: "none",
title: "请输入姓名",
});
return;
}
if(e.detail.value.tel == ""){
if (e.detail.value.tel == "") {
wx.showToast({
icon: "none",
title: "请输入手机号",
});
icon: "none",
title: "请输入手机号",
});
return;
}
var reg = /^1[3|4|5|6|9|7|8][0-9]\d{8}$/;
if(reg.test(e.detail.value.tel) == false){
if (reg.test(e.detail.value.tel) == false) {
wx.showToast({
icon: "none",
title: "请输入正确的手机号",
});
icon: "none",
title: "请输入正确的手机号",
});
return;
}
if(that.data.info.agencyOperation == 2){
if(that.data.ageIndex == -1){
if (that.data.info.agencyOperation == 2) {
if (that.data.ageIndex == -1) {
wx.showToast({
icon: "none",
title: "请选择年龄",
@ -211,8 +216,8 @@ Component({
}
e.detail.value.age = parseInt(that.data.ageIndex) + 16;
e.detail.value.sex = that.data.sex;
}else{
if(e.detail.value.idCard == ""){
} else {
if (e.detail.value.idCard == "") {
wx.showToast({
icon: "none",
title: "请输入身份证号",
@ -220,7 +225,7 @@ Component({
return;
}
var regIdCard = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/;
if(regIdCard.test(e.detail.value.idCard) == false){
if (regIdCard.test(e.detail.value.idCard) == false) {
wx.showToast({
icon: "none",
title: "请输入正确的身份证号",
@ -230,12 +235,12 @@ Component({
e.detail.value.interviewTimeStr = that.data.currentTime;
}
if(that.data.idCardImageUrl != ""){
if (that.data.idCardImageUrl != "") {
e.detail.value.idCardImageUrl = that.data.idCardImageUrl
}
e.detail.value.jobId = that.data.info.id
that.setData({
disabled:true
disabled: true
})
@ -255,9 +260,9 @@ Component({
})
that.setData({
show: false,
ageIndex:-1,
disabled:false,
idCardNum:""
ageIndex: -1,
disabled: false,
idCardNum: ""
})
wx.showTabBar({
animation: false,
@ -269,7 +274,7 @@ Component({
} else {
that.setData({
disabled:false,
disabled: false,
})
wx.showToast({
icon: "none",
@ -337,7 +342,7 @@ Component({
// this.data.show = false
this.setData({
ageIndex: -1,
idCardNum:"",
idCardNum: "",
})
var eventDetail = {
type: this.data.drawerType
@ -408,7 +413,7 @@ Component({
console.log("9999999999");
console.log(res);
if(res.statusCode == 413){
if (res.statusCode == 413) {
wx.showToast({
duration: 2000,
title: "身份证未识别",
@ -421,8 +426,8 @@ Component({
console.log(idcard);
if (idcard.status == 200) {
that.setData({
idCardNum:idcard.data.num,
idCardImageUrl:idcard.data.idCardImageUrl
idCardNum: idcard.data.num,
idCardImageUrl: idcard.data.idCardImageUrl
});
} else {
wx.showToast({

@ -81,7 +81,8 @@
</label>
</view>
<view class="weui-cell__bd">
<input class="weui-input f17" type="number" maxlength="11" name="tel" placeholder="请输入您的手机号" placeholder-class="input__placeholder cccc" />
{{info.tel}}
<input class="weui-input f17" type="number" maxlength="11" name="tel" value="{{tel}}" placeholder="请输入您的手机号" placeholder-class="input__placeholder cccc" />
</view>
</view>
<view class="weui-cell bb1 pb12 pt12" wx:if="{{info.agencyOperation == 1}}">

@ -2751,15 +2751,15 @@ Page({
*/
recordBill (e) {
console.log(e.currentTarget.dataset.job);
this.setData({
recordShow: true,
currentInfo: e.currentTarget.dataset.job,
})
console.log(this.data.recordShow);
wx.hideTabBar({
animation: false,
success: (result) => {
this.setData({
recordShow: true,
currentInfo: e.currentTarget.dataset.job,
})
},
fail: () => { },
complete: () => { }

@ -2,110 +2,110 @@ const app = getApp();
const commonUtil = require("../../../utils/commonUtil.js");
Page({
data: {
currentInfo:{},
data: {
currentInfo: {},
recordShow: false,
pullNum: 0, //下拉次数
loadMore: "",
loadContent: ["马不停蹄加载更多数据中...", "-- 已经到底了,加不了咯 --"],
statusBarHeight: wx.getStorageSync("statusBarHeight"), // 状态栏高度
navigationBarHeight: wx.getStorageSync("navigationBarHeight"), // 导航栏高度
menuButtonHeight: wx.getStorageSync("menuButtonHeight"), // 胶囊按钮高度
menuButton: wx.getStorageSync("menuButtonInfo"), // 胶囊信息
navigatorHeight: 60,
recordList: [],
jobSpecialLabelNames: [],
storeJobListSearchForm: {
jobCategoryLabelIds:'',
recruitment:1,
pageNum: 1,
pageSize: 20,
classify: 1,
sex: -1,
workTypeStr: "",
lat: "",
lng: "",
jobClassify: "",
sortTag: 0,
jobSpecialLabelIds: "",
cityName: "",
brandIds: "",
jobCategoryLabelIds: "",
ucj: 0,
},
loading: true,
hasMoreData: false, //下拉是否还有更多数据
inputShowed: false,
inputVal: "搜索工作",
wxCode: "",
isLogin: false,
hasUserInfo: 0,
pageShow: false,
recordCount: 0,
totalPage: 0,
currPage: 0,
list:[],
active:0,
scrollInfoView:'category_0',
sList:[],
pullNum: 0, //下拉次数
loadMore: "",
loadContent: ["马不停蹄加载更多数据中...", "-- 已经到底了,加不了咯 --"],
statusBarHeight: wx.getStorageSync("statusBarHeight"), // 状态栏高度
navigationBarHeight: wx.getStorageSync("navigationBarHeight"), // 导航栏高度
menuButtonHeight: wx.getStorageSync("menuButtonHeight"), // 胶囊按钮高度
menuButton: wx.getStorageSync("menuButtonInfo"), // 胶囊信息
navigatorHeight: 60,
recordList: [],
jobSpecialLabelNames: [],
storeJobListSearchForm: {
jobCategoryLabelIds: '',
recruitment: 1,
pageNum: 1,
pageSize: 20,
classify: 1,
sex: -1,
workTypeStr: "",
lat: "",
lng: "",
jobClassify: "",
sortTag: 0,
jobSpecialLabelIds: "",
cityName: "",
brandIds: "",
jobCategoryLabelIds: "",
ucj: 0,
},
loading: true,
hasMoreData: false, //下拉是否还有更多数据
inputShowed: false,
inputVal: "搜索工作",
wxCode: "",
isLogin: false,
hasUserInfo: 0,
pageShow: false,
recordCount: 0,
totalPage: 0,
currPage: 0,
list: [],
active: 0,
scrollInfoView: 'category_0',
sList: [],
},
handleTab(e){
handleTab (e) {
var that = this;
console.log('点击tab',e.currentTarget.dataset.active)
console.log('点击tab',e.currentTarget.dataset.id)
console.log('点击tab', e.currentTarget.dataset.active)
console.log('点击tab', e.currentTarget.dataset.id)
that.data.storeJobListSearchForm['jobCategoryLabelIds'] = e.currentTarget.dataset.id
that.data.storeJobListSearchForm.pageNum = 1
this.setData({
active:e.currentTarget.dataset.active,// tab切换
this.setData({
active: e.currentTarget.dataset.active,// tab切换
storeJobListSearchForm: that.data.storeJobListSearchForm
});
});
console.log(this.data.scrollInfoView)
that.getJobList();
},
goLogin() {
wx.setStorageSync("comeFromPage", "index");
wx.navigateTo({
url: "/pages/login/index",
});
},
onLoad(options) {
var that = this;
},
onReady() {
},
/**
* 智能匹配结束
*
*
*
*/
onShow() {
},
goLogin () {
wx.setStorageSync("comeFromPage", "index");
wx.navigateTo({
url: "/pages/login/index",
});
},
onLoad (options) {
var that = this;
},
onReady () {
},
/**
* 智能匹配结束
*
*
*
*/
onShow () {
let that = this;
console.log(app.globalData)
that.data.storeJobListSearchForm.pageNum = 1;
that.data.storeJobListSearchForm.pageNum = 1;
that.setData({
isLogin:app.globalData.isLogin
isLogin: app.globalData.isLogin
})
that.getType();
},
getType(){
},
getType () {
var that = this;
wx.request({
url: app.globalData.ip + "/yishoudan/custom/job/categoryLabels",
method: "get",
header: app.globalData.headers,
success: function (res) {
if(res.data.data.labels.length > 2){
if (res.data.data.labels.length > 2) {
var first = res.data.data.labels[0];
var last = res.data.data.labels[res.data.data.labels.length - 1];
res.data.data.labels.pop();
@ -115,255 +115,255 @@ Page({
res.data.data.labels.push(last);
}
if(res.data.data.labels[0]){
if (res.data.data.labels[0]) {
that.data.storeJobListSearchForm['jobCategoryLabelIds'] = res.data.data.labels[0].id
}
that.setData({
list:res.data.data.labels,
list: res.data.data.labels,
storeJobListSearchForm: that.data.storeJobListSearchForm
})
that.getJobList();
}
})
},
getJobList() {
var that = this;
that.setData({
getJobList () {
var that = this;
that.setData({
pageShow: false,
recordList:[]
});
return new Promise(function (resolve, reject) {
recordList: []
});
return new Promise(function (resolve, reject) {
wx.showLoading({
title: "加载中...",
wx.showLoading({
title: "加载中...",
});
wx.request({
url: app.globalData.ip + "/yishoudan/custom/job/listApp",
method: "POST",
header: app.globalData.headers,
data: that.data.storeJobListSearchForm,
success: function (res) {
console.log("职位列表↓↓↓↓");
console.log(res);
that.setData({
totalPage: res.data.data.pageBean.pageCount,
currPage: res.data.data.pageBean.currentPage,
});
if (res.data.data.pageBean.recordList == null || res.data.data.pageBean.recordList.length == 0 || res.data.data.pageBean.recordList.length < that.data.storeJobListSearchForm.pageSize) {
var jobListTemp = commonUtil.disposeJobListData(res.data.data.pageBean.recordList);
that.data.recordList = that.data.recordList.concat(jobListTemp);
that.setData({
recordList: that.data.recordList,
isTrigger: false,
});
} else {
var jobListTemp = commonUtil.disposeJobListData(res.data.data.pageBean.recordList);
that.data.recordList = that.data.recordList.concat(jobListTemp);
that.setData({
recordList: that.data.recordList,
isTrigger: false,
});
wx.request({
url: app.globalData.ip + "/yishoudan/custom/job/listApp",
method: "POST",
header: app.globalData.headers,
data: that.data.storeJobListSearchForm,
success: function (res) {
console.log("职位列表↓↓↓↓");
console.log(res);
that.setData({
totalPage: res.data.data.pageBean.pageCount,
currPage: res.data.data.pageBean.currentPage,
});
if (res.data.data.pageBean.recordList == null || res.data.data.pageBean.recordList.length == 0 || res.data.data.pageBean.recordList.length < that.data.storeJobListSearchForm.pageSize) {
var jobListTemp = commonUtil.disposeJobListData(res.data.data.pageBean.recordList);
that.data.recordList = that.data.recordList.concat(jobListTemp);
that.setData({
recordList: that.data.recordList,
isTrigger: false,
});
} else {
var jobListTemp = commonUtil.disposeJobListData(res.data.data.pageBean.recordList);
that.data.recordList = that.data.recordList.concat(jobListTemp);
that.setData({
recordList: that.data.recordList,
isTrigger: false,
});
}
// if (res.data.data.pageBean.recordCount >= res.data.data.pageBean.pageSize) {
// that.setData({
// hasMoreData: true,
// });
// } else {
// that.setData({
// hasMoreData: false,
// });
// }
wx.hideLoading({
success: (res) => {},
});
that.setData({
loading: false,
pageShow: true,
storeJobListSearchForm: that.data.storeJobListSearchForm,
});
resolve();
// that.getTag();
that.data.recordList.forEach((item, index) => {
// that.setData({
// hasMoreData: true,
// });
// } else {
// that.setData({
// hasMoreData: false,
// });
// }
wx.hideLoading({
success: (res) => { },
});
that.setData({
loading: false,
pageShow: true,
storeJobListSearchForm: that.data.storeJobListSearchForm,
});
resolve();
// that.getTag();
that.data.recordList.forEach((item, index) => {
item['citys'] = commonUtil.setJobInfoPosition(item.storeDistrict);
// console.log(item);
if (app.isNotEmptyCheck(item.returnFeeType) || item.returnFeeType == "0" || item.returnFee == "0") {
item["fuWuFei"] = commonUtil.getReturnFeeTypeName1ById(item.returnFeeType, item.returnFee);
} else {
item["fuWuFei"] = "";
}
// console.log(item);
if (app.isNotEmptyCheck(item.returnFeeType) || item.returnFeeType == "0" || item.returnFee == "0") {
item["fuWuFei"] = commonUtil.getReturnFeeTypeName1ById(item.returnFeeType, item.returnFee);
} else {
item["fuWuFei"] = "";
}
});
let _stopList = [];
// if($type == 'onshow'){
// that.data.list.forEach((item,index) => {
// that.getDomInfo('category_' + index,(categoryRes)=>{
// _stopList.push(Number(categoryRes.top))
// })
// });
// }
that.setData({
sList:_stopList,
recordList: that.data.recordList,
currentJobDrawer: that.data.currentJobDrawer,
});
that.setData({
recordList: that.data.recordList,
currentJobDrawer: that.data.currentJobDrawer,
});
// if (that.data.recordList.length < res.data.data.pageBean.recordCount) {
// that.setData({
// hasMoreData: true,
// });
// } else {
// that.setData({
// hasMoreData: false,
// });
// }
},
});
});
},
bindCategoryScroll(e){
let that = this;
// if(0 <= e.detail.scrollTop && e.detail.scrollTop < 4241){
// that.setData({
// active:0
// })
// }else if(4241 <= e.detail.scrollTop && e.detail.scrollTop < 8482){
// that.setData({
// active:1
// })
// }else {
// that.setData({
// active:2
// })
// }
},
// getDomInfo($obj,callback=()=>{}){
// if($obj){
// const query = wx.createSelectorQuery()
// query.select('#' + $obj).boundingClientRect(function(categoryRes){
// callback(categoryRes);
// })
// query.exec()
// }else{
// callback({
// bottom: -1,
// dataset: {},
// height: -1,
// id: "",
// left: -1,
// right: -1,
// top: -1,
// width: -1
// });
// };
// },
/**
* 标准详情
*
*
*/
goDetail(e) {
console.log(e);
var that = this;
wx.navigateTo({
url: "../../detail/index?storeJobId=" + e.currentTarget.dataset.id + "&wxCode=" + that.data.wxCode,
});
},
// if($type == 'onshow'){
// that.data.list.forEach((item,index) => {
// that.getDomInfo('category_' + index,(categoryRes)=>{
// _stopList.push(Number(categoryRes.top))
// })
// });
// }
that.setData({
sList: _stopList,
recordList: that.data.recordList,
currentJobDrawer: that.data.currentJobDrawer,
});
that.setData({
recordList: that.data.recordList,
currentJobDrawer: that.data.currentJobDrawer,
});
// if (that.data.recordList.length < res.data.data.pageBean.recordCount) {
// that.setData({
// hasMoreData: true,
// });
// } else {
// that.setData({
// hasMoreData: false,
// });
// }
},
});
});
},
bindCategoryScroll (e) {
let that = this;
// if(0 <= e.detail.scrollTop && e.detail.scrollTop < 4241){
// that.setData({
// active:0
// })
// }else if(4241 <= e.detail.scrollTop && e.detail.scrollTop < 8482){
// that.setData({
// active:1
// })
// }else {
// that.setData({
// active:2
// })
// }
},
// getDomInfo($obj,callback=()=>{}){
// if($obj){
// const query = wx.createSelectorQuery()
// query.select('#' + $obj).boundingClientRect(function(categoryRes){
// callback(categoryRes);
// })
// query.exec()
// }else{
// callback({
// bottom: -1,
// dataset: {},
// height: -1,
// id: "",
// left: -1,
// right: -1,
// top: -1,
// width: -1
// });
// };
// },
/**
* 标准详情
*
*
*/
goDetail (e) {
console.log(e);
var that = this;
wx.navigateTo({
url: "../../detail/index?storeJobId=" + e.currentTarget.dataset.id + "&wxCode=" + that.data.wxCode,
});
},
// 下拉加载更多
onScrollToLower () {
var that = this;
that.data.storeJobListSearchForm.pageNum =
that.data.storeJobListSearchForm.pageNum + 1;
if (that.data.hasMoreData) {
that.getJobList();
}
// 根据实际数据加载情况设定 loadMore 的值即可,分别为 load 和 over
that.data.storeJobListSearchForm.pageNum =
that.data.storeJobListSearchForm.pageNum + 1;
if (that.data.hasMoreData) {
that.getJobList();
}
// 根据实际数据加载情况设定 loadMore 的值即可,分别为 load 和 over
this.setData({
loadMore: "load",
// loading:true
});
this.setData({
loadMore: "load",
// loading:true
});
},
goEnroll (e) {
console.log(e);
// wx.navigateTo({
// url: "../newEnroll/index?applyType=0"
// });
var that = this;
wx.removeStorageSync("townsManInfo");
wx.removeStorageSync("townsManInfoJob");
wx.removeStorageSync("storeInfoJob");
// if(app.isNotEmptyCheck(wx.getStorage('townsManInfo'))){
// wx.removeStorageSync('townsManInfo')
// }
// if(app.isNotEmptyCheck(wx.getStorage('townsManInfoJob'))){
// wx.removeStorageSync('townsManInfoJob')
// }
// if(app.isNotEmptyCheck(wx.getStorage('storeInfoJob'))){
// wx.removeStorageSync('storeInfoJob')
// }
// wx.removeStorageSync('townsManInfoJob')
console.log(app.globalData.loginUserInfo.tel);
wx.setStorageSync("jobDetailStorage", that.data.recordList[e.currentTarget.dataset.idx]);
let argument;
argument = JSON.stringify(e.currentTarget.dataset.info).replace(/\=|\&/g, "3D");
wx.navigateTo({
url: `../newEnroll/enroll/index?applyType=1&info=${argument}`,
});
},
wxLogin () {
var that = this;
wx.login({
success (res) {
if (res.code) {
that.setData({
wxCode: res.code,
});
} else {
console.log("获取code失败" + res.errMsg);
}
},
});
},
scroll (e) {
return false;
},
stoptap (e) {
return false;
},
onHide () {
this.setData({
whichOneShow: "",
// topNum: 1,
});
},
goEnroll(e) {
console.log(e);
// wx.navigateTo({
// url: "../newEnroll/index?applyType=0"
// });
var that = this;
wx.removeStorageSync("townsManInfo");
wx.removeStorageSync("townsManInfoJob");
wx.removeStorageSync("storeInfoJob");
// if(app.isNotEmptyCheck(wx.getStorage('townsManInfo'))){
// wx.removeStorageSync('townsManInfo')
// }
// if(app.isNotEmptyCheck(wx.getStorage('townsManInfoJob'))){
// wx.removeStorageSync('townsManInfoJob')
// }
// if(app.isNotEmptyCheck(wx.getStorage('storeInfoJob'))){
// wx.removeStorageSync('storeInfoJob')
// }
// wx.removeStorageSync('townsManInfoJob')
console.log(app.globalData.loginUserInfo.tel);
wx.setStorageSync("jobDetailStorage", that.data.recordList[e.currentTarget.dataset.idx]);
let argument;
argument = JSON.stringify(e.currentTarget.dataset.info).replace(/\=|\&/g, "3D");
wx.navigateTo({
url: `../newEnroll/enroll/index?applyType=1&info=${argument}`,
});
},
wxLogin() {
var that = this;
wx.login({
success(res) {
if (res.code) {
that.setData({
wxCode: res.code,
});
} else {
console.log("获取code失败" + res.errMsg);
}
},
});
},
scroll(e) {
return false;
},
stoptap(e) {
return false;
},
onHide() {
this.setData({
whichOneShow: "",
// topNum: 1,
});
},
onUnload() {
console.log("destory");
},
goList() {
wx.navigateTo({
url: "/pages/filterPage/index",
});
onUnload () {
console.log("destory");
},
goList () {
wx.navigateTo({
url: "/pages/filterPage/index",
});
},
hidedrawershow (e) {
console.log(e);
@ -402,15 +402,15 @@ Page({
// return;
// }
console.log(e.currentTarget.dataset.job);
this.setData({
recordShow: true,
currentInfo: e.currentTarget.dataset.job,
})
console.log(this.data.recordShow);
wx.hideTabBar({
animation: false,
success: (result) => {
this.setData({
recordShow: true,
currentInfo: e.currentTarget.dataset.job,
})
},
fail: () => { },
complete: () => { }
@ -434,7 +434,7 @@ Page({
// url: `../newEnroll/enroll/index?applyType=1&info=${info}`,
// });
},
makePhone(e){
makePhone (e) {
var that = this;
var tel = e.currentTarget.dataset.tel;
wx.makePhoneCall({

Loading…
Cancel
Save