From f48082a5f93b8d728d2e2625772219e73c1b3f98 Mon Sep 17 00:00:00 2001 From: xiaoaojiao Date: Thu, 25 Dec 2025 15:48:43 +0800 Subject: [PATCH] update --- src/components/HomePage.vue | 55 ++++++++++++++++++++++-------- src/components/Lottery.vue | 31 ----------------- src/components/ModalTransition.vue | 2 +- src/libs/utils.js | 2 +- 4 files changed, 43 insertions(+), 47 deletions(-) diff --git a/src/components/HomePage.vue b/src/components/HomePage.vue index 90cfda3..15a01e3 100644 --- a/src/components/HomePage.vue +++ b/src/components/HomePage.vue @@ -31,6 +31,34 @@ const lotteryShow = ref(false) const lotteryType = ref("draw") const lotteryNoticeData = ref(null) +//分享进来 +const fromShare = async () => { + const fromId = getParam("fromid") + if (!fromId) { + return + } + + const userinfos = Storage.get("userinfos") + if (fromId === userinfos.invite_code) { + weui.alert("不能接受自己的邀请哦~") + return + } + + const inviteInfos = await Request("invite/info", { invite_code: fromId, type: "mapai" }, "GET") + if (inviteInfos.res.status == 200) { + const isHelp = inviteInfos.json.helps.find(v => v.id === inviteInfos.json.id) + console.log(isHelp) + if (!isHelp) { + const result = await Request("invite/help", { invite_code: fromId, type: "mapai" }) + if (result.res.status == 200) { + weui.alert("受邀成功!") + } + } else { + weui.alert("您已接受过其他好友邀请,每人只能受邀一次哦~") + } + } +} + // 初始化全局音频实例 const initGlobalAudio = () => { if (!globalStore.globalAudio) { @@ -289,20 +317,20 @@ 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 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 getNotice() } if (isLogin()) { @@ -347,10 +375,6 @@ globalToastEvent.on(ToastType.SHOW_SWIPER, () => { }) - - - - const ruleShow = ref(false) globalToastEvent.on(ToastType.SHOW_RULE, () => { ruleShow.value = true @@ -367,6 +391,9 @@ const getUserLottery = async () => { const result = await Request("lottery", { pool: "all" }, "GET") if (result.res.status === 200) { prizelist.value = result.json.lottery_logs.length > 0 ? result.json.lottery_logs : [] + if(prizelist.value.length===0){ + weui.alert("您还没有中奖") + } } //TODO 上线换成上面的 // prizelist.value = [ diff --git a/src/components/Lottery.vue b/src/components/Lottery.vue index 298fe9d..ed86661 100644 --- a/src/components/Lottery.vue +++ b/src/components/Lottery.vue @@ -7,7 +7,6 @@
-<<<<<<< Updated upstream
@@ -25,27 +24,6 @@
-======= - -
- - -
- - -
- - - ->>>>>>> Stashed changes
-
@@ -401,11 +378,7 @@ onUnmounted(() => { z-index: 3; /* CSS Mask(WebKit + 标准) */ -<<<<<<< Updated upstream -webkit-mask-image: url("../assets/images/new/mask-img.webp"); -======= - -webkit-mask-image: url("../assets/images/new/mask-img.png"); ->>>>>>> Stashed changes -webkit-mask-repeat: no-repeat; -webkit-mask-position: center; -webkit-mask-size: var(--maskSize) var(--maskSize); @@ -413,13 +386,9 @@ onUnmounted(() => { mask-image: url("../assets/images/new/mask-img.webp"); mask-repeat: no-repeat; mask-position: center; -<<<<<<< Updated upstream mask-size: var(--maskSize) var(--maskSize); /* -webkit-clip-path: circle(calc(var(--maskSize) * 0.5) at 50% 50%); clip-path: circle(calc(var(--maskSize) * 0.5) at 50% 50%); */ -======= - mask-size: var(--maskSize) var(--maskSize); ->>>>>>> Stashed changes } /* 可视化的 mask-img.webp:让用户能看到“遮罩在放大”的过程 */ diff --git a/src/components/ModalTransition.vue b/src/components/ModalTransition.vue index ff42d65..cee0790 100644 --- a/src/components/ModalTransition.vue +++ b/src/components/ModalTransition.vue @@ -58,7 +58,7 @@ if (!props.noAnimation) {