Commit 1f3429d2 authored by spc's avatar spc

fixed act915

parent 34f1b60d
<template> <template>
<view class="act915page" v-if="!loading"> <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="act915pagebg" :style="getBackgroundStyle()"></span>
<span class="act915pagegoods1" :style="{ backgroundImage: `url(${$baseUrl}${getImageUrl('goods1')})` }" <span class="act915pagegoods1" :style="{ backgroundImage: `url(${$baseUrl}${getImageUrl('goods1')})` }"
@click="handleGoods1Click"></span> @click="handleGoods1Click"></span>
...@@ -113,8 +119,8 @@ ...@@ -113,8 +119,8 @@
</view> </view>
<!-- 抽奖成功弹窗 --> <!-- 抽奖成功弹窗 -->
<DrawSucModal :visible="showDrawSucModal" :award-name="currentAwardName" :award-image-url="currentAwardImageUrl" @close="handleDrawSucModalClose" <DrawSucModal :visible="showDrawSucModal" :award-name="currentAwardName" :award-image-url="currentAwardImageUrl"
@happy-get="handleHappyGet" /> @close="handleDrawSucModalClose" @happy-get="handleHappyGet" />
</view> </view>
</template> </template>
...@@ -127,6 +133,7 @@ import { useUserStore } from '@/stores/user'; // Import userStore ...@@ -127,6 +133,7 @@ import { useUserStore } from '@/stores/user'; // Import userStore
import { invitationAssist } from '@/api/activity0915/index.js'; // Import invitationAssist import { invitationAssist } from '@/api/activity0915/index.js'; // Import invitationAssist
import { jump } from '../../utils/index.js'; // Import jump function import { jump } from '../../utils/index.js'; // Import jump function
import DrawSucModal from '../lottery/components/drawSucModal/drawSucModal.vue'; // Import DrawSucModal if needed import DrawSucModal from '../lottery/components/drawSucModal/drawSucModal.vue'; // Import DrawSucModal if needed
import md from '../../md.js';
// 组件名称 // 组件名称
defineOptions({ defineOptions({
...@@ -206,9 +213,46 @@ const getBackgroundStyle = () => { ...@@ -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区域点击处理 // 商品1区域点击处理
const handleGoods1Click = () => { const handleGoods1Click = () => {
console.log('点击商品1区域') console.log('点击商品1区域')
md.sensorComponentLogTake({
xcxComponentClick: "true",
pageName: "915专题活动首页",
componentName: "商品单列图",
componentContent: config.value?.goods?.goods1?.title || "商品单列图"
});
jump(config.value?.goods?.goods1?.link) jump(config.value?.goods?.goods1?.link)
} }
...@@ -405,6 +449,14 @@ const handleGoods3Click = (productId) => { ...@@ -405,6 +449,14 @@ const handleGoods3Click = (productId) => {
const goods3List = goods3Data?.items || [] const goods3List = goods3Data?.items || []
const product = goods3List.find(item => item.id === productId) const product = goods3List.find(item => item.id === productId)
// 添加埋点
md.sensorComponentLogTake({
xcxComponentClick: "true",
pageName: "915专题活动首页",
componentName: "商品三列图",
componentContent: product?.title || `商品三列图-商品${productId}`
});
if (product && product.link) { if (product && product.link) {
// 直接处理跳转链接 // 直接处理跳转链接
jump(product.link) jump(product.link)
...@@ -426,6 +478,14 @@ const handleGoodsList1Click = (productId) => { ...@@ -426,6 +478,14 @@ const handleGoodsList1Click = (productId) => {
const goodsList1 = goodsList1Data?.items || [] const goodsList1 = goodsList1Data?.items || []
const product = goodsList1.find(item => item.id === productId) const product = goodsList1.find(item => item.id === productId)
// 添加埋点
md.sensorComponentLogTake({
xcxComponentClick: "true",
pageName: "915专题活动首页",
componentName: "爆品不错过商品专区",
componentContent: product?.title || `爆品不错过商品专区-商品${productId}`
});
if (product && product.link) { if (product && product.link) {
// 直接处理跳转链接 // 直接处理跳转链接
jump(product.link) jump(product.link)
...@@ -447,6 +507,14 @@ const handleGoodsList2Click = (productId) => { ...@@ -447,6 +507,14 @@ const handleGoodsList2Click = (productId) => {
const goodsList2 = goodsList2Data?.items || [] const goodsList2 = goodsList2Data?.items || []
const product = goodsList2.find(item => item.id === productId) const product = goodsList2.find(item => item.id === productId)
// 添加埋点
md.sensorComponentLogTake({
xcxComponentClick: "true",
pageName: "915专题活动首页",
componentName: "好物等你来商品专区",
componentContent: product?.title || `好物等你来商品专区-商品${productId}`
});
if (product && product.link) { if (product && product.link) {
// 直接处理跳转链接 // 直接处理跳转链接
jump(product.link) jump(product.link)
...@@ -489,7 +557,7 @@ const handleInvitationAssist = async (incomingCode) => { ...@@ -489,7 +557,7 @@ const handleInvitationAssist = async (incomingCode) => {
try { try {
console.log('处理助力邀请码:', incomingCode) console.log('处理助力邀请码:', incomingCode)
const unionId = uni.getStorageSync('unionId'); const unionId = uni.getStorageSync('unionId');
const res = await invitationAssist(incomingCode, unionId); const res = await invitationAssist(incomingCode, unionId);
if (res && res.success) { if (res && res.success) {
uni.showToast({ uni.showToast({
...@@ -549,6 +617,79 @@ const initPage = async () => { ...@@ -549,6 +617,79 @@ const initPage = async () => {
onMounted(async () => { onMounted(async () => {
console.log('915活动页面已加载') 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 { try {
console.log('开始执行 normalAutoLogin...') console.log('开始执行 normalAutoLogin...')
......
...@@ -23,6 +23,19 @@ ...@@ -23,6 +23,19 @@
max-width: 100vw; // 确保不超过视口宽度 max-width: 100vw; // 确保不超过视口宽度
overflow-x: hidden; // 防止水平滚动 overflow-x: hidden; // 防止水平滚动
// 返回按钮样式
.nav-left {
position: fixed;
top: 60rpx;
left: 30rpx;
z-index: 999;
.back-btn {
width: 60rpx;
height: 60rpx;
}
}
.act915pagebg { .act915pagebg {
width: 750rpx; width: 750rpx;
height: 4238rpx; height: 4238rpx;
......
...@@ -46,11 +46,11 @@ ...@@ -46,11 +46,11 @@
// 规则内容滚动容器 // 规则内容滚动容器
.rulemodal-text-container { .rulemodal-text-container {
width: 481rpx; width: 100%;
height: 471rpx; height: 471rpx;
position: absolute; position: absolute;
top: 154rpx; // top: 154rpx;
left: 35rpx; // left: 35rpx;
overflow-y: auto; overflow-y: auto;
overflow-x: hidden; overflow-x: hidden;
z-index: 3; z-index: 3;
......
This diff is collapsed.
// 抽奖页面样式 // 抽奖页面样式
.lotterypage { .lotterypage {
width: 750rpx; width: 750rpx;
height: 1624rpx; height: 100vh;
left: 0rpx; left: 0rpx;
top: 0rpx; top: 0rpx;
overflow: hidden;
position: absolute; 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 { .lotterypagebg {
width: 750rpx; width: 750rpx;
height: 1624rpx; height: 1624rpx;
...@@ -269,7 +292,7 @@ ...@@ -269,7 +292,7 @@
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
color: rgba(0, 0, 0, 1); color: rgba(0, 0, 0, 1);
text-align: center; text-align: center;
} }
} }
...@@ -394,7 +417,7 @@ ...@@ -394,7 +417,7 @@
.lotterypagenoticecontext-container { .lotterypagenoticecontext-container {
transition: transform 0.5s ease-in-out; transition: transform 0.5s ease-in-out;
&.no-transition { &.no-transition {
transition: none; transition: none;
} }
...@@ -453,7 +476,7 @@ ...@@ -453,7 +476,7 @@
opacity: 0.5; opacity: 0.5;
cursor: not-allowed; cursor: not-allowed;
pointer-events: none; pointer-events: none;
&:hover { &:hover {
opacity: 0.5; opacity: 0.5;
} }
......
...@@ -13,6 +13,27 @@ ...@@ -13,6 +13,27 @@
"type": -1, "type": -1,
"url": "" "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": { "goods": {
...@@ -28,7 +49,8 @@ ...@@ -28,7 +49,8 @@
}, },
"type": 2, "type": 2,
"url": "/subPackages/shopMainProcess/product/index?productId=791811288869839822&skuId=791811288869839823" "url": "/subPackages/shopMainProcess/product/index?productId=791811288869839822&skuId=791811288869839823"
} },
"title": "爱本纤纤益生菌羽衣甘蓝蛋白粉(1.5g*14)(J+X)"
}, },
{ {
"id": 2, "id": 2,
...@@ -39,7 +61,8 @@ ...@@ -39,7 +61,8 @@
}, },
"type": 2, "type": 2,
"url": "/subPackages/shopMainProcess/product/index?productId=748378985404945887&skuId=748378985404945888" "url": "/subPackages/shopMainProcess/product/index?productId=748378985404945887&skuId=748378985404945888"
} },
"title": "爱本跃动蛋白营养粉600g(20g*30条)【J+X】"
}, },
{ {
"id": 3, "id": 3,
...@@ -50,7 +73,8 @@ ...@@ -50,7 +73,8 @@
}, },
"type": 2, "type": 2,
"url": "/subPackages/shopMainProcess/product/index?productId=749105279435866513&skuId=749105279435866514" "url": "/subPackages/shopMainProcess/product/index?productId=749105279435866513&skuId=749105279435866514"
} },
"title": "爱本跃动蛋白营养粉200g【J+X】"
} }
] ]
}, },
...@@ -66,7 +90,8 @@ ...@@ -66,7 +90,8 @@
}, },
"type": 2, "type": 2,
"url": "/subPackages/shopMainProcess/product/index?productId=767546274051183809&skuId=767546274051183810" "url": "/subPackages/shopMainProcess/product/index?productId=767546274051183809&skuId=767546274051183810"
} },
"title": "爱本纤纤益生菌羽衣甘蓝蛋白粉(1.5g*14)"
}, },
{ {
"id": 2, "id": 2,
...@@ -77,7 +102,8 @@ ...@@ -77,7 +102,8 @@
}, },
"type": 2, "type": 2,
"url": "/subPackages/shopMainProcess/product/index?productId=748659115456528889&skuId=748659115456528890" "url": "/subPackages/shopMainProcess/product/index?productId=748659115456528889&skuId=748659115456528890"
} },
"title": "金装爱本牛初乳配方奶粉616g/盒"
}, },
{ {
"id": 3, "id": 3,
...@@ -88,7 +114,8 @@ ...@@ -88,7 +114,8 @@
}, },
"type": 2, "type": 2,
"url": "/subPackages/shopMainProcess/product/index?productId=749098220531287139&skuId=749098220531287140" "url": "/subPackages/shopMainProcess/product/index?productId=749098220531287139&skuId=749098220531287140"
} },
"title": "爱本跃动蛋白营养粉200g"
}, },
{ {
"id": 4, "id": 4,
...@@ -99,7 +126,8 @@ ...@@ -99,7 +126,8 @@
}, },
"type": 2, "type": 2,
"url": "/subPackages/shopMainProcess/product/index?productId=791808935596365423&skuId=791808935596365424" "url": "/subPackages/shopMainProcess/product/index?productId=791808935596365423&skuId=791808935596365424"
} },
"title": "爱本跃动蛋白营养粉600g/盒(20g*30条)"
}, },
{ {
"id": 5, "id": 5,
...@@ -110,7 +138,8 @@ ...@@ -110,7 +138,8 @@
}, },
"type": 2, "type": 2,
"url": "/subPackages/shopMainProcess/product/index?productId=768991288915277214&skuId=768991288915277215" "url": "/subPackages/shopMainProcess/product/index?productId=768991288915277214&skuId=768991288915277215"
} },
"title": "爱本每日蛋白营养糊400g(25g*16)"
}, },
{ {
"id": 6, "id": 6,
...@@ -121,7 +150,8 @@ ...@@ -121,7 +150,8 @@
}, },
"type": 2, "type": 2,
"url": "/subPackages/shopMainProcess/product/index?productId=7914062957339698784&skuId=791406295733969879" "url": "/subPackages/shopMainProcess/product/index?productId=7914062957339698784&skuId=791406295733969879"
} },
"title": "飞鹤爱本免疫球蛋白IgG乳铁蛋白营养粉45g(1.5g*30条)"
} }
] ]
}, },
...@@ -137,7 +167,8 @@ ...@@ -137,7 +167,8 @@
}, },
"type": 2, "type": 2,
"url": "/subPackages/shopMainProcess/product/index?productId=748373470406312440&skuId=748373470406312441" "url": "/subPackages/shopMainProcess/product/index?productId=748373470406312440&skuId=748373470406312441"
} },
"title": "经典爱本乳铁蛋白配方奶粉800g【J+X】"
}, },
{ {
"id": 2, "id": 2,
...@@ -148,7 +179,8 @@ ...@@ -148,7 +179,8 @@
}, },
"type": 2, "type": 2,
"url": "/subPackages/shopMainProcess/product/index?productId=748374838109458955&skuId=748374838109458956" "url": "/subPackages/shopMainProcess/product/index?productId=748374838109458955&skuId=748374838109458956"
} },
"title": "经典爱本膳骨配方奶粉800g【J+X】"
}, },
{ {
"id": 3, "id": 3,
...@@ -159,7 +191,8 @@ ...@@ -159,7 +191,8 @@
}, },
"type": 2, "type": 2,
"url": "/subPackages/shopMainProcess/product/index?productId=748374193441031857&skuId=748374193441031858" "url": "/subPackages/shopMainProcess/product/index?productId=748374193441031857&skuId=748374193441031858"
} },
"title": "经典爱本葆欣配方奶粉800g【J+X】"
}, },
{ {
"id": 4, "id": 4,
...@@ -170,7 +203,8 @@ ...@@ -170,7 +203,8 @@
}, },
"type": 2, "type": 2,
"url": "/subPackages/shopMainProcess/product/index?productId=748376191670080756&skuId=748376191670080757" "url": "/subPackages/shopMainProcess/product/index?productId=748376191670080756&skuId=748376191670080757"
} },
"title": "经典爱本清澄配方奶粉800g【J+X】"
}, },
{ {
"id": 5, "id": 5,
...@@ -181,7 +215,8 @@ ...@@ -181,7 +215,8 @@
}, },
"type": 2, "type": 2,
"url": "/subPackages/shopMainProcess/product/index?productId=803065749907539292&skuId=803065749907539293" "url": "/subPackages/shopMainProcess/product/index?productId=803065749907539292&skuId=803065749907539293"
} },
"title": "飞鹤乐高高学生营养奶粉400g (25g*16条独立装)"
}, },
{ {
"id": 6, "id": 6,
...@@ -192,7 +227,8 @@ ...@@ -192,7 +227,8 @@
}, },
"type": 2, "type": 2,
"url": "/subPackages/shopMainProcess/product/index?productId=803077734359466778&skuId=803077734359466779" "url": "/subPackages/shopMainProcess/product/index?productId=803077734359466778&skuId=803077734359466779"
} },
"title": "飞鹤智多多学生营养奶粉400g (25g*16条独立装)"
} }
] ]
}, },
...@@ -205,7 +241,8 @@ ...@@ -205,7 +241,8 @@
}, },
"type": 2, "type": 2,
"url": "subPackages/shopMainProcess/product/index?productId=809227403994695284&skuId=809227403994695285" "url": "subPackages/shopMainProcess/product/index?productId=809227403994695284&skuId=809227403994695285"
} },
"title": "【限时换购】爱本纤纤益生菌羽衣甘蓝蛋白粉3条装*2"
} }
}, },
"background": { "background": {
......
{ {
"ruleImg": "LotteryPage/v1/LotteryPageBg.png" "ruleImg": "LotteryPage/v1/ruleImg.png"
} }
\ No newline at end of file
...@@ -248,15 +248,16 @@ ...@@ -248,15 +248,16 @@
"style": { "style": {
"navigationBarTitleText": "", "navigationBarTitleText": "",
"shareAppMessage": true, "shareAppMessage": true,
"shareTimeline": false "shareTimeline": false,
"navigationStyle": "custom"
} }
}, },
{ {
"path": "lottery/lottery", "path": "lottery/lottery",
"style": { "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