测试支付

This commit is contained in:
weiwei committed 2025-03-20 17:19:38 +08:00
1 parent 6fcbd00d73
commit b1f0b230e3
2 files changed
+5 -2

No files matched your search

+1
View File
@@ -134,5 +134,6 @@ const handlePay = () => {
return
}
uni.showToast({ title: "支付中。。。", icon: "none" })
usePayStore().payData = ""
}
</script>
+4 -2
View File
@@ -48,6 +48,7 @@ import { filePath } from "@@/utils/file"
import { hooks, router, constant } from "@@/index"
import { userApi } from "@@/api"
import isDevEnv from "@/sheep/utils/isDevEnv"
import { usePayStore } from "@/sheep/stores/pay"
// import dd from "gdt-jsapi"
interface MenuItem {
@@ -178,14 +179,15 @@ const doLogout = async () => {
const doScanCode = async () => {
console.log("ssss")
try {
const res: any = await dd.scan({ type: "all" })
const res: any = await (window as any).dd.scan({ type: "all" })
console.log(res)
uni.showToast({
title: res,
icon: "none",
})
router.jump("/pages/pay/scanPay", { query: { data: JSON.stringify(res) } })
usePayStore().setPayData(JSON.stringify(res))
router.jump("/pages/pay/scanPay")
} catch (error: any) {
uni.showToast({
title: error,