update
This commit is contained in:
@@ -349,6 +349,9 @@ globalToastEvent.on(ToastType.SHOW_LOTTERY, async () => {
|
|||||||
// await initUserGameInfos(false, false);
|
// await initUserGameInfos(false, false);
|
||||||
lotteryShow.value = true
|
lotteryShow.value = true
|
||||||
})
|
})
|
||||||
|
globalToastEvent.on(ToastType.INFO_UPDATE, async () => {
|
||||||
|
initUserGameInfos(false, false)
|
||||||
|
})
|
||||||
|
|
||||||
watch(() => lotteryShow.value, async (newVal) => {
|
watch(() => lotteryShow.value, async (newVal) => {
|
||||||
initUserGameInfos(true, true);
|
initUserGameInfos(true, true);
|
||||||
|
|||||||
@@ -28,6 +28,7 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import { ref, computed } from "vue"
|
import { ref, computed } from "vue"
|
||||||
import { globalStore } from "@/globalstore";
|
import { globalStore } from "@/globalstore";
|
||||||
|
import globalToastEvent, { ToastType } from "../globalToastEvent"
|
||||||
import ModalTransition from "./ModalTransition.vue"
|
import ModalTransition from "./ModalTransition.vue"
|
||||||
import { Storage, generateQR, isWeixin, isMiniPage, Request } from "../libs/utils"
|
import { Storage, generateQR, isWeixin, isMiniPage, Request } from "../libs/utils"
|
||||||
import Haibao from "@/libs/haibao"
|
import Haibao from "@/libs/haibao"
|
||||||
@@ -147,9 +148,12 @@ const openHaibao = async (e) => {
|
|||||||
haibaoShow.value = true
|
haibaoShow.value = true
|
||||||
|
|
||||||
if (!globalStore.first_share_today) {
|
if (!globalStore.first_share_today) {
|
||||||
Request(`face/share/${mergeId}`)
|
const shareOk = await Request(`face/share/${mergeId}`)
|
||||||
|
if (shareOk.res.status === 200) {
|
||||||
|
globalStore.first_share_today = true
|
||||||
|
globalToastEvent.emit(ToastType.INFO_UPDATE)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
handleHaibao()
|
handleHaibao()
|
||||||
} else {
|
} else {
|
||||||
return weui.alert("请先参与活动合成图片并打榜!")
|
return weui.alert("请先参与活动合成图片并打榜!")
|
||||||
|
|||||||
@@ -8,7 +8,8 @@ export const ToastType = {
|
|||||||
SHOW_LOTTERY: "show_lottery",
|
SHOW_LOTTERY: "show_lottery",
|
||||||
SHOW_AD: "show_ad",
|
SHOW_AD: "show_ad",
|
||||||
SHOW_ADDRESS: "show_address",
|
SHOW_ADDRESS: "show_address",
|
||||||
MOUNTED: "mounted"
|
MOUNTED: "mounted",
|
||||||
|
INFO_UPDATE: "info_update"
|
||||||
};
|
};
|
||||||
|
|
||||||
export default globalToastEvent;
|
export default globalToastEvent;
|
||||||
|
|||||||
Reference in New Issue
Block a user