From eededf481df44e926c3576028ed1bcc0532508ba Mon Sep 17 00:00:00 2001
From: Wik-T <812952667@qq.com>
Date: Tue, 25 Oct 2022 14:11:32 +0800
Subject: [PATCH] =?UTF-8?q?1.=E4=BF=AE=E6=94=B92.0=20=E8=AE=A2=E5=8D=95?=
=?UTF-8?q?=E4=B8=8B=E5=8D=95=E5=AF=B9=E6=8E=A5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
App.vue | 2 +-
Utils/Api.js | 30 +-
Utils/Request.js | 3 +-
.../rec-confirmation/rec-confirmation.vue | 159 +++++----
pages/goods/refuel-confirm/refuel-confirm.vue | 337 ++++++++++--------
pages/goods/refuel-succes/refuel-succes.vue | 34 +-
pages/order/confirmation.vue | 321 +++++++++++------
pages/user/deposit/deposit.vue | 32 +-
pages/user/news/news.vue | 6 +-
pages/user/order_details/order_details.vue | 133 ++++---
pages/user/order_list/order_list.vue | 152 ++++----
qianzhu-KFC/confirmOrder/confirmOrder.vue | 129 ++++---
qianzhu-KFC/order-details/order-details.vue | 37 +-
qianzhu-KFC/payment-method/payment-method.vue | 17 +-
static/img/user/kefu.png | Bin 0 -> 4959 bytes
static/img/user/notive.png | Bin 0 -> 3471 bytes
static/img/user/order.png | Bin 0 -> 1661 bytes
.../unionComfirmation/unionComfirmation.vue | 4 +-
18 files changed, 819 insertions(+), 577 deletions(-)
create mode 100644 static/img/user/kefu.png
create mode 100644 static/img/user/notive.png
create mode 100644 static/img/user/order.png
diff --git a/App.vue b/App.vue
index 659a93a..748b045 100644
--- a/App.vue
+++ b/App.vue
@@ -15,7 +15,7 @@
//测试
url: 'https://hsgcs.dctpay.com/crest',
v1url: 'https://hsgcs.dctpay.com/v1',
- orderurl:' https://hsgcs.dctpay.com/order',
+ orderurl:'https://hsgcs.dctpay.com/order',
brestUrl: 'https://hsgcs.dctpay.com/brest',
imgUrl: 'https://hsgcs.dctpay.com/filesystem/',
imageWxImg: 'https://hsgcs.dctpay.com/filesystem/wxApplets/',
diff --git a/Utils/Api.js b/Utils/Api.js
index c6ba27a..868959b 100644
--- a/Utils/Api.js
+++ b/Utils/Api.js
@@ -149,10 +149,7 @@ export const cancelOrder = params => {
export const getOrderById = params => {
return POST('GET', `${base}/highOrder/getOrderById`, params).then(res => res.data);
}
-//已完成未查看
-export const orderCheck = params => {
- return POST('GET', `${base}/highOrder/orderCheck`, params).then(res => res.data);
-}
+
//获取商户列表
export const getMerchantList = params => {
@@ -248,7 +245,12 @@ export const oilPriceDiscountCompute = params => {
//在线加油优惠券
export const canUseDiscount = params => {
return POST('POST', `${base}/userDiscount/canUseDiscount`, params).then(res => res.data);
-}
+}
+//在线加油详情
+export const getOrderByOrderNo = params => {
+ return POST('GET', `${base}/gasOrder/getOrderByOrderNo`, params).then(res => res.data);
+}
+
//查询卡数据字典
export const getDictionaryByCodeType = params => {
return POST('GET', `${base}/common/getDictionaryByCodeType`, params).then(res => res.data);
@@ -391,8 +393,8 @@ export const listByStoreCode = params => {
return POST('GET', `${base}/highThirdParty/listByStoreCode`, params).then(res => res.data);
}
//肯德基订单详情
-export const getThirdOrderByOrderId = params => {
- return POST('GET', `${base}/highThirdParty/getThirdOrderByOrderId`, params).then(res => res.data);
+export const getThirdOrderByOrderNo = params => {
+ return POST('GET', `${base}/highThirdParty/getThirdOrderByOrderNo`, params).then(res => res.data);
}
//肯德基,星巴克取消订单
export const thirdCancelOrder = params => {
@@ -648,3 +650,17 @@ export const getDetailByOrderNo = params => {
export const cancel = params => {
return POST('POST', `${orderbase}/cancel`, params).then(res => res.data);
}
+//微信支付
+export const wechatPay = params => {
+ return POST('POST', `${orderbase}/orderPay/wechatPay`, params).then(res => res.data);
+}
+//工会卡、油卡
+export const cardPay = params => {
+ return POST('POST', `${orderbase}/orderPay/cardPay`, params).then(res => res.data);
+}
+
+//已完成未查看
+export const orderCheck = params => {
+ return POST('GET', `${orderbase}/highOrder/orderCheck`, params).then(res => res.data);
+}
+
diff --git a/Utils/Request.js b/Utils/Request.js
index f61d2d1..c7c4b7c 100644
--- a/Utils/Request.js
+++ b/Utils/Request.js
@@ -71,7 +71,8 @@ function request(method, url, data) {
// #endif
}
},
- fail(err) {
+ fail(err) {
+ console.log('======='+JSON.stringify(err))
uni.showToast({
title: '网络异常',
icon: 'none',
diff --git a/member-Recharge/rec-confirmation/rec-confirmation.vue b/member-Recharge/rec-confirmation/rec-confirmation.vue
index 7ff891b..5088eea 100644
--- a/member-Recharge/rec-confirmation/rec-confirmation.vue
+++ b/member-Recharge/rec-confirmation/rec-confirmation.vue
@@ -72,26 +72,26 @@
¥{{priceValue[1] / 100}}
-
-
-
-
-
- 下单返积分
-
-
- 返{{rebateIntegral}}积分
-
-
- {{rebateIntegral}}
-
-
-
-
- 积分抵扣与优惠券抵扣不同享
-
+
+
+
+
+
+ 下单返积分
+
+
+ 返{{rebateIntegral}}积分
+
+
+ {{rebateIntegral}}
+
+
+
+
+ 积分抵扣与优惠券抵扣不同享
+
@@ -127,7 +127,7 @@
合计: ¥{{payPrice}}
-
+
去支付
@@ -167,14 +167,14 @@
import ssPaymentPassword from '@/components/sanshui-payment-password/index.vue';
import wybPopup from '../../components/wyb-popup/wyb-popup.vue';
import {
- xbkaddOrder,
+ create,
getThirdPartyByDetail,
getHuiLianTongCardBalance,
findUser,
- qianzhuorderToPayByWx,
- czhltUnionCardPay,
+ wechatPay,
+ cardPay,
getUserOrderPreList,
- thirdCancelOrder,
+ thirdCancelOrder,
getRebateIntegral
} from '../../Utils/Api.js';
// #ifdef H5
@@ -215,9 +215,9 @@
OrderPreList: [], //优惠券数据
imageUrl: app.globalData.imgUrl, //图片地址
orderPrice: 0, //订单价格
- rechargeDes: '', // 支付详情
- rebateIntegral: '' ,//返回积分
- Integrastu:1 //返积分状态
+ rechargeDes: '', // 支付详情
+ rebateIntegral: '', //返回积分
+ Integrastu: 1 //返积分状态
}
},
onLoad(options) {
@@ -271,7 +271,7 @@
this.user = res.return_data;
this.getHuiLianTongCardBalance();
this.getThirdPartyByDetail();
- this.getUserOrderPreList();
+ this.getUserOrderPreList();
this.getRebateIntegral();
uni.setStorage({
key: "user",
@@ -279,24 +279,24 @@
})
}
});
- },
- //支付返利积分
- getRebateIntegral() {
- let datas = {
- "companyId": app.globalData.companyId,
- "price": this.payPrice,
- "productId": 3,
- "type": 4,
- }
- getRebateIntegral(datas).then(res => {
- if (res.return_code == '000000') {
- this.rebateIntegral = res.return_data;
- this.Integrastu = 1;
- }else{
- this.rebateIntegral = res.return_msg;
- this.Integrastu = 2;
- }
- })
+ },
+ //支付返利积分
+ getRebateIntegral() {
+ let datas = {
+ "companyId": app.globalData.companyId,
+ "price": this.payPrice,
+ "productId": 3,
+ "type": 4,
+ }
+ getRebateIntegral(datas).then(res => {
+ if (res.return_code == '000000') {
+ this.rebateIntegral = res.return_data;
+ this.Integrastu = 1;
+ } else {
+ this.rebateIntegral = res.return_msg;
+ this.Integrastu = 2;
+ }
+ })
},
//查询工会卡详情
getHuiLianTongCardBalance() {
@@ -340,7 +340,7 @@
this.paytype = '';
} else {
this.isUse = true;
- }
+ }
this.getRebateIntegral();
},
//获取选择支付方式
@@ -362,7 +362,7 @@
}
},
//下单
- qzaddorder() {
+ create() {
if (this.customerMobile == '') {
uni.showToast({
title: '请输入充值手机号',
@@ -394,26 +394,30 @@
title: '提交订单中...'
})
let datas = {
- "customerMobile": this.customerMobile,
- "regionId": app.globalData.cityId,
- "productType": 3,
- "platformId": this.showType,
- "password": this.PaymentPassword,
- "integralNum": this.priceValue[1],
+ "childOrderList": [{
+ "goodsId": this.goodId,
+ "customerMobile": this.customerMobile,
+ "platformId": this.showType,
+ "productType": this.productType,
+ "goodsType": 10,
+ "saleCount": 1,
+ }],
+ "payGold": this.priceValue[1],
+ "companyId": app.globalData.companyId,
+ // "promoteCode": this.identificationCode,
"memDiscountId": this.memDiscountId,
- "goodsId": this.goodId
}
- xbkaddOrder(datas).then(res => {
+ create(datas).then(res => {
uni.hideLoading();
if (res.return_code == '000000') {
- this.orderId = res.return_data.id;
+ this.orderId = res.return_data.orderNo;
let params = {
- "orderId": res.return_data.id,
+ "orderNo": res.return_data.orderNo,
"openId": app.globalData.openId,
"openIdType": this.showType
}
- this.qianzhuorderToPayByWx(params);
+ this.wechatPay(params);
} else {
uni.showToast({
title: res.return_msg,
@@ -503,9 +507,9 @@
.toFixed(2));
} else {
this.payPrice = Math.abs(parseFloat(this.orderPrice - (parseFloat(this.priceValue[1] / 100).toFixed(
- 2)) - this
+ 2)) - this
.deductionPrice).toFixed(2));
- }
+ }
this.getRebateIntegral();
},
rechangeload() {
@@ -518,10 +522,10 @@
this.$nextTick(() => (this.isDiscount = true))
},
//获取订单数据
- qianzhuorderToPayByWx(item) {
+ wechatPay(item) {
let that = this;
if (that.paytype == '2') {
- qianzhuorderToPayByWx(item).then(res => {
+ wechatPay(item).then(res => {
if (res.return_code == '000000') {
// #ifdef MP
uni.showLoading({
@@ -633,20 +637,25 @@
}
if (this.payPrice == 0) {
let datas = {
- "customerMobile": this.customerMobile,
- "regionId": app.globalData.cityId,
- "productType": 3,
- "platformId": this.showType,
- "password": this.PaymentPassword,
- "integralNum": this.priceValue[1],
+ "childOrderList": [{
+ "goodsId": this.goodId,
+ "customerMobile": this.customerMobile,
+ "platformId": this.showType,
+ "productType": 3,
+ "goodsType": 10,
+ "saleCount": 1,
+ }],
+ "payGold": this.priceValue[1],
+ "companyId": app.globalData.companyId,
+ // "promoteCode": this.identificationCode,
"memDiscountId": this.memDiscountId,
- "goodsId": this.goodId
+ "payPwd": this.PaymentPassword
}
- xbkaddOrder(datas).then(res => {
+ create(datas).then(res => {
uni.hideLoading();
if (res.return_code == '000000') {
- this.orderId = res.return_data.id;
+ this.orderId = res.return_data.orderNo;
uni.reLaunch({
url: '/qianzhu-KFC/order-details/order-details?id=' + this.orderId
})
@@ -668,11 +677,11 @@
return;
}
let params = {
- "orderId": this.orderId,
+ "orderNo": this.orderId,
"cardNo": this.user.hltCardNo.cardNo,
"password": this.PaymentPassword
}
- czhltUnionCardPay(params).then(res => {
+ cardPay(params).then(res => {
uni.hideLoading();
if (res.return_code == '000000') {
uni.showToast({
diff --git a/pages/goods/refuel-confirm/refuel-confirm.vue b/pages/goods/refuel-confirm/refuel-confirm.vue
index 35b1b2c..3249677 100644
--- a/pages/goods/refuel-confirm/refuel-confirm.vue
+++ b/pages/goods/refuel-confirm/refuel-confirm.vue
@@ -134,47 +134,47 @@
v-if="Integrastu == 2">
{{rebateIntegral}}
-
-
-
- 积分抵扣与优惠券抵扣不同享
+
+
+
+ 积分抵扣与优惠券抵扣不同享
支付方式:
-
+
-
-
+
+
微信支付
-
+
-
-
+
+
油卡支付余额: {{oilPirce}}元
-
+
-
+
重要说明
@@ -188,7 +188,7 @@
合计: ¥{{payPrice}}
-
+
@@ -228,7 +228,7 @@