diff --git a/src/pages/tabbar/home.vue b/src/pages/tabbar/home.vue index e1463db..9003264 100644 --- a/src/pages/tabbar/home.vue +++ b/src/pages/tabbar/home.vue @@ -34,6 +34,8 @@ const toDetail = async (v: any) => { // 测试扫扫 const doScanCode = async () => { + console.log("ssss") + try { const res = await dd.scan({ type: "all" }) console.log(res) @@ -42,13 +44,14 @@ const doScanCode = async () => { icon: "none", }) } catch (error) { - console.log("error", error) uni.showToast({ title: JSON.stringify(error), icon: "none", }) } - const res11 = window.dd.scan({ type: "all" }) + console.log("eee") + + const res11 = await window.dd.scan({ type: "all" }) console.log(res11) uni.showToast({ title: JSON.stringify(res11), @@ -57,34 +60,29 @@ const doScanCode = async () => { } // 测试扫扫 -dd.ready(async function () { - dd.confirm({ - message: "2022年亚运会在哪里举办", - title: "提问", - buttonLabels: ["杭州", "上海"], - }) - .then((res) => { - console.log(res) - }) - .catch((err) => { - console.error(err) - }) +// 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", - }) -}) +// const res = await dd.scan({ type: "all" }) +// console.log(res) +// uni.showToast({ +// title: JSON.stringify(res), +// icon: "none", +// }) +// })