数据调整

This commit is contained in:
kron
2025-07-22 00:01:29 +08:00
parent b030452161
commit cbf83952d7
6 changed files with 45 additions and 29 deletions

View File

@@ -2,6 +2,10 @@
import { ref, onMounted, onUnmounted } from "vue";
import { onShow } from "@dcloudio/uni-app";
import { isGamingAPI, getCurrentGameAPI } from "@/apis";
import useStore from "@/store";
import { storeToRefs } from "pinia";
const store = useStore();
const { user } = storeToRefs(store);
const props = defineProps({
signin: {
type: Function,
@@ -10,8 +14,10 @@ const props = defineProps({
});
const show = ref(false);
onShow(async () => {
const isGaming = await isGamingAPI();
show.value = isGaming;
if (user.value.id) {
const isGaming = await isGamingAPI();
show.value = isGaming;
}
});
const onClick = async () => {
const isGaming = await isGamingAPI();