update
This commit is contained in:
@@ -18,9 +18,6 @@ const cancelBtn = () => {
|
||||
<ModalTransition class="popup" :show="show" name="opacity">
|
||||
<div class="home-bg">
|
||||
<div class="popup-bg">
|
||||
<div class="scene-item item-1">
|
||||
<img src="../assets/images/new/start.webp" @click="cancelBtn" alt="开始">
|
||||
</div>
|
||||
<div class="scene-item item-2">
|
||||
<img src="../assets/images/new/start-1.webp" @click="cancelBtn" alt="立即挑战">
|
||||
</div>
|
||||
|
||||
@@ -264,9 +264,9 @@ const handleRule = () => {
|
||||
globalToastEvent.emit(ToastType.SHOW_RULE)
|
||||
}
|
||||
const handleLottery = () => {
|
||||
// if (globalStore.draw_chances <= 0) {
|
||||
// return weui.alert("还没有抽奖机会,快去参加活动吧")
|
||||
// };
|
||||
if (globalStore.draw_chances <= 0) {
|
||||
return weui.alert("还没有抽奖机会,快去参加活动吧")
|
||||
};
|
||||
lotteryType.value = 'draw'
|
||||
lotteryNoticeData.value = null
|
||||
globalToastEvent.emit(ToastType.SHOW_LOTTERY);
|
||||
@@ -353,21 +353,21 @@ watch(() => mergeId, async (newVal) => {
|
||||
}, { immediate: true })
|
||||
|
||||
globalToastEvent.on(ToastType.SHOW_LOTTERY, async () => {
|
||||
// await initUserGameInfos(false, false);
|
||||
lotteryShow.value = true
|
||||
})
|
||||
globalToastEvent.on(ToastType.INFO_UPDATE, async () => {
|
||||
initUserGameInfos(false, false)
|
||||
})
|
||||
|
||||
watch(() => lotteryShow.value, async (newVal) => {
|
||||
initUserGameInfos(true, true);
|
||||
}, { immediate: true })
|
||||
|
||||
|
||||
const gameSwiperShow = ref(false);
|
||||
const navigateGamePage = () => {
|
||||
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
|
||||
if (globalStore.draw_chances <= 0) {
|
||||
return weui.alert("还没有探索机会,快去参加活动吧")
|
||||
} else {
|
||||
gameSwiperShow.value = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
globalToastEvent.on(ToastType.SHOW_SWIPER, () => {
|
||||
@@ -414,10 +414,10 @@ globalToastEvent.on(ToastType.SHOW_TODO, () => {
|
||||
})
|
||||
|
||||
const sharePageShow = ref(false)
|
||||
const isFromTodoList = ref(false)
|
||||
const isFromHomePageList = ref(false)
|
||||
globalToastEvent.on(ToastType.SHOW_SHAREPAGE, (env) => {
|
||||
sharePageShow.value = true;
|
||||
isFromTodoList.value = env;
|
||||
isFromHomePageList.value = env;
|
||||
})
|
||||
|
||||
const popupMoreShow = ref(false)
|
||||
@@ -465,7 +465,7 @@ const handleAddress = (id) => {
|
||||
<div class="home-wrapper">
|
||||
<div class="fallback-background"></div>
|
||||
|
||||
<div class="scene-item item-1" @click="handleLottery" :class="{ 'disabled': globalStore.draw_chances <= 0 }">
|
||||
<div class="scene-item item-1" @click="handleLottery">
|
||||
<img src="../assets/images/new/lottery.webp" alt="抽奖">
|
||||
</div>
|
||||
<div class="scene-item item-2" @click="navigateGamePage">
|
||||
@@ -556,7 +556,7 @@ const handleAddress = (id) => {
|
||||
<GamePage :show="gamePageShow" @close="gamePageShow = false" :gameSlideId="gameSlideId" />
|
||||
<GameDemo :show="gameDemoShow" @close="gameDemoShow = false" />
|
||||
<Lottery :show="lotteryShow" @close="lotteryShow = false" :type="lotteryType" :data="lotteryNoticeData"></Lottery>
|
||||
<SharePage :show="sharePageShow" @close="sharePageShow = false" :isFromTodoList="isFromTodoList"></SharePage>
|
||||
<SharePage :show="sharePageShow" @close="sharePageShow = false" :isFromHomePageList="isFromHomePageList"></SharePage>
|
||||
<PopupMore :show="popupMoreShow" @close="popupMoreShow = false"></PopupMore>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -29,12 +29,19 @@
|
||||
class="lottery-title-no"
|
||||
:class="props.type === 'notice' && 'notice'"
|
||||
ref="titleRef"
|
||||
v-show="btngroupShow && activePrizeData.prize_code === 'NO'"
|
||||
v-if="btngroupShow && activePrizeData.prize_code === 'NO'"
|
||||
></div>
|
||||
|
||||
<div
|
||||
class="lottery-title"
|
||||
:class="props.type === 'notice' && 'notice'"
|
||||
ref="titleRef"
|
||||
v-if="btngroupShow && activePrizeData.prize_code !== 'NO'"
|
||||
></div>
|
||||
|
||||
<div class="lottery-btngroup" v-show="btngroupShow">
|
||||
<div class="btn-more" @click="navigateSharePage" v-if="activePrizeData.prize_code !== 'NO'"></div>
|
||||
<!-- <div class="btn-kaixin" @click="handleLotteryAction" v-if="activePrizeData.prize_code !== 'NO'"></div> -->
|
||||
<div class="btn-kaixin" @click="handleLotteryAction" v-if="activePrizeData.prize_code !== 'NO'"></div>
|
||||
<div class="back-home" @click="handleGoHomeAction" v-if="activePrizeData.prize_code === 'NO'"></div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -55,8 +62,7 @@ import { Request, Sleep } from "../libs/utils"
|
||||
import { globalStore } from "@/globalstore";
|
||||
|
||||
const navigateSharePage = () => {
|
||||
// globalToastEvent.emit(ToastType.SHOW_POPUPMORE)
|
||||
globalToastEvent.emit(ToastType.SHOW_SHAREPAGE)
|
||||
globalToastEvent.emit(ToastType.SHOW_SHAREPAGE, true)
|
||||
}
|
||||
|
||||
|
||||
@@ -224,7 +230,7 @@ watch(() => props.show, async (newVal) => {
|
||||
// id: 0,
|
||||
// code: "xxx",
|
||||
// // NOTE: 测试用,确保能命中现有的样式映射,便于看到揭晓效果
|
||||
// prize_code: 'NO',
|
||||
// prize_code: '52A6_100ML_6',
|
||||
// prize_name: '泸州老窖国窖1573 55度双十耀星版500ml',
|
||||
// coupon_type: "scene",
|
||||
// name: "泸州老窖的一瓶酒"
|
||||
|
||||
@@ -57,9 +57,6 @@ if (!props.noAnimation) {
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.global-modal-content {
|
||||
/* z-index: 0; */
|
||||
}
|
||||
.transBottom-enter-active .global-modal-wrapper,
|
||||
.transBottom-leave-active .global-modal-wrapper {
|
||||
transform: translate3d(0, 0, 0);
|
||||
|
||||
@@ -16,7 +16,7 @@ import todoListImg from '../assets/images/new/todolist-img.webp';
|
||||
|
||||
const props = defineProps({
|
||||
show: false,
|
||||
isFromTodoList: false
|
||||
isFromHomePageList: false
|
||||
})
|
||||
|
||||
watch(() => props.show, async (newVal) => {
|
||||
@@ -36,12 +36,6 @@ const gameImgMap = {
|
||||
game5: share5
|
||||
}
|
||||
|
||||
// const haibaoBackgroundImg = computed(() => {
|
||||
// const id = Number(props.gameSlideId) || 1;
|
||||
// const img = gameImgMap[`game${id}`] || game1;
|
||||
// return { backgroundImage: `url(${img})` };
|
||||
// })
|
||||
|
||||
const cancelBtn = () => {
|
||||
emit('close')
|
||||
}
|
||||
@@ -57,13 +51,13 @@ const handleHaibao = async () => {
|
||||
const loading = weui.loading();
|
||||
|
||||
const img = gameImgMap[globalStore.game_id] || 'share1';
|
||||
haibaoBackgroundImg.value = props.isFromTodoList ? { backgroundImage: `url(${todoListImg})` } : { backgroundImage: `url(${img})` };
|
||||
haibaoBackgroundImg.value = props.isFromHomePageList ? { backgroundImage: `url(${todoListImg})` } : { backgroundImage: `url(${img})` };
|
||||
|
||||
const infos = Storage.get("userinfos")
|
||||
const haibaoCover = new Haibao(1080, 2160);
|
||||
|
||||
haibaoCover.add(ruleBg, 0, 0)
|
||||
const qrcode = await generateQR(`fromid=${infos.invite_code}&merge_id=${infos.mergeId}`, 200, 200);
|
||||
const qrcode = await generateQR(`fromid=${infos.invite_code}`, 200, 200);
|
||||
haibaoCover.add(qrcode, 742, 1870);
|
||||
|
||||
haibaoCover.draw().then(() => {
|
||||
|
||||
Reference in New Issue
Block a user