定义支付完成后跳转页面
parent
d17e3819d7
commit
ee5e791199
@ -0,0 +1,47 @@
|
||||
<template>
|
||||
<view>
|
||||
支付查询中...
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
ref
|
||||
} from 'vue'
|
||||
import {
|
||||
$image,
|
||||
$api,
|
||||
$response
|
||||
} from '@/api'
|
||||
import {
|
||||
onLoad
|
||||
} from '@dcloudio/uni-app'
|
||||
|
||||
let orderid=ref(0);
|
||||
const CheckPay = async () => {
|
||||
uni.showLoading()
|
||||
const response = await $api('CheckPay', {
|
||||
openid: localStorage.getItem('OPENID'),
|
||||
order_number: orderid.value,
|
||||
})
|
||||
uni.hideLoading()
|
||||
$response(response, () => {
|
||||
|
||||
})
|
||||
}
|
||||
onLoad((option) => {
|
||||
if(!!option.orderid){
|
||||
orderid.value=option.orderid
|
||||
CheckPay()
|
||||
}else{
|
||||
uni.showToast({
|
||||
title: '获取订单号失败',
|
||||
icon:"none"
|
||||
});
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
Loading…
Reference in New Issue