update
This commit is contained in:
@@ -116,21 +116,10 @@ const isConfirmBtnDisplay = computed(() => {
|
||||
})
|
||||
|
||||
const getGameInfo = async () => {
|
||||
const result = await Request('game/info', { refresh_official: true, refresh_cap_scan: true }, "GET")
|
||||
if (result?.res?.status === 200) {
|
||||
console.log(result)
|
||||
globalStore.completed_games_today = result.json.completed_games_today || [];
|
||||
//TODO: 测试数据
|
||||
// globalStore.completed_games_today = ['game1', 'game3'];
|
||||
slides.value = slides.value.map(slide => ({
|
||||
...slide,
|
||||
show: globalStore.completed_games_today.includes(`game${slide.id}`)
|
||||
}));
|
||||
} else {
|
||||
weui.alert("获取游戏数据失败,请刷新页面重试");
|
||||
emit('close');
|
||||
return
|
||||
}
|
||||
slides.value = slides.value.map(slide => ({
|
||||
...slide,
|
||||
show: globalStore.completed_games_today.includes(`game${slide.id}`)
|
||||
}));
|
||||
}
|
||||
|
||||
watch(() => props.show, async (newVal) => {
|
||||
|
||||
Reference in New Issue
Block a user