调整购物商品兑换,节点中心调整,权证转让管理增加筛选,调整交易市场

This commit is contained in:
唐明明
2021-11-11 16:40:19 +08:00
parent d3ca6422a0
commit 8dec48f748
9 changed files with 1144 additions and 997 deletions

View File

@@ -73,8 +73,7 @@
<scroll-view scroll-y="true" style="height: 1000rpx;" class="scrollView">
<view class="coupon-title">可用优惠券列表</view>
<view class="coupon-list-item" v-for="(item,index) in list" :key="index" v-if="list.length>0">
<u-icon v-if="coupon_grant_id!== item.coupon_grant_id" name="checkmark-circle" color="#cacaca"
size="50">
<u-icon v-if="coupon_grant_id !== item.coupon_grant_id" name="checkmark-circle" color="#cacaca" size="50">
</u-icon>
<u-icon v-else name="checkmark-circle-fill" color="#8b64fd" size="50"></u-icon>
<couponTemplate style="flex: 1;" :item="{...item}" :showUse='false' />
@@ -168,7 +167,6 @@
},
// 触发支付
nowPay() {
this.canPay = false
let apiUrl = ''
let data = {}
if (this.selectTypeId === '2') {
@@ -183,13 +181,26 @@
order_no: this.order_no,
type: 'app'
}
} else {
apiUrl = ebPay
data = {
order_no: this.order_no
}
}
apiUrl(data).then(res => {
// 不需要支付
console.log(res.canPay)
if(!res.canPay){
uni.showModal({
title : '提示',
content : '商品兑换成功',
showCancel : false,
success () {
uni.reLaunch({
url: '/pages/goods/payStatus?success=true'
})
}
})
return
}
// 微信支付
if (this.selectTypeId === '2') {
let payInfo = JSON.parse(res)
@@ -200,7 +211,6 @@
uni.reLaunch({
url: '/pages/goods/payStatus?success=true'
})
this.canPay = true
},
fail: (err) => {
uni.showToast({
@@ -220,7 +230,6 @@
uni.reLaunch({
url: '/pages/goods/payStatus?success=true'
})
this.canPay = true
},
fail: (err) => {
uni.showToast({
@@ -235,13 +244,9 @@
}).catch(err => {
uni.showToast({
title: err.message,
duration: 3000,
mask: true,
icon: 'none'
})
setTimeout(res => {
this.canPay = true
}, 2000)
})
},
@@ -249,10 +254,8 @@
selectCoupon(item) {
if (this.coupon_grant_id === item.coupon_grant_id) {
this.coupon_grant_id = ''
// this.coupon_price = ''
} else {
this.coupon_grant_id = item.coupon_grant_id
// this.coupon_price = item.price
}
this.mallBuyGoods(this.params, 'get')
this.showCouponList = false