订单列表

parent 3a27604a
......@@ -36,6 +36,7 @@
</template>
<script setup>
import { debounce } from '@/utils/common';
const emits = defineEmits(['payment']);
const selectType = ref('TENPAY');
const show = ref(false);
......@@ -45,10 +46,10 @@ function radioChange(evt) {
selectType.value = value;
}
const toPay = () => {
const toPay = debounce(() => {
emits('payment', { selectType: selectType.value, orderNumber: orderNumber.value });
show.value = false;
};
});
const orderNumber = ref('');
const open = (e) => {
......
......@@ -376,6 +376,19 @@ const payNow = async (data) => {
dataList.value[changeIndex.value].orderNumber = outTradeNo;
pendingPaymentOrder.value = outTradeNo;
window.location.href = paymentUrl;
// 设置一个延时器
const start = Date.now();
setTimeout(() => {
const end = Date.now();
if (end - start < 1200) {
// 如果 iframe 加载时间小于 1.2 秒,说明应用没有安装
xma.showToast({
title: '未安装App',
icon: 'error',
});
// 这里可以跳转到应用下载页面
}
}, 1000);
};
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment