From 25f51ad53a0e47feced892bcf6135ea749d4ecbb Mon Sep 17 00:00:00 2001 From: kron Date: Wed, 31 Dec 2025 11:56:45 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=A8=E6=88=B7=E4=B8=AD=E5=BF=83=E9=80=BB?= =?UTF-8?q?=E8=BE=91=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/user.vue | 31 ++++++++++++++++++++++--------- src/store.js | 4 ++++ 2 files changed, 26 insertions(+), 9 deletions(-) diff --git a/src/pages/user.vue b/src/pages/user.vue index f91d008..a6539af 100644 --- a/src/pages/user.vue +++ b/src/pages/user.vue @@ -7,7 +7,7 @@ import Avatar from "@/components/Avatar.vue"; import useStore from "@/store"; import { storeToRefs } from "pinia"; const store = useStore(); -const { user, device } = storeToRefs(store); +const { user, device, online } = storeToRefs(store); const { updateUser } = store; const toOrderPage = () => { @@ -16,13 +16,20 @@ const toOrderPage = () => { }); }; -const toFristTryPage = () => { +const toFristTryPage = async () => { + if (!online.value) { + return uni.showToast({ + title: "智能弓未连接", + icon: "none", + }); + } if (!device.value.deviceId) { return uni.showToast({ title: "请先绑定设备", icon: "none", }); } + await uni.$checkAudio(); uni.navigateTo({ url: "/pages/first-try", }); @@ -75,9 +82,15 @@ onMounted(() => {