Commit 5198e7ea authored by 张九刚's avatar 张九刚

feat: fixbug

parent fe823538
...@@ -148,7 +148,7 @@ onMounted(() => { ...@@ -148,7 +148,7 @@ onMounted(() => {
md.sensorComponentLogTake({ md.sensorComponentLogTake({
xcxComponentExposure: "true", xcxComponentExposure: "true",
pageName: "积分服务页", pageName: "积分服务页",
componentName: "育儿课程", componentName: "会员权益",
componentContent: "育儿课程-查看育儿课程" componentContent: "育儿课程-查看育儿课程"
}); });
...@@ -176,7 +176,7 @@ const jump = (level) => { ...@@ -176,7 +176,7 @@ const jump = (level) => {
md.sensorComponentLogTake({ md.sensorComponentLogTake({
xcxComponentClick: "true", xcxComponentClick: "true",
pageName: "积分服务页", pageName: "积分服务页",
componentName: "育儿课程", componentName: "会员权益",
componentContent: "育儿课程-查看育儿课程" componentContent: "育儿课程-查看育儿课程"
}); });
// 检查用户等级是否符合要求 // 检查用户等级是否符合要求
......
...@@ -610,6 +610,12 @@ const closeJingxuanPopup = () => { ...@@ -610,6 +610,12 @@ const closeJingxuanPopup = () => {
} }
const handleCouponClick = async (level) => { const handleCouponClick = async (level) => {
md.sensorComponentLogTake({
xcxComponentClick: "true",
pageName: "积分服务页",
componentName: "会员权益",
componentContent: "月月礼-"+getCouponButtonText(currentLevelName.value)
});
console.log("handleCouponClick level:", level, "state.couponStatus:", state.couponStatus) console.log("handleCouponClick level:", level, "state.couponStatus:", state.couponStatus)
if (state.couponStatus[level] === 'used') { if (state.couponStatus[level] === 'used') {
...@@ -658,7 +664,7 @@ const handleBuyClick = async (level) => { ...@@ -658,7 +664,7 @@ const handleBuyClick = async (level) => {
md.sensorComponentLogTake({ md.sensorComponentLogTake({
xcxComponentClick: "true", xcxComponentClick: "true",
pageName: "积分服务页", pageName: "积分服务页",
componentName: "月月礼", componentName: "会员权益",
componentContent: "月月礼-" +getBuyButtonText(currentLevelName.value) componentContent: "月月礼-" +getBuyButtonText(currentLevelName.value)
}); });
console.log(`Clicked buy for ${level}`) console.log(`Clicked buy for ${level}`)
...@@ -765,7 +771,7 @@ const switchTimeSlot = (index) => { ...@@ -765,7 +771,7 @@ const switchTimeSlot = (index) => {
md.sensorComponentLogTake({ md.sensorComponentLogTake({
xcxComponentExposure: "true", xcxComponentExposure: "true",
pageName: "积分服务页", pageName: "积分服务页",
componentName: "月月礼", componentName: "会员权益",
componentContent: "月月礼-" + state.timeSlots[state.selectedTimeSlot].time+"-"+getBuyButtonText(currentLevelName.value) componentContent: "月月礼-" + state.timeSlots[state.selectedTimeSlot].time+"-"+getBuyButtonText(currentLevelName.value)
}); });
} }
...@@ -992,9 +998,15 @@ const initExposure = () => { ...@@ -992,9 +998,15 @@ const initExposure = () => {
md.sensorComponentLogTake({ md.sensorComponentLogTake({
xcxComponentExposure: "true", xcxComponentExposure: "true",
pageName: "积分服务页", pageName: "积分服务页",
componentName: "月月礼", componentName: "会员权益",
componentContent: "月月礼-" + state.timeSlots[state.selectedTimeSlot].time+"-"+getBuyButtonText(currentLevelName.value) componentContent: "月月礼-" + state.timeSlots[state.selectedTimeSlot].time+"-"+getBuyButtonText(currentLevelName.value)
}); });
md.sensorComponentLogTake({
xcxComponentExposure: "true",
pageName: "积分服务页",
componentName: "会员权益",
componentContent: "月月礼-"+getCouponButtonText(currentLevelName.value)
});
} }
// 初始化 // 初始化
......
...@@ -144,7 +144,7 @@ ...@@ -144,7 +144,7 @@
</template> </template>
<script setup> <script setup>
import { getCurrentInstance, computed } from 'vue' import { getCurrentInstance, computed,onMounted } from 'vue'
import { YEAR_GIFT_IMAGES } from './yearGiftImages.js' import { YEAR_GIFT_IMAGES } from './yearGiftImages.js'
// 获取全局属性 // 获取全局属性
...@@ -199,9 +199,22 @@ const buttonInfo = computed(() => { ...@@ -199,9 +199,22 @@ const buttonInfo = computed(() => {
}; };
} }
}) })
onMounted(() => {
md.sensorComponentLogTake({
xcxComponentExposure: "true",
pageName: "积分服务页",
componentName: "会员权益",
componentContent: "周岁礼-"+buttonInfo.value.text
});
})
// 按钮点击事件处理 // 按钮点击事件处理
const handleButtonClick = () => { const handleButtonClick = () => {
md.sensorComponentLogTake({
xcxComponentClick: "true",
pageName: "积分服务页",
componentName: "会员权益",
componentContent: "周岁礼-"+buttonInfo.value.text
});
if (buttonInfo.value.action === 'upgrade') { if (buttonInfo.value.action === 'upgrade') {
// 跳转到升级页面 // 跳转到升级页面
uni.navigateTo({ uni.navigateTo({
......
...@@ -109,7 +109,7 @@ onMounted(() => { ...@@ -109,7 +109,7 @@ onMounted(() => {
md.sensorComponentLogTake({ md.sensorComponentLogTake({
xcxComponentExposure: "true", xcxComponentExposure: "true",
pageName: "积分服务页", pageName: "积分服务页",
componentName: "爱本新人礼", componentName: "会员权益",
componentContent: "爱本新人礼-去升级" componentContent: "爱本新人礼-去升级"
}); });
console.log('props.isshowLocksdfsdfsdfsdsf===', props.isshowLock) console.log('props.isshowLocksdfsdfsdfsdsf===', props.isshowLock)
...@@ -123,7 +123,7 @@ const handleUpgrade = () => { ...@@ -123,7 +123,7 @@ const handleUpgrade = () => {
md.sensorComponentLogTake({ md.sensorComponentLogTake({
xcxComponentClick: "true", xcxComponentClick: "true",
pageName: "积分服务页", pageName: "积分服务页",
componentName: "爱本新人礼", componentName: "会员权益",
componentContent: "爱本新人礼-去升级" componentContent: "爱本新人礼-去升级"
}); });
emit('upgrade', { emit('upgrade', {
......
...@@ -57,7 +57,7 @@ onMounted(() => { ...@@ -57,7 +57,7 @@ onMounted(() => {
md.sensorComponentLogTake({ md.sensorComponentLogTake({
xcxComponentExposure: "true", xcxComponentExposure: "true",
pageName: "积分服务页", pageName: "积分服务页",
componentName: "晋级礼", componentName: "会员权益",
componentContent: "晋级礼-去升级" componentContent: "晋级礼-去升级"
}); });
}) })
...@@ -108,7 +108,7 @@ const handleUpgrade = () => { ...@@ -108,7 +108,7 @@ const handleUpgrade = () => {
md.sensorComponentLogTake({ md.sensorComponentLogTake({
xcxComponentClick: "true", xcxComponentClick: "true",
pageName: "积分服务页", pageName: "积分服务页",
componentName: "晋级礼", componentName: "会员权益",
componentContent: "晋级礼-去升级" componentContent: "晋级礼-去升级"
}); });
emit('upgrade', { emit('upgrade', {
......
...@@ -55,7 +55,7 @@ onMounted(() => { ...@@ -55,7 +55,7 @@ onMounted(() => {
md.sensorComponentLogTake({ md.sensorComponentLogTake({
xcxComponentExposure: "true", xcxComponentExposure: "true",
pageName: "积分服务页", pageName: "积分服务页",
componentName: "免费问诊", componentName: "会员权益",
componentContent: "免费问诊-立即使用" componentContent: "免费问诊-立即使用"
}); });
}) })
...@@ -74,7 +74,7 @@ const handleUseNow = () => { ...@@ -74,7 +74,7 @@ const handleUseNow = () => {
md.sensorComponentLogTake({ md.sensorComponentLogTake({
xcxComponentClick: "true", xcxComponentClick: "true",
pageName: "积分服务页", pageName: "积分服务页",
componentName: "免费问诊", componentName: "会员权益",
componentContent: "免费问诊-立即使用" componentContent: "免费问诊-立即使用"
}); });
emit('use-now', { emit('use-now', {
......
...@@ -62,6 +62,7 @@ ...@@ -62,6 +62,7 @@
import { defineProps, defineEmits, onMounted, ref } from 'vue' import { defineProps, defineEmits, onMounted, ref } from 'vue'
import { showLoading, hideLoading } from '../../utils' import { showLoading, hideLoading } from '../../utils'
import { fetchBirthdayGiftJSON } from '../../api/integral' import { fetchBirthdayGiftJSON } from '../../api/integral'
import md from '../../md.js'
import { useUserStore } from "../../stores/user"; import { useUserStore } from "../../stores/user";
...@@ -146,7 +147,12 @@ const handleUpgrade = async () => { ...@@ -146,7 +147,12 @@ const handleUpgrade = async () => {
index: status1.value, index: status1.value,
userStore:useUserStore() userStore:useUserStore()
}) })
md.sensorComponentLogTake({
xcxComponentClick: "true",
pageName: "积分服务页",
componentName: "会员权益",
componentContent: "生日礼-"+getBtnName()
});
} }
// 待开启按钮点击 // 待开启按钮点击
...@@ -183,7 +189,7 @@ const status1 = ref(0); ...@@ -183,7 +189,7 @@ const status1 = ref(0);
const hasBaby = ref(false); const hasBaby = ref(false);
const islogin = ref(true); const islogin = ref(true);
onMounted(async () => { onMounted(async () => {
const userStore = useUserStore(); const userStore = useUserStore();
const memberInfo = userStore.memberInfo; const memberInfo = userStore.memberInfo;
...@@ -218,6 +224,12 @@ onMounted(async () => { ...@@ -218,6 +224,12 @@ onMounted(async () => {
} }
console.log('data', data); console.log('data', data);
hideLoading(); hideLoading();
md.sensorComponentLogTake({
xcxComponentExposure: "true",
pageName: "积分服务页",
componentName: "会员权益",
componentContent: "生日礼-"+getBtnName()
});
}) })
......
...@@ -100,7 +100,7 @@ const handleUpgrade = () => { ...@@ -100,7 +100,7 @@ const handleUpgrade = () => {
md.sensorComponentLogTake({ md.sensorComponentLogTake({
xcxComponentClick: "true", xcxComponentClick: "true",
pageName: "积分服务页", pageName: "积分服务页",
componentName: "溯源游", componentName: "会员权益",
componentContent: "溯源游-"+(props.isshowLock ? '去升级' : '立即报名') componentContent: "溯源游-"+(props.isshowLock ? '去升级' : '立即报名')
}); });
emit('upgrade', { emit('upgrade', {
...@@ -158,7 +158,7 @@ onMounted(async () => { ...@@ -158,7 +158,7 @@ onMounted(async () => {
md.sensorComponentLogTake({ md.sensorComponentLogTake({
xcxComponentExposure: "true", xcxComponentExposure: "true",
pageName: "积分服务页", pageName: "积分服务页",
componentName: "溯源游", componentName: "会员权益",
componentContent: "溯源游-"+(props.isshowLock ? '去升级' : '立即报名') componentContent: "溯源游-"+(props.isshowLock ? '去升级' : '立即报名')
}); });
}) })
......
...@@ -72,7 +72,7 @@ onMounted(() => { ...@@ -72,7 +72,7 @@ onMounted(() => {
md.sensorComponentLogTake({ md.sensorComponentLogTake({
xcxComponentExposure: "true", xcxComponentExposure: "true",
pageName: "积分服务页", pageName: "积分服务页",
componentName: "转段礼", componentName: "会员权益",
componentContent: "转段礼-去升级" componentContent: "转段礼-去升级"
}); });
}) })
...@@ -110,7 +110,7 @@ const handleUpgrade = () => { ...@@ -110,7 +110,7 @@ const handleUpgrade = () => {
md.sensorComponentLogTake({ md.sensorComponentLogTake({
xcxComponentClick: "true", xcxComponentClick: "true",
pageName: "积分服务页", pageName: "积分服务页",
componentName: "转段礼", componentName: "会员权益",
componentContent: "转段礼-去升级" componentContent: "转段礼-去升级"
}); });
emit('upgrade', { emit('upgrade', {
......
...@@ -94,6 +94,11 @@ ...@@ -94,6 +94,11 @@
xcxClick: '品牌故事-次屏页面点击', xcxClick: '品牌故事-次屏页面点击',
pageName: '品牌故事-次屏页面', pageName: '品牌故事-次屏页面',
buttonName: `${productTabList[channelTabIndex] + '中的' + infoItem.title}+'商品'` buttonName: `${productTabList[channelTabIndex] + '中的' + infoItem.title}+'商品'`
}" :data-comlog="{
xcxComponentClick: 'true',
pageName: '品牌故事页',
componentName: '飞鹤产品家族',
componentContent: '产品家族商品-' + infoItem.desc
}" @tap="jumpProduct(infoItem, $event)"> }" @tap="jumpProduct(infoItem, $event)">
<view class="flexbox"> <view class="flexbox">
<view class="infotitle"> <view class="infotitle">
...@@ -520,6 +525,9 @@ export default { ...@@ -520,6 +525,9 @@ export default {
jumpProduct(item, evt) { jumpProduct(item, evt) {
if (evt) { if (evt) {
md.sensorLog(evt); md.sensorLog(evt);
if (evt.currentTarget.dataset.comlog) {
md.sensorComponentLogTake(evt.currentTarget.dataset.comlog);
}
} }
const { productId, skuId, contentImg, contentImgLen, shareTitle, shareImg, title } = item; const { productId, skuId, contentImg, contentImgLen, shareTitle, shareImg, title } = item;
const tabName = this.productTabList[this.channelTabIndex]; const tabName = this.productTabList[this.channelTabIndex];
......
...@@ -662,6 +662,12 @@ export default { ...@@ -662,6 +662,12 @@ export default {
pageName: '首页-首屏', pageName: '首页-首屏',
buttonName: `第${index + 1}张焦点图-入口`, buttonName: `第${index + 1}张焦点图-入口`,
}); });
md.sensorComponentLogTake({
xcxComponentExposure: "true",
pageName: "首页",
componentName: "首页banner",
componentContent: item.title
});
if (item.videoUrl) { if (item.videoUrl) {
this.currentVideoUrl = this.$baseUrl + item.videoUrl; this.currentVideoUrl = this.$baseUrl + item.videoUrl;
this.showVideo = true; this.showVideo = true;
......
...@@ -436,10 +436,23 @@ const handleChangeBaby = (e) => { ...@@ -436,10 +436,23 @@ const handleChangeBaby = (e) => {
md.sensorLog(e); md.sensorLog(e);
md.sensorComponentLogTake({ md.sensorComponentLogTake({
xcxComponentClick: "true", xcxComponentClick: "true",
xcxComponentExposure: "true",
pageName: "我的页面", pageName: "我的页面",
componentName: "资料编辑", componentName: "资料编辑",
componentContent: "状态展开" componentContent: "状态展开"
}) })
md.sensorComponentLogTake({
xcxComponentExposure: "true",
pageName: "我的页面",
componentName: "资料编辑",
componentContent: "新增"
})
md.sensorComponentLogTake({
xcxComponentExposure: "true",
pageName: "我的页面",
componentName: "资料编辑",
componentContent: "状态切换"
})
showBabySwitcher.value = true; showBabySwitcher.value = true;
}; };
......
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