From d2f6efbd3fb7ca93c073ad986f360f5ba589b6d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E6=AF=85?= <1335909236@qq.com> Date: Wed, 17 Sep 2025 08:49:18 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9E=E7=8E=B0=E5=BA=95=E9=83=A8=E5=AF=BC?= =?UTF-8?q?=E8=88=AA=E6=A0=8F=E4=B8=AD=E7=9A=84=E6=89=AB=E4=B8=80=E6=89=AB?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/nav/nav.vue | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/components/nav/nav.vue b/components/nav/nav.vue index a716b4a3..5b41cce1 100644 --- a/components/nav/nav.vue +++ b/components/nav/nav.vue @@ -161,6 +161,25 @@ export default { jump(e) { const url = e.currentTarget.dataset.url; + const index = e.currentTarget.dataset.idx; + const item = this.navList[index]; + + // 检查是否为扫码功能 + if (item.isScan) { + // 调用uni-app的扫码API + uni.scanCode({ + success: (res) => { + // 扫码成功后的处理逻辑 + console.log('扫码结果:', res.result); + // 可以根据实际需求对扫码结果进行处理 + }, + fail: (err) => { + console.log('扫码失败:', err); + } + }); + return; + } + // 检查url是否存在且不为空 if (!url || url.trim() === '') { this.NotOpen();