仅正式环境判断设备在线
This commit is contained in:
@@ -18,6 +18,7 @@ import {
|
||||
getDeviceBatteryAPI,
|
||||
} from "@/apis";
|
||||
import { topThreeColors } from "@/constants";
|
||||
import { canEenter } from "@/util";
|
||||
|
||||
import useStore from "@/store";
|
||||
import { storeToRefs } from "pinia";
|
||||
@@ -42,19 +43,11 @@ const toPage = async (path) => {
|
||||
return;
|
||||
}
|
||||
if (path === "/pages/first-try") {
|
||||
if (!device.value.deviceId) {
|
||||
return uni.showToast({
|
||||
title: "请先绑定设备",
|
||||
icon: "none",
|
||||
});
|
||||
if (canEenter(user.value, device.value, online.value, path)) {
|
||||
await uni.$checkAudio();
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
if (!online.value) {
|
||||
return uni.showToast({
|
||||
title: "智能弓未连接",
|
||||
icon: "none",
|
||||
});
|
||||
}
|
||||
await uni.$checkAudio();
|
||||
}
|
||||
uni.navigateTo({ url: path });
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user