测试扫码

This commit is contained in:
weiwei committed 2025-03-20 12:31:37 +08:00
1 parent 36d52e26cd
commit 5f61e563ab
2 files changed
+8 -31

No files matched your search

+1 -1
View File
@@ -3,7 +3,7 @@
<head>
<meta charset="UTF-8" />
<script src="https://dapp.tmuyun.com/oss-static/app/jcommind.js"></script>
<script src="https://g.alicdn.com/gdt/jsapi/1.9.43/index.js"></script>
<!-- <script src="https://g.alicdn.com/gdt/jsapi/1.9.43/index.js"></script> -->
<script>
var coverSupport =
"CSS" in window && typeof CSS.supports === "function" && (CSS.supports("top: env(a)") || CSS.supports("top: constant(a)"))
+7 -30
View File
@@ -4,7 +4,7 @@ import { onShow } from "@dcloudio/uni-app"
import { hooks, router } from "@@/index"
import { merchantApi } from "@@/api"
import { filePath } from "@@/utils/file"
// import dd from "gdt-jsapi"
import dd from "gdt-jsapi"
const state = reactive<any>({
pa: {
@@ -35,7 +35,6 @@ const toDetail = async (v: any) => {
// 测试扫扫
const doScanCode = async () => {
console.log("ssss")
try {
const res = await dd.scan({ type: "all" })
console.log(res)
@@ -51,35 +50,13 @@ const doScanCode = async () => {
}
console.log("eee")
const res11 = await window.dd.scan({ type: "all" })
console.log(res11)
uni.showToast({
title: JSON.stringify(res11),
icon: "none",
})
// const res11 = await window.dd.scan({ type: "all" })
// console.log(res11)
// uni.showToast({
// title: JSON.stringify(res11),
// icon: "none",
// })
}
// 测试扫扫
// dd.ready(async function () {
// dd.confirm({
// message: "2022年亚运会在哪里举办",
// title: "提问",
// buttonLabels: ["杭州", "上海"],
// })
// .then((res) => {
// console.log(res)
// })
// .catch((err) => {
// console.error(err)
// })
// const res = await dd.scan({ type: "all" })
// console.log(res)
// uni.showToast({
// title: JSON.stringify(res),
// icon: "none",
// })
// })
</script>
<template>