From 23c568fa0eea27f8d479eb4dd61425cc6e920a70 Mon Sep 17 00:00:00 2001 From: XiaoXinPro 14 IAH5R <568170040@qq.com> Date: Mon, 13 Feb 2023 16:54:31 +0800 Subject: [PATCH] =?UTF-8?q?=E5=81=9C=E8=BD=A6=E6=A8=A1=E5=9D=97=E6=9B=B4?= =?UTF-8?q?=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.json | 2 + config/config.js | 4 + ext.json | 50 ++++----- index/passCar.js | 66 +++++++++++- index/passCar.wxml | 23 +++-- pages/coupon/detail/index.wxml | 3 +- pages/passCar/showDetail/showDetail.js | 125 +++++++++++++++++++++++ pages/passCar/showDetail/showDetail.json | 9 ++ pages/passCar/showDetail/showDetail.wxml | 43 ++++++++ pages/passCar/showDetail/showDetail.wxss | 8 ++ pages/passCar/showList/showList.js | 119 +++++++++++++++++++++ pages/passCar/showList/showList.json | 9 ++ pages/passCar/showList/showList.wxml | 14 +++ pages/passCar/showList/showList.wxss | 28 +++++ project.config.json | 2 +- 15 files changed, 470 insertions(+), 35 deletions(-) create mode 100644 pages/passCar/showDetail/showDetail.js create mode 100644 pages/passCar/showDetail/showDetail.json create mode 100644 pages/passCar/showDetail/showDetail.wxml create mode 100644 pages/passCar/showDetail/showDetail.wxss create mode 100644 pages/passCar/showList/showList.js create mode 100644 pages/passCar/showList/showList.json create mode 100644 pages/passCar/showList/showList.wxml create mode 100644 pages/passCar/showList/showList.wxss diff --git a/app.json b/app.json index c93061a..1e18c89 100644 --- a/app.json +++ b/app.json @@ -46,6 +46,8 @@ "pages/orderquanma/index", "pages/passCar/couponList/couponList", "pages/passCar/couponDetail/couponDetail", + "pages/passCar/showList/showList", + "pages/passCar/showDetail/showDetail", "pages/managelicenseplate/managelicenseplate", "pages/payrule/payrule", "pages/grade/grade", diff --git a/config/config.js b/config/config.js index 297d2ca..b90f37c 100755 --- a/config/config.js +++ b/config/config.js @@ -180,6 +180,10 @@ var config = { * 联合登录 */ carInit: "/car/init", + /** + * 停车支付订单列表 + */ + carPayOrderList: "/car/payOrderList", /** * 绑车牌 */ diff --git a/ext.json b/ext.json index 46be677..34dfe10 100644 --- a/ext.json +++ b/ext.json @@ -2,44 +2,35 @@ "ext": { "attr": { "car": { - "tjd": { - "payPath": "", - "tjdAppId": "wx6945d1bda68d7993" - }, "etcp": { - "payPath": "pages/pay/order-pay-open/main", - "etcpAppId": "wxc07f9d67923d676d", - "etcpCallbackUrl": "https://admin.malls.iformall.com/api/carCallback/etcpPaidCallback" - }, - "bolink": { - "payPath": "pages/park/park", - "bolinkAppId": "wxbd08b4baa10fcc1d" - }, - "version": "release" + "etcpAppId": "wx192b7d2e8dcbefd0", + "etcpVersion": "release", + "etcpCallbackUrl": "https://admintest.malls.iformall.com/api/carCallback/etcpPaidCallback" + } }, "mchId": "1604439800", "imgProxy": [ { - "newUrl": "https://c.malls.iformall.com/img", + "newUrl": "https://ctest.malls.iformall.com/img", "orgUrl": "https://iformall-net.formall.oss-accelerate.aliyuncs.com" }, { - "newUrl": "https://c.malls.iformall.com/img1", + "newUrl": "https://ctest.malls.iformall.com/img1", "orgUrl": "https://formall.oss-accelerate.aliyuncs.com" }, { - "newUrl": "https://c.malls.iformall.com/img2", + "newUrl": "https://ctest.malls.iformall.com/img2", "orgUrl": "https://wx.qlogo.cn" } ], - "configUrl": "https://c.malls.iformall.com/C/api", - "ifStoreApp": "0", + "configUrl": "https://ctest.malls.iformall.com/C/api", + "businessSwitch": "1", "ifHaveWebSocket": "0", - "ifHaveCarModular": "0" + "ifHaveCarModular": "1" }, - "name": "金茂悦茂邻荟", - "weappId": "wx7c9c7122a91946a7", - "appVersion": "C.5.1.1" + "name": "金泸商务", + "weappId": "wx649b3be73c1afe47", + "appVersion": "C.test.5.2.0" }, "debug": false, "tabBar": { @@ -75,7 +66,8 @@ "selectedIconPath": "assets/images/user-a.png" } ], - "custom": true + "color": "#abb1be", + "selectedColor": "#b2743d" }, "window": { "backgroundTextStyle": "dark", @@ -83,7 +75,17 @@ "navigationBarTitleText": "", "navigationBarBackgroundColor": "#FFFFFF" }, - "extAppid": "wx7c9c7122a91946a7", + "plugins": { + "auto-points-plugin": { + "version": "1.3.0", + "provider": "wxfab2bf944bfc4da6" + }, + "live-player-plugin": { + "version": "1.3.4", + "provider": "wx2b03c6e691cd7370" + } + }, + "extAppid": "wx649b3be73c1afe47", "extEnable": true, "permission": { "scope.userLocation": { diff --git a/index/passCar.js b/index/passCar.js index 3b186f0..227aa6a 100644 --- a/index/passCar.js +++ b/index/passCar.js @@ -54,6 +54,7 @@ Page({ generalPayPath: '', generalExtraData: {}, goHomeUrl: "", + supportPay: "" }, getMoreList(e) { let totalNum = this.data.ticketList.length; @@ -192,6 +193,33 @@ Page({ } }, + callPay(data) { + wx.requestPayment({ + timeStamp: data.timeStamp, + nonceStr: data.nonceStr, + package: data.package, + signType: data.signType ? data.signType : "MD5", + paySign: res.data.paySign, + success: res => { + wx.showLoading({ + title: '订单正在处理中...', + }) + this.showList() + }, + fail: res => { + wx.hideLoading(); + wx.showToast({ + title: '支付失败', + icon: 'error' + }) + /** + * 支付失败,需要更新订单的状态 + */ + }, + complete: res => { } + }); + }, + //停车费用为0 paySuccess: function () { wx.showModal({ @@ -201,6 +229,22 @@ Page({ }) }, + // supportPay等于1时 + goToPay() { + Http.post({ + url: '/car/createPayOrder', + data: { + carNumber: this.data.listCardNum, + carFee: String(this.data.stopFees.remainingFee * 100) + } + }).then(res => { + const data = res.data + this.callPay(data) + }).catch(err => { + + }) + }, + gotomange: function () { wx.navigateTo({ url: '/pages/managelicenseplate/managelicenseplate', @@ -236,6 +280,13 @@ Page({ url: '/pages/passCar/couponList/couponList', }) }, + + showList: function () { + wx.navigateTo({ + url: '/pages/passCar/showList/showList', + }) + }, + gotodetail: function (e) { wx.showModal({ title: '缴费规则', @@ -631,6 +682,15 @@ Page({ if (res.data.token) { app.globalData.etcpToken = res.data.token; } + if (res.data.supportPay && res.data.supportPay == 1) { + that.setData({ + supportPay: 1 + }) + } else { + that.setData({ + supportPay: 0 + }) + } /** * 获得停车费用 */ @@ -912,7 +972,8 @@ Page({ }, timecha: res.data.duration }); - } else { + } else { // *#06# + // var extraDataStr = { // params: { // token: app.globalData.etcpToken, @@ -934,8 +995,7 @@ Page({ generalAppId: res.data.appId, generalPayPath: res.data.payPath, generalExtraData: res.data.extraData, - extraDataFlag: JSON.stringify(res.data.extraData), - + extraDataFlag: JSON.stringify(res.data.extraData) }); console.log(that.data.extraDataFlag, "123456789") } diff --git a/index/passCar.wxml b/index/passCar.wxml index 50daf4a..e489fdf 100644 --- a/index/passCar.wxml +++ b/index/passCar.wxml @@ -60,28 +60,28 @@ 系统提示: --> - + 立即支付 立即支付 - + 立即支付 立即支付 - + 立即支付 立即支付 - + 立即支付 @@ -89,7 +89,7 @@ - + 立即支付 @@ -97,7 +97,10 @@ - 立即支付 + + 立即支付 + + @@ -109,6 +112,14 @@ 车辆入场后,才能绑车牌 + + + 我的支付订单 + + + + + 我的停车券 diff --git a/pages/coupon/detail/index.wxml b/pages/coupon/detail/index.wxml index fadc9ee..567328c 100644 --- a/pages/coupon/detail/index.wxml +++ b/pages/coupon/detail/index.wxml @@ -164,7 +164,8 @@ 首页 + {{priceAndStockObj.salePrice/100}}元马上购买 +