|
|
|
@ -4,6 +4,7 @@ var dateUtil = require("../../utils/dateUtil.js");
|
|
|
|
var dateTimePicker = require("../../utils/dateTimePicker.js");
|
|
|
|
var dateTimePicker = require("../../utils/dateTimePicker.js");
|
|
|
|
Component({
|
|
|
|
Component({
|
|
|
|
data: {
|
|
|
|
data: {
|
|
|
|
|
|
|
|
idCardNum:"",
|
|
|
|
dateTime: "",
|
|
|
|
dateTime: "",
|
|
|
|
currentTime: dateUtil.formatDateYMD(mydate.toLocaleDateString()),
|
|
|
|
currentTime: dateUtil.formatDateYMD(mydate.toLocaleDateString()),
|
|
|
|
copyTime: dateUtil.formatDateYMD(mydate.toLocaleDateString()),
|
|
|
|
copyTime: dateUtil.formatDateYMD(mydate.toLocaleDateString()),
|
|
|
|
@ -227,13 +228,6 @@ Component({
|
|
|
|
|
|
|
|
|
|
|
|
e.detail.value.interviewTimeStr = that.data.currentTime;
|
|
|
|
e.detail.value.interviewTimeStr = that.data.currentTime;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
e.detail.value.jobId = that.data.info.id
|
|
|
|
e.detail.value.jobId = that.data.info.id
|
|
|
|
console.log('form发生了submit事件,携带数据为:', e.detail.value)
|
|
|
|
console.log('form发生了submit事件,携带数据为:', e.detail.value)
|
|
|
|
wx.request({
|
|
|
|
wx.request({
|
|
|
|
@ -250,7 +244,8 @@ Component({
|
|
|
|
})
|
|
|
|
})
|
|
|
|
that.setData({
|
|
|
|
that.setData({
|
|
|
|
show: false,
|
|
|
|
show: false,
|
|
|
|
ageIndex:-1
|
|
|
|
ageIndex:-1,
|
|
|
|
|
|
|
|
idCardNum:""
|
|
|
|
})
|
|
|
|
})
|
|
|
|
wx.showTabBar({
|
|
|
|
wx.showTabBar({
|
|
|
|
animation: false,
|
|
|
|
animation: false,
|
|
|
|
@ -326,7 +321,8 @@ Component({
|
|
|
|
hideLeft () {
|
|
|
|
hideLeft () {
|
|
|
|
// this.data.show = false
|
|
|
|
// this.data.show = false
|
|
|
|
this.setData({
|
|
|
|
this.setData({
|
|
|
|
ageIndex: -1
|
|
|
|
ageIndex: -1,
|
|
|
|
|
|
|
|
idCardNum:"",
|
|
|
|
})
|
|
|
|
})
|
|
|
|
var eventDetail = {
|
|
|
|
var eventDetail = {
|
|
|
|
type: this.data.drawerType
|
|
|
|
type: this.data.drawerType
|
|
|
|
@ -356,7 +352,85 @@ Component({
|
|
|
|
this.setData({
|
|
|
|
this.setData({
|
|
|
|
morePeople: !this.data.morePeople
|
|
|
|
morePeople: !this.data.morePeople
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
chooseIdCard () {
|
|
|
|
|
|
|
|
var that = this;
|
|
|
|
|
|
|
|
console.log("ischoise");
|
|
|
|
|
|
|
|
wx.chooseMedia({
|
|
|
|
|
|
|
|
count: 1,
|
|
|
|
|
|
|
|
sizeType: ["original", "compressed"],
|
|
|
|
|
|
|
|
sourceType: ["album", "camera"],
|
|
|
|
|
|
|
|
success (res) {
|
|
|
|
|
|
|
|
console.log(res);
|
|
|
|
|
|
|
|
// debugger;
|
|
|
|
|
|
|
|
that.uploadIdcardImg(res);
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
uploadIdcardImg (imgPath) {
|
|
|
|
|
|
|
|
let that = this;
|
|
|
|
|
|
|
|
// tempFilePath可以作为img标签的src属性显示图片
|
|
|
|
|
|
|
|
let filePath;
|
|
|
|
|
|
|
|
console.log("22222222222222222");
|
|
|
|
|
|
|
|
console.log(imgPath);
|
|
|
|
|
|
|
|
if (imgPath.tempFiles[0].tempFilePath) {
|
|
|
|
|
|
|
|
filePath = imgPath.tempFiles[0].tempFilePath
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
filePath = imgPath;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
console.log(filePath);
|
|
|
|
|
|
|
|
wx.showLoading({
|
|
|
|
|
|
|
|
title: "识别中...",
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
wx.uploadFile({
|
|
|
|
|
|
|
|
// url: app.globalData.ip + '/commons/idCardOcrRecognize',
|
|
|
|
|
|
|
|
url: app.globalData.ip + "/commons/idCardOcrRecognizeAndUploadToAliyunOss",
|
|
|
|
|
|
|
|
filePath,
|
|
|
|
|
|
|
|
name: "uploadFile",
|
|
|
|
|
|
|
|
header: app.globalData.headers,
|
|
|
|
|
|
|
|
success: function (res) {
|
|
|
|
|
|
|
|
console.log("9999999999");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
console.log(res);
|
|
|
|
|
|
|
|
if(res.statusCode == 413){
|
|
|
|
|
|
|
|
wx.showToast({
|
|
|
|
|
|
|
|
duration: 2000,
|
|
|
|
|
|
|
|
title: "身份证未识别",
|
|
|
|
|
|
|
|
icon: "none",
|
|
|
|
|
|
|
|
mask: true,
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
var idcard = JSON.parse(res.data);
|
|
|
|
|
|
|
|
console.log(idcard);
|
|
|
|
|
|
|
|
if (idcard.status == 200) {
|
|
|
|
|
|
|
|
that.setData({
|
|
|
|
|
|
|
|
idCardNum:idcard.data.num
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
wx.showToast({
|
|
|
|
|
|
|
|
duration: 2000,
|
|
|
|
|
|
|
|
title: "身份证未识别",
|
|
|
|
|
|
|
|
icon: "none",
|
|
|
|
|
|
|
|
mask: true,
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
wx.hideLoading();
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
fail: function (res) {
|
|
|
|
|
|
|
|
console.log("99999999998");
|
|
|
|
|
|
|
|
console.log(res);
|
|
|
|
|
|
|
|
wx.hideLoading()
|
|
|
|
|
|
|
|
wx.showToast({
|
|
|
|
|
|
|
|
duration: 2000,
|
|
|
|
|
|
|
|
title: "身份证未识别",
|
|
|
|
|
|
|
|
icon: "none",
|
|
|
|
|
|
|
|
mask: true,
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|