退款退货流程页面

This commit is contained in:
2022-06-11 11:06:05 +08:00
parent 74064e17ce
commit f0285c99aa
33 changed files with 9262 additions and 2219 deletions

View File

@@ -6,6 +6,7 @@
</template>
<script>
import eventBus from '../../utils/eventBus.js';
import {
wxPAY,
alPAY,
@@ -17,18 +18,23 @@
payNo: "",
price: "",
coins: "",
platform: ['dtpay']
platform: ['dtpay'],
oepnType: '',
}
},
mounted() {
this.payNo = this.$Route.query.orderNo
this.price = Number(this.$Route.query.price).toFixed(2)
this.coins = this.$Route.query.coins
if (this.$Route.query.oepnType === 'order') {
console.log('order....');
this.oepnType = this.$Route.query.oepnType
}
},
methods: {
pay(e) {
if (e.platform === 'dtpay') return this.getDTPAY(e.platform);
uni.getProvider({
uni.getProvider({
service: 'payment',
success: res => {
if (res.provider.findIndex(val => val === e.platform) < 0) {
@@ -42,7 +48,7 @@
case 'alipay':
uni.showToast({
title: '支付失败,您暂未安装支付宝',
icon: 'none'
icon: 'none'
})
break;
}
@@ -77,23 +83,43 @@
}
})
} else {
uni.showModal({
title: '支付成功',
content: '该订单已支付成功',
confirmText: '我的订单',
confirmColor: "#34CE98",
cancelText: '再逛逛',
cancelColor: "#666666",
success: (res) => {
// if (res.confirm) {
// this.$Router.push({
// name: "AccountRecharge"
// })
// } else {
// uni.navigateBack();
// }
}
})
if (this.oepnType === 'order') {
uni.showModal({
title: '支付成功',
content: '该订单已支付成功',
confirmText: ' 返回订单',
confirmColor: "#34CE98",
showCancel: false,
success: (res) => {
if (res.confirm) {
this.$Router.back();
eventBus.$emit('paySuccess', this.payNo);
}
}
})
} else {
uni.showModal({
title: '支付成功',
content: '该订单已支付成功',
confirmText: '我的订单',
confirmColor: "#34CE98",
cancelText: '再逛逛',
cancelColor: "#666666",
success: (res) => {
if (res.confirm) {
this.$Router.push({
name: "Order",
params: {
index: 0
},
})
} else {
uni.navigateBack();
}
}
})
}
}
}).catch(err => {
uni.showToast({