定义支付完成后跳转页面

wenjuan
yanzai 1 year ago
parent d17e3819d7
commit ee5e791199

@ -16,7 +16,7 @@ class XCXApiController extends Controller
public static $appid = "13a159e438a742dd932c9bddbfaa41e5";//appid
public static $signType = "OPENAPI-SHA256-RSA2048";//签名认证类型
public static $baseUrl = "https://xdfe-api.hnxdfe.com/hisminitest";
public static $pay_notify_url = "https://www.xxxxxxxx.com";//支付完成后小程序跳转H5路径
public static $pay_notify_url = "https://www.xxxxxxxx.com/h5/#/pages/main/order/CheckPay";//支付完成后小程序跳转H5路径
public static function Api($url_code)
{

@ -79,6 +79,14 @@
"navigationBarBackgroundColor": "#D8EDF2",
"navigationBarTextStyle": "black"
}
},
{
"path" : "pages/main/order/CheckPay",
"style" :
{
"navigationBarTitleText" : "",
"enablePullDownRefresh" : false
}
}
],
"globalStyle": {

@ -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…
Cancel
Save