From da1cca7a665322c8adea69bebacf2079e6f9ab4c Mon Sep 17 00:00:00 2001
From: yangsanTT <812952667@qq.com>
Date: Tue, 31 Aug 2021 23:21:41 +0800
Subject: [PATCH] =?UTF-8?q?1.=E5=AF=B9=E6=8E=A5=E5=B7=A5=E4=BC=9A=E5=8D=A1?=
=?UTF-8?q?=E6=94=AF=E4=BB=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages.json | 46 ++++---
pages/order/confirmation.vue | 133 ++++++++++++++++----
pages/pay/payment/payment.vue | 140 ++++++++++++++++++---
pages/tabBar/user/user.vue | 10 +-
pages/user/bindingCard/bindingCard.vue | 4 +
pages/user/order_details/order_details.vue | 3 +
pages/user/unionCard/unionCard.vue | 49 ++++++--
7 files changed, 313 insertions(+), 72 deletions(-)
diff --git a/pages.json b/pages.json
index 3525afd..9c9184f 100644
--- a/pages.json
+++ b/pages.json
@@ -1,17 +1,6 @@
{
"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
{
- "path" : "pages/user/bindingCardList/bindingCardList",
- "style" :
- {
- "navigationBarTitleText": "卡列表",
- "navigationBarBackgroundColor": "#0083f5",
- "backgroundColorTop": "#0083f5",
- "navigationBarTextStyle": "white",
- "enablePullDownRefresh": false
- }
-
- },{
"path": "pages/tabBar/home/home",
"style": {
"navigationBarTextStyle": "white",
@@ -30,6 +19,17 @@
}
}
},{
+ "path" : "pages/user/bindingCardList/bindingCardList",
+ "style" :
+ {
+ "navigationBarTitleText": "卡列表",
+ "navigationBarBackgroundColor": "#0083f5",
+ "backgroundColorTop": "#0083f5",
+ "navigationBarTextStyle": "white",
+ "enablePullDownRefresh": false
+ }
+
+ },{
"path": "pages/login/login",
"style": {
"navigationBarBackgroundColor": "#0083f5",
@@ -289,26 +289,32 @@
}, {
"path": "pages/user/deposit/deposit",
"style": {
- "navigationBarBackgroundColor": "#ffffff",
+ "enablePullDownRefresh": false,
"navigationBarTitleText": "充值",
- "backgroundColorTop": "#ffffff",
- "backgroundColorBottom": "#ffffff"
+ "backgroundTextStyle": "light",
+ "navigationBarBackgroundColor": "#0083f5",
+ "backgroundColorTop": "#0083f5",
+ "navigationBarTextStyle": "white"
}
}, {
"path": "pages/pay/payment/payment",
"style": {
- "navigationBarBackgroundColor": "#ffffff",
+ "enablePullDownRefresh": false,
"navigationBarTitleText": "订单支付",
- "backgroundColorTop": "#ffffff",
- "backgroundColorBottom": "#ffffff"
+ "backgroundTextStyle": "light",
+ "navigationBarBackgroundColor": "#0083f5",
+ "backgroundColorTop": "#0083f5",
+ "navigationBarTextStyle": "white"
}
}, {
"path": "pages/pay/success/success",
"style": {
- "navigationBarBackgroundColor": "#ffffff",
+ "enablePullDownRefresh": false,
"navigationBarTitleText": "支付成功",
- "backgroundColorTop": "#ffffff",
- "backgroundColorBottom": "#ffffff"
+ "backgroundTextStyle": "light",
+ "navigationBarBackgroundColor": "#0083f5",
+ "backgroundColorTop": "#0083f5",
+ "navigationBarTextStyle": "white"
}
},
{
diff --git a/pages/order/confirmation.vue b/pages/order/confirmation.vue
index 794895b..6d9ff0a 100644
--- a/pages/order/confirmation.vue
+++ b/pages/order/confirmation.vue
@@ -10,16 +10,14 @@
¥{{couponList.discountPrice}}
-
+
{{couponList.discountPrice*100}}
¥{{couponList.salesPrice}}
-
+
{{couponList.salesPrice*100}}
x1
@@ -35,8 +33,7 @@
¥{{couponList.discountPrice}}
-
+
{{couponList.discountPrice*100}}
@@ -98,13 +95,13 @@
-
+
- 工会卡支付可用余额:
+ 工会卡支付可用余额: {{tongCardPrice}}元
-
+
@@ -125,8 +122,7 @@
实付:¥{{paytheprice}}
-
+
{{paytheprice*100}}
@@ -171,7 +167,9 @@
bindUserPhone,
orderToPay,
orderToGoldPay,
- findUser
+ findUser,
+ hltUnionCardPay,
+ getHuiLianTongCardBalance
} from '../../Utils/Api.js';
import wybPopup from '../../components/wyb-popup/wyb-popup.vue';
import ssPaymentPassword from '../../components/sanshui-payment-password'
@@ -206,18 +204,29 @@
PaymentPassword: '',
isture: true,
orderId: '',
- jumpType:''
+ jumpType: '',
+ tongCardPrice: 0,
+ balanceCardNo : ''
+
};
},
onLoad(option) {
this.couponId = option.id;
this.getCouponById();
- this.getUserNormalDiscountList();
},
onShow() {
- this.user = app.globalData.userInfo;
- this.findUser();
+ let that =this;
+ that.paytype = '';
+ that.user = app.globalData.userInfo;
+ that.findUser();
+ uni.getStorage({
+ key: 'balanceCardNo',
+ success(e) {
+ that.balanceCardNo = e.data;
+ that.getHuiLianTongCardBalance();
+ }
+ })
},
onHide() {
@@ -254,7 +263,7 @@
if (res.return_code == '000000') {
app.globalData.userInfo = res.return_data;
this.user = res.return_data;
- uni.setStorage({
+ uni.setStorage({
key: "user",
data: res.return_data
})
@@ -329,6 +338,19 @@
}
})
},
+ //查询工会卡余额
+ //查询详情
+ getHuiLianTongCardBalance() {
+ let params = {
+ cardNo: this.balanceCardNo
+ }
+ getHuiLianTongCardBalance(params).then(res => {
+ if (res.return_code == '000000') {
+ this.tongCardPrice = res.return_data.balance;
+ }
+
+ });
+ },
// H5获取手机号
jumpH5Bding() {
uni.navigateTo({
@@ -400,7 +422,24 @@
}
})
},
-
+ //获取选择支付方式
+ changeRiado() {
+ if (!this.user.isSetHltCard) {
+ uni.showToast({
+ icon: 'none',
+ title: '当前账号还未绑定,前往绑定',
+ duration: 2000,
+ success() {
+ setTimeout(() => {
+ uni.navigateTo({
+ url: '../user/bindingCard/bindingCard'
+ })
+ }, 1000)
+ }
+ });
+ return;
+ }
+ },
//获取订单数据
orderToPay(item) {
let that = this;
@@ -453,7 +492,7 @@
}
})
} else if (that.paytype == 'jinbi') {
- if(!that.user.isSetPayPwd){
+ if (!that.user.isSetPayPwd) {
uni.navigateTo({
url: '../login/updatePas/updatePas'
})
@@ -461,6 +500,24 @@
}
that.isture = false;
that.$refs.paymentPassword.modalFun('show');
+ } else if (that.paytype == 'gonghuika') {
+ if (!that.user.isSetHltCard) {
+ uni.showToast({
+ icon: 'none',
+ title: '当前账号还未绑定,前往绑定',
+ duration: 2000,
+ success() {
+ setTimeout(() => {
+ uni.navigateTo({
+ url: '../user/bindingCard/bindingCard'
+ })
+ }, 1000)
+ }
+ });
+ return;
+ }
+ that.isture = false;
+ that.$refs.paymentPassword.modalFun('show');
} else {
uni.showToast({
title: '请选择支付方式',
@@ -475,18 +532,49 @@
uni.showLoading({
title: '支付中...'
})
+ if (this.paytype == 'jinbi') {
+ let params = {
+ "orderId": this.orderId,
+ "password": this.PaymentPassword
+ }
+ orderToGoldPay(params).then(res => {
+ uni.hideLoading();
+ if (res.return_code == '000000') {
+ uni.showToast({
+ title: '支付成功'
+ })
+ uni.reLaunch({
+ url: '../pay/success/success?id=' + this.couponId
+ });
+ return;
+ }
+ if (res.return_code == '102130') {
+ uni.navigateTo({
+ url: '../../login/updatePas/updatePas'
+ })
+ return;
+ }
+ uni.showToast({
+ title: res.return_msg,
+ icon: 'none'
+ })
+ })
+ return;
+ }
+
let params = {
"orderId": this.orderId,
+ "cardNo": this.balanceCardNo,
"password": this.PaymentPassword
}
- orderToGoldPay(params).then(res => {
+ hltUnionCardPay(params).then(res => {
uni.hideLoading();
if (res.return_code == '000000') {
uni.showToast({
title: '支付成功'
})
uni.reLaunch({
- url:'../pay/success/success?id=' + this.couponId
+ url: '../pay/success/success?id=' + this.couponId
});
return;
}
@@ -500,8 +588,9 @@
title: res.return_msg,
icon: 'none'
})
-
})
+
+
},
payRequest: function(self) {
uni.showLoading({
diff --git a/pages/pay/payment/payment.vue b/pages/pay/payment/payment.vue
index 7140894..ae1038f 100644
--- a/pages/pay/payment/payment.vue
+++ b/pages/pay/payment/payment.vue
@@ -6,8 +6,8 @@
订单金额:
{{amount}} 元
- {{amount*100}} 个积分 (当前积分:{{user.gold}})
- {{amount}}元(当前积分:{{user.gold}})
+ {{amount*100}} 个积分
+ {{amount}}元
@@ -25,12 +25,25 @@
- 积分支付
+ 积分支付(积分:{{user.gold}})
+
+
+
+
+
+
+ 工会卡支付(余额:{{tongCardPrice}}元)
+
+
+
+
+
@@ -61,7 +74,9 @@