From e0025a5c468864c4053c0f4566df19d589654877 Mon Sep 17 00:00:00 2001 From: Wik-T <812952667@qq.com> Date: Tue, 7 Jun 2022 17:51:10 +0800 Subject: [PATCH] =?UTF-8?q?1.=E6=96=B0=E5=A2=9E=E8=AF=9D=E8=B4=B9=E5=85=85?= =?UTF-8?q?=E5=80=BC=E7=A7=AF=E5=88=86=E6=8A=B5=E6=89=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- high-unionPay/Utils/Api.js | 26 +- .../components/cj-slider/cj-slider.vue | 372 +++++++ high-unionPay/pages.json | 49 +- .../goods/refuel-details/refuel-details.vue | 151 +-- high-unionPay/pages/tabBar/user/user.vue | 10 +- .../Phone-recharge-details.vue | 107 ++ .../recharge-centre/recharge-centre.vue | 109 +- .../unionPay/recharge-pay/recharge-pay.vue | 413 ++++++++ .../unionComfirmation/unionComfirmation.vue | 964 ++++++++++++++++++ .../unionorder-des/unionorder-des.vue | 917 +++++++++-------- high-unionPay/static/img/cz1.jpg | Bin 0 -> 18886 bytes high-unionPay/static/img/cz2.jpg | Bin 0 -> 16267 bytes high-unionPay/static/img/cz3.jpg | Bin 0 -> 17061 bytes high-unionPay/static/img/phone.png | Bin 0 -> 8718 bytes .../unionPay-orderList/unionPay-orderList.vue | 886 ++++++++-------- high-unionPay/uni.scss | 4 + 16 files changed, 3009 insertions(+), 999 deletions(-) create mode 100644 high-unionPay/components/cj-slider/cj-slider.vue create mode 100644 high-unionPay/pages/unionPay/Phone-recharge-details/Phone-recharge-details.vue create mode 100644 high-unionPay/pages/unionPay/recharge-pay/recharge-pay.vue create mode 100644 high-unionPay/pages/unionPay/unionComfirmation/unionComfirmation.vue create mode 100644 high-unionPay/static/img/cz1.jpg create mode 100644 high-unionPay/static/img/cz2.jpg create mode 100644 high-unionPay/static/img/cz3.jpg create mode 100644 high-unionPay/static/img/phone.png diff --git a/high-unionPay/Utils/Api.js b/high-unionPay/Utils/Api.js index b7d35ca..1a4dbd9 100644 --- a/high-unionPay/Utils/Api.js +++ b/high-unionPay/Utils/Api.js @@ -135,6 +135,10 @@ export const getStoreListByMerchant = params => { export const getDiscountByQrCode = params => { return POST('GET', `${base}/discount/getDiscountByQrCode`, params).then(res => res.data); } +//查询话费优惠券 +export const getUserOrderPreList = params => { + return POST('GET', `${base}/userDiscount/getUserExclusiveDiscount`, params).then(res => res.data); +} //领取优惠券 export const receiveDiscount = params => { return POST('POST', `${base}/userDiscount/receiveDiscount`, params).then(res => res.data); @@ -176,8 +180,8 @@ export const getDictionaryByCodeTypeOl = params => { return POST('GET', `${base}/common/getDictionaryByCodeTypeOl`, params).then(res => res.data); } //团油计算价格 -export const oilPriceCompute = params => { - return POST('GET', `${base}/highGas/oilPriceCompute`, params).then(res => res.data); +export const oilPriceDiscountCompute = params => { + return POST('GET', `${base}/highGas/oilPriceDiscountCompute`, params).then(res => res.data); } //查询卡数据字典 @@ -204,7 +208,15 @@ export const addOrderPay = params => { //话费充值查询 export const getListOutRechargePrice = params => { - return POST('GET', `${base}/outRechargePrice/getListOutRechargePrice`, params).then(res => res.data); + return POST('GET', `${base}/outRechargePrice/getRechargePriceByList`, params).then(res => res.data); +} +//查询充值话费详情 +export const getPhoneOrderById = params => { + return POST('GET', `${base}/outRechargeOrder/getOrderById`, params).then(res => res.data); +} +// 取消话费订单 +export const cancelRechargeOrder = params => { + return POST('GET', `${base}/outRechargeOrder/cancelOrder`, params).then(res => res.data); } //提交订单 export const orderToUNionPay = params => { @@ -215,8 +227,12 @@ export const unionPay = params => { return POST('POST', `${base}/order/unionPay`, params).then(res => res.data); } // 银联话费充值 -export const orderToUnionPayphone = params => { - return POST('POST', `${base}/outRechargeOrder/orderToUnionPay`, params).then(res => res.data); +export const orderToUnionPay = params => { + return POST('POST', `${base}/czOrder/orderToUnionPay`, params).then(res => res.data); +} +//查询话费详情 +export const findById = params => { + return POST('GET', `${base}/outRechargePrice/findById`, params).then(res => res.data); } //银联查询详情接口 export const paygetOrderById = params => { diff --git a/high-unionPay/components/cj-slider/cj-slider.vue b/high-unionPay/components/cj-slider/cj-slider.vue new file mode 100644 index 0000000..e0b13f6 --- /dev/null +++ b/high-unionPay/components/cj-slider/cj-slider.vue @@ -0,0 +1,372 @@ + + + + + diff --git a/high-unionPay/pages.json b/high-unionPay/pages.json index eab6709..aca8524 100644 --- a/high-unionPay/pages.json +++ b/high-unionPay/pages.json @@ -636,11 +636,14 @@ "path": "pages/unionPay/unionorder-des/unionorder-des", "style": { "navigationBarTitleText": "充值详情", - "enablePullDownRefresh": false, + "navigationBarBackgroundColor": "#0083f5", + "backgroundColorTop": "#0083f5", + "backgroundColorBottom": "#ffffff", "app-plus": { "titleNView": false //禁用原生导航栏 } - } + } + }, { "path": "pages/tabBar/order/stagesUrl/stagesUrl", @@ -656,7 +659,43 @@ } } } - ], + ,{ + "path" : "pages/unionPay/unionComfirmation/unionComfirmation", + "style" : + { + "navigationBarTitleText": "话费确认", + "enablePullDownRefresh": false, + "app-plus": { + "titleNView": false //禁用原生导航栏 + } + } + + } + ,{ + "path" : "pages/unionPay/Phone-recharge-details/Phone-recharge-details", + "style" : + { + "navigationBarTitleText": "支付成功", + "enablePullDownRefresh": false, + "app-plus": { + "titleNView": false //禁用原生导航栏 + } + } + + } + ,{ + "path" : "pages/unionPay/recharge-pay/recharge-pay", + "style" : + { + "navigationBarTitleText": "", + "enablePullDownRefresh": false, + "app-plus": { + "titleNView": false //禁用原生导航栏 + } + } + + } + ], "subpackages": [{ "root": "subPages", "pages": [{ @@ -690,12 +729,10 @@ }, { "path": "unionPay-orderList/unionPay-orderList", "style": { - "enablePullDownRefresh": false, "navigationBarTitleText": "话费订单", - "backgroundTextStyle": "light", "navigationBarBackgroundColor": "#0083f5", "backgroundColorTop": "#0083f5", - "navigationBarTextStyle": "white", + "backgroundColorBottom": "#ffffff", "app-plus": { "titleNView": false //禁用原生导航栏 } diff --git a/high-unionPay/pages/goods/refuel-details/refuel-details.vue b/high-unionPay/pages/goods/refuel-details/refuel-details.vue index 50b5e13..d1ed5ef 100644 --- a/high-unionPay/pages/goods/refuel-details/refuel-details.vue +++ b/high-unionPay/pages/goods/refuel-details/refuel-details.vue @@ -66,25 +66,29 @@ + @input="Listeningfocus" /> - 约{{litre}}L + 约{{oilLiters}}L - - - - 加油升数: {{litre}}L - 平台折扣: 0.95折 - - - 平台优惠: 11.7 - 加油补贴: ¥0.44 - - - 每升优惠: 11.7 - 本次优惠: ¥0.95 - + + + + 加油升数: {{oilLiters}}L + 平台折扣: {{discount}}折 + + + 平台优惠: ¥{{pricePreferences}} + + 加油补贴: ¥{{oilSubsidy}} + + + + 每升优惠: ¥{{litersPreferences}} + + 本次优惠: ¥{{totalPreferences}} + + 话费充值 - + + @@ -143,7 +145,8 @@ headerPosition: "fixed", textnum: '', textSend: '', - therrNum: '', + therrNum: '', + rechargeOrderNum:'', //话费待支付 headerTop: null, statusTop: null, showHeader: true, @@ -296,7 +299,8 @@ this.user = res.return_data; this.textnum = res.return_data.unusedCouponNum; this.textSend = res.return_data.unusedDiscount; - this.therrNum = res.return_data.unpaid; + this.therrNum = res.return_data.unpaid; + this.rechargeOrderNum = res.return_data.rechargeOrderNum; uni.setStorage({ key: "user", data: res.return_data diff --git a/high-unionPay/pages/unionPay/Phone-recharge-details/Phone-recharge-details.vue b/high-unionPay/pages/unionPay/Phone-recharge-details/Phone-recharge-details.vue new file mode 100644 index 0000000..ba7de36 --- /dev/null +++ b/high-unionPay/pages/unionPay/Phone-recharge-details/Phone-recharge-details.vue @@ -0,0 +1,107 @@ + + + + + diff --git a/high-unionPay/pages/unionPay/recharge-centre/recharge-centre.vue b/high-unionPay/pages/unionPay/recharge-centre/recharge-centre.vue index f7b3140..d83693a 100644 --- a/high-unionPay/pages/unionPay/recharge-centre/recharge-centre.vue +++ b/high-unionPay/pages/unionPay/recharge-centre/recharge-centre.vue @@ -3,7 +3,8 @@ - + @@ -17,10 +18,10 @@ 选择金额 - - {{item.price}}元 - {{item.discount}} 折 + + {{item.rechargePrice}}元 + {{item.payPrice}}元 已售空 @@ -116,8 +117,7 @@ let app = getApp(); import { getListOutRechargePrice, - addOrderPay, - orderToUnionPayphone + addOrderPay } from '../../../Utils/Api.js'; import QSTabs from '../../../components/QS-tabs/QS-tabs.vue'; export default { @@ -171,8 +171,8 @@ }, methods: { select(amoutinfos) { - this.inputAmount = amoutinfos.realPrice; - this.orderPrice = amoutinfos.price; + this.inputAmount = amoutinfos.payPrice; + this.orderPrice = amoutinfos.rechargePrice; this.inputAmountId = amoutinfos.id; this.amoutstatus = amoutinfos.status; }, @@ -198,9 +198,9 @@ title: '加载中...' }) let params = { - type: item, + operatorType: item, regionId: app.globalData.cityId, - showType: 3, + platformId: 3, rechargeType: this.swiperCurrent } getListOutRechargePrice(params).then(res => { @@ -216,8 +216,9 @@ /** * 提交订单 */ - addOrderPay() { - if (this.amoutstatus == 2) { + addOrderPay() { + let that = this; + if (that.amoutstatus == 2) { uni.showToast({ title: '当前面值已售空', duration: 2000, @@ -225,92 +226,42 @@ }); return; } - if (this.inputPhone == '') { + if (that.inputPhone == '') { uni.showToast({ title: '请输入充值号码', icon: "none" }); return; } - if (this.inputPhone.length != 11) { + if (that.inputPhone.length != 11) { uni.showToast({ title: '请输入正确充值号码', icon: "none" }); return; } - if (this.inputAmount == '') { + if (that.inputAmount == '') { uni.showToast({ title: '请选择价格', icon: "none" }); - return false; - } - let params = { - "orderPrice": this.orderPrice, - "payPrice": this.inputAmount, - "rechargeContent": this.inputPhone, - "rechargeModel": this.amoutType, - "agentKey": this.codesVlues, - "objectId": this.inputAmountId, - } - uni.showLoading({ - title: '加载中...' - }) - addOrderPay(params).then(res => { - uni.hideLoading() - if (res.return_code == '000000') { - this.orderToUnionPayphone(res.return_data.id); - - } else { - uni.showToast({ - title: res.return_msg, - icon: "none" - }) - } - }) - }, - //获取订单信息 - orderToUnionPayphone(item) { - let params = { - "orderId": item + return; } - orderToUnionPayphone(params).then(res => { - if (res.return_code == '000000') { - this.uniontopay(res.return_data.prepayid); - } else { - uni.showToast({ - title: res.return_msg, - icon: 'none' + uni.showToast({ + title: '提交订单...', + icon: 'none', + duration: 2000, + success() { + uni.navigateTo({ + url: '../unionComfirmation/unionComfirmation?orderPrice=' + that.orderPrice + + '&payPrice=' + that.inputAmount + '&rechargeContent=' + that.inputPhone + + '&rechargeModel=' + that.amoutType + + '&objectId=' + that.inputAmountId + '&rechargeType=' + that.swiperCurrent }) } }) - }, - //银联支付 - uniontopay(item) { - let that = this; - upsdk.pluginReady(function() { - upsdk.pay({ - tn: item, - success: function(res) { - uni.showToast({ - title: '支付成功' - }) - uni.reLaunch({ - url: '/pages/tabBar/user/user' - }); - }, - fail: function(err) { - uni.showToast({ - title: err.msg, - icon: 'none', - duration: 2000 - }) - // 支付失败, err.msg 是失败原因描述, 比如TN号不合法, 或者用户取消了交易 等等。 - } - }); - }); - }, + + } } } diff --git a/high-unionPay/pages/unionPay/recharge-pay/recharge-pay.vue b/high-unionPay/pages/unionPay/recharge-pay/recharge-pay.vue new file mode 100644 index 0000000..f36bc6e --- /dev/null +++ b/high-unionPay/pages/unionPay/recharge-pay/recharge-pay.vue @@ -0,0 +1,413 @@ + + + + + diff --git a/high-unionPay/pages/unionPay/unionComfirmation/unionComfirmation.vue b/high-unionPay/pages/unionPay/unionComfirmation/unionComfirmation.vue new file mode 100644 index 0000000..6ecfcfe --- /dev/null +++ b/high-unionPay/pages/unionPay/unionComfirmation/unionComfirmation.vue @@ -0,0 +1,964 @@ + + + + + diff --git a/high-unionPay/pages/unionPay/unionorder-des/unionorder-des.vue b/high-unionPay/pages/unionPay/unionorder-des/unionorder-des.vue index 0c6614d..14f8859 100644 --- a/high-unionPay/pages/unionPay/unionorder-des/unionorder-des.vue +++ b/high-unionPay/pages/unionPay/unionorder-des/unionorder-des.vue @@ -1,467 +1,504 @@ -