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(() => {
-
+
-
+
+
{{ user.nickName }}
@@ -141,17 +154,17 @@ onMounted(() => {
:onClick="logout"
v-if="showLogout"
/>
-
-
+
+
+