调整支付

This commit is contained in:
ywyonui 2025-09-02 21:30:44 +08:00
parent 717f32cdf3
commit bbe816d9b9

View File

@ -48,7 +48,6 @@ import { jzXkCancelApi, jzXkFqJfjApi } from "@/api/base/xkApi";
import { useUserStore } from "@/store/modules/user";
import { useDataStore } from "@/store/modules/data";
import { useDebounce } from "@/utils/debounce";
import { PageUtils } from "@/utils/pageUtil";
const { getUser, setWsCallback } = useUserStore();
const { getQk } = useDataStore();
@ -208,17 +207,26 @@ const payNow = payDebounce(async () => {
const res = await jzXkFqJfjApi({
xsId: qk.value.xsId,
xkId: qk.value.xkId,
jffs: "线上缴费", // 线线
zfptLx: "四川农信", // TODO:
jzId: getUser.jzId,
userId: getUser.userId,
openId: getUser.openId,
});
if (res.resultCode === 1 && res.result) {
// 使 uni.openUrl plus.runtime.openUrl
const payUrl = res.result.cashierPayHtml;
const payUrl = res.result.payUrl || res.result.cashierPayHtml;
if (!payUrl) {
uni.showToast({
title: "未能获取到对应的支付链接",
icon: "error",
});
return;
}
openPaymentPage(payUrl);
} else {
uni.showToast({
title: "发起支付失败",
icon: "error",
});
goBack();
}
} catch (error: any) {
console.log(error);