diff --git a/pages/index/index.js b/pages/index/index.js index 1e86934..aa44569 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -59,7 +59,7 @@ Page({ * 生命周期函数--监听页面加载 */ onLoad(options) { - this.login() + this.setData({ statusHeight: app.globalData.deviceInfo.statusHeight, navigationHeight: app.globalData.deviceInfo.navigationHeight, @@ -133,7 +133,9 @@ Page({ /** * 生命周期函数--监听页面显示 */ - onShow() {}, + onShow() { + this.login() + }, /** * 生命周期函数--监听页面隐藏 diff --git a/pages/webView/webView.js b/pages/webView/webView.js index 028b4ff..703acce 100644 --- a/pages/webView/webView.js +++ b/pages/webView/webView.js @@ -12,6 +12,7 @@ Page({ * 生命周期函数--监听页面加载 */ onLoad(options) { + console.log(options); if(options.url){ this.setData({ url:decodeURIComponent(options.url) diff --git a/subpages/index/checkInUser/checkInUser.js b/subpages/index/checkInUser/checkInUser.js index 5baeeeb..3f9a1ce 100644 --- a/subpages/index/checkInUser/checkInUser.js +++ b/subpages/index/checkInUser/checkInUser.js @@ -40,19 +40,7 @@ Page({ * 生命周期函数--监听页面显示 */ 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(){ selectMzGraduateInfo({idCard:this.data.form.idCard}).then(res=>{ - console.log(res); + console.log(res,'毕业生信息'); if(res.code === 200){ this.bindIdCard() - if(res.data.signType === 0){ + if(res.data.signType === 0 && res.data.contract){ //线上支付去跳转签合同 app.globalData.userInfo.chooseRoomId = res.data.chooseRecId + console.log(res.data.contract,'链接》》》》'); + wx.navigateTo({ url: '/pages/webView/webView?url=' + encodeURIComponent(res.data.contract), }) }else if(res.data.signType === 1){ // 线下签订去支付 - wx.navigateTo({ - url: '/subpages/OCRCard/pages/deposit/deposit?chooseRoomId=' + res.data.chooseRecId, + wx.switchTab({ + url: '/pages/index/index', }) }else{ wx.navigateTo({ diff --git a/subpages/index/checkInWait/checkInWait.js b/subpages/index/checkInWait/checkInWait.js index d568a01..8b28efe 100644 --- a/subpages/index/checkInWait/checkInWait.js +++ b/subpages/index/checkInWait/checkInWait.js @@ -33,19 +33,19 @@ Page({ * 生命周期函数--监听页面显示 */ onShow() { - if(this.data.info){ - const pamars = { - bizId:this.data.info.chooseRecId ||'', - signType:1 - } - eSignDownload(pamars).then(res=>{ - if(res.data.code === 0){ - wx.navigateTo({ - url: '/subpages/OCRCard/pages/deposit/deposit', - }) - } - }) - } + // if(this.data.info){ + // const pamars = { + // bizId:this.data.info.chooseRecId ||'', + // signType:1 + // } + // eSignDownload(pamars).then(res=>{ + // if(res.data.code === 0){ + // wx.navigateTo({ + // 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'), // }) // 线上签订合同跳转信息确认 - if(res.data.signType === 0){ + if(res.data.signType === 0 && res.data.contract){ app.globalData.userInfo.chooseRoomId = res.data.chooseRecId + console.log(res.data.contract,'链接》》》》'); wx.navigateTo({ url: '/pages/webView/webView?url=' + encodeURIComponent(res.data.contract), }) }else if(res.data.signType === 1){ // 线下签订 - wx.navigateTo({ - url: '/subpages/OCRCard/pages/deposit/deposit?chooseRoomId=' + res.data.chooseRecId, + wx.switchTab({ + url: '/pages/index/index', }) }else{ // 没有合同信息 diff --git a/subpages/index/checkOutConfirm/index/index.js b/subpages/index/checkOutConfirm/index/index.js index 42b9c9c..b69c905 100644 --- a/subpages/index/checkOutConfirm/index/index.js +++ b/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=>{ if(res.code === 200){ console.log(res); + wx.showToast({ + title: '办理成功', + duration:2000, + success:()=>{ + setTimeout(()=>{ + wx.switchTab({ + url: '/pages/index/index', + }) + },2000) + } + }) }else{ console.log(res); } diff --git a/subpages/index/checkOutConfirm/index/index.wxml b/subpages/index/checkOutConfirm/index/index.wxml index 6cb5174..37324f7 100644 --- a/subpages/index/checkOutConfirm/index/index.wxml +++ b/subpages/index/checkOutConfirm/index/index.wxml @@ -63,10 +63,10 @@ - + - + diff --git a/utils/request.js b/utils/request.js index d75003e..b21cef9 100644 --- a/utils/request.js +++ b/utils/request.js @@ -24,6 +24,7 @@ const request = function (url, options) { data: options.method === 'GET' ? options.data : JSON.stringify(options.data), header: header, success (response) { + console.log(header,'seeeeeee++++++++++++++++++++++++++++++++++++++'); if (response.statusCode === 200) { if(response.data.code===200){ resolve(response.data)