Commit 1f3429d2 authored by spc's avatar spc

fixed act915

parent 34f1b60d
<template>
<view class="act915page" v-if="!loading">
<!-- 返回按钮 -->
<view class="nav-left">
<image class="back-btn" :src="$baseUrl + 'xingmaLab/1001/backBtn.png'" mode="aspectFit"
@click="handleBack" />
</view>
<span class="act915pagebg" :style="getBackgroundStyle()"></span>
<span class="act915pagegoods1" :style="{ backgroundImage: `url(${$baseUrl}${getImageUrl('goods1')})` }"
@click="handleGoods1Click"></span>
......@@ -113,8 +119,8 @@
</view>
<!-- 抽奖成功弹窗 -->
<DrawSucModal :visible="showDrawSucModal" :award-name="currentAwardName" :award-image-url="currentAwardImageUrl" @close="handleDrawSucModalClose"
@happy-get="handleHappyGet" />
<DrawSucModal :visible="showDrawSucModal" :award-name="currentAwardName" :award-image-url="currentAwardImageUrl"
@close="handleDrawSucModalClose" @happy-get="handleHappyGet" />
</view>
</template>
......@@ -127,6 +133,7 @@ import { useUserStore } from '@/stores/user'; // Import userStore
import { invitationAssist } from '@/api/activity0915/index.js'; // Import invitationAssist
import { jump } from '../../utils/index.js'; // Import jump function
import DrawSucModal from '../lottery/components/drawSucModal/drawSucModal.vue'; // Import DrawSucModal if needed
import md from '../../md.js';
// 组件名称
defineOptions({
......@@ -206,9 +213,46 @@ const getBackgroundStyle = () => {
}
}
// 返回按钮处理
const handleBack = () => {
console.log('点击返回按钮')
// md.sensorComponentLogTake({
// xcxComponentClick: "true",
// pageName: "915专题活动首页",
// componentName: "返回按钮",
// componentContent: "返回"
// });
try {
uni.navigateBack({
delta: 1,
success: () => {
console.log('返回成功')
},
fail: () => {
// 如果返回失败,跳转到首页
uni.redirectTo({
url: '/pages/index/index'
})
}
})
} catch (error) {
console.log('返回失败:', error)
uni.redirectTo({
url: '/pages/index/index'
})
}
}
// 商品1区域点击处理
const handleGoods1Click = () => {
console.log('点击商品1区域')
md.sensorComponentLogTake({
xcxComponentClick: "true",
pageName: "915专题活动首页",
componentName: "商品单列图",
componentContent: config.value?.goods?.goods1?.title || "商品单列图"
});
jump(config.value?.goods?.goods1?.link)
}
......@@ -405,6 +449,14 @@ const handleGoods3Click = (productId) => {
const goods3List = goods3Data?.items || []
const product = goods3List.find(item => item.id === productId)
// 添加埋点
md.sensorComponentLogTake({
xcxComponentClick: "true",
pageName: "915专题活动首页",
componentName: "商品三列图",
componentContent: product?.title || `商品三列图-商品${productId}`
});
if (product && product.link) {
// 直接处理跳转链接
jump(product.link)
......@@ -426,6 +478,14 @@ const handleGoodsList1Click = (productId) => {
const goodsList1 = goodsList1Data?.items || []
const product = goodsList1.find(item => item.id === productId)
// 添加埋点
md.sensorComponentLogTake({
xcxComponentClick: "true",
pageName: "915专题活动首页",
componentName: "爆品不错过商品专区",
componentContent: product?.title || `爆品不错过商品专区-商品${productId}`
});
if (product && product.link) {
// 直接处理跳转链接
jump(product.link)
......@@ -447,6 +507,14 @@ const handleGoodsList2Click = (productId) => {
const goodsList2 = goodsList2Data?.items || []
const product = goodsList2.find(item => item.id === productId)
// 添加埋点
md.sensorComponentLogTake({
xcxComponentClick: "true",
pageName: "915专题活动首页",
componentName: "好物等你来商品专区",
componentContent: product?.title || `好物等你来商品专区-商品${productId}`
});
if (product && product.link) {
// 直接处理跳转链接
jump(product.link)
......@@ -489,7 +557,7 @@ const handleInvitationAssist = async (incomingCode) => {
try {
console.log('处理助力邀请码:', incomingCode)
const unionId = uni.getStorageSync('unionId');
const res = await invitationAssist(incomingCode, unionId);
if (res && res.success) {
uni.showToast({
......@@ -549,6 +617,79 @@ const initPage = async () => {
onMounted(async () => {
console.log('915活动页面已加载')
md.sensorComponentLogTake({
xcxComponentExposure: "true",
pageName: "915专题活动首页",
componentName: "banner头图",
componentContent: "banner头图"
});
md.sensorComponentLogTake({
xcxComponentExposure: "true",
pageName: "915专题活动首页",
componentName: "商品单列图",
componentContent: config.value?.goods?.goods1?.title || "商品单列图"
});
// 商品三列图埋点 - 遍历每个商品
if (config.value?.goods?.goods3?.items) {
config.value.goods.goods3.items.forEach((item, index) => {
md.sensorComponentLogTake({
xcxComponentExposure: "true",
pageName: "915专题活动首页",
componentName: "商品三列图",
componentContent: item.title || `商品三列图-商品${index + 1}`
});
});
}
md.sensorComponentLogTake({
xcxComponentExposure: "true",
pageName: "915专题活动首页",
componentName: "邀请得好礼",
componentContent: "立即邀请"
});
md.sensorComponentLogTake({
xcxComponentExposure: "true",
pageName: "915专题活动首页",
componentName: "中部抽奖banner",
componentContent: "中部抽奖banner"
});
// 爆品不错过商品专区埋点 - 遍历每个商品
if (config.value?.goods?.goodslist1?.items) {
config.value.goods.goodslist1.items.forEach((item, index) => {
md.sensorComponentLogTake({
xcxComponentExposure: "true",
pageName: "915专题活动首页",
componentName: "爆品不错过商品专区",
componentContent: item.title || `爆品不错过商品专区-商品${index + 1}`
});
});
}
// 好物等你来商品专区埋点 - 遍历每个商品
if (config.value?.goods?.goodslist2?.items) {
config.value.goods.goodslist2.items.forEach((item, index) => {
md.sensorComponentLogTake({
xcxComponentExposure: "true",
pageName: "915专题活动首页",
componentName: "好物等你来商品专区",
componentContent: item.title || `好物等你来商品专区-商品${index + 1}`
});
});
}
// md.sensorComponentLogTake({
// xcxComponentClick: "true",
// pageName: "星妈lab首页",
// componentName: "商品单列图",
// componentContent: "商品单列图"
// });
// 先进行自动登录获取基础信息,登录成功后执行页面初始化
try {
console.log('开始执行 normalAutoLogin...')
......
......@@ -23,6 +23,19 @@
max-width: 100vw; // 确保不超过视口宽度
overflow-x: hidden; // 防止水平滚动
// 返回按钮样式
.nav-left {
position: fixed;
top: 60rpx;
left: 30rpx;
z-index: 999;
.back-btn {
width: 60rpx;
height: 60rpx;
}
}
.act915pagebg {
width: 750rpx;
height: 4238rpx;
......
......@@ -46,11 +46,11 @@
// 规则内容滚动容器
.rulemodal-text-container {
width: 481rpx;
width: 100%;
height: 471rpx;
position: absolute;
top: 154rpx;
left: 35rpx;
// top: 154rpx;
// left: 35rpx;
overflow-y: auto;
overflow-x: hidden;
z-index: 3;
......
<template>
<view class="lotterypage">
<span class="lotterypagebg"
:style="{ backgroundImage: `url(${$baseUrl}${getImageUrl(config.images.background)})` }"></span>
<!-- 返回按钮 -->
<view class="nav-left">
<image class="back-btn" :src="$baseUrl + 'xingmaLab/1001/backBtn.png'" mode="aspectFit"
@click="handleBack" />
</view>
<div class="lotterypageturntable">
<span class="lotterypageturntablebg"
:style="{ backgroundImage: `url(${$baseUrl}${getImageUrl(config.images.turnTableBg)})` }"></span>
<span class="lotterypageturntablelogo"
:style="{ backgroundImage: `url(${$baseUrl}${getImageUrl(config.images.turnTableLogo)})` }"></span>
<div class="lotterypageturntableawards" :style="turntableRotationStyle">
<div class="lotterypageturntableawards6" v-if="turntablePrizes.length > 5">
<span class="lotterypageturntableawards6selbg" v-if="isPrizeSelected(5) || isPrizeHighlighted(5)"
:style="{ backgroundImage: `url(${$baseUrl}${getImageUrl(config.images.lotterypageturntableawardsSelBg)})` }"></span>
<image class="lotterypageturntableawards6img"
:src="`${$baseUrl}${turntablePrizes[5].prizeImageUrl}`"
mode="aspectFit"
@error="console.log('奖品6图片加载失败')"></image>
<span class="lotterypageturntableawards6name">{{ turntablePrizes[5].prizeName }}</span>
</div>
<div class="lotterypageturntableawards5" v-if="turntablePrizes.length > 4">
<span class="lotterypageturntableawards5selbg" v-if="isPrizeSelected(4) || isPrizeHighlighted(4)"
:style="{ backgroundImage: `url(${$baseUrl}${getImageUrl(config.images.lotterypageturntableawardsSelBg)})` }"></span>
<image class="lotterypageturntableawards5img"
:src="`${$baseUrl}${turntablePrizes[4].prizeImageUrl}`"
mode="aspectFit"
@error="console.log('奖品5图片加载失败')"></image>
<span class="lotterypageturntableawards5name">{{ turntablePrizes[4].prizeName }}</span>
</div>
<div class="lotterypageturntableawards4" v-if="turntablePrizes.length > 3">
<span class="lotterypageturntableawards4selbg" v-if="isPrizeSelected(3) || isPrizeHighlighted(3)"
:style="{ backgroundImage: `url(${$baseUrl}${getImageUrl(config.images.lotterypageturntableawardsSelBg)})` }"></span>
<image class="lotterypageturntableawards4img"
:src="`${$baseUrl}${turntablePrizes[3].prizeImageUrl}`"
mode="aspectFit"
@error="console.log('奖品4图片加载失败')"></image>
<span class="lotterypageturntableawards4name">{{ turntablePrizes[3].prizeName }}</span>
</div>
<div class="lotterypageturntableawards3" v-if="turntablePrizes.length > 2">
<span class="lotterypageturntableawards3selbg" v-if="isPrizeSelected(2) || isPrizeHighlighted(2)"
:style="{ backgroundImage: `url(${$baseUrl}${getImageUrl(config.images.lotterypageturntableawardsSelBg)})` }"></span>
<image class="lotterypageturntableawards3img"
:src="`${$baseUrl}${turntablePrizes[2].prizeImageUrl}`"
mode="aspectFit"
@error="console.log('奖品3图片加载失败')"></image>
<span class="lotterypageturntableawards3name">{{ turntablePrizes[2].prizeName }}</span>
</div>
<div class="lotterypageturntableawards2" v-if="turntablePrizes.length > 1">
<span class="lotterypageturntableawards2selbg" v-if="isPrizeSelected(1) || isPrizeHighlighted(1)"
:style="{ backgroundImage: `url(${$baseUrl}${getImageUrl(config.images.lotterypageturntableawardsSelBg)})` }"></span>
<image class="lotterypageturntableawards2img"
:src="`${$baseUrl}${turntablePrizes[1].prizeImageUrl}`"
mode="aspectFit"
@error="console.log('奖品2图片加载失败')"></image>
<span class="lotterypageturntableawards2name">{{ turntablePrizes[1].prizeName }}</span>
</div>
<div class="lotterypageturntableawards1" v-if="turntablePrizes.length > 0">
<span class="lotterypageturntableawards1selbg" v-if="isPrizeSelected(0) || isPrizeHighlighted(0)"
:style="{ backgroundImage: `url(${$baseUrl}${getImageUrl(config.images.lotterypageturntableawardsSelBg)})` }"></span>
<image class="lotterypageturntableawards1img"
:src="`${$baseUrl}${turntablePrizes[0].prizeImageUrl}`"
mode="aspectFit"
@error="console.log('奖品1图片加载失败')"></image>
<span class="lotterypageturntableawards1name">{{ turntablePrizes[0].prizeName }}</span>
<view class="lotterypageCon">
<span class="lotterypagebg"
:style="{ backgroundImage: `url(${$baseUrl}${getImageUrl(config.images.background)})` }"></span>
<div class="lotterypageturntable">
<span class="lotterypageturntablebg"
:style="{ backgroundImage: `url(${$baseUrl}${getImageUrl(config.images.turnTableBg)})` }"></span>
<span class="lotterypageturntablelogo"
:style="{ backgroundImage: `url(${$baseUrl}${getImageUrl(config.images.turnTableLogo)})` }"></span>
<div class="lotterypageturntableawards" :style="turntableRotationStyle">
<div class="lotterypageturntableawards6" v-if="turntablePrizes.length > 5">
<span class="lotterypageturntableawards6selbg"
v-if="isPrizeSelected(5) || isPrizeHighlighted(5)"
:style="{ backgroundImage: `url(${$baseUrl}${getImageUrl(config.images.lotterypageturntableawardsSelBg)})` }"></span>
<image class="lotterypageturntableawards6img"
:src="`${$baseUrl}${turntablePrizes[5].prizeImageUrl}`" mode="aspectFit"
@error="console.log('奖品6图片加载失败')"></image>
<span class="lotterypageturntableawards6name">{{ turntablePrizes[5].prizeName }}</span>
</div>
<div class="lotterypageturntableawards5" v-if="turntablePrizes.length > 4">
<span class="lotterypageturntableawards5selbg"
v-if="isPrizeSelected(4) || isPrizeHighlighted(4)"
:style="{ backgroundImage: `url(${$baseUrl}${getImageUrl(config.images.lotterypageturntableawardsSelBg)})` }"></span>
<image class="lotterypageturntableawards5img"
:src="`${$baseUrl}${turntablePrizes[4].prizeImageUrl}`" mode="aspectFit"
@error="console.log('奖品5图片加载失败')"></image>
<span class="lotterypageturntableawards5name">{{ turntablePrizes[4].prizeName }}</span>
</div>
<div class="lotterypageturntableawards4" v-if="turntablePrizes.length > 3">
<span class="lotterypageturntableawards4selbg"
v-if="isPrizeSelected(3) || isPrizeHighlighted(3)"
:style="{ backgroundImage: `url(${$baseUrl}${getImageUrl(config.images.lotterypageturntableawardsSelBg)})` }"></span>
<image class="lotterypageturntableawards4img"
:src="`${$baseUrl}${turntablePrizes[3].prizeImageUrl}`" mode="aspectFit"
@error="console.log('奖品4图片加载失败')"></image>
<span class="lotterypageturntableawards4name">{{ turntablePrizes[3].prizeName }}</span>
</div>
<div class="lotterypageturntableawards3" v-if="turntablePrizes.length > 2">
<span class="lotterypageturntableawards3selbg"
v-if="isPrizeSelected(2) || isPrizeHighlighted(2)"
:style="{ backgroundImage: `url(${$baseUrl}${getImageUrl(config.images.lotterypageturntableawardsSelBg)})` }"></span>
<image class="lotterypageturntableawards3img"
:src="`${$baseUrl}${turntablePrizes[2].prizeImageUrl}`" mode="aspectFit"
@error="console.log('奖品3图片加载失败')"></image>
<span class="lotterypageturntableawards3name">{{ turntablePrizes[2].prizeName }}</span>
</div>
<div class="lotterypageturntableawards2" v-if="turntablePrizes.length > 1">
<span class="lotterypageturntableawards2selbg"
v-if="isPrizeSelected(1) || isPrizeHighlighted(1)"
:style="{ backgroundImage: `url(${$baseUrl}${getImageUrl(config.images.lotterypageturntableawardsSelBg)})` }"></span>
<image class="lotterypageturntableawards2img"
:src="`${$baseUrl}${turntablePrizes[1].prizeImageUrl}`" mode="aspectFit"
@error="console.log('奖品2图片加载失败')"></image>
<span class="lotterypageturntableawards2name">{{ turntablePrizes[1].prizeName }}</span>
</div>
<div class="lotterypageturntableawards1" v-if="turntablePrizes.length > 0">
<span class="lotterypageturntableawards1selbg"
v-if="isPrizeSelected(0) || isPrizeHighlighted(0)"
:style="{ backgroundImage: `url(${$baseUrl}${getImageUrl(config.images.lotterypageturntableawardsSelBg)})` }"></span>
<image class="lotterypageturntableawards1img"
:src="`${$baseUrl}${turntablePrizes[0].prizeImageUrl}`" mode="aspectFit"
@error="console.log('奖品1图片加载失败')"></image>
<span class="lotterypageturntableawards1name">{{ turntablePrizes[0].prizeName }}</span>
</div>
</div>
</div>
</div>
<span class="lotterypagetitle"
:style="{ backgroundImage: `url(${$baseUrl}${getImageUrl(config.images.title)})` }"></span>
<span class="lotterypagerulebtn"
:style="{ backgroundImage: `url(${$baseUrl}${getImageUrl(config.images.ruleBtn)})` }"
@click="handleRuleClick"></span>
<span class="lotterypageawardbtn"
:style="{ backgroundImage: `url(${$baseUrl}${getImageUrl(config.images.awardBtn)})` }"
@click="handleAwardClick"></span>
<div class="lotterypagenoticecon">
<span class="lotterypagenoticeconbg"
:style="{ backgroundImage: `url(${$baseUrl}${getImageUrl(config.images.noticeConBg)})` }"></span>
<div class="lotterypagenoticecontext-wrapper">
<div class="lotterypagenoticecontext-container" :class="{ 'no-transition': isResetting }"
:style="{ transform: `translateY(-${currentNoticeIndex * 40}rpx)` }">
<span class="lotterypagenoticecontext" v-for="(notice, index) in displayNotices"
:key="`${notice.userNickname}-${index}`"
:style="{ top: `${index * 40}rpx` }">{{ formatNotice(notice.userNickname, notice.prizeName)
}}</span>
<span class="lotterypagetitle"
:style="{ backgroundImage: `url(${$baseUrl}${getImageUrl(config.images.title)})` }"></span>
<span class="lotterypagerulebtn"
:style="{ backgroundImage: `url(${$baseUrl}${getImageUrl(config.images.ruleBtn)})` }"
@click="handleRuleClick"></span>
<span class="lotterypageawardbtn"
:style="{ backgroundImage: `url(${$baseUrl}${getImageUrl(config.images.awardBtn)})` }"
@click="handleAwardClick"></span>
<div class="lotterypagenoticecon">
<span class="lotterypagenoticeconbg"
:style="{ backgroundImage: `url(${$baseUrl}${getImageUrl(config.images.noticeConBg)})` }"></span>
<div class="lotterypagenoticecontext-wrapper">
<div class="lotterypagenoticecontext-container" :class="{ 'no-transition': isResetting }"
:style="{ transform: `translateY(-${currentNoticeIndex * 40}rpx)` }">
<span class="lotterypagenoticecontext" v-for="(notice, index) in displayNotices"
:key="`${notice.userNickname}-${index}`" :style="{ top: `${index * 40}rpx` }">{{
formatNotice(notice.userNickname, notice.prizeName)
}}</span>
</div>
</div>
<span class="lotterypagenoticeconsoundicon"
:style="{ backgroundImage: `url(${$baseUrl}${getImageUrl(config.images.noticeConSoundIcon)})` }"></span>
</div>
<span class="lotterypagenoticeconsoundicon"
:style="{ backgroundImage: `url(${$baseUrl}${getImageUrl(config.images.noticeConSoundIcon)})` }"></span>
</div>
<span class="lotterypagedrawbtn"
:style="{ backgroundImage: `url(${$baseUrl}${getImageUrl(config.images.drawBtn)})` }"
@click="handleDrawClick" :class="{ 'disabled-draw-btn': !canDraw }"></span>
<span class="lotterypagelefttimes">剩余次数:{{ remainingTimes }}</span>
<!-- 规则弹窗 -->
<RuleModal :visible="showRuleModal" :rules="activityRules" :config="ruleModalConfig" @close="handleRuleModalClose" />
<span class="lotterypagedrawbtn"
:style="{ backgroundImage: `url(${$baseUrl}${getImageUrl(config.images.drawBtn)})` }"
@click="handleDrawClick" :class="{ 'disabled-draw-btn': !canDraw }"></span>
<span class="lotterypagelefttimes">剩余次数:{{ remainingTimes }}</span>
<!-- 抽奖成功弹窗 -->
<DrawSucModal :visible="showDrawSucModal" :award-name="currentAwardName" :award-image-url="currentAwardImageUrl" @close="handleDrawSucModalClose"
@happy-get="handleHappyGet" />
<!-- 规则弹窗 -->
<RuleModal :visible="showRuleModal" :rules="activityRules" :config="ruleModalConfig"
@close="handleRuleModalClose" />
<!-- 抽奖失败弹窗 -->
<DrawFailModal :visible="showDrawFailModal" @close="handleDrawFailModalClose" @i-know="handleIKnow" />
<!-- 抽奖成功弹窗 -->
<DrawSucModal :visible="showDrawSucModal" :award-name="currentAwardName"
:award-image-url="currentAwardImageUrl" @close="handleDrawSucModalClose" @happy-get="handleHappyGet" />
<!-- 抽奖失败弹窗 -->
<DrawFailModal :visible="showDrawFailModal" @close="handleDrawFailModalClose" @i-know="handleIKnow" />
</view>
</view>
</template>
......@@ -116,6 +125,7 @@ import RuleModal from './components/ruleModal/ruleModal.vue'
import DrawSucModal from './components/drawSucModal/drawSucModal.vue'
import DrawFailModal from './components/drawFailModal/drawFailModal.vue'
import { getAct915LotteryDraw, getAct915LotteryInfo, fetchAct915LotteryJSON } from '../../api/activity0915/index.js'
import md from '../../md.js'
// 组件名称
defineOptions({
......@@ -178,7 +188,7 @@ const isPrizeHighlighted = (index) => {
// 获取最近的20条公告
const recentNotices = computed(() => {
let notices = [];
if (winningCarousel.value.length > 0) {
notices = winningCarousel.value.slice(0, 20);
} else {
......@@ -189,14 +199,14 @@ const recentNotices = computed(() => {
{ userNickname: '用户3', prizeName: '奖品C' }
];
}
// 如果只有1条数据,复制成3条以确保轮播效果
if (notices.length === 1) {
const singleNotice = notices[0];
notices = [singleNotice, singleNotice, singleNotice];
console.log('轮播数据只有1条,已复制成3条:', notices);
}
return notices;
});
......@@ -215,9 +225,46 @@ const formatNotice = (nickname, prize) => {
return fullText.length > 20 ? fullText.substring(0, 20) + '…' : fullText;
};
// 返回按钮处理
const handleBack = () => {
console.log('点击返回按钮')
// md.sensorComponentLogTake({
// xcxComponentClick: "true",
// pageName: "915专题活动抽奖页",
// componentName: "返回按钮",
// componentContent: "返回"
// });
try {
uni.navigateBack({
delta: 1,
success: () => {
console.log('返回成功')
},
fail: () => {
// 如果返回失败,跳转到首页
uni.redirectTo({
url: '/activity0915/act0915/act0915'
})
}
})
} catch (error) {
console.log('返回失败:', error)
uni.redirectTo({
url: '/activity0915/act0915/act0915'
})
}
}
// 规则按钮点击处理
const handleRuleClick = () => {
console.log('点击规则按钮')
md.sensorComponentLogTake({
xcxComponentClick: "true",
pageName: "915专题活动抽奖页",
componentName: "抽奖板块",
componentContent: "规则"
});
showRuleModal.value = true
}
......@@ -229,7 +276,12 @@ const handleRuleModalClose = () => {
// 奖品按钮点击处理
const handleAwardClick = () => {
console.log('点击奖品按钮')
md.sensorComponentLogTake({
xcxComponentClick: "true",
pageName: "915专题活动抽奖页",
componentName: "抽奖板块",
componentContent: "奖品"
});
// 根据环境获取对应的appId
const getAppId = () => {
// 可以根据实际环境判断
......@@ -362,6 +414,12 @@ const stopNoticeCarousel = () => {
// 抽奖按钮点击处理
const handleDrawClick = async () => {
md.sensorComponentLogTake({
xcxComponentClick: "true",
pageName: "915专题活动抽奖页",
componentName: "抽奖板块",
componentContent: "立即抽奖"
});
if (!canDraw.value) {
uni.showToast({
title: '抽奖次数已用完',
......@@ -400,15 +458,15 @@ const handleDrawClick = async () => {
isDrawing.value = false
showDrawFailModal.value = true
}
} else {
} else {
// uni.hideLoading()
isDrawing.value = false
uni.showToast({
title: response.msg || '抽奖失败',
icon: 'none'
})
}
} catch (error) {
}
} catch (error) {
console.error('getAct915LotteryDraw 接口请求失败:', error)
uni.hideLoading()
isDrawing.value = false
......@@ -455,7 +513,7 @@ const startHighlightAnimation = (targetIndex, isWin) => {
currentAwardName.value = turntablePrizes.value[targetIndex].prizeName
currentAwardImageUrl.value = turntablePrizes.value[targetIndex].prizeImageUrl
showDrawSucModal.value = true
} else {
} else {
showDrawFailModal.value = true
}
......@@ -512,6 +570,13 @@ onMounted(() => {
console.log('抽奖页面已加载')
loadRuleModalConfig() // 先加载规则弹窗配置
loadLotteryInfo()
md.sensorComponentLogTake({
xcxComponentExposure: "true",
pageName: "915专题活动抽奖页",
componentName: "抽奖板块",
componentContent: "规则、奖品、立即抽奖"
});
})
onUnmounted(() => {
......
// 抽奖页面样式
.lotterypage {
width: 750rpx;
height: 1624rpx;
height: 100vh;
left: 0rpx;
top: 0rpx;
overflow: hidden;
position: absolute;
// 返回按钮样式
.nav-left {
position: fixed;
top: 60rpx;
left: 30rpx;
z-index: 999;
.back-btn {
width: 60rpx;
height: 60rpx;
}
}
.lotterypageCon {
width: 750rpx;
height: 1624rpx;
top: 0rpx;
bottom: 0rpx;
margin: auto;
position: absolute;
}
.lotterypagebg {
width: 750rpx;
height: 1624rpx;
......@@ -269,7 +292,7 @@
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
color: rgba(0, 0, 0, 1);
color: rgba(0, 0, 0, 1);
text-align: center;
}
}
......@@ -394,7 +417,7 @@
.lotterypagenoticecontext-container {
transition: transform 0.5s ease-in-out;
&.no-transition {
transition: none;
}
......@@ -453,7 +476,7 @@
opacity: 0.5;
cursor: not-allowed;
pointer-events: none;
&:hover {
opacity: 0.5;
}
......
......@@ -13,6 +13,27 @@
"type": -1,
"url": ""
}
},
{
"image": "Act915Page/v3/Act915PageBanner3.png",
"link": {
"type": -1,
"url": ""
}
},
{
"image": "Act915Page/v3/Act915PageBanner4.png",
"link": {
"type": -1,
"url": ""
}
},
{
"image": "Act915Page/v3/Act915PageBanner5.png",
"link": {
"type": -1,
"url": ""
}
}
],
"goods": {
......@@ -28,7 +49,8 @@
},
"type": 2,
"url": "/subPackages/shopMainProcess/product/index?productId=791811288869839822&skuId=791811288869839823"
}
},
"title": "爱本纤纤益生菌羽衣甘蓝蛋白粉(1.5g*14)(J+X)"
},
{
"id": 2,
......@@ -39,7 +61,8 @@
},
"type": 2,
"url": "/subPackages/shopMainProcess/product/index?productId=748378985404945887&skuId=748378985404945888"
}
},
"title": "爱本跃动蛋白营养粉600g(20g*30条)【J+X】"
},
{
"id": 3,
......@@ -50,7 +73,8 @@
},
"type": 2,
"url": "/subPackages/shopMainProcess/product/index?productId=749105279435866513&skuId=749105279435866514"
}
},
"title": "爱本跃动蛋白营养粉200g【J+X】"
}
]
},
......@@ -66,7 +90,8 @@
},
"type": 2,
"url": "/subPackages/shopMainProcess/product/index?productId=767546274051183809&skuId=767546274051183810"
}
},
"title": "爱本纤纤益生菌羽衣甘蓝蛋白粉(1.5g*14)"
},
{
"id": 2,
......@@ -77,7 +102,8 @@
},
"type": 2,
"url": "/subPackages/shopMainProcess/product/index?productId=748659115456528889&skuId=748659115456528890"
}
},
"title": "金装爱本牛初乳配方奶粉616g/盒"
},
{
"id": 3,
......@@ -88,7 +114,8 @@
},
"type": 2,
"url": "/subPackages/shopMainProcess/product/index?productId=749098220531287139&skuId=749098220531287140"
}
},
"title": "爱本跃动蛋白营养粉200g"
},
{
"id": 4,
......@@ -99,7 +126,8 @@
},
"type": 2,
"url": "/subPackages/shopMainProcess/product/index?productId=791808935596365423&skuId=791808935596365424"
}
},
"title": "爱本跃动蛋白营养粉600g/盒(20g*30条)"
},
{
"id": 5,
......@@ -110,7 +138,8 @@
},
"type": 2,
"url": "/subPackages/shopMainProcess/product/index?productId=768991288915277214&skuId=768991288915277215"
}
},
"title": "爱本每日蛋白营养糊400g(25g*16)"
},
{
"id": 6,
......@@ -121,7 +150,8 @@
},
"type": 2,
"url": "/subPackages/shopMainProcess/product/index?productId=7914062957339698784&skuId=791406295733969879"
}
},
"title": "飞鹤爱本免疫球蛋白IgG乳铁蛋白营养粉45g(1.5g*30条)"
}
]
},
......@@ -137,7 +167,8 @@
},
"type": 2,
"url": "/subPackages/shopMainProcess/product/index?productId=748373470406312440&skuId=748373470406312441"
}
},
"title": "经典爱本乳铁蛋白配方奶粉800g【J+X】"
},
{
"id": 2,
......@@ -148,7 +179,8 @@
},
"type": 2,
"url": "/subPackages/shopMainProcess/product/index?productId=748374838109458955&skuId=748374838109458956"
}
},
"title": "经典爱本膳骨配方奶粉800g【J+X】"
},
{
"id": 3,
......@@ -159,7 +191,8 @@
},
"type": 2,
"url": "/subPackages/shopMainProcess/product/index?productId=748374193441031857&skuId=748374193441031858"
}
},
"title": "经典爱本葆欣配方奶粉800g【J+X】"
},
{
"id": 4,
......@@ -170,7 +203,8 @@
},
"type": 2,
"url": "/subPackages/shopMainProcess/product/index?productId=748376191670080756&skuId=748376191670080757"
}
},
"title": "经典爱本清澄配方奶粉800g【J+X】"
},
{
"id": 5,
......@@ -181,7 +215,8 @@
},
"type": 2,
"url": "/subPackages/shopMainProcess/product/index?productId=803065749907539292&skuId=803065749907539293"
}
},
"title": "飞鹤乐高高学生营养奶粉400g (25g*16条独立装)"
},
{
"id": 6,
......@@ -192,7 +227,8 @@
},
"type": 2,
"url": "/subPackages/shopMainProcess/product/index?productId=803077734359466778&skuId=803077734359466779"
}
},
"title": "飞鹤智多多学生营养奶粉400g (25g*16条独立装)"
}
]
},
......@@ -205,7 +241,8 @@
},
"type": 2,
"url": "subPackages/shopMainProcess/product/index?productId=809227403994695284&skuId=809227403994695285"
}
},
"title": "【限时换购】爱本纤纤益生菌羽衣甘蓝蛋白粉3条装*2"
}
},
"background": {
......
{
"ruleImg": "LotteryPage/v1/LotteryPageBg.png"
"ruleImg": "LotteryPage/v1/ruleImg.png"
}
\ No newline at end of file
......@@ -248,15 +248,16 @@
"style": {
"navigationBarTitleText": "",
"shareAppMessage": true,
"shareTimeline": false
"shareTimeline": false,
"navigationStyle": "custom"
}
},
{
"path": "lottery/lottery",
"style": {
"navigationBarTitleText": ""
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
}
]
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment