Browse Source

没有电子合同不给跳转

epass
mk 2 months ago
parent
commit
18e1522e12
  1. 6
      pages/index/index.js
  2. 1
      pages/webView/webView.js
  3. 24
      subpages/index/checkInUser/checkInUser.js
  4. 33
      subpages/index/checkInWait/checkInWait.js
  5. 11
      subpages/index/checkOutConfirm/index/index.js
  6. 4
      subpages/index/checkOutConfirm/index/index.wxml
  7. 1
      utils/request.js

6
pages/index/index.js

@ -59,7 +59,7 @@ Page({
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad(options) { onLoad(options) {
this.login()
this.setData({ this.setData({
statusHeight: app.globalData.deviceInfo.statusHeight, statusHeight: app.globalData.deviceInfo.statusHeight,
navigationHeight: app.globalData.deviceInfo.navigationHeight, navigationHeight: app.globalData.deviceInfo.navigationHeight,
@ -133,7 +133,9 @@ Page({
/** /**
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow() {}, onShow() {
this.login()
},
/** /**
* 生命周期函数--监听页面隐藏 * 生命周期函数--监听页面隐藏

1
pages/webView/webView.js

@ -12,6 +12,7 @@ Page({
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad(options) { onLoad(options) {
console.log(options);
if(options.url){ if(options.url){
this.setData({ this.setData({
url:decodeURIComponent(options.url) url:decodeURIComponent(options.url)

24
subpages/index/checkInUser/checkInUser.js

@ -40,19 +40,7 @@ Page({
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow() { onShow() {
if(this.data.form){
const pamars = {
bizId:this.data.form.chooseRecId || '',
signType:1
}
eSignDownload(pamars).then(res=>{
if(res.data.code === 0){
wx.navigateTo({
url: '/subpages/OCRCard/pages/deposit/deposit',
})
}
})
}
}, },
/** /**
@ -91,19 +79,21 @@ Page({
}, },
submit(){ submit(){
selectMzGraduateInfo({idCard:this.data.form.idCard}).then(res=>{ selectMzGraduateInfo({idCard:this.data.form.idCard}).then(res=>{
console.log(res); console.log(res,'毕业生信息');
if(res.code === 200){ if(res.code === 200){
this.bindIdCard() this.bindIdCard()
if(res.data.signType === 0){ 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,'链接》》》》');
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.navigateTo({ wx.switchTab({
url: '/subpages/OCRCard/pages/deposit/deposit?chooseRoomId=' + res.data.chooseRecId, url: '/pages/index/index',
}) })
}else{ }else{
wx.navigateTo({ wx.navigateTo({

33
subpages/index/checkInWait/checkInWait.js

@ -33,19 +33,19 @@ Page({
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow() { onShow() {
if(this.data.info){ // if(this.data.info){
const pamars = { // const pamars = {
bizId:this.data.info.chooseRecId ||'', // bizId:this.data.info.chooseRecId ||'',
signType:1 // signType:1
} // }
eSignDownload(pamars).then(res=>{ // eSignDownload(pamars).then(res=>{
if(res.data.code === 0){ // if(res.data.code === 0){
wx.navigateTo({ // wx.navigateTo({
url: '/subpages/OCRCard/pages/deposit/deposit', // url: '/subpages/OCRCard/pages/deposit/deposit',
}) // })
} // }
}) // })
} // }
}, },
/** /**
@ -93,15 +93,16 @@ Page({
// url: '/pages/webView/webView?url=' + encodeURIComponent('https://smlh5.esign.cn/mesign/guide?context=ocdfblk7G6&flowId=0eb621c0d73d4d218f5ae9b357a91821&organ=false&appId=7439066638&linkSource=1&bizType=1&tsign_source_type=SIGN_LINK_XUANYUAN&tsign_source_detail=16R2mv%2F27h2Y5CkM9bwhboJgEfaR5q9nLW1M2TKOt%2FsnmaDbpS23d%2FYDkRZo47IgfpkLUByBPb9sP4eZvvz00wnj4Wshq%2B%2F3XgAN8xrJ7u%2BLr1f%2Fc9JAccKV839CDqMhELJXjp6kV5WYnH3Fvcm6wfNCwqHwSeMCsqO7xbinP4ECLnKbmG3FrVaZVUrg7ts7YVDNLiFo2n3CXJN4k1BOiR8YCSSRmtQyaT0SvncLKKhL2fYTDY2XjiLahYSqNo6Rc'), // url: '/pages/webView/webView?url=' + encodeURIComponent('https://smlh5.esign.cn/mesign/guide?context=ocdfblk7G6&flowId=0eb621c0d73d4d218f5ae9b357a91821&organ=false&appId=7439066638&linkSource=1&bizType=1&tsign_source_type=SIGN_LINK_XUANYUAN&tsign_source_detail=16R2mv%2F27h2Y5CkM9bwhboJgEfaR5q9nLW1M2TKOt%2FsnmaDbpS23d%2FYDkRZo47IgfpkLUByBPb9sP4eZvvz00wnj4Wshq%2B%2F3XgAN8xrJ7u%2BLr1f%2Fc9JAccKV839CDqMhELJXjp6kV5WYnH3Fvcm6wfNCwqHwSeMCsqO7xbinP4ECLnKbmG3FrVaZVUrg7ts7YVDNLiFo2n3CXJN4k1BOiR8YCSSRmtQyaT0SvncLKKhL2fYTDY2XjiLahYSqNo6Rc'),
// }) // })
// 线上签订合同跳转信息确认 // 线上签订合同跳转信息确认
if(res.data.signType === 0){ 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,'链接》》》》');
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.navigateTo({ wx.switchTab({
url: '/subpages/OCRCard/pages/deposit/deposit?chooseRoomId=' + res.data.chooseRecId, url: '/pages/index/index',
}) })
}else{ }else{
// 没有合同信息 // 没有合同信息

11
subpages/index/checkOutConfirm/index/index.js

@ -64,6 +64,17 @@ console.log('area',scrollArea.node);
checkoutConfirm({deliveryReceiptUrl:this.data.signImgSrc[0].url,checkOutRecId:this.data.info.checkOutRecId}).then(res=>{ checkoutConfirm({deliveryReceiptUrl:this.data.signImgSrc[0].url,checkOutRecId:this.data.info.checkOutRecId}).then(res=>{
if(res.code === 200){ if(res.code === 200){
console.log(res); console.log(res);
wx.showToast({
title: '办理成功',
duration:2000,
success:()=>{
setTimeout(()=>{
wx.switchTab({
url: '/pages/index/index',
})
},2000)
}
})
}else{ }else{
console.log(res); console.log(res);
} }

4
subpages/index/checkOutConfirm/index/index.wxml

@ -63,10 +63,10 @@
<view slot="title" class="flex flex-wrap"> <view slot="title" class="flex flex-wrap">
<block wx:for="{{info.facilitiesCheckImages}}" wx:key="index"> <block wx:for="{{info.facilitiesCheckImages}}" wx:key="index">
<view class="media-item"> <view class="media-item">
<block wx:if="{{item.type === 'image'}}"> <block wx:if="{{item.type === 'image/png' || item.type === 'image/jpg' || item.type === 'image/jepg'}}">
<van-image width="118" height="80" src="{{item.url}}" /> <van-image width="118" height="80" src="{{item.url}}" />
</block> </block>
<block wx:else> <block wx:if="{{item.type === 'video/mp4'}}">
<video width="118px" height="80px" src="{{item.url}}"></video> <video width="118px" height="80px" src="{{item.url}}"></video>
</block> </block>
</view> </view>

1
utils/request.js

@ -24,6 +24,7 @@ const request = function (url, options) {
data: options.method === 'GET' ? options.data : JSON.stringify(options.data), data: options.method === 'GET' ? options.data : JSON.stringify(options.data),
header: header, header: header,
success (response) { success (response) {
console.log(header,'seeeeeee++++++++++++++++++++++++++++++++++++++');
if (response.statusCode === 200) { if (response.statusCode === 200) {
if(response.data.code===200){ if(response.data.code===200){
resolve(response.data) resolve(response.data)

Loading…
Cancel
Save