From a912fc29287fd328ef86c57aa13ba7ab0254b329 Mon Sep 17 00:00:00 2001 From: mk <2403457699@qq.com> Date: Mon, 9 Jun 2025 11:05:03 +0800 Subject: [PATCH] =?UTF-8?q?webview=E9=A1=B5=E9=9D=A2=E5=AE=8C=E5=96=84=20?= =?UTF-8?q?=E7=AD=BE=E8=AE=A2=E5=90=88=E5=90=8C=E5=AE=8C=E6=88=90=E5=90=8E?= =?UTF-8?q?=E5=81=9A=E5=88=A4=E6=96=AD=E7=AD=BE=E8=AE=A2=E5=AE=8C=E6=88=90?= =?UTF-8?q?=E8=B7=B3=E8=BD=AC=E6=94=AF=E4=BB=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/index.js | 6 ++-- api/user.js | 2 +- pages/mine/mine.wxml | 4 +-- pages/webView/webView.js | 2 +- project.private.config.json | 20 ++++++------- subpages/OCRCard/pages/deposit/deposit.js | 5 ++++ subpages/OCRCard/pages/deposit/deposit.wxml | 4 +-- subpages/index/checkInUser/checkInUser.js | 27 ++++++++++++++---- subpages/index/checkInWait/checkInWait.js | 28 ++++++++++++++++--- .../index/checkOutConfirm/index/index.wxml | 5 ++-- .../index/checkOutConfirm/index/index.wxss | 6 ++-- subpages/index/policy/index/index.js | 4 +-- utils/request.js | 3 +- 13 files changed, 77 insertions(+), 39 deletions(-) diff --git a/api/index.js b/api/index.js index ea0f229..17c2d56 100644 --- a/api/index.js +++ b/api/index.js @@ -32,5 +32,7 @@ export function evaluateInfo(id) { export function selectMzGraduateInfo(pamars) { return fly.get(`/bysmp/user/selectMzGraduateInfo`,pamars) } - - +//下载已签署文件 +export function eSignDownload(pamars) { + return fly.get(`/eSign/download/${pamars.bizId}`,{signType:pamars.signType}) +} diff --git a/api/user.js b/api/user.js index b01e7f7..9f391b0 100644 --- a/api/user.js +++ b/api/user.js @@ -6,7 +6,7 @@ export function bindPhone(code) { return fly.put(`/bysmp/user/bindPhone?code=${code}`) } export function bindIdCard(query) { - return fly.put(`/bysmp/user/bindIdCard?name=${query.name}&icCard=${query.idCard}`,) + return fly.put(`/bysmp/user/bindIdCard?name=${query.name}&idCard=${query.idCard}`,) } export function getUserInfo() { return fly.get(`/bysmp/user/wxUserInfo`) diff --git a/pages/mine/mine.wxml b/pages/mine/mine.wxml index fb8cde8..7ef92c3 100644 --- a/pages/mine/mine.wxml +++ b/pages/mine/mine.wxml @@ -63,12 +63,12 @@ 资源管理 - 本月用水:12m³ + 本月用水:-- | - 本月用电:28kw-h + 本月用电:-- diff --git a/pages/webView/webView.js b/pages/webView/webView.js index b2695f8..4057525 100644 --- a/pages/webView/webView.js +++ b/pages/webView/webView.js @@ -14,7 +14,7 @@ Page({ onLoad(options) { if(options.url){ this.setData({ - url:options.url + url:decodeURIComponent(options.url) }) } }, diff --git a/project.private.config.json b/project.private.config.json index 8e92420..3078476 100644 --- a/project.private.config.json +++ b/project.private.config.json @@ -1,5 +1,5 @@ { - "libVersion": "2.33.0", + "libVersion": "3.7.12", "projectname": "epmet-apartment-mp", "setting": { "urlCheck": false, @@ -15,12 +15,19 @@ "miniprogram": { "list": [ { - "name": "确认信息", - "pathName": "subpages/index/checkInUser/checkInUser", + "name": "支付", + "pathName": "subpages/OCRCard/pages/deposit/deposit", "query": "", "scene": null, "launchMode": "default" }, + { + "name": "确认信息", + "pathName": "subpages/index/checkInUser/checkInUser", + "query": "", + "launchMode": "default", + "scene": null + }, { "name": "新增评价", "pathName": "subpages/mine/evaluate/evaluate", @@ -77,13 +84,6 @@ "launchMode": "default", "scene": null }, - { - "name": "subpages/OCRCard/pages/deposit/deposit", - "pathName": "subpages/OCRCard/pages/deposit/deposit", - "query": "", - "launchMode": "default", - "scene": null - }, { "name": "subpages/index/policy/detail/detail", "pathName": "subpages/index/policy/detail/detail", diff --git a/subpages/OCRCard/pages/deposit/deposit.js b/subpages/OCRCard/pages/deposit/deposit.js index 611db4f..2667b56 100644 --- a/subpages/OCRCard/pages/deposit/deposit.js +++ b/subpages/OCRCard/pages/deposit/deposit.js @@ -68,5 +68,10 @@ Page({ */ onShareAppMessage() { + }, + toCheckInRecord(){ + wx.navigateTo({ + url: '/subpages/mine/checkInRecord/checkInRecord', + }) } }) \ No newline at end of file diff --git a/subpages/OCRCard/pages/deposit/deposit.wxml b/subpages/OCRCard/pages/deposit/deposit.wxml index d8a536e..cc4e0d7 100644 --- a/subpages/OCRCard/pages/deposit/deposit.wxml +++ b/subpages/OCRCard/pages/deposit/deposit.wxml @@ -30,7 +30,7 @@ 您尚未完成支付,请尽快前往 “我的-入住记录”完成支付。 - + 前往支付 @@ -46,8 +46,6 @@ - - diff --git a/subpages/index/checkInUser/checkInUser.js b/subpages/index/checkInUser/checkInUser.js index 9afed06..bbe55fe 100644 --- a/subpages/index/checkInUser/checkInUser.js +++ b/subpages/index/checkInUser/checkInUser.js @@ -1,6 +1,6 @@ // subpages/index/checkInUser/checkInUser.js import {bindIdCard} from "../../../api/user" -import {selectMzGraduateInfo} from "../../../api/index" +import {selectMzGraduateInfo,eSignDownload} from "../../../api/index" Page({ @@ -33,14 +33,29 @@ Page({ onReady() { }, - + onRouteDone(e){ + console.log(e); + }, /** * 生命周期函数--监听页面显示 */ 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', + }) + } + }) + } }, - + /** * 生命周期函数--监听页面隐藏 */ @@ -81,8 +96,8 @@ Page({ this.bindIdCard() if(res.data.signType === 0){ //线上支付去跳转签合同 - wx.navigateTo({ - url: '/pages/webView/webView', + wx.navigateTo({ + url: '/pages/webView/webView?url=' + encodeURIComponent(res.data.contract), }) }else if(res.data.signType === 1){ // 线下签订去支付 diff --git a/subpages/index/checkInWait/checkInWait.js b/subpages/index/checkInWait/checkInWait.js index 936fba1..ca29d71 100644 --- a/subpages/index/checkInWait/checkInWait.js +++ b/subpages/index/checkInWait/checkInWait.js @@ -1,12 +1,13 @@ // subpages/index/checkInWait/checkInWait.js -import {selectMzGraduateInfo} from "../../../api/index" +import {selectMzGraduateInfo,eSignDownload} from "../../../api/index" Page({ /** * 页面的初始数据 */ data: { - idCard:'' + idCard:'', + info:{} }, /** @@ -26,12 +27,25 @@ Page({ onReady() { }, + /** * 生命周期函数--监听页面显示 */ 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', + }) + } + }) + } }, /** @@ -72,10 +86,16 @@ Page({ submit(){ selectMzGraduateInfo({idCard:this.data.idCard}).then(res=>{ if(res.code === 200){ + this.setData({ + info:res.data + }) + // wx.navigateTo({ + // url: '/pages/webView/webView?url=' + encodeURIComponent('https://smlh5.esign.cn/mesign/guide?context=oajSUuKZG1&flowId=8004dd72e83e419d8a56fff4b32fd0d6&organ=false&appId=7439066638&linkSource=1&bizType=1&tsign_source_type=SIGN_LINK_XUANYUAN&tsign_source_detail=16R2mv%2F27h2Y5CkM9bwhboJgEfaR5q9nLW1M2TKOt%2FsnmaDbpS23d%2FYDkRZo47IgfpkLUByBPb9sP4eZvvz00wnj4Wshq%2B%2F3XgAN8xrJ7u%2BLr1f%2Fc9JAccKV839CDqMhELJXjp6kV5WYnH3Fvcm6wfNCwqHwSeMCsqO7xbinP4ECLnKbmG3FrVaZVUrg7ts7YVLxKBBH1KjdwnkF3Ehl9WC%2FTmIpV6JsVoMiZndgN3cLmTYyn8XR6DqEucQGh3hZD\res.data.contract'), + // }) // 线上签订合同跳转信息确认 if(res.data.signType === 0){ wx.navigateTo({ - url: '/pages/webView/webView?url=' + res.data.contract, + url: '/pages/webView/webView?url=' + encodeURIComponent(res.data.contract), }) }else if(res.data.signType === 1){ // 线下签订 diff --git a/subpages/index/checkOutConfirm/index/index.wxml b/subpages/index/checkOutConfirm/index/index.wxml index 87aea03..6cb5174 100644 --- a/subpages/index/checkOutConfirm/index/index.wxml +++ b/subpages/index/checkOutConfirm/index/index.wxml @@ -1,11 +1,10 @@ - + - + 退房确认 - diff --git a/subpages/index/checkOutConfirm/index/index.wxss b/subpages/index/checkOutConfirm/index/index.wxss index c44f147..952f087 100644 --- a/subpages/index/checkOutConfirm/index/index.wxss +++ b/subpages/index/checkOutConfirm/index/index.wxss @@ -13,15 +13,14 @@ .navigation { - width: 100%; display: flex; align-items: center; - justify-content: space-between; color: #333333; font-size: 32rpx; z-index: 100; position: fixed; - margin-top: 20rpx; + left: 50%; + transform: translateX(-60rpx); } .back { width: 30rpx; @@ -30,6 +29,7 @@ margin-top: 20rpx; border-radius: 0rpx; z-index: 101; + position: fixed; } .info { background: #ffffff; diff --git a/subpages/index/policy/index/index.js b/subpages/index/policy/index/index.js index 13dd37b..e0388b9 100644 --- a/subpages/index/policy/index/index.js +++ b/subpages/index/policy/index/index.js @@ -14,7 +14,7 @@ Page({ active: 0, policyList:[], pageNo: 1, - pageSize: 5, + pageSize: 6, loadingStatus:true }, @@ -29,7 +29,7 @@ Page({ title:'加载中...' }) const res = await getPolicyList({ - pageNo: this.data.pageNo, + pageNum: this.data.pageNo, pageSize: this.data.pageSize, dictCode:this.data.active }); diff --git a/utils/request.js b/utils/request.js index 4f9ca61..d75003e 100644 --- a/utils/request.js +++ b/utils/request.js @@ -24,7 +24,6 @@ const request = function (url, options) { data: options.method === 'GET' ? options.data : JSON.stringify(options.data), header: header, success (response) { - console.log(response); if (response.statusCode === 200) { if(response.data.code===200){ resolve(response.data) @@ -45,7 +44,7 @@ const request = function (url, options) { }) reject(response.data) } - } else { + } else if(response.statusCode !== 404){ wx.showToast({ title: '网络问题,请稍后再试。', icon: 'none',