优化
This commit is contained in:
@@ -310,7 +310,7 @@ const initUserGameInfos = async (refresh_official, refresh_cap_scan) => {
|
|||||||
const handleLoginSuccess = async () => {
|
const handleLoginSuccess = async () => {
|
||||||
console.log("已登录")
|
console.log("已登录")
|
||||||
loginShow.value = false
|
loginShow.value = false
|
||||||
|
console.log(111)
|
||||||
await initUserGameInfos(true, true)
|
await initUserGameInfos(true, true)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -338,7 +338,9 @@ globalToastEvent.on(ToastType.SHOW_LOTTERY, () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
watch(() => lotteryShow.value, async (newVal) => {
|
watch(() => lotteryShow.value, async (newVal) => {
|
||||||
initUserGameInfos(true, true);
|
if (newVal) {
|
||||||
|
initUserGameInfos(true, true)
|
||||||
|
}
|
||||||
}, { immediate: true })
|
}, { immediate: true })
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -120,12 +120,12 @@ const openQiwei = (e) => {
|
|||||||
qiweiShow.value = true
|
qiweiShow.value = true
|
||||||
}
|
}
|
||||||
|
|
||||||
const openHaibao = async(e) => {
|
const openHaibao = async (e) => {
|
||||||
const target = e.currentTarget
|
const target = e.currentTarget
|
||||||
// TODO 首页分享增加一次合成次数
|
// TODO 首页分享增加一次合成次数
|
||||||
// if(!globalStore.first_share_today){
|
if (!globalStore.first_share_today) {
|
||||||
// const result = await Request('face/share',{mergeId:xxx})
|
await Request('face/share', { mergeId: mergeId })
|
||||||
// }
|
}
|
||||||
if (target.classList.contains("has")) {
|
if (target.classList.contains("has")) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -140,23 +140,23 @@ const openHaibao = async(e) => {
|
|||||||
'Authorization': `Bearer ${Storage.get("userinfos").api_token}`
|
'Authorization': `Bearer ${Storage.get("userinfos").api_token}`
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.then(response => response.json())
|
.then(response => response.json())
|
||||||
.then(data => {
|
.then(data => {
|
||||||
const foundItem = data.data.find(item => item.is_public === true);
|
const foundItem = data.data.find(item => item.is_public === true);
|
||||||
if (foundItem) {
|
if (foundItem) {
|
||||||
globalStore.result_url = foundItem.result_url;
|
globalStore.result_url = foundItem.result_url;
|
||||||
mergeId = foundItem.id;
|
mergeId = foundItem.id;
|
||||||
haibaoShow.value = true
|
haibaoShow.value = true
|
||||||
handleHaibao()
|
handleHaibao()
|
||||||
} else {
|
} else {
|
||||||
return weui.alert("请先参与活动合成图片并打榜!")
|
return weui.alert("请先参与活动合成图片并打榜!")
|
||||||
}
|
}
|
||||||
return { success: true, data };
|
return { success: true, data };
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
console.error('Error:', error);
|
console.error('Error:', error);
|
||||||
return { success: false, error };
|
return { success: false, error };
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
haibaoShow.value = true
|
haibaoShow.value = true
|
||||||
handleHaibao()
|
handleHaibao()
|
||||||
|
|||||||
Reference in New Issue
Block a user