数据调整
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user