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