diff --git a/index.html b/index.html index f4e1ded..43c0d16 100644 --- a/index.html +++ b/index.html @@ -1,25 +1,24 @@ - - - - - - - - - -
- - + + + + + + + + + + +
+ + diff --git a/src/pages/tabbar/home.vue b/src/pages/tabbar/home.vue index d6b3c3f..658789d 100644 --- a/src/pages/tabbar/home.vue +++ b/src/pages/tabbar/home.vue @@ -5,6 +5,7 @@ import { onLoad, onShow } from "@dcloudio/uni-app" import { hooks, router } from "@@/index" import { merchantApi } from "@@/api" import { filePath } from "@@/utils/file" +// import dd from "gdt-jsapi" const state = reactive({ pa: { @@ -32,9 +33,32 @@ const toDetail = async (v: any) => { router.jump("/pages/merchant/detail", { id: v.id }) } } + +// 扫扫扫 +const doScanCode = async () => { + try { + const res = await dd.scan({ type: "all" }) + console.log(res) + uni.showToast({ + title: JSON.stringify(res), + icon: "none", + }) + } catch (error) { + console.log("error", error) + uni.showToast({ + title: JSON.stringify(error), + icon: "none", + }) + } +} @@ -53,7 +48,6 @@ import { filePath } from "@@/utils/file" import { hooks, router, constant } from "@@/index" import { userApi } from "@@/api" import isDevEnv from "@/sheep/utils/isDevEnv" -import dd from "gdt-jsapi" interface MenuItem { text: string @@ -194,24 +188,6 @@ const onTabMenu = async (v: MenuItem, i: number) => { } } -// 扫扫扫 -const doScanCode = async () => { - try { - const res = await dd.scan({ type: "all" }) - console.log(res) - uni.showToast({ - title: JSON.stringify(res), - icon: "none", - }) - } catch (error) { - console.log("error", error) - uni.showToast({ - title: JSON.stringify(error), - icon: "none", - }) - } -} - const getStorageUserInfo = () => { const tokenKey = constant.storageConstant.TOKEN const userInfoKey = constant.storageConstant.USERINFO