仅正式环境判断设备在线
This commit is contained in:
@@ -5,6 +5,7 @@ import Container from "@/components/Container.vue";
|
||||
import Avatar from "@/components/Avatar.vue";
|
||||
import { topThreeColors } from "@/constants";
|
||||
import { isGamingAPI, getHomeData } from "@/apis";
|
||||
import { canEenter } from "@/util";
|
||||
import useStore from "@/store";
|
||||
import { storeToRefs } from "pinia";
|
||||
const store = useStore();
|
||||
@@ -41,24 +42,7 @@ const handleSelect = (index) => {
|
||||
};
|
||||
|
||||
const toMatchPage = async (gameType, teamSize) => {
|
||||
if (!device.value.deviceId) {
|
||||
return uni.showToast({
|
||||
title: "请先绑定设备",
|
||||
icon: "none",
|
||||
});
|
||||
}
|
||||
if (!online.value) {
|
||||
return uni.showToast({
|
||||
title: "智能弓未连接",
|
||||
icon: "none",
|
||||
});
|
||||
}
|
||||
if (!user.value.trio) {
|
||||
return uni.showToast({
|
||||
title: "请先完成新手试炼",
|
||||
icon: "none",
|
||||
});
|
||||
}
|
||||
if (!canEenter(user.value, device.value, online.value)) return;
|
||||
const isGaming = await isGamingAPI();
|
||||
if (isGaming) {
|
||||
uni.$showHint(1);
|
||||
|
||||
Reference in New Issue
Block a user