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
|
||||
}
|
||||
}
|
||||
|
||||
watch(() => props.show, async (newVal) => {
|
||||
|
||||
@@ -317,20 +317,11 @@ const initUserGameInfos = async (refresh_official, refresh_cap_scan) => {
|
||||
globalToastEvent.emit(ToastType.MOUNTED)
|
||||
}
|
||||
}
|
||||
// const getNotice = async () => {
|
||||
// const result = await Request('notice/latest', {}, "GET")
|
||||
// if (result?.json?.notification) {
|
||||
// lotteryType.value = 'notice'
|
||||
// lotteryNoticeData.value = result.json.notification
|
||||
// lotteryShow.value = true
|
||||
// }
|
||||
// }
|
||||
const handleLoginSuccess = async () => {
|
||||
console.log("已登录")
|
||||
loginShow.value = false
|
||||
await fromShare()
|
||||
// await initUserGameInfos(true, true)
|
||||
// await getNotice()
|
||||
await initUserGameInfos(true, true)
|
||||
}
|
||||
|
||||
if (isLogin()) {
|
||||
@@ -362,6 +353,7 @@ const navigateGamePage = async () => {
|
||||
const result = await Request('game/info', { refresh_official: false, refresh_cap_scan: false }, "GET")
|
||||
if (result?.res?.status === 200) {
|
||||
globalStore.draw_chances = result.json.draw_chances
|
||||
globalStore.completed_games_today = result.json.completed_games_today || [];
|
||||
if (globalStore.draw_chances <= 0) {
|
||||
return weui.alert("还没有探索机会,快去参加活动吧")
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user