Merge branch 'sit-Carl' into sit-Leung

# Conflicts:
#	rc-busness/pages/personal/userpay.vue
This commit is contained in:
Vion
2022-01-27 09:52:47 +08:00
20 changed files with 426 additions and 131 deletions

View File

@@ -44,6 +44,7 @@
:class="activeIndex == index ? 'active' : ''"
v-if="(!disableAlipay || (disableAlipay && item.type!='alipay'))"
>
<div style="display:flex;">
<img :src="item.payimage" alt="" />
<span>{{ item.paytype }}支付</span>
@@ -53,6 +54,7 @@
</div>
</div>
<div class="payconfirm rc-padding-y--md" v-if="disableQrcode">
<span class="ts-standard-btn ts-standard-btn--two center" @click="goPayH5">
确认支付
@@ -74,6 +76,7 @@
<div class="line_dashed"></div>
<div class="userer">
<div class="qrcode">
<img src="/images/qrcode-wxgroup.jpg">
</div>
<p>微信扫一扫识别二维码</p>
@@ -106,6 +109,7 @@ export default {
activeIndex: 0,
paymentTimer:undefined,
isSucess: false,
dialogSuccess: false,
paytype: "微信",
userpaystype: [
@@ -114,11 +118,13 @@ export default {
payimage: require("../../assets/pay/wx.png"),
type:'wechat'
},
{
paytype: "支付宝",
payimage: require("../../assets/pay/zfb.png"),
type:'alipay'
},
],
dialogFail: false,
userPayData: {},
@@ -128,14 +134,13 @@ export default {
disableQrcode:false,
};
},
computed: {
},
created(){
},
mounted() {
let stype=this.$route.query.stype;
this.userPayData = JSON.parse(this.$route.query.userPayData);
this.defaultHandlePayment();
},
@@ -193,6 +198,12 @@ export default {
// path: "/personal/useraddress",
// });
},
async selectGoods(item, index) {
this.activeIndex = index;
this.paytype = item.paytype;
if (index == 1) {
//支付宝
let res = await generateOrderAlipay(this.userPayData.orderId);
async selectGoods(item, index) {
this.activeIndex = index;
this.paytype = item.paytype;
@@ -201,8 +212,10 @@ export default {
let res = await generateOrderAlipay(this.userPayData.orderId);
this.qrtext = '';
if (res.success) {
this.qrtext=res.data;
}
} else {
this.userPayData = JSON.parse(this.$route.query.userPayData);
this.qrtext=this.userPayData.wxPay
@@ -218,12 +231,14 @@ export default {
} else if (res.fail) {
this.dialogFail = true;
} else {
let _self = this;
this.paymentTimer = setTimeout(function(){
_self.payOrderWX()
},5000);
}
}
},
components: {
@@ -364,6 +379,7 @@ export default {
justify-content: left;
&.active {
border: none;
border-bottom: 4px solid #e2001a;
}
}