|
@ -1,6 +1,11 @@ |
|
|
// subpages/index/checkInUser/checkInUser.js
|
|
|
// subpages/index/checkInUser/checkInUser.js
|
|
|
import {bindIdCard} from "../../../api/user" |
|
|
import { |
|
|
import {selectMzGraduateInfo,eSignDownload} from "../../../api/index" |
|
|
bindIdCard |
|
|
|
|
|
} from "../../../api/user" |
|
|
|
|
|
import { |
|
|
|
|
|
selectMzGraduateInfo, |
|
|
|
|
|
eSignDownload |
|
|
|
|
|
} from "../../../api/index" |
|
|
const app = getApp() |
|
|
const app = getApp() |
|
|
Page({ |
|
|
Page({ |
|
|
|
|
|
|
|
@ -8,10 +13,11 @@ Page({ |
|
|
* 页面的初始数据 |
|
|
* 页面的初始数据 |
|
|
*/ |
|
|
*/ |
|
|
data: { |
|
|
data: { |
|
|
form:{ |
|
|
form: { |
|
|
graduateName:'', |
|
|
graduateName: '', |
|
|
idCard:'', |
|
|
idCard: '', |
|
|
telephone:'' |
|
|
telephone: '', |
|
|
|
|
|
type: '' |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
@ -19,12 +25,16 @@ Page({ |
|
|
* 生命周期函数--监听页面加载 |
|
|
* 生命周期函数--监听页面加载 |
|
|
*/ |
|
|
*/ |
|
|
onLoad(options) { |
|
|
onLoad(options) { |
|
|
if(options.idCard){ |
|
|
console.log(options); |
|
|
|
|
|
if (options) { |
|
|
this.setData({ |
|
|
this.setData({ |
|
|
'form.idCard':options.idCard, |
|
|
'form.idCard': options.idCard, |
|
|
|
|
|
type: options.type || '' |
|
|
}) |
|
|
}) |
|
|
|
|
|
if(!options.type){ |
|
|
this.selectMzGraduateInfo() |
|
|
this.selectMzGraduateInfo() |
|
|
} |
|
|
} |
|
|
|
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
@ -33,8 +43,7 @@ Page({ |
|
|
onReady() { |
|
|
onReady() { |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
onRouteDone(e){ |
|
|
onRouteDone(e) { |
|
|
console.log(e); |
|
|
|
|
|
}, |
|
|
}, |
|
|
/** |
|
|
/** |
|
|
* 生命周期函数--监听页面显示 |
|
|
* 生命周期函数--监听页面显示 |
|
@ -77,65 +86,80 @@ Page({ |
|
|
onShareAppMessage() { |
|
|
onShareAppMessage() { |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
onChange(e){ |
|
|
onChange(e) { |
|
|
console.log(e); |
|
|
console.log(e); |
|
|
this.setData({ |
|
|
this.setData({ |
|
|
'form.idCard':e.detail |
|
|
'form.idCard': e.detail |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
onChangePhone(e){ |
|
|
onChangePhone(e) { |
|
|
this.setData({ |
|
|
this.setData({ |
|
|
'form.telephone':e.detail |
|
|
'form.telephone': e.detail |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
onChangeName(e){ |
|
|
onChangeName(e) { |
|
|
this.setData({ |
|
|
this.setData({ |
|
|
'form.graduateName':e.detail |
|
|
'form.graduateName': e.detail |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
submit(){ |
|
|
submit() { |
|
|
// this.bindIdCard()
|
|
|
// this.bindIdCard()
|
|
|
selectMzGraduateInfo({idCard:this.data.form.idCard}).then(res=>{ |
|
|
if (this.data.type === 'out') { |
|
|
console.log(res,'毕业生信息'); |
|
|
wx.navigateTo({ |
|
|
if(res.code === 200){ |
|
|
url: '/subpages/index/checkOutConfirm/index/index', |
|
|
|
|
|
}) |
|
|
|
|
|
return false |
|
|
|
|
|
} |
|
|
|
|
|
selectMzGraduateInfo({ |
|
|
|
|
|
idCard: this.data.form.idCard |
|
|
|
|
|
}).then(res => { |
|
|
|
|
|
console.log(res, '毕业生信息'); |
|
|
|
|
|
if (res.code === 200) { |
|
|
this.bindIdCard() |
|
|
this.bindIdCard() |
|
|
if(res.data.signType === 0 && res.data.contract){ |
|
|
|
|
|
|
|
|
if (res.data.signType === 0 && res.data.contract) { |
|
|
//线上支付去跳转签合同
|
|
|
//线上支付去跳转签合同
|
|
|
app.globalData.userInfo.chooseRoomId = res.data.chooseRecId |
|
|
app.globalData.userInfo.chooseRoomId = res.data.chooseRecId |
|
|
console.log(res.data.contract,'链接》》》》'); |
|
|
console.log(res.data.contract, '链接》》》》'); |
|
|
res.data.contract = res.data.contract.replace('https://h5.esign.cn','https://hxm5112004501.h5.esign.cn') |
|
|
res.data.contract = res.data.contract.replace('https://h5.esign.cn', 'https://hxm5112004501.h5.esign.cn') |
|
|
wx.navigateTo({ |
|
|
wx.navigateTo({ |
|
|
url: '/pages/webView/webView?url=' + encodeURIComponent(res.data.contract), |
|
|
url: '/pages/webView/webView?url=' + encodeURIComponent(res.data.contract), |
|
|
}) |
|
|
}) |
|
|
}else if(res.data.signType === 1){ |
|
|
} else if (res.data.signType === 1) { |
|
|
// 线下签订去支付
|
|
|
// 线下签订去支付
|
|
|
wx.switchTab({ |
|
|
wx.switchTab({ |
|
|
url: '/pages/index/index', |
|
|
url: '/pages/index/index', |
|
|
}) |
|
|
}) |
|
|
}else{ |
|
|
} else { |
|
|
wx.navigateTo({ |
|
|
wx.navigateTo({ |
|
|
url: `/subpages/index/checkInWait/checkInWait?idCard=${this.data.form.idCard}`, |
|
|
url: `/subpages/index/checkInWait/checkInWait?idCard=${this.data.form.idCard}`, |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
}).catch(err=>{ |
|
|
}).catch(err => { |
|
|
console.log(err); |
|
|
console.log(err); |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
bindIdCard(){ |
|
|
bindIdCard() { |
|
|
bindIdCard({idCard:this.data.form.idCard,name:this.data.form.graduateName}).then(res=>{ |
|
|
bindIdCard({ |
|
|
|
|
|
idCard: this.data.form.idCard, |
|
|
|
|
|
name: this.data.form.graduateName |
|
|
|
|
|
}).then(res => { |
|
|
console.log(res); |
|
|
console.log(res); |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
selectMzGraduateInfo(){ |
|
|
selectMzGraduateInfo() { |
|
|
selectMzGraduateInfo({idCard:this.data.form.idCard}).then(res=>{ |
|
|
selectMzGraduateInfo({ |
|
|
if(res.code === 200){ |
|
|
idCard: this.data.form.idCard |
|
|
|
|
|
}).then(res => { |
|
|
|
|
|
if (res.code === 200) { |
|
|
this.setData({ |
|
|
this.setData({ |
|
|
form:res.data |
|
|
form: res.data |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
}).catch(err=>{ |
|
|
}).catch(err => { |
|
|
console.log(err); |
|
|
console.log(err); |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|