From 1a1a7897f5a5b8b7d7094b131ada96359827c244 Mon Sep 17 00:00:00 2001 From: weiwei Date: Thu, 20 Mar 2025 11:13:28 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E6=89=AB=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 43 +++++++++++++++++++-------------------- src/pages/tabbar/home.vue | 24 ++++++++++++++++++++++ src/pages/tabbar/my.vue | 24 ---------------------- 3 files changed, 45 insertions(+), 46 deletions(-) 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