待支付订单支付
This commit is contained in:
@@ -32,7 +32,8 @@
|
||||
</div>
|
||||
|
||||
<div class="pay-button-container">
|
||||
<van-button block type="primary" round class="pay-button" @click="onCreatePayOrder">确认支付</van-button>
|
||||
<van-button v-if="query.order_id" block type="primary" round class="pay-button" @click="onContinuePayOrder">确认支付</van-button>
|
||||
<van-button v-else block type="primary" round class="pay-button" @click="onCreatePayOrder">确认支付</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -52,12 +53,14 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onContinuePayOrder(){
|
||||
this.onPayment({ id: this.query.order_id })
|
||||
},
|
||||
async onCreatePayOrder(){
|
||||
// 创建日行一善支付订单
|
||||
if(this.query.goods_type == '1'){
|
||||
const request = {
|
||||
...this.query,
|
||||
|
||||
}
|
||||
const order = await createFriendlyDayOrder(request)
|
||||
this.onPayment(order)
|
||||
@@ -99,7 +102,6 @@ export default {
|
||||
|
||||
},
|
||||
async onPayment(order){
|
||||
console.log(order)
|
||||
const result = await createPay(order.id);
|
||||
const payResult = await requestPayment(result)
|
||||
await this.$router.push({
|
||||
|
||||
Reference in New Issue
Block a user