This commit is contained in:
2021-10-18 10:05:26 +08:00
parent 4854c04fb7
commit c2f108a77b
7 changed files with 1458 additions and 2259 deletions

View File

@@ -189,36 +189,53 @@
}
}
apiUrl(data).then(res => {
let payInfo = JSON.parse(res)
console.log(payInfo, 'timeStamp...')
if (this.selectTypeId === '2') {
let payInfo = JSON.parse(res)
if (payInfo.timestamp) {
// app 支付未完。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。
uni.requestPayment({
provider: "wxpay",
orderInfo: JSON.stringify(payInfo),
success: res => {
this.$refs.uToast.show({
title: '支付成功',
type: 'primary',
duration: 3000
})
setTimeout(() => {
this.canPay = true
uni.reLaunch({
url: '/pages/property/coupon/payStatus?success=true'
})
}, 3000);
},
fail: (err) => {
// uni.requestPayment({
// provider: "wxpay",
// orderInfo: JSON.stringify(payInfo),
// success: res => {
// this.$refs.uToast.show({
// title: '支付成功',
// type: 'primary',
// duration: 3000
// })
// setTimeout(() => {
// this.canPay = true
// uni.reLaunch({
// url: '/pages/property/coupon/payStatus?success=true'
// })
// }, 3000);
// },
// fail: (err) => {
// this.canPay = true
// this.$refs.uToast.show({
// title: '支付失败',
// type: 'primary',
// duration: 3000
// })
// setTimeout(() => {
// this.canPay = true
// uni.reLaunch({
// url: '/pages/property/coupon/payStatus?success=false'
// })
// }, 3000);
// }
// })
this.$refs.uToast.show({
title: '支付失败',
type: 'primary',
duration: 3000
})
uni.showModal({
title: '温馨提醒',
content: '微信支付当前暂未开通,无法支付。',
success(res) {
this.canPay = true
this.$refs.uToast.show({
title: '支付失败',
type: 'primary',
duration: 3000
})
setTimeout(() => {
this.canPay = true
uni.reLaunch({
@@ -227,11 +244,10 @@
}, 3000);
}
})
// app 支付未完。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。
} else {
this.$refs.uToast.show({
title: '创建订单成功',
@@ -246,6 +262,7 @@
}, 3000);
}
} else {
console.log(res)
this.$refs.uToast.show({
title: res,
type: 'primary',

View File

@@ -4,7 +4,7 @@
<view style="position: relative;z-index: 3;">
<!-- 搜索... -->
<view class="mine-top-contant">
<u-navbar :background="background" title="企业优惠券中心" title-color="#fff"
<u-navbar :background="background" back-icon-color = '#fff' title="企业优惠券中心" title-color="#fff"
:border-bottom='false'>
</u-navbar>
<!--banner-->