仅正式环境判断设备在线
This commit is contained in:
@@ -6,6 +6,7 @@ import UserItem from "@/components/UserItem.vue";
|
||||
import Avatar from "@/components/Avatar.vue";
|
||||
import useStore from "@/store";
|
||||
import { storeToRefs } from "pinia";
|
||||
import { canEenter } from "@/util";
|
||||
const store = useStore();
|
||||
const { user, device, online } = storeToRefs(store);
|
||||
const { updateUser } = store;
|
||||
@@ -17,22 +18,12 @@ const toOrderPage = () => {
|
||||
};
|
||||
|
||||
const toFristTryPage = async () => {
|
||||
if (!online.value) {
|
||||
return uni.showToast({
|
||||
title: "智能弓未连接",
|
||||
icon: "none",
|
||||
if (canEenter(user.value, device.value, online.value, "/pages/first-try")) {
|
||||
await uni.$checkAudio();
|
||||
uni.navigateTo({
|
||||
url: "/pages/first-try",
|
||||
});
|
||||
}
|
||||
if (!device.value.deviceId) {
|
||||
return uni.showToast({
|
||||
title: "请先绑定设备",
|
||||
icon: "none",
|
||||
});
|
||||
}
|
||||
await uni.$checkAudio();
|
||||
uni.navigateTo({
|
||||
url: "/pages/first-try",
|
||||
});
|
||||
};
|
||||
const toBeVipPage = () => {
|
||||
uni.navigateTo({
|
||||
|
||||
Reference in New Issue
Block a user