申请退换货页面及重构page.json
This commit is contained in:
@@ -1,30 +1,33 @@
|
||||
<template>
|
||||
<view>
|
||||
<oct-pay :price="price" :payNo="payNo" color="#34CE98" price-color="#e6576b" :payPlatform="platform"
|
||||
@onPay="pay" />
|
||||
<oct-pay :price="price" :coins="coins" :payNo="payNo" color="#34CE98" price-color="#e6576b"
|
||||
:payPlatform="platform" @onPay="pay" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
wxPAY,
|
||||
alPAY
|
||||
alPAY,
|
||||
dtPAY
|
||||
} from '@/apis/interfaces/pay'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
payNo: "",
|
||||
price: "",
|
||||
coins: "",
|
||||
platform: ['dtpay']
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.payNo = this.$Route.query.orderNo
|
||||
this.price = Number(this.$Route.query.price).toFixed(2)
|
||||
this.coins = this.$Route.query.coins
|
||||
},
|
||||
methods: {
|
||||
pay(e) {
|
||||
if (e.platform === 'dtpay') return this.getDTPAY(e.platform);
|
||||
pay(e) {
|
||||
if (e.platform === 'dtpay') return this.getDTPAY(e.platform);
|
||||
uni.getProvider({
|
||||
service: 'payment',
|
||||
success: res => {
|
||||
@@ -47,27 +50,59 @@
|
||||
}
|
||||
if (e.platform === 'wxpay') this.getWXPAY(e.platform)
|
||||
if (e.platform === 'alipay') this.getALPAY(e.platform)
|
||||
|
||||
}
|
||||
})
|
||||
},
|
||||
getDTPAY(){
|
||||
console.log('dt 支付。。。')
|
||||
uni.showModal({
|
||||
title:'当前DT积分不足',
|
||||
content:'不能支付该订单,是否放弃当前支付',
|
||||
confirmText:'立即充值',
|
||||
confirmColor:"#34CE98",
|
||||
cancelText:'放弃支付',
|
||||
cancelColor:"#666666",
|
||||
success: (res) => {
|
||||
if(res.confirm){
|
||||
|
||||
}else{
|
||||
uni.navigateBack();
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
getDTPAY() {
|
||||
console.log('dt 支付。。。')
|
||||
dtPAY(this.payNo).then(res => {
|
||||
console.log(res);
|
||||
// this.callPay(res, payType)
|
||||
if (res.state === 'warning') {
|
||||
uni.showModal({
|
||||
title: '当前DT积分不足',
|
||||
content: '不能支付该订单,是否放弃当前支付',
|
||||
confirmText: '立即充值',
|
||||
confirmColor: "#34CE98",
|
||||
cancelText: '放弃支付',
|
||||
cancelColor: "#666666",
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
this.$Router.push({
|
||||
name: "AccountRecharge"
|
||||
})
|
||||
} else {
|
||||
uni.navigateBack();
|
||||
}
|
||||
}
|
||||
})
|
||||
} else {
|
||||
uni.showModal({
|
||||
title: '支付成功',
|
||||
content: '该订单已支付成功',
|
||||
confirmText: '我的订单',
|
||||
confirmColor: "#34CE98",
|
||||
cancelText: '再逛逛',
|
||||
cancelColor: "#666666",
|
||||
success: (res) => {
|
||||
// if (res.confirm) {
|
||||
// this.$Router.push({
|
||||
// name: "AccountRecharge"
|
||||
// })
|
||||
// } else {
|
||||
// uni.navigateBack();
|
||||
// }
|
||||
}
|
||||
})
|
||||
}
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon: "none",
|
||||
mask: true,
|
||||
})
|
||||
})
|
||||
|
||||
},
|
||||
getALPAY(payType) {
|
||||
alPAY(this.payNo).then(res => {
|
||||
|
||||
Reference in New Issue
Block a user