Commit 34d3f09a authored by 张九刚's avatar 张九刚

Merge branch 'feature/20250825md' into 'master'

Feature/20250825md

See merge request !1
parents f6646fad d198c5c1
File deleted
......@@ -2,3 +2,4 @@ unpackage/
dist/
static/
node_modules/
.DS_Store
\ No newline at end of file
{
"editor.semanticHighlighting.enabled": false,
"files.associations": {
"*.wxml": "html",
"*.wxss": "css",
"*.wxs": "javascript"
},
"editor.tokenColorCustomizations": {
"comments": "#9AA0A6",
"textMateRules": [
{
"scope": [
"comment",
"comment.block",
"comment.block.documentation",
"punctuation.definition.comment"
],
"settings": { "foreground": "#9AA0A6" }
},
{
"scope": [
"comment.block.html",
"punctuation.definition.comment.html",
"comment.block.vue",
"punctuation.definition.comment.vue",
"comment.block.vue-html",
"punctuation.definition.comment.vue-html",
"comment.block.xml",
"punctuation.definition.comment.xml"
],
"settings": { "foreground": "#9AA0A6" }
},
{
"scope": [
"comment.block.js",
"comment.line.double-slash.js",
"punctuation.definition.comment.js",
"comment.block.javascript",
"comment.line.double-slash.javascript",
"punctuation.definition.comment.javascript"
],
"settings": { "foreground": "#9AA0A6" }
},
{
"scope": [
"comment.block.css",
"punctuation.definition.comment.css"
],
"settings": { "foreground": "#9AA0A6" }
}
],
"[Default Dark+]": {
"comments": "#9AA0A6",
"textMateRules": [
{
"scope": [
"comment",
"comment.block",
"comment.block.documentation",
"punctuation.definition.comment",
"comment.block.html",
"punctuation.definition.comment.html",
"comment.block.vue",
"punctuation.definition.comment.vue",
"comment.block.vue-html",
"punctuation.definition.comment.vue-html",
"comment.block.xml",
"punctuation.definition.comment.xml",
"comment.block.js",
"comment.line.double-slash.js",
"punctuation.definition.comment.js",
"comment.block.javascript",
"comment.line.double-slash.javascript",
"punctuation.definition.comment.javascript",
"comment.block.css",
"punctuation.definition.comment.css"
],
"settings": { "foreground": "#9AA0A6" }
}
]
},
"[Default Light+]": {
"comments": "#80868B",
"textMateRules": [
{
"scope": [
"comment",
"comment.block",
"comment.block.documentation",
"punctuation.definition.comment",
"comment.block.html",
"punctuation.definition.comment.html",
"comment.block.vue",
"punctuation.definition.comment.vue",
"comment.block.vue-html",
"punctuation.definition.comment.vue-html",
"comment.block.xml",
"punctuation.definition.comment.xml",
"comment.block.js",
"comment.line.double-slash.js",
"punctuation.definition.comment.js",
"comment.block.javascript",
"comment.line.double-slash.javascript",
"punctuation.definition.comment.javascript",
"comment.block.css",
"punctuation.definition.comment.css"
],
"settings": { "foreground": "#80868B" }
}
]
},
"[Cursor Dark]": {
"comments": "#9AA0A6",
"textMateRules": [
{
"scope": [
"comment",
"comment.block",
"comment.block.documentation",
"punctuation.definition.comment",
"comment.block.html",
"punctuation.definition.comment.html",
"comment.block.vue",
"punctuation.definition.comment.vue",
"comment.block.vue-html",
"punctuation.definition.comment.vue-html",
"comment.block.xml",
"punctuation.definition.comment.xml",
"comment.block.js",
"comment.line.double-slash.js",
"punctuation.definition.comment.js",
"comment.block.javascript",
"comment.line.double-slash.javascript",
"punctuation.definition.comment.javascript",
"comment.block.css",
"punctuation.definition.comment.css"
],
"settings": { "foreground": "#9AA0A6" }
}
]
},
"[Cursor Light]": {
"comments": "#80868B",
"textMateRules": [
{
"scope": [
"comment",
"comment.block",
"comment.block.documentation",
"punctuation.definition.comment",
"comment.block.html",
"punctuation.definition.comment.html",
"comment.block.vue",
"punctuation.definition.comment.vue",
"comment.block.vue-html",
"punctuation.definition.comment.vue-html",
"comment.block.xml",
"punctuation.definition.comment.xml",
"comment.block.js",
"comment.line.double-slash.js",
"punctuation.definition.comment.js",
"comment.block.javascript",
"comment.line.double-slash.javascript",
"punctuation.definition.comment.javascript",
"comment.block.css",
"punctuation.definition.comment.css"
],
"settings": { "foreground": "#80868B" }
}
]
}
},
"editor.semanticTokenColorCustomizations": {
"enabled": false
}
}
......@@ -3,21 +3,12 @@
<view class="popup-content" @click.stop>
<!-- 喂养方式列表 -->
<view class="feed-list">
<view
v-for="(item, index) in feedOptions"
:key="index"
class="feed-item"
:class="{ selected: selectedIndex === index }"
@click="selectFeed(index)"
>
<view v-for="(item, index) in feedOptions" :key="index" class="feed-item"
:class="{ selected: selectedIndex === index }" @click="selectFeed(index)">
<!-- 选中背景 -->
<image
v-if="selectedIndex === index"
class="feed-item-bg"
:src="`${$baseUrl}shengzhangTool/1001/changeFeed/itemBg.png`"
mode="aspectFit"
/>
<image v-if="selectedIndex === index" class="feed-item-bg"
:src="`${$baseUrl}shengzhangTool/1001/changeFeed/itemBg.png`" mode="aspectFit" />
<!-- 喂养方式文本 -->
<text class="feed-text">{{ item.name }}</text>
</view>
......@@ -25,30 +16,21 @@
<!-- 底部按钮 -->
<view class="bottom-buttons">
<image
class="cancel-btn"
:class="{'cancel-btn-active': isCancelPressed}"
<image class="cancel-btn" :class="{ 'cancel-btn-active': isCancelPressed }"
:src="`${$baseUrl}shengzhangTool/1001/changeFeed/cancelBtn.png`"
@touchstart="handleCancelTouchStart"
@touchend="handleCancelTouchEnd"
mode="aspectFit"
/>
<image
class="ok-btn"
:class="{'ok-btn-active': isOkPressed}"
:src="`${$baseUrl}shengzhangTool/1001/changeFeed/okBtn.png`"
@touchstart="handleOkTouchStart"
@touchend="handleOkTouchEnd"
mode="aspectFit"
/>
@touchstart="handleCancelTouchStart" @touchend="handleCancelTouchEnd" mode="aspectFit" />
<image class="ok-btn" :class="{ 'ok-btn-active': isOkPressed }"
:src="`${$baseUrl}shengzhangTool/1001/changeFeed/okBtn.png`" @touchstart="handleOkTouchStart"
@touchend="handleOkTouchEnd" mode="aspectFit" />
</view>
</view>
</view>
</template>
<script setup>
import { ref, defineEmits, defineProps, onMounted } from 'vue'
import { ref, defineEmits, defineProps, watch, onMounted } from 'vue'
import md from '../md.js'
const props = defineProps({
visible: {
......@@ -90,6 +72,12 @@ const selectedFeedText = ref('母乳+奶粉混合喂养')
const selectFeed = (index) => {
selectIndex.value = index
emit('update:selectedIndex', index)
md.sensorPopLogTake({
xcxPopClick: "true",
toolName: "生长曲线",
popName: "喂养方式选择弹窗",
buttonName: feedOptions.value[index].name
});
}
// 取消按钮事件
......@@ -109,13 +97,19 @@ const handleOkTouchStart = () => {
const handleOkTouchEnd = () => {
isOkPressed.value = false
md.sensorPopLogTake({
xcxPopClick: "true",
toolName: "生长曲线",
popName: "喂养方式选择弹窗",
buttonName: "确认"
});
const index = selectIndex.value
const selectedFeed = feedOptions.value[index]
// 发送事件通知主页面
emit('change', selectedFeed, index)//只能传一个参数
closePopup()
closePopup("nonePop")
}
// 点击喂养方式选择
......@@ -127,24 +121,38 @@ const openFeedSelector = () => {
// 处理喂养方式选择变化
const onFeedChange = (feedOption, index) => {
isLoadingFeed.value = true
console.log('选择了喂养方式:', feedOption, index)
selectedFeedText.value = feedOption.name
currentFeedIndex.value = index
// 模拟保存数据
setTimeout(() => {
isLoadingFeed.value = false
}, 300)
}
const closePopup = () => {
const closePopup = (type) => {
if (type !== 'nonePop') {
md.sensorPopLogTake({
xcxPopClick: "true",
toolName: "生长曲线",
popName: "喂养方式选择弹窗",
buttonName: "取消"
});
}
emit('update:visible', false)
}
onMounted(() => {
})
watch(() => props.visible, (newVal) => {
if (newVal) {
md.sensorPopLogTake({
xcxPopExposure: "true",
toolName: "生长曲线",
popName: "喂养方式选择弹窗"
});
}
})
}
</script>
<style lang="less" scoped>
......@@ -173,7 +181,7 @@ onMounted(() => {
overflow-y: auto;
padding-left: 30rpx;
padding-right: 30rpx;
.feed-item {
position: relative;
display: flex;
......@@ -183,18 +191,18 @@ onMounted(() => {
margin-bottom: 20rpx;
border-radius: 16rpx;
background-color: #fff;
&.selected {
background-color: transparent;
}
.feed-item-bg {
position: absolute;
width: 689rpx;
height: 108rpx;
z-index: 1;
}
.feed-text {
position: relative;
z-index: 2;
......@@ -212,22 +220,22 @@ onMounted(() => {
padding-top: 20rpx;
padding-left: 30rpx;
padding-right: 30rpx;
.cancel-btn {
width: 334rpx;
height: 97rpx;
transition: transform 0.1s ease-out;
&.cancel-btn-active {
transform: scale(0.95);
}
}
.ok-btn {
width: 334rpx;
height: 97rpx;
transition: transform 0.1s ease-out;
&.ok-btn-active {
transform: scale(0.95);
}
......@@ -251,23 +259,22 @@ onMounted(() => {
display: flex;
align-items: center;
cursor: pointer; // 添加手型光标
.feeding-value {
font-size: 28rpx;
color: #666;
margin-right: 8rpx;
}
.dropdown-icon {
width: 20rpx;
height: 20rpx;
transition: transform 0.3s ease; // 添加旋转动画
}
// 可选:添加点击反馈效果
&:active {
opacity: 0.7;
}
}
</style>
......@@ -67,6 +67,7 @@
<script setup>
import { ref, defineEmits, defineProps, onMounted } from 'vue'
import { useUserStore } from "@/stores/user";
import md from '../md.js'
// const props = defineProps({
// visible: {
......@@ -104,6 +105,12 @@ const handleOkTouchStart = () => {
}
const handleOkTouchEnd = async () => {
md.sensorPopLogTake({
xcxPopClick: "true",
toolName: "生长曲线",
popName: "切换宝宝弹窗",
buttonName: "确认"
});
isOkPressed.value = false
const index = selectIndex.value;
......@@ -116,11 +123,23 @@ const handleOkTouchEnd = async () => {
}
const closePopup = () => {
md.sensorPopLogTake({
xcxPopClick: "true",
toolName: "生长曲线",
popName: "切换宝宝弹窗",
buttonName: "关闭"
});
emit('update:visible', false)
}
const selectIndex = ref(0)
const selectBaby = (index) => {
md.sensorPopLogTake({
xcxPopClick: "true",
toolName: "生长曲线",
popName: "切换宝宝弹窗",
buttonName: "宝宝列表"
});
selectIndex.value = index;
emit('update:selectedIndex', index);
}
......@@ -135,6 +154,11 @@ onMounted(() => {
const selectedIndexInList = babyList.value.findIndex(item => item.selected === true)
console.log('选中宝宝的索引:', selectedIndexInList)
selectIndex.value = selectedIndexInList;
md.sensorPopLogTake({
xcxPopExposure: "true",
toolName: "生长曲线",
popName: "切换宝宝弹窗"
});
})
......
......@@ -27,7 +27,8 @@
</template>
<script setup>
import { ref, defineEmits, defineProps } from 'vue'
import { ref, defineEmits, defineProps,watch } from 'vue'
import md from '../md.js'
const props = defineProps({
visible: {
......@@ -67,11 +68,27 @@ const handleOkTouchStart = () => {
const handleOkTouchEnd = () => {
isOkPressed.value = false
closePopup()
md.sensorPopLogTake({
xcxPopClick: "true",
toolName: "生长曲线",
popName: "测量方式提示弹窗",
buttonName: "我知道了"
});
}
const closePopup = () => {
emit('update:visible', false)
}
watch(() => props.visible, (newVal) => {
if (newVal) {
md.sensorPopLogTake({
xcxPopExposure: "true",
toolName: "生长曲线",
popName: "测量方式提示弹窗"
});
}
})
</script>
<style lang="less" scoped>
......
......@@ -65,7 +65,8 @@
</template>
<script setup>
import { ref, defineEmits, defineProps, watch, computed } from 'vue'
import { ref, defineEmits, defineProps, watch, computed,onMounted } from 'vue'
import md from '../md.js'
const props = defineProps({
visible: {
......@@ -107,6 +108,9 @@ const yearRange = computed(() => {
return yearRange
})
onMounted(() => {
})
// 生成月份范围 (1-12)
const monthRange = computed(() => {
......@@ -252,6 +256,12 @@ const handleOkTouchEnd = () => {
}
const closePopup = () => {
md.sensorPopLogTake({
xcxPopClick: "true",
toolName: "生长曲线",
popName: "选择本次测评日期弹窗",
buttonName: "关闭"
});
// 格式化日期为 YYYY-MM-DD
const year = currentDate.value.getFullYear()
const month = String(currentDate.value.getMonth() + 1).padStart(2, '0')
......
......@@ -111,9 +111,9 @@
</template>
<script setup>
import { getCurrentInstance } from 'vue'
import { getCurrentInstance,onMounted,computed } from 'vue'
import { BABY_CLASS_IMAGES } from './babyClassImages.js'
import { computed } from 'vue'
import md from '../../md.js'
// 获取全局属性
const { proxy } = getCurrentInstance()
......@@ -144,7 +144,15 @@ const getColor = () => {
]
return colors[props.currentLevel];
}
onMounted(() => {
md.sensorComponentLogTake({
xcxComponentExposure: "true",
pageName: "积分服务页",
componentName: "会员权益",
componentContent: "育儿课程-查看育儿课程"
});
})
// 等级映射常量
const LEVEL_MAP = {
......@@ -165,6 +173,12 @@ const userLevelName = computed(() => LEVEL_MAP[props.userLevel])
const jump = (level) => {
console.log(`跳转到 ${level} 等级页面`)
md.sensorComponentLogTake({
xcxComponentClick: "true",
pageName: "积分服务页",
componentName: "会员权益",
componentContent: "育儿课程-查看育儿课程"
});
// 检查用户等级是否符合要求
// const levelOrder = [0, 1, 2, 3, 4]; // gold, platinum, diamond, starlight, starshine
// const userLevelIndex = levelOrder.indexOf(props.userLevel);
......
......@@ -481,6 +481,7 @@ import { getCurrentInstance, reactive, computed, onMounted, watch, onUnmounted }
import { MONTH_GIFT_IMAGES } from './monthGiftImages.js'
import { monthlyGiftIndex, monthlyGiftDrawOne, monthlyGiftDrawAll } from '../../api/monthGift.js'
import { jump } from '../../utils/index.js'
import md from '../../md.js'
// import popupJingxuan from '../popup-jingxuan/popup-jingxuan.vue'
// 获取全局属性
......@@ -609,6 +610,12 @@ const closeJingxuanPopup = () => {
}
const handleCouponClick = async (level) => {
md.sensorComponentLogTake({
xcxComponentClick: "true",
pageName: "积分服务页",
componentName: "会员权益",
componentContent: "月月礼-"+getCouponButtonText(currentLevelName.value)
});
console.log("handleCouponClick level:", level, "state.couponStatus:", state.couponStatus)
if (state.couponStatus[level] === 'used') {
......@@ -654,6 +661,12 @@ const handleCouponClick = async (level) => {
}
const handleBuyClick = async (level) => {
md.sensorComponentLogTake({
xcxComponentClick: "true",
pageName: "积分服务页",
componentName: "会员权益",
componentContent: "月月礼-" +getBuyButtonText(currentLevelName.value)
});
console.log(`Clicked buy for ${level}`)
// 检查用户等级是否符合领取条件(优先级最高)
......@@ -755,6 +768,12 @@ const handleBuyClick = async (level) => {
const switchTimeSlot = (index) => {
state.selectedTimeSlot = index
console.log(`切换到时间段: ${state.timeSlots[index].time}`)
md.sensorComponentLogTake({
xcxComponentExposure: "true",
pageName: "积分服务页",
componentName: "会员权益",
componentContent: "月月礼-" + state.timeSlots[state.selectedTimeSlot].time+"-"+getBuyButtonText(currentLevelName.value)
});
}
// 获取精选好券按钮文本
......@@ -974,10 +993,28 @@ onUnmounted(() => {
}
})
const initExposure = () => {
md.sensorComponentLogTake({
xcxComponentExposure: "true",
pageName: "积分服务页",
componentName: "会员权益",
componentContent: "月月礼-" + state.timeSlots[state.selectedTimeSlot].time+"-"+getBuyButtonText(currentLevelName.value)
});
md.sensorComponentLogTake({
xcxComponentExposure: "true",
pageName: "积分服务页",
componentName: "会员权益",
componentContent: "月月礼-"+getCouponButtonText(currentLevelName.value)
});
}
// 初始化
onMounted(async () => {
console.log('MonthGift component mounted, current level:', props.currentLevel, props.userLevel)
await fetchMonthlyGiftData()
initExposure();
})
// 调试函数:打印当前状态
......
......@@ -144,8 +144,9 @@
</template>
<script setup>
import { getCurrentInstance, computed } from 'vue'
import { getCurrentInstance, computed,onMounted } from 'vue'
import { YEAR_GIFT_IMAGES } from './yearGiftImages.js'
import md from '../../md.js'
// 获取全局属性
const { proxy } = getCurrentInstance()
......@@ -199,9 +200,22 @@ const buttonInfo = computed(() => {
};
}
})
onMounted(() => {
md.sensorComponentLogTake({
xcxComponentExposure: "true",
pageName: "积分服务页",
componentName: "会员权益",
componentContent: "周岁礼-"+buttonInfo.value.text
});
})
// 按钮点击事件处理
const handleButtonClick = () => {
md.sensorComponentLogTake({
xcxComponentClick: "true",
pageName: "积分服务页",
componentName: "会员权益",
componentContent: "周岁礼-"+buttonInfo.value.text
});
if (buttonInfo.value.action === 'upgrade') {
// 跳转到升级页面
uni.navigateTo({
......
......@@ -47,6 +47,7 @@
<script setup>
import { defineProps, defineEmits, onMounted } from 'vue'
import md from '../../md.js'
// 定义组件名称
defineOptions({
......@@ -105,6 +106,12 @@ const isShowBtn = () => {
}
onMounted(() => {
md.sensorComponentLogTake({
xcxComponentExposure: "true",
pageName: "积分服务页",
componentName: "会员权益",
componentContent: "爱本新人礼-去升级"
});
console.log('props.isshowLocksdfsdfsdfsdsf===', props.isshowLock)
})
......@@ -113,6 +120,12 @@ const emit = defineEmits(['upgrade'])
// 去升级按钮点击
const handleUpgrade = () => {
md.sensorComponentLogTake({
xcxComponentClick: "true",
pageName: "积分服务页",
componentName: "会员权益",
componentContent: "爱本新人礼-去升级"
});
emit('upgrade', {
index: props.index
})
......
......@@ -44,13 +44,24 @@
</template>
<script setup>
import { defineProps, defineEmits } from 'vue'
import { defineProps, defineEmits,onMounted } from 'vue'
import md from '../../md.js'
// 定义组件名称
defineOptions({
name: 'jinjili'
})
onMounted(() => {
md.sensorComponentLogTake({
xcxComponentExposure: "true",
pageName: "积分服务页",
componentName: "会员权益",
componentContent: "晋级礼-去升级"
});
})
const getBgName = () => {
if(props.isshowLock){
return props.index + ""
......@@ -94,6 +105,12 @@ const emit = defineEmits(['upgrade'])
// 去升级按钮点击
const handleUpgrade = () => {
md.sensorComponentLogTake({
xcxComponentClick: "true",
pageName: "积分服务页",
componentName: "会员权益",
componentContent: "晋级礼-去升级"
});
emit('upgrade', {
index: props.index
})
......
......@@ -35,7 +35,8 @@
</template>
<script setup>
import { defineProps, defineEmits } from 'vue'
import { defineProps, defineEmits,onMounted } from 'vue'
import md from '../../md.js'
// 定义组件名称
defineOptions({
......@@ -50,6 +51,14 @@ const props = defineProps({
}
})
onMounted(() => {
md.sensorComponentLogTake({
xcxComponentExposure: "true",
pageName: "积分服务页",
componentName: "会员权益",
componentContent: "免费问诊-立即使用"
});
})
// 定义组件事件
const emit = defineEmits(['doctor-click', 'use-now'])
......@@ -62,9 +71,16 @@ const handleDoctorGridClick = () => {
// 立即使用按钮点击
const handleUseNow = () => {
md.sensorComponentLogTake({
xcxComponentClick: "true",
pageName: "积分服务页",
componentName: "会员权益",
componentContent: "免费问诊-立即使用"
});
emit('use-now', {
index: props.index
})
}
// 颜色配置
......
......@@ -62,6 +62,7 @@
import { defineProps, defineEmits, onMounted, ref } from 'vue'
import { showLoading, hideLoading } from '../../utils'
import { fetchBirthdayGiftJSON } from '../../api/integral'
import md from '../../md.js'
import { useUserStore } from "../../stores/user";
......@@ -146,7 +147,12 @@ const handleUpgrade = async () => {
index: status1.value,
userStore:useUserStore()
})
md.sensorComponentLogTake({
xcxComponentClick: "true",
pageName: "积分服务页",
componentName: "会员权益",
componentContent: "生日礼-"+getBtnName()
});
}
// 待开启按钮点击
......@@ -183,7 +189,7 @@ const status1 = ref(0);
const hasBaby = ref(false);
const islogin = ref(true);
onMounted(async () => {
const userStore = useUserStore();
const memberInfo = userStore.memberInfo;
......@@ -218,6 +224,12 @@ onMounted(async () => {
}
console.log('data', data);
hideLoading();
md.sensorComponentLogTake({
xcxComponentExposure: "true",
pageName: "积分服务页",
componentName: "会员权益",
componentContent: "生日礼-"+getBtnName()
});
})
......
......@@ -45,7 +45,7 @@
import { defineProps, defineEmits, ref, onMounted } from 'vue'
import { showLoading, hideLoading } from '../../utils';
import { fetchActivityStateJSON } from '../../api/integral';
import md from '../../md.js'
const handleUpgrade_daikaiqi = () => {
uni.showToast({
title: '活动暂未开启',
......@@ -97,6 +97,12 @@ const emit = defineEmits(['upgrade'])
// 去升级按钮点击
const handleUpgrade = () => {
md.sensorComponentLogTake({
xcxComponentClick: "true",
pageName: "积分服务页",
componentName: "会员权益",
componentContent: "溯源游-"+(props.isshowLock ? '去升级' : '立即报名')
});
emit('upgrade', {
index: props.index
})
......@@ -148,6 +154,13 @@ onMounted(async () => {
}
hideLoading();
md.sensorComponentLogTake({
xcxComponentExposure: "true",
pageName: "积分服务页",
componentName: "会员权益",
componentContent: "溯源游-"+(props.isshowLock ? '去升级' : '立即报名')
});
})
</script>
......
......@@ -46,7 +46,8 @@
</template>
<script setup>
import { defineProps, defineEmits } from 'vue'
import { defineProps, defineEmits,onMounted } from 'vue'
import md from '../../md.js'
// 定义组件名称
defineOptions({
......@@ -66,6 +67,16 @@ const props = defineProps({
}
})
onMounted(() => {
md.sensorComponentLogTake({
xcxComponentExposure: "true",
pageName: "积分服务页",
componentName: "会员权益",
componentContent: "转段礼-去升级"
});
})
const getBgName = () => {
if(props.isshowLock){
return props.index + ""
......@@ -96,6 +107,12 @@ const emit = defineEmits(['upgrade'])
// 去升级按钮点击
const handleUpgrade = () => {
md.sensorComponentLogTake({
xcxComponentClick: "true",
pageName: "积分服务页",
componentName: "会员权益",
componentContent: "转段礼-去升级"
});
emit('upgrade', {
index: props.index
})
......
......@@ -25,7 +25,8 @@
</template>
<script setup>
import { defineProps, defineEmits } from 'vue'
import { defineProps, defineEmits,watch } from 'vue'
import md from '../md.js'
// 定义props
const props = defineProps({
......@@ -40,8 +41,24 @@ const emit = defineEmits(['close'])
// 关闭弹窗
const closePopup = () => {
md.sensorPopLogTake({
xcxPopClick: "true",
toolName: "生长曲线",
popName: "生长曲线介绍弹窗",
buttonName: "我知道了"
});
emit('close')
}
watch(() => props.visible, (newVal) => {
if (newVal) {
md.sensorPopLogTake({
xcxPopExposure: "true",
toolName: "生长曲线",
popName: "生长曲线介绍弹窗"
});
}
})
</script>
<style lang="less" scoped>
......
......@@ -6,7 +6,7 @@ const init = (SENSORS_URL) => {
sensors.setPara({
name: "sensors",
server_url: SENSORS_URL,
show_log: true,
show_log: false,
autoTrack: {
appLaunch: true, // 默认为 true,false 则关闭 $MPLaunch 事件采集
appShow: true, // 默认为 true,false 则关闭 $MPShow 事件采集
......@@ -62,13 +62,13 @@ const sensorLog = (evt) => {
trackObj[key] = logObj[key];
}
if (xcxPage && xcxPage.length > 0) {
console.warn("xcxPage", trackObj);
// console.warn("xcxPage", trackObj);
sensors.track("xcxPage", {
...trackObj,
});
}
if (xcxClick && xcxClick.length > 0) {
console.warn("xcxClick", trackObj);
// console.warn("xcxClick", trackObj);
sensors.track("xcxClick", {
...trackObj,
});
......@@ -91,10 +91,101 @@ const sensorLogTake = (logObj) => {
};
sensorLog(evt);
};
const sensorComponentLog = (evt) => {
const _dataset = evt.currentTarget.dataset;
const logObj = _dataset.comlog;
if (!logObj) {
return;
}
const { xcxComponentExposure, xcxComponentClick } = logObj;
let trackObj = {};
for (let key in logObj) {
trackObj[key] = logObj[key];
}
if (xcxComponentExposure && xcxComponentExposure.length > 0) {
// console.warn("-----xcxComponentExposure-----", trackObj);
sensors.track("xcxComponentExposure", {
...trackObj,
});
}
if (xcxComponentClick && xcxComponentClick.length > 0) {
// console.warn("-----xcxComponentClick-----", trackObj);
sensors.track("xcxComponentClick", {
...trackObj,
});
}
};
/**
* 主动通过配置数据触发埋点
* @param {*} evt
*/
const sensorComponentLogTake = (logObj) => {
if (!logObj) {
return;
}
const evt = {
currentTarget: {
dataset: {
comlog: logObj,
},
},
};
sensorComponentLog(evt);
};
const sensorPopLog = (evt) => {
const _dataset = evt.currentTarget.dataset;
const logObj = _dataset.poplog;
if (!logObj) {
return;
}
const { xcxPopExposure, xcxPopClick } = logObj;
let trackObj = {};
for (let key in logObj) {
trackObj[key] = logObj[key];
}
if (xcxPopExposure && xcxPopExposure.length > 0) {
// console.warn("-----xcxPopExposure-----", trackObj);
sensors.track("xcxPopExposure", {
...trackObj,
});
}
if (xcxPopClick && xcxPopClick.length > 0) {
// console.warn("-----xcxPopClick-----", trackObj);
sensors.track("xcxPopClick", {
...trackObj,
});
}
};
/**
* 主动通过配置数据触发埋点
* @param {*} evt
*/
const sensorPopLogTake = (logObj) => {
if (!logObj) {
return;
}
const evt = {
currentTarget: {
dataset: {
poplog: logObj,
},
},
};
sensorPopLog(evt);
};
export default {
init,
sensors,
login,
sensorLog,
sensorLogTake,
sensorComponentLog,
sensorComponentLogTake,
sensorPopLog,
sensorPopLogTake,
};
......@@ -3,6 +3,7 @@
{
"videoUrl": "https://course.feihe.com/momclub-picture/brandpage/bannerVideo.mp4",
"link": {},
"title": "北纬47°黄金种植带",
"url": "brandpage/Banner41.png"
},
{
......@@ -11,14 +12,16 @@
"type": 3,
"url": "https://mp.weixin.qq.com/s/0eMxbWB3R_0g06HZPUEj5Q"
},
"title": "飞鹤自由牧场",
"url": "brandpage/Banner42.png"
},
{
"link": {
"extra": {},
"type": 3,
"url": "https://factory.feihe.com/user/#/web"
"type": 1,
"url": "/reservation/home/index"
},
"title": "飞鹤哈尔滨智能产业园",
"url": "brandpage/Banner44.png"
}
],
......@@ -26,7 +29,8 @@
"finderUserName": "",
"videoUrl": "brandpage/videoChannel/video2Channel/V1/1.mp4",
"posterUrl": "",
"feedId": ""
"feedId": "",
"title": "品牌故事视频2"
},
"product": [
[
......@@ -477,9 +481,13 @@
"videoUrl": "https://course.feihe.com/momclub-picture/brandpage/banner_1%E6%85%A2%E4%BA%BA%E8%8A%82x%E9%A3%9E%E9%B9%A4%2B-%2B%E5%9C%9FFINAL.mp4",
"erqiPeizhi": {
"ipImg4": "https://course.feihe.com/momclub-picture/brandpage/ip4.png",
"ipTitle3": "视频号",
"title1": "飞鹤产品家族",
"ipTitle4": "小红书",
"title2": "飞鹤品牌IP鹤小飞一家",
"ipTitle1": "毛绒可爱发夹",
"title3": "飞鹤ESG",
"ipTitle2": "大容量吨吨桶水杯",
"iphexiaofeiUrl": "https://course.feihe.com/momclub-picture/brandpage/v1_iphexiaofei.png",
"ipImg1": "https://course.feihe.com/momclub-picture/brandpage/v1_ip1.png",
"ipImg3": "https://course.feihe.com/momclub-picture/brandpage/ip3.png",
......@@ -489,7 +497,8 @@
"finderUserName": "sphgexisAi0pRGm",
"videoUrl": "brandpage/videoChannel/video1Channel/V2/1.mp4",
"posterUrl": "",
"feedId": "export/UzFfAgtgekIEAQAAAAAABbEMmxr36QAAAAstQy6ubaLX4KHWvLEZgBPEgaJkYSYbLr6JzNPgMJp7tTZCYcYsIpU6Z0fgSnSE"
"feedId": "export/UzFfAgtgekIEAQAAAAAABbEMmxr36QAAAAstQy6ubaLX4KHWvLEZgBPEgaJkYSYbLr6JzNPgMJp7tTZCYcYsIpU6Z0fgSnSE",
"title": "品牌故事视频1"
},
"esgInfoList": [
[
......
{
"contentImgList": [
{
"videoUrl": "https://course.feihe.com/momclub-picture/homepage/4-0%E5%AE%98%E7%BD%91%E8%A7%86%E9%A2%91.mp4",
"_style": "width:311rpx;height: 324rpx;left: 40rpx;top: 0;",
"link": "www.baidu.com",
"bgUrl": "homepage/content_1.png"
"contentImgList": [
{
"videoUrl": "https://course.feihe.com/momclub-picture/homepage/4-0%E5%AE%98%E7%BD%91%E8%A7%86%E9%A2%91.mp4",
"_style": "width:311rpx;height: 324rpx;left: 40rpx;top: 0;",
"link": "www.baidu.com",
"bgUrl": "homepage/content_1.png"
},
{
"videoUrl": "https://course.feihe.com/momclub-picture/homepage/%E9%A6%96%E9%A1%B5_2%E9%A3%9E%E9%B9%A4%E8%BF%9E%E7%BB%AD%E4%BA%94%E5%B9%B4%E5%A5%B6%E7%B2%89%E7%AC%AC%E4%B8%80.mp4",
"_style": "width:263rpx;height: 324rpx;right: 40rpx;top: 400rpx;",
"link": "www.baidu.com",
"bgUrl": "homepage/content_2.png"
},
{
"videoUrl": "https://course.feihe.com/momclub-picture/homepage/%E9%A6%96%E9%A1%B5_3%E3%80%909%E6%9C%8827%E6%97%A5%E3%80%91%E9%A3%9E%E9%B9%A4_%E4%B8%96%E7%95%8C%E6%97%85%E6%B8%B8%E6%97%A5.mp4",
"_style": "width:418rpx;height: 345rpx;left: 40rpx;top: 750rpx;",
"link": "www.baidu.com",
"bgUrl": "homepage/content_3.png"
},
{
"_style": "width:263rpx;height: 324rpx;right: 40rpx;top: 1120rpx;",
"link": {
"extra": {},
"type": 3,
"url": "https://mp.weixin.qq.com/s/HhBF5h8xX8zOrthsy2-Y-A"
},
"bgUrl": "homepage/content_4.png"
}
],
"toolList": {
"maintitle": "工具推荐",
"jtIcon": "homepage/tool_jt.png",
"subtitle": "更多妈妈都在用,告别手忙脚乱,助你轻松带娃!",
"tools": [
{
"icon": "homepage/tool_icon_2.png",
"link": {
"extra": {},
"type": 1,
"url": "/pages/feedingIndex/feedingIndex"
},
"context": "一键更新喂养记录",
"type": 1,
"title": "喂养工具"
},
{
"icon": "homepage/tool_icon_3.png",
"link": {
"extra": {},
"type": 1,
"url": "/pages/postnatalCheckUp/postnatalCheckUp"
},
"context": "孕周检查准时告知",
"type": 1,
"title": "产检提醒"
},
{
"icon": "homepage/tool_icon_4.png",
"link": {
"extra": {},
"type": 1,
"url": "/pages/shengzhangTools/shengzhangTools"
},
"context": "发育偏离预警早报",
"type": 1,
"title": "宝宝生长测评"
}
],
"bgUrl": "homepage/toolBg.png"
},
{
"videoUrl": "https://course.feihe.com/momclub-picture/homepage/%E9%A6%96%E9%A1%B5_2%E9%A3%9E%E9%B9%A4%E8%BF%9E%E7%BB%AD%E4%BA%94%E5%B9%B4%E5%A5%B6%E7%B2%89%E7%AC%AC%E4%B8%80.mp4",
"_style": "width:263rpx;height: 324rpx;right: 40rpx;top: 400rpx;",
"link": "www.baidu.com",
"bgUrl": "homepage/content_2.png"
"suggest": {
"link": {
"type": 3,
"url": "https://mom.feihe.com/expertsView?from=home"
}
},
{
"videoUrl": "https://course.feihe.com/momclub-picture/homepage/%E9%A6%96%E9%A1%B5_3%E3%80%909%E6%9C%8827%E6%97%A5%E3%80%91%E9%A3%9E%E9%B9%A4_%E4%B8%96%E7%95%8C%E6%97%85%E6%B8%B8%E6%97%A5.mp4",
"_style": "width:418rpx;height: 345rpx;left: 40rpx;top: 750rpx;",
"link": "www.baidu.com",
"bgUrl": "homepage/content_3.png"
"channelTabList": [
"凯叔讲故事",
"品格培养",
"知识科普",
"睡眠作息",
"宝贝喂养"
],
"popupImageObj": {
"btnName": "立即寻宝",
"jumpType": 1,
"imageUrl": "homepage/popImg/popBgImg2.jpg",
"jumpExtra": {},
"title": "北纬47°鲜活溯源之旅",
"jumpUrl": "/pages/syWebview/syWebview?p=xmh11"
},
{
"_style": "width:263rpx;height: 324rpx;right: 40rpx;top: 1120rpx;",
"voiceStory": {
"link": {
"extra": {},
"type": 3,
"url": "https://mp.weixin.qq.com/s/HhBF5h8xX8zOrthsy2-Y-A"
"url": "https://mom.feihe.com/babyWikipedia?from=song&sourceFrom=moreTools&source=moreTools&num=1&bir=2024-05-23&monthAge=12&month=null"
}
},
"channelTabListMianTitle": "有声频道",
"swiperList": [
{
"img": "homepage/homeSwiper/V1/7.jpg",
"link": {
"extra": {},
"type": 1,
"url": "/pages/syWebview/syWebview?p=xmh09"
},
"type": 1,
"title": "北纬47°鲜活溯源之旅",
"url": "homepage/homeSwiper/V1/7.jpg"
},
"bgUrl": "homepage/content_4.png"
}
],
"toolList": {
"maintitle": "工具推荐",
"jtIcon": "homepage/tool_jt.png",
"subtitle": "更多妈妈都在用,告别手忙脚乱,助你轻松带娃!",
"tools": [
{
"icon": "homepage/tool_icon_2.png",
"videoUrl": "homepage/homeSwiper/V1/8.mp4",
"link": {},
"title": "先是自己再是妈妈",
"url": "homepage/homeSwiper/V1/8.png"
},
{
"videoUrl": "homepage/homeSwiper/V1/2.m4v",
"link": {},
"title": "成为妈妈更懂妈妈",
"url": "homepage/homeSwiper/V1/2.png"
},
{
"img": "homepage/homeSwiper/V1/28会员日.jpg",
"link": {
"extra": {
"envVersion": "release",
"appId": "wx4205ec55b793245e"
},
"type": 2,
"url": "/subPackages/shopMainList/topicNew/index?id=1001087"
},
"title": "28会员日",
"url": "homepage/homeSwiper/V1/28会员日.jpg"
}
],
"childrenInfoList": [
[
{
"desc2": "乙肝母婴传播可防可控,但“时间窗口”不容错过!",
"link": {
"extra": {},
"type": 3,
"url": "https://mp.weixin.qq.com/s/8OHpMdvbuwJPGsfdXs7aDg"
},
"isNew": false,
"desc": "新生儿出生后24小时必做!错过可能影响一生健康",
"bgUrl": "homepage/children/childrenV1/1.jpg"
},
{
"desc2": "家长通过科学抚触,不仅能激活宝宝大脑神经突触,还能为宝宝的认知力、自护力打下坚实基础。",
"link": {
"extra": {},
"type": 3,
"url": "https://mp.weixin.qq.com/s/vMyPcDbAmwMsZCMlW0kkDA"
},
"isNew": false,
"desc": "0-3岁宝宝触觉发育关键期,附按摩手法!",
"bgUrl": "homepage/children/childrenV1/2.jpg"
},
{
"desc2": "究竟是体质虚弱?生病了?还是缺乏某些营养元素呢?星妈会带你一次性搞懂宝宝出汗的秘密!",
"link": {
"extra": {},
"type": 3,
"url": "https://mp.weixin.qq.com/s/pnYVG4yTuBSbNN-fIYKrCQ"
},
"isNew": false,
"desc": "宝宝满头汗vs全身湿!小心这4种疾病,正在偷走健康!",
"bgUrl": "homepage/children/childrenV1/3.jpg"
}
]
],
"vipConfigList": [
{
"btnTitle": "首注200元优惠券",
"subTitle": "新人礼权益",
"level": "注册会员",
"btnSubTitle": "立即注册",
"grade": "-1",
"bgUrl": "homepage/cardbg1.png"
},
{
"btnTitle": "三甲医生在线问诊",
"subTitle": "免费问诊权益",
"btnSubTitle": "立即了解",
"grade": "0",
"link": {
"extra": {
"envVersion": "release",
"appId": "wx4205ec55b793245e"
},
"type": 2,
"url": "subPackages/xmhMainProcess/member/index?entrySource=xmh_wechatmp_points_recgoodsbot"
},
"bgUrl": "homepage/cardbg1.png"
},
{
"btnTitle": "12类系列课程",
"subTitle": "育儿课程权益",
"btnSubTitle": "立即了解",
"grade": "1",
"link": {
"extra": {
"envVersion": "release",
"appId": "wx4205ec55b793245e"
},
"type": 2,
"url": "subPackages/xmhMainProcess/member/index?entrySource=xmh_wechatmp_points_recgoodsbot"
},
"bgUrl": "homepage/cardbg1.png"
},
{
"btnTitle": "12类系列课程",
"subTitle": "育儿课程权益",
"btnSubTitle": "立即了解",
"grade": "2",
"link": {
"extra": {
"envVersion": "release",
"appId": "wx4205ec55b793245e"
},
"type": 2,
"url": "subPackages/xmhMainProcess/member/index?entrySource=xmh_wechatmp_points_recgoodsbot"
},
"bgUrl": "homepage/cardbg1.png"
},
{
"btnTitle": "1分购、优惠券",
"subTitle": "月月礼权益",
"btnSubTitle": "立即了解",
"grade": "3",
"link": {
"extra": {
"envVersion": "release",
"appId": "wx4205ec55b793245e"
},
"type": 2,
"url": "subPackages/xmhMainProcess/member/index?entrySource=xmh_wechatmp_points_recgoodsbot"
},
"bgUrl": "homepage/cardbg1.png"
},
{
"btnTitle": "1分购、优惠券",
"subTitle": "月月礼权益",
"btnSubTitle": "立即了解",
"grade": "4",
"link": {
"extra": {
"envVersion": "release",
"appId": "wx4205ec55b793245e"
},
"type": 2,
"url": "subPackages/xmhMainProcess/member/index?entrySource=xmh_wechatmp_points_recgoodsbot"
},
"bgUrl": "homepage/cardbg1.png"
}
],
"changelInfoList": [
[
{
"link": {
"extra": {},
"type": 3,
"url": "https://mom.feihe.com/babyWikipedia/audioDetail?id=22101&type=3&period_id=5&tag_id=1&navActive=1&fnTagId=0"
},
"desc": "凯叔·金子美铃童诗:【藏好了吗】",
"bgUrl": "homepage/channel/soundChannelV1/1/1.jpg"
},
{
"link": {
"extra": {},
"type": 3,
"url": "https://mom.feihe.com/babyWikipedia/audioDetail?id=22102&type=3&period_id=5&tag_id=1&navActive=1&fnTagId=0"
},
"desc": "凯叔·金子美铃童诗:【水和风和娃娃】",
"bgUrl": "homepage/channel/soundChannelV1/1/2.jpg"
},
{
"link": {
"extra": {},
"type": 3,
"url": "https://mom.feihe.com/babyWikipedia/audioDetail?id=22103&type=3&period_id=5&tag_id=1&navActive=1&fnTagId=0"
},
"desc": "凯叔·金子美铃童诗:【羽绒被】",
"bgUrl": "homepage/channel/soundChannelV1/1/3.jpg"
},
{
"link": {
"extra": {},
"type": 3,
"url": "https://mom.feihe.com/babyWikipedia/audioDetail?id=22104&type=3&period_id=5&tag_id=1&navActive=1&fnTagId=0"
},
"desc": "凯叔·金子美铃童诗:【知了的外衣】",
"bgUrl": "homepage/channel/soundChannelV1/1/4.jpg"
},
{
"link": {
"extra": {},
"type": 3,
"url": "https://mom.feihe.com/babyWikipedia/audioDetail?id=22106&type=3&period_id=5&tag_id=1&navActive=1&fnTagId=0"
},
"desc": "凯叔·金子美铃童诗:【风】",
"bgUrl": "homepage/channel/soundChannelV1/1/5.jpg"
},
{
"link": {
"extra": {},
"type": 3,
"url": "https://mom.feihe.com/babyWikipedia/audioDetail?id=22107&type=3&period_id=5&tag_id=1&navActive=1&fnTagId=0"
},
"desc": "凯叔·金子美铃童诗:【我和小鸟和铃铛】",
"bgUrl": "homepage/channel/soundChannelV1/1/6.jpg"
}
],
[
{
"link": {
"extra": {},
"type": 3,
"url": "https://mom.feihe.com/babyWikipedia/audioDetail?id=21891&type=3&period_id=5&tag_id=1&navActive=1&fnTagId=0"
},
"desc": "培养宝宝不虚荣的好品格:【红舞鞋】",
"bgUrl": "homepage/channel/soundChannelV1/2/1.jpg"
},
{
"link": {
"extra": {},
"type": 3,
"url": "https://mom.feihe.com/babyWikipedia/audioDetail?id=21845&type=3&period_id=5&tag_id=1&navActive=1&fnTagId=0"
},
"desc": "【动物王国】教宝宝学会爱护东西:【谁是破坏王】",
"bgUrl": "homepage/channel/soundChannelV1/2/2.jpg"
},
{
"link": {
"extra": {},
"type": 3,
"url": "https://mom.feihe.com/babyWikipedia/audioDetail?id=21930&type=3&period_id=5&tag_id=1&navActive=1&fnTagId=0"
},
"desc": "培养宝宝拒绝的勇气:【该说不,就说不】",
"bgUrl": "homepage/channel/soundChannelV1/2/3.jpg"
},
{
"link": {
"extra": {},
"type": 3,
"url": "https://mom.feihe.com/babyWikipedia/audioDetail?id=21898&type=3&period_id=5&tag_id=1&navActive=1&fnTagId=0"
},
"desc": "培养宝宝专心的好习惯:【两个青年学棋】",
"bgUrl": "homepage/channel/soundChannelV1/2/4.jpg"
},
{
"link": {
"extra": {},
"type": 3,
"url": "https://mom.feihe.com/babyWikipedia/audioDetail?id=21953&type=3&period_id=5&tag_id=1&navActive=1&fnTagId=0"
},
"desc": "培养宝宝坚持的好品格:【不怕挫折的渔夫】",
"bgUrl": "homepage/channel/soundChannelV1/2/5.jpg"
},
{
"link": {
"extra": {},
"type": 3,
"url": "https://mom.feihe.com/babyWikipedia/audioDetail?id=21840&type=3&period_id=5&tag_id=1&navActive=1&fnTagId=0"
},
"desc": "培养宝宝的自制力:【一次只要一个】",
"bgUrl": "homepage/channel/soundChannelV1/2/6.jpg"
}
],
[
{
"link": {
"extra": {},
"type": 3,
"url": "https://mom.feihe.com/calendar/parentchildsongsdetail?id=22281"
},
"desc": "营养健康小知识:营养元素钙铁锌",
"bgUrl": "homepage/channel/soundChannelV1/3/1.jpg"
},
{
"link": {
"extra": {},
"type": 3,
"url": "https://mom.feihe.com/babyWikipedia/audioDetail?id=21328&type=3&period_id=5&tag_id=1&navActive=1&fnTagId=0"
},
"desc": "宝宝指甲长倒刺是缺维生素吗?",
"bgUrl": "homepage/channel/soundChannelV1/3/2.jpg"
},
{
"link": {
"extra": {},
"type": 3,
"url": "https://mom.feihe.com/babyWikipedia/audioDetail?id=21545&type=3&period_id=5&tag_id=1&navActive=1&fnTagId=0"
},
"desc": "如何分辨宝宝是攒肚还是便秘?",
"bgUrl": "homepage/channel/soundChannelV1/3/3.jpg"
},
{
"link": {
"extra": {},
"type": 3,
"url": "https://mom.feihe.com/babyWikipedia/audioDetail?id=21310&type=3&period_id=5&tag_id=1&navActive=1&fnTagId=0"
},
"desc": "手足口疫苗有必要打吗?",
"bgUrl": "homepage/channel/soundChannelV1/3/4.jpg"
},
{
"link": {
"extra": {},
"type": 3,
"url": "https://mom.feihe.com/babyWikipedia/audioDetail?id=21734&type=3&period_id=5&tag_id=1&navActive=1&fnTagId=0"
},
"desc": "宝宝多大开始刷牙?一定不能晚于这个时间!",
"bgUrl": "homepage/channel/soundChannelV1/3/5.jpg"
},
{
"link": {
"extra": {},
"type": 3,
"url": "https://mom.feihe.com/babyWikipedia/audioDetail?id=25897&type=3&period_id=5&tag_id=1&navActive=1&fnTagId=0"
},
"desc": "如何缓解0-6月宝宝肠绞痛?",
"bgUrl": "homepage/channel/soundChannelV1/3/6.jpg"
}
],
[
{
"link": {
"extra": {},
"type": 3,
"url": "https://mom.feihe.com/babyWikipedia/audioDetail?id=21533&type=3&period_id=5&tag_id=1&navActive=1&fnTagId=0"
},
"desc": "如何拯救睡渣宝宝?培养自主入睡?",
"bgUrl": "homepage/channel/soundChannelV1/4/1.jpg"
},
{
"link": {
"extra": {},
"type": 3,
"url": "https://mom.feihe.com/babyWikipedia/audioDetail?id=21602&type=3&period_id=5&tag_id=1&navActive=1&fnTagId=0"
},
"desc": "开灯睡觉影响宝宝智力发育?",
"bgUrl": "homepage/channel/soundChannelV1/4/2.jpg"
},
{
"link": {
"extra": {},
"type": 3,
"url": "https://mom.feihe.com/babyWikipedia/audioDetail?id=21613&type=3&period_id=5&tag_id=1&navActive=1&fnTagId=0"
},
"desc": "宝宝都爱“投降式睡姿”?要纠正吗?",
"bgUrl": "homepage/channel/soundChannelV1/4/3.jpg"
},
{
"link": {
"extra": {},
"type": 3,
"url": "https://mom.feihe.com/babyWikipedia/audioDetail?id=21494&type=3&period_id=5&tag_id=1&navActive=1&fnTagId=0"
},
"desc": "娃睡得正香,要不要叫醒吃奶?",
"bgUrl": "homepage/channel/soundChannelV1/4/4.jpg"
},
{
"link": {
"extra": {},
"type": 3,
"url": "https://mom.feihe.com/babyWikipedia/audioDetail?id=21633&type=3&period_id=5&tag_id=1&navActive=1&fnTagId=0"
},
"desc": "宝宝总夜醒怎么办?",
"bgUrl": "homepage/channel/soundChannelV1/4/5.jpg"
},
{
"link": {
"extra": {},
"type": 3,
"url": "https://mom.feihe.com/babyWikipedia/audioDetail?id=21629&type=3&period_id=5&tag_id=1&navActive=1&fnTagId=0"
},
"desc": "宝宝每天睡多久合适?",
"bgUrl": "homepage/channel/soundChannelV1/4/6.jpg"
}
],
[
{
"link": {
"extra": {},
"type": 3,
"url": "https://mom.feihe.com/babyWikipedia/audioDetail?id=21357&type=3&period_id=5&tag_id=1&navActive=1&fnTagId=0"
},
"desc": "宝宝夏日拉肚子该怎么办?",
"bgUrl": "homepage/channel/soundChannelV1/5/1.jpg"
},
{
"link": {
"extra": {},
"type": 3,
"url": "https://mom.feihe.com/babyWikipedia/audioDetail?id=21497&type=3&period_id=5&tag_id=1&navActive=1&fnTagId=0"
},
"desc": "给宝宝冲奶粉,冲稀点不上火,浓点更营养?",
"bgUrl": "homepage/channel/soundChannelV1/5/2.jpg"
},
{
"link": {
"extra": {},
"type": 3,
"url": "https://mom.feihe.com/babyWikipedia/audioDetail?id=21506&type=3&period_id=5&tag_id=1&navActive=1&fnTagId=0"
},
"desc": "怎样辨别奶粉中含有香精?",
"bgUrl": "homepage/channel/soundChannelV1/5/3.jpg"
},
{
"link": {
"extra": {},
"type": 3,
"url": "https://mom.feihe.com/babyWikipedia/audioDetail?id=21455&type=3&period_id=5&tag_id=1&navActive=1&fnTagId=0"
},
"desc": "怎样判断宝宝吃饱了没?",
"bgUrl": "homepage/channel/soundChannelV1/5/4.jpg"
},
{
"link": {
"extra": {},
"type": 3,
"url": "https://mom.feihe.com/babyWikipedia/audioDetail?id=21495&type=3&period_id=5&tag_id=1&navActive=1&fnTagId=0"
},
"desc": "奶粉颜色偏黄好?还是偏白好?",
"bgUrl": "homepage/channel/soundChannelV1/5/5.jpg"
},
{
"link": {
"extra": {},
"type": 3,
"url": "https://mom.feihe.com/babyWikipedia/audioDetail?id=21489&type=3&period_id=5&tag_id=1&navActive=1&fnTagId=0"
},
"desc": "冲奶粉,不能用哪种水?",
"bgUrl": "homepage/channel/soundChannelV1/5/6.jpg"
}
]
],
"bottomLinkList": [
{
"_style": "width:70rpx;height:109rpx;",
"link": "www.baidu.com",
"bgUrl": "homepage/iconwx.png"
},
{
"_style": "width:95rpx;height:109rpx;",
"link": "www.baidu.com",
"bgUrl": "homepage/iconqw.png"
},
{
"_style": "width:70rpx;height:109rpx;",
"link": "www.baidu.com",
"bgUrl": "homepage/iconsph.png"
},
{
"_style": "width:88rpx;height:99rpx;",
"link": "www.baidu.com",
"bgUrl": "homepage/iconxhs.png"
}
],
"vipCardList": [
{
"btnTitle": "12类系列课程",
"subTitle": "育儿课程权益",
"level": "钻石会员",
"btnSubTitle": "立即了解",
"link": {
"extra": {
"envVersion": "release",
"appId": "wx4205ec55b793245e"
},
"type": 2,
"url": "subPackages/xmhMainProcess/member/index?entrySource=xmh_wechatmp_points_recgoodsbot"
},
"bgUrl": "homepage/cardbg1.png"
},
{
"btnTitle": "",
"showCornerTxt": "",
"subTitle": "来自万年黑土的健康食品",
"level": "北纬47°系列",
"btnSubTitle": "",
"link": {
"extra": {
"envVersion": "release",
"appId": "wx4205ec55b793245e"
},
"type": 2,
"url": "subPackages/shopMainList/topicNew/index?id=1000265&entrySource=xmh_wechatmp_home_recgoods"
},
"bgUrl": "homepage/cardbg2.png"
},
{
"btnTitle": "",
"showCornerTxt": "",
"subTitle": "专家文章、育儿知识、饮食知识",
"level": "育儿宝典",
"btnSubTitle": "",
"link": {
"extra": {},
"type": 1,
"url": "/pages/feedingIndex/feedingIndex"
"url": "/pages/library/ContentLibrary"
},
<<<<<<< HEAD
"bgUrl": "homepage/cardbg3.png"
}
],
"qrInfoList": [
=======
"context": "一键更新喂养记录",
"type": 1,
"title": "喂养工具"
......@@ -137,498 +707,28 @@
],
"childrenInfoList": [
[
>>>>>>> master
{
"desc2": "乙肝母婴传播可防可控,但“时间窗口”不容错过!",
"link": {
"extra": {},
"type": 3,
"url": "https://mp.weixin.qq.com/s/8OHpMdvbuwJPGsfdXs7aDg"
},
"isNew": false,
"desc": "新生儿出生后24小时必做!错过可能影响一生健康",
"bgUrl": "homepage/children/childrenV1/1.jpg"
},
{
"desc2": "家长通过科学抚触,不仅能激活宝宝大脑神经突触,还能为宝宝的认知力、自护力打下坚实基础。",
"link": {
"extra": {},
"type": 3,
"url": "https://mp.weixin.qq.com/s/vMyPcDbAmwMsZCMlW0kkDA"
},
"isNew": false,
"desc": "0-3岁宝宝触觉发育关键期,附按摩手法!",
"bgUrl": "homepage/children/childrenV1/2.jpg"
},
{
"desc2": "究竟是体质虚弱?生病了?还是缺乏某些营养元素呢?星妈会带你一次性搞懂宝宝出汗的秘密!",
"link": {
"extra": {},
"type": 3,
"url": "https://mp.weixin.qq.com/s/pnYVG4yTuBSbNN-fIYKrCQ"
},
"isNew": false,
"desc": "宝宝满头汗vs全身湿!小心这4种疾病,正在偷走健康!",
"bgUrl": "homepage/children/childrenV1/3.jpg"
}
]
],
"vipConfigList": [
{
"btnTitle": "首注200元优惠券",
"subTitle": "新人礼权益",
"level": "注册会员",
"btnSubTitle": "立即注册",
"grade": "-1",
"bgUrl": "homepage/cardbg1.png"
},
{
"btnTitle": "三甲医生在线问诊",
"subTitle": "免费问诊权益",
"btnSubTitle": "立即了解",
"grade": "0",
"link": {
"extra": {
"envVersion": "release",
"appId": "wx4205ec55b793245e"
},
"type": 2,
"url": "subPackages/xmhMainProcess/member/index?entrySource=xmh_wechatmp_points_recgoodsbot"
},
"bgUrl": "homepage/cardbg1.png"
},
{
"btnTitle": "12类系列课程",
"subTitle": "育儿课程权益",
"btnSubTitle": "立即了解",
"grade": "1",
"link": {
"extra": {
"envVersion": "release",
"appId": "wx4205ec55b793245e"
},
"type": 2,
"url": "subPackages/xmhMainProcess/member/index?entrySource=xmh_wechatmp_points_recgoodsbot"
},
"bgUrl": "homepage/cardbg1.png"
},
{
"btnTitle": "12类系列课程",
"subTitle": "育儿课程权益",
"btnSubTitle": "立即了解",
"grade": "2",
"link": {
"extra": {
"envVersion": "release",
"appId": "wx4205ec55b793245e"
},
"type": 2,
"url": "subPackages/xmhMainProcess/member/index?entrySource=xmh_wechatmp_points_recgoodsbot"
},
"bgUrl": "homepage/cardbg1.png"
},
{
"btnTitle": "1分购、优惠券",
"subTitle": "月月礼权益",
"btnSubTitle": "立即了解",
"grade": "3",
"link": {
"extra": {
"envVersion": "release",
"appId": "wx4205ec55b793245e"
},
"type": 2,
"url": "subPackages/xmhMainProcess/member/index?entrySource=xmh_wechatmp_points_recgoodsbot"
},
"bgUrl": "homepage/cardbg1.png"
},
{
"btnTitle": "1分购、优惠券",
"subTitle": "月月礼权益",
"btnSubTitle": "立即了解",
"grade": "4",
"link": {
"extra": {
"envVersion": "release",
"appId": "wx4205ec55b793245e"
},
"type": 2,
"url": "subPackages/xmhMainProcess/member/index?entrySource=xmh_wechatmp_points_recgoodsbot"
},
"bgUrl": "homepage/cardbg1.png"
}
],
"changelInfoList": [
[
{
"link": {
"extra": {},
"type": 3,
"url": "https://mom.feihe.com/babyWikipedia/audioDetail?id=22101&type=3&period_id=5&tag_id=1&navActive=1&fnTagId=0"
},
"desc": "凯叔·金子美铃童诗:【藏好了吗】",
"bgUrl": "homepage/channel/soundChannelV1/1/1.jpg"
},
{
"link": {
"extra": {},
"type": 3,
"url": "https://mom.feihe.com/babyWikipedia/audioDetail?id=22102&type=3&period_id=5&tag_id=1&navActive=1&fnTagId=0"
},
"desc": "凯叔·金子美铃童诗:【水和风和娃娃】",
"bgUrl": "homepage/channel/soundChannelV1/1/2.jpg"
},
{
"link": {
"extra": {},
"type": 3,
"url": "https://mom.feihe.com/babyWikipedia/audioDetail?id=22103&type=3&period_id=5&tag_id=1&navActive=1&fnTagId=0"
},
"desc": "凯叔·金子美铃童诗:【羽绒被】",
"bgUrl": "homepage/channel/soundChannelV1/1/3.jpg"
},
{
"link": {
"extra": {},
"type": 3,
"url": "https://mom.feihe.com/babyWikipedia/audioDetail?id=22104&type=3&period_id=5&tag_id=1&navActive=1&fnTagId=0"
},
"desc": "凯叔·金子美铃童诗:【知了的外衣】",
"bgUrl": "homepage/channel/soundChannelV1/1/4.jpg"
},
{
"link": {
"extra": {},
"type": 3,
"url": "https://mom.feihe.com/babyWikipedia/audioDetail?id=22106&type=3&period_id=5&tag_id=1&navActive=1&fnTagId=0"
},
"desc": "凯叔·金子美铃童诗:【风】",
"bgUrl": "homepage/channel/soundChannelV1/1/5.jpg"
},
{
"link": {
"extra": {},
"type": 3,
"url": "https://mom.feihe.com/babyWikipedia/audioDetail?id=22107&type=3&period_id=5&tag_id=1&navActive=1&fnTagId=0"
},
"desc": "凯叔·金子美铃童诗:【我和小鸟和铃铛】",
"bgUrl": "homepage/channel/soundChannelV1/1/6.jpg"
}
],
[
{
"link": {
"extra": {},
"type": 3,
"url": "https://mom.feihe.com/babyWikipedia/audioDetail?id=21891&type=3&period_id=5&tag_id=1&navActive=1&fnTagId=0"
},
"desc": "培养宝宝不虚荣的好品格:【红舞鞋】",
"bgUrl": "homepage/channel/soundChannelV1/2/1.jpg"
},
{
"link": {
"extra": {},
"type": 3,
"url": "https://mom.feihe.com/babyWikipedia/audioDetail?id=21845&type=3&period_id=5&tag_id=1&navActive=1&fnTagId=0"
},
"desc": "【动物王国】教宝宝学会爱护东西:【谁是破坏王】",
"bgUrl": "homepage/channel/soundChannelV1/2/2.jpg"
},
{
"link": {
"extra": {},
"type": 3,
"url": "https://mom.feihe.com/babyWikipedia/audioDetail?id=21930&type=3&period_id=5&tag_id=1&navActive=1&fnTagId=0"
},
"desc": "培养宝宝拒绝的勇气:【该说不,就说不】",
"bgUrl": "homepage/channel/soundChannelV1/2/3.jpg"
},
{
"link": {
"extra": {},
"type": 3,
"url": "https://mom.feihe.com/babyWikipedia/audioDetail?id=21898&type=3&period_id=5&tag_id=1&navActive=1&fnTagId=0"
},
"desc": "培养宝宝专心的好习惯:【两个青年学棋】",
"bgUrl": "homepage/channel/soundChannelV1/2/4.jpg"
"qrUrl": "homepage/qrcode_gzh.png",
"title": "公众号",
"desc": "长按关注<span style:'color:#D3A358;'>星妈会</span>公众号,了解更多专业育儿资讯"
},
{
"link": {
"extra": {},
"type": 3,
"url": "https://mom.feihe.com/babyWikipedia/audioDetail?id=21953&type=3&period_id=5&tag_id=1&navActive=1&fnTagId=0"
},
"desc": "培养宝宝坚持的好品格:【不怕挫折的渔夫】",
"bgUrl": "homepage/channel/soundChannelV1/2/5.jpg"
"qrUrl": "homepage/qrcode_qw.png",
"title": "企业微信",
"desc": "长按添加<span style:'color:#D3A358;'>星妈管家</span>,享受专家问诊与社群福利活动"
},
{
"link": {
"extra": {},
"type": 3,
"url": "https://mom.feihe.com/babyWikipedia/audioDetail?id=21840&type=3&period_id=5&tag_id=1&navActive=1&fnTagId=0"
},
"desc": "培养宝宝的自制力:【一次只要一个】",
"bgUrl": "homepage/channel/soundChannelV1/2/6.jpg"
"qrUrl": "homepage/qrcode_sph.png",
"title": "视频号",
"desc": "扫码关注<span style:'color:#D3A358;'>星妈会</span>视频号,了解更多专业育儿资讯"
}
],
[
{
"link": {
"extra": {},
"type": 3,
"url": "https://mom.feihe.com/calendar/parentchildsongsdetail?id=22281"
},
"desc": "营养健康小知识:营养元素钙铁锌",
"bgUrl": "homepage/channel/soundChannelV1/3/1.jpg"
},
{
"link": {
"extra": {},
"type": 3,
"url": "https://mom.feihe.com/babyWikipedia/audioDetail?id=21328&type=3&period_id=5&tag_id=1&navActive=1&fnTagId=0"
},
"desc": "宝宝指甲长倒刺是缺维生素吗?",
"bgUrl": "homepage/channel/soundChannelV1/3/2.jpg"
},
{
"link": {
"extra": {},
"type": 3,
"url": "https://mom.feihe.com/babyWikipedia/audioDetail?id=21545&type=3&period_id=5&tag_id=1&navActive=1&fnTagId=0"
},
"desc": "如何分辨宝宝是攒肚还是便秘?",
"bgUrl": "homepage/channel/soundChannelV1/3/3.jpg"
},
{
"link": {
"extra": {},
"type": 3,
"url": "https://mom.feihe.com/babyWikipedia/audioDetail?id=21310&type=3&period_id=5&tag_id=1&navActive=1&fnTagId=0"
},
"desc": "手足口疫苗有必要打吗?",
"bgUrl": "homepage/channel/soundChannelV1/3/4.jpg"
},
{
"link": {
"extra": {},
"type": 3,
"url": "https://mom.feihe.com/babyWikipedia/audioDetail?id=21734&type=3&period_id=5&tag_id=1&navActive=1&fnTagId=0"
},
"desc": "宝宝多大开始刷牙?一定不能晚于这个时间!",
"bgUrl": "homepage/channel/soundChannelV1/3/5.jpg"
},
{
"link": {
"extra": {},
"type": 3,
"url": "https://mom.feihe.com/babyWikipedia/audioDetail?id=25897&type=3&period_id=5&tag_id=1&navActive=1&fnTagId=0"
},
"desc": "如何缓解0-6月宝宝肠绞痛?",
"bgUrl": "homepage/channel/soundChannelV1/3/6.jpg"
}
],
[
{
"link": {
"extra": {},
"type": 3,
"url": "https://mom.feihe.com/babyWikipedia/audioDetail?id=21533&type=3&period_id=5&tag_id=1&navActive=1&fnTagId=0"
},
"desc": "如何拯救睡渣宝宝?培养自主入睡?",
"bgUrl": "homepage/channel/soundChannelV1/4/1.jpg"
},
{
"link": {
"extra": {},
"type": 3,
"url": "https://mom.feihe.com/babyWikipedia/audioDetail?id=21602&type=3&period_id=5&tag_id=1&navActive=1&fnTagId=0"
},
"desc": "开灯睡觉影响宝宝智力发育?",
"bgUrl": "homepage/channel/soundChannelV1/4/2.jpg"
},
{
"link": {
"extra": {},
"type": 3,
"url": "https://mom.feihe.com/babyWikipedia/audioDetail?id=21613&type=3&period_id=5&tag_id=1&navActive=1&fnTagId=0"
},
"desc": "宝宝都爱“投降式睡姿”?要纠正吗?",
"bgUrl": "homepage/channel/soundChannelV1/4/3.jpg"
},
{
"link": {
"extra": {},
"type": 3,
"url": "https://mom.feihe.com/babyWikipedia/audioDetail?id=21494&type=3&period_id=5&tag_id=1&navActive=1&fnTagId=0"
},
"desc": "娃睡得正香,要不要叫醒吃奶?",
"bgUrl": "homepage/channel/soundChannelV1/4/4.jpg"
},
{
"link": {
"extra": {},
"type": 3,
"url": "https://mom.feihe.com/babyWikipedia/audioDetail?id=21633&type=3&period_id=5&tag_id=1&navActive=1&fnTagId=0"
},
"desc": "宝宝总夜醒怎么办?",
"bgUrl": "homepage/channel/soundChannelV1/4/5.jpg"
},
{
"link": {
"extra": {},
"type": 3,
"url": "https://mom.feihe.com/babyWikipedia/audioDetail?id=21629&type=3&period_id=5&tag_id=1&navActive=1&fnTagId=0"
},
"desc": "宝宝每天睡多久合适?",
"bgUrl": "homepage/channel/soundChannelV1/4/6.jpg"
}
],
[
{
"link": {
"extra": {},
"type": 3,
"url": "https://mom.feihe.com/babyWikipedia/audioDetail?id=21357&type=3&period_id=5&tag_id=1&navActive=1&fnTagId=0"
},
"desc": "宝宝夏日拉肚子该怎么办?",
"bgUrl": "homepage/channel/soundChannelV1/5/1.jpg"
},
{
"link": {
"extra": {},
"type": 3,
"url": "https://mom.feihe.com/babyWikipedia/audioDetail?id=21497&type=3&period_id=5&tag_id=1&navActive=1&fnTagId=0"
},
"desc": "给宝宝冲奶粉,冲稀点不上火,浓点更营养?",
"bgUrl": "homepage/channel/soundChannelV1/5/2.jpg"
},
{
"link": {
"extra": {},
"type": 3,
"url": "https://mom.feihe.com/babyWikipedia/audioDetail?id=21506&type=3&period_id=5&tag_id=1&navActive=1&fnTagId=0"
},
"desc": "怎样辨别奶粉中含有香精?",
"bgUrl": "homepage/channel/soundChannelV1/5/3.jpg"
},
{
"link": {
"extra": {},
"type": 3,
"url": "https://mom.feihe.com/babyWikipedia/audioDetail?id=21455&type=3&period_id=5&tag_id=1&navActive=1&fnTagId=0"
},
"desc": "怎样判断宝宝吃饱了没?",
"bgUrl": "homepage/channel/soundChannelV1/5/4.jpg"
},
{
"link": {
"extra": {},
"type": 3,
"url": "https://mom.feihe.com/babyWikipedia/audioDetail?id=21495&type=3&period_id=5&tag_id=1&navActive=1&fnTagId=0"
},
"desc": "奶粉颜色偏黄好?还是偏白好?",
"bgUrl": "homepage/channel/soundChannelV1/5/5.jpg"
},
{
"link": {
"extra": {},
"type": 3,
"url": "https://mom.feihe.com/babyWikipedia/audioDetail?id=21489&type=3&period_id=5&tag_id=1&navActive=1&fnTagId=0"
},
"desc": "冲奶粉,不能用哪种水?",
"bgUrl": "homepage/channel/soundChannelV1/5/6.jpg"
}
]
],
"bottomLinkList": [
{
"_style": "width:70rpx;height:109rpx;",
"link": "www.baidu.com",
"bgUrl": "homepage/iconwx.png"
},
{
"_style": "width:95rpx;height:109rpx;",
"link": "www.baidu.com",
"bgUrl": "homepage/iconqw.png"
},
{
"_style": "width:70rpx;height:109rpx;",
"link": "www.baidu.com",
"bgUrl": "homepage/iconsph.png"
},
{
"_style": "width:88rpx;height:99rpx;",
"link": "www.baidu.com",
"bgUrl": "homepage/iconxhs.png"
"childrenInfoListMianTitle": "育儿智库",
"expertTeam": {
"maintitle": "专家团",
"etConUrl2": "homepage/et_con2.png",
"etConUrl3": "homepage/et_con3.png",
"etConUrl1": "homepage/et_con11.png"
}
],
"vipCardList": [
{
"btnTitle": "12类系列课程",
"subTitle": "育儿课程权益",
"level": "钻石会员",
"btnSubTitle": "立即了解",
"link": {
"extra": {
"envVersion": "release",
"appId": "wx4205ec55b793245e"
},
"type": 2,
"url": "subPackages/xmhMainProcess/member/index?entrySource=xmh_wechatmp_points_recgoodsbot"
},
"bgUrl": "homepage/cardbg1.png"
},
{
"btnTitle": "",
"showCornerTxt": "",
"subTitle": "来自万年黑土的健康食品",
"level": "北纬47°系列",
"btnSubTitle": "",
"link": {
"extra": {
"envVersion": "release",
"appId": "wx4205ec55b793245e"
},
"type": 2,
"url": "subPackages/shopMainList/topicNew/index?id=1000265&entrySource=xmh_wechatmp_home_recgoods"
},
"bgUrl": "homepage/cardbg2.png"
},
{
"btnTitle": "",
"showCornerTxt": "",
"subTitle": "专家文章、育儿知识、饮食知识",
"level": "育儿宝典",
"btnSubTitle": "",
"link": {
"extra": {},
"type": 1,
"url": "/pages/library/ContentLibrary"
},
"bgUrl": "homepage/cardbg3.png"
}
],
"qrInfoList": [
{
"qrUrl": "homepage/qrcode_gzh.png",
"title": "公众号",
"desc": "长按关注<span style:'color:#D3A358;'>星妈会</span>公众号,了解更多专业育儿资讯"
},
{
"qrUrl": "homepage/qrcode_qw.png",
"title": "企业微信",
"desc": "长按添加<span style:'color:#D3A358;'>星妈管家</span>,享受专家问诊与社群福利活动"
},
{
"qrUrl": "homepage/qrcode_sph.png",
"title": "视频号",
"desc": "扫码关注<span style:'color:#D3A358;'>星妈会</span>视频号,了解更多专业育儿资讯"
}
],
"childrenInfoListMianTitle": "育儿智库",
"expertTeam": {
"maintitle": "专家团",
"etConUrl2": "homepage/et_con2.png",
"etConUrl3": "homepage/et_con3.png",
"etConUrl1": "homepage/et_con11.png"
}
}
\ No newline at end of file
}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -217,6 +217,12 @@ const onAdd = () => {
}
})
popup.value.open()
md.sensorComponentLogTake({
xcxPopExposure: "true",
toolName: "产检提醒",
popName: "选择产检项目弹窗"
});
// 回显数据
if (listData.value.length > 0) {
// 回显数据 - 将 listData 中的数据同步到 selectedAirports
......@@ -224,7 +230,15 @@ const onAdd = () => {
}
}
// 关闭项目弹窗
const onPopupClose = () => {
const onPopupClose = (type) => {
if (type !== 'nonePop') {
md.sensorPopLogTake({
xcxPopClick: "true",
toolName: "产检提醒",
popName: "选择产检项目弹窗",
buttonName: "关闭"
});
}
wx.setPageStyle({
style: {
overflow: 'auto'
......@@ -232,6 +246,7 @@ const onPopupClose = () => {
})
selectedAirports.value = []
popup.value.close()
}
// 检查是否已选中
const isSelected = (id) => {
......@@ -246,6 +261,12 @@ const toggleSelect = (airport) => {
id: airport.id,
itemName: airport.itemName
});
md.sensorComponentLogTake({
xcxPopClick: "true",
toolName: "产检提醒",
popName: "选择产检项目弹窗",
buttonName: airport.itemName
});
} else {
selectedAirports.value.splice(index, 1);
}
......@@ -259,7 +280,13 @@ const saveSelection = () => {
const uniqueMap = new Map();
combined.forEach(item => uniqueMap.set(item.id, item));
listData.value = Array.from(uniqueMap.values());
onPopupClose();
onPopupClose("nonePop");
md.sensorPopLogTake({
xcxPopClick: "true",
toolName: "产检提醒",
popName: "选择产检项目弹窗",
buttonName: "确认"
});
};
// // 移除已选项目
// const removeSelected = (airport) => {
......
......@@ -1885,6 +1885,12 @@ async function completeRecord() {
// 显示成功弹窗
successPopup.value.open()
md.sensorPopLogTake({
xcxPopExposure: "true",
toolName: "喂养记录",
popName: "添加成功弹窗"
});
......@@ -2406,6 +2412,7 @@ function showAddFoodPopup(categoryName) {
pageName: "喂养工具首页",
buttonName: "辅食添加" + categoryName,
});
// 防连点检查
if (foodSelectionState.value.isAddingFood) {
console.log('防连点:添加辅食按钮被阻止')
......@@ -2439,7 +2446,11 @@ function showAddFoodPopup(categoryName) {
foodSelectionState.value.newFoodItem = ''
// 显示弹窗
addFoodPopup.value.open()
md.sensorPopLogTake({
xcxPopExposure: "true",
toolName: "喂养记录",
popName: "新增辅食弹窗",
});
// 立即重置防连点状态(弹窗显示后)
setTimeout(() => {
foodSelectionState.value.isAddingFood = false
......@@ -2458,6 +2469,12 @@ function toggleCategoryExpansion(categoryName) {
function cancelAddFood() {
addFoodPopup.value.close()
foodSelectionState.value.newFoodItem = ''
md.sensorPopLogTake({
xcxPopClick: "true",
toolName: "喂养记录",
popName: "新增辅食弹窗",
buttonName: "取消"
});
}
function confirmAddFood() {
......@@ -2465,6 +2482,12 @@ function confirmAddFood() {
console.log('防连点:添加辅食按钮被阻止')
return
}
md.sensorPopLogTake({
xcxPopClick: "true",
toolName: "喂养记录",
popName: "新增辅食弹窗",
buttonName: "添加"
});
foodSelectionState.value.isAddingFood = true
console.log('防连点:设置添加辅食状态为true')
......@@ -3246,7 +3269,11 @@ async function startPollingRecognitionResult(taskId) {
voiceRecognitionState.value.voiceDateTime = `${year}-${month}-${day} ${hours}:${minutes}:00`
}
voiceRecognitionState.value.showResultPage = true
md.sensorPopLogTake({
xcxPopExposure: "true",
toolName: "喂养记录",
popName: "语音识别结果弹窗"
});
// 显示识别成功提示
uni.showToast({
title: '语音识别成功',
......@@ -3402,7 +3429,12 @@ function formatRecordingDuration(seconds) {
function reRecognize() {
console.log('重新识别...')
md.sensorPopLogTake({
xcxPopClick: "true",
toolName: "喂养记录",
popName: "语音识别结果弹窗",
buttonName: "不对,重新识别"
});
// 清理轮询状态
clearPollingInterval()
......@@ -3429,6 +3461,12 @@ async function completeVoiceRecord() {
if (isSubmitting.value) {
return
}
md.sensorPopLogTake({
xcxPopClick: "true",
toolName: "喂养记录",
popName: "语音识别结果弹窗",
buttonName: "完成记录"
});
const detailText = voiceRecognitionState.value.recognizedText.trim()
......@@ -3486,6 +3524,11 @@ async function completeVoiceRecord() {
// 显示成功弹窗
successPopup.value.open()
md.sensorPopLogTake({
xcxPopExposure: "true",
toolName: "喂养记录",
popName: "添加成功弹窗"
});
} catch (error) {
console.error('保存语音记录失败:', error)
// uni.hideLoading()
......@@ -3543,11 +3586,23 @@ async function onSuccessJump() {
},
}); // 关闭弹窗
successPopup.value.close()
md.sensorPopLogTake({
xcxPopClick: "true",
toolName: "喂养记录",
popName: "添加成功弹窗",
buttonName: "咨询专家"
});
}
function onSuccessClose() {
// 关闭弹窗
successPopup.value.close()
md.sensorPopLogTake({
xcxPopClick: "true",
toolName: "喂养记录",
popName: "添加成功弹窗",
buttonName: "关闭"
});
// 跳转至记录页面
uni.navigateTo({
url: '/pages/feedingRecord/feedingRecord'
......
......@@ -723,9 +723,24 @@ function editRecord(index) {
editingRecord.value = { index, record }
showEditPopup.value = true
md.sensorPopLogTake({
xcxPopExposure: "true",
toolName: "喂养记录",
popName: "日历页确认修改内容弹窗"
});
}
function closeEditPopup() {
function closeEditPopup(type) {
if (type !== 'nonePop') {
md.sensorPopLogTake({
xcxPopClick: "true",
toolName: "喂养记录",
popName: "日历页确认修改内容弹窗",
buttonName: "取消"
});
}
showEditPopup.value = false
editingRecord.value = null
editForm.value = { time: '', type: '', content: '' }
......@@ -800,6 +815,12 @@ function onEditTypeChange(event) {
}
async function saveEditRecord() {
md.sensorPopLogTake({
xcxPopClick: "true",
toolName: "喂养记录",
popName: "日历页确认修改内容弹窗",
buttonName: "保存修改"
});
if (!editForm.value.time || !editForm.value.type) {
uni.showToast({ title: '请填写完整信息', icon: 'none' })
return
......@@ -868,7 +889,7 @@ async function saveEditRecord() {
icon: 'none'
})
closeEditPopup()
closeEditPopup('nonePop')
// 清空缓存,确保获取最新数据
clearCache()
......
<template>
<view>
<view class="postnatal">
<!-- 自定义头部 -->
<!-- 自定义头部 -->
<!-- <customize-navigation>
<template v-slot:navbar-content>
<view class="page-top">
......@@ -11,10 +11,10 @@
<view class="page_title">产检提醒</view>
</view>
</template>
</customize-navigation> -->
</customize-navigation> -->
<view class="postnatal-con">
<!-- 轮播图 -->
<swiper class="banner-swiper" :autoplay="true" :circular="true" v-if="bannerList.length > 0 ">
<swiper class="banner-swiper" :autoplay="true" :circular="true" v-if="bannerList.length > 0">
<swiper-item v-for="(item, index) in bannerList" :key="index">
<image class="banner-img" :src="`${item.img}`" mode="aspectFill"
@click="handleBannerClick(item, index)" />
......@@ -46,7 +46,7 @@
</view>
<!-- 产检记录 -->
<scroll-view class="postnatal-con-record" scroll-y :scroll-top="scrollTop">
<!-- <view class="postnatal-con-record"> -->
<!-- <view class="postnatal-con-record"> -->
<view :class="['record-item', `item-${index}`]"
v-for="({ id, checkupDate, index, pregnancyWeek, status, examinationItems, type }, i) in homeInfo.checkupList"
@click="onDetails(id, type)" :key="i">
......@@ -79,7 +79,7 @@
重点:{{ getProject(examinationItems) }}
</view>
</view>
<!-- </view> -->
<!-- </view> -->
</scroll-view>
</view>
<!-- 新增产检 -->
......@@ -112,12 +112,13 @@
</view>
</view>
</view>
<!-- 提示弹窗 -->
<popup-tip v-if="isTip" type="2" @statusChange="onBabyChange" @close="isTip = false"></popup-tip>
<popup-tip v-if="isTip" type="2" @statusChange="onBabyChange" @close="isTip = false"></popup-tip>
<!-- 使用封装后的日期选择器组件 -->
<DatePicker v-model:visible="visible" :default-date="time" @confirm="handleDateConfirm" />
<DatePicker v-model:visible="visible" :default-date="time" @confirm="handleDateConfirm"
/>
</view>
</view>
</template>
......@@ -127,7 +128,8 @@ import {
ref,
getCurrentInstance,
onMounted,
nextTick
nextTick,
watch
} from 'vue'
import {
onLoad,
......@@ -193,6 +195,7 @@ const visible = ref(false)
// 时间
const time = ref('')
const isClickClose = ref(false)
// 保存要修改的id
const editId = ref(null)
......@@ -258,7 +261,7 @@ const backHandler = () => {
const handleBannerClick = (item, index) => {
console.log(item)
let buttonName = '';
switch(index){
switch (index) {
case 0:
buttonName = '第一张焦点图';
break;
......@@ -285,7 +288,7 @@ const handleBannerClick = (item, index) => {
})
}
}
// 新增体检
const onAdd = () => {
......@@ -306,7 +309,14 @@ const onBtn = (type) => {
switch (type) {
case 0:
// 如果授权就不弹出提醒
showPicker.value = isWxNotification.value ? true : false
showPicker.value = isWxNotification.value ? true : false
if (showPicker.value) {
md.sensorPopLogTake({
xcxPopExposure: "true",
toolName: "产检提醒",
popName: "设置提醒时间弹窗"
});
}
buttonName = '提醒'
break;
......@@ -334,8 +344,17 @@ const onBtn = (type) => {
}
// 提醒关闭
const close = () => {
const close = (type) => {
if (type !== 'nonePop') {
md.sensorPopLogTake({
xcxPopClick: "true",
toolName: "产检提醒",
popName: "设置提醒时间弹窗",
buttonName: "取消"
});
}
showPicker.value = false;
}
// 选择提醒事件
const handleChange = (e) => {
......@@ -343,10 +362,15 @@ const handleChange = (e) => {
}
// 确认选择
const handleConfirm = () => {
md.sensorPopLogTake({
xcxPopClick: "true",
toolName: "产检提醒",
popName: "设置提醒时间弹窗",
buttonName: "确认"
});
selectedValue.value = options[pickerValue.value].id;
console.log(selectedValue.value, homeInfo.value.wxTemplateId, babyId.value)
close();
close("nonePop");
// 订阅提醒
uni.requestSubscribeMessage({
tmplIds: [homeInfo.value.wxTemplateId],
......@@ -359,7 +383,19 @@ const handleConfirm = () => {
}
})
}
watch(visible, (newVal) => {
if (!newVal) {
if (isClickClose.value) {
return
}
md.sensorPopLogTake({
xcxPopClick: "true",
toolName: "产检提醒",
popName: "选择产检时间弹窗",
buttonName: "取消"
});
}
})
// 编辑时间
const onEdit = (id, newTime) => {
md.sensorLogTake({
......@@ -372,45 +408,61 @@ const onEdit = (id, newTime) => {
time.value = newTime
visible.value = true
editId.value = id
isClickClose.value = false
md.sensorPopLogTake({
xcxPopExposure: "true",
toolName: "产检提醒",
popName: "选择产检时间弹窗"
});
}
// 选择日期回调确认
const handleDateConfirm = (date) => {
console.log('选择的日期是:', date);
time.value = date;
console.log(editId.value, time.value)
onEditTime()
isClickClose.value = true
md.sensorPopLogTake({
xcxPopClick: "true",
toolName: "产检提醒",
popName: "选择产检时间弹窗",
buttonName: "确认"
});
}
// 添加计算滚动位置的方法
const scrollToCurrentWeek = async () => {
// 确保数据已加载
if (!homeInfo.value || !homeInfo.value.gestationalWeeks || !homeInfo.value.checkupList) return;
// 找到当前孕周对应的产检项
const currentItem = homeInfo.value.checkupList.find(
item => item.pregnancyWeek == homeInfo.value.gestationalWeeks
);
if (!currentItem) return;
// 等待DOM更新
await nextTick();
// 创建选择器查询
const query = uni.createSelectorQuery().in(proxy);
query.select(`.item-${currentItem.index}`).boundingClientRect();
query.select('.postnatal-con-record').boundingClientRect();
query.exec((rects) => {
if (!rects[0] || !rects[1]) return;
const [itemRect, containerRect] = rects;
// 计算元素在容器内的相对位置
const position = itemRect.top - containerRect.top;
// 设置滚动位置(增加20px的缓冲距离)
scrollTop.value = position + 20;
});
// 确保数据已加载
if (!homeInfo.value || !homeInfo.value.gestationalWeeks || !homeInfo.value.checkupList) return;
// 找到当前孕周对应的产检项
const currentItem = homeInfo.value.checkupList.find(
item => item.pregnancyWeek == homeInfo.value.gestationalWeeks
);
if (!currentItem) return;
// 等待DOM更新
await nextTick();
// 创建选择器查询
const query = uni.createSelectorQuery().in(proxy);
query.select(`.item-${currentItem.index}`).boundingClientRect();
query.select('.postnatal-con-record').boundingClientRect();
query.exec((rects) => {
if (!rects[0] || !rects[1]) return;
const [itemRect, containerRect] = rects;
// 计算元素在容器内的相对位置
const position = itemRect.top - containerRect.top;
// 设置滚动位置(增加20px的缓冲距离)
scrollTop.value = position + 20;
});
};
// 保存订阅消息
const getWxNotificationFn = async (notificationDate, wxTemplateId, babyId) => {
......@@ -464,16 +516,16 @@ const getInfoFn = async () => {
uni.setStorageSync('dueDate', data.dueDate)
// 新增:调用滚动方法
scrollToCurrentWeek()
scrollToCurrentWeek()
} else {
uni.showToast({
title: message,
icon: "none",
});
}
}
// 获取banner图
......@@ -495,43 +547,43 @@ const getSettingFn = () => {
success(res) {
// console.log(res.authSetting, '授权信息')
console.log(res.subscriptionsSetting, '订阅信息')
if(res.subscriptionsSetting.itemSettings){
isWxNotification.value = false
console.log("🚀 ~ success ~ isWxNotification111:", isWxNotification.value)
if (res.subscriptionsSetting.itemSettings) {
isWxNotification.value = false
console.log("🚀 ~ success ~ isWxNotification111:", isWxNotification.value)
} else {
isWxNotification.value = true
console.log("🚀 ~ success ~ isWxNotification222:", isWxNotification.value)
isWxNotification.value = true
console.log("🚀 ~ success ~ isWxNotification222:", isWxNotification.value)
}
}
})
}
// 提示弹窗回调
const onBabyChange= ()=>{
const onBabyChange = () => {
publicFn()
}
// 公共函数
const publicFn = () => {
console.log("🚀 ~ onShow ~ userStore:", userStore.babyInfo)
console.log("🚀 ~ onShow ~ userStore:", userStore.babyInfo)
const babyInfo = userStore.babyInfo
if(babyInfo && babyInfo.babyStage == 1){
if (babyInfo && babyInfo.babyStage == 1) {
isTip.value = false
babyId.value = userStore.babyInfo?.content?.id
babyId.value = userStore.babyInfo?.content?.id
getSettingFn()
// 获取banner图
postnatalJSONFn()
// 获取banner图
postnatalJSONFn()
// 获取信息
getInfoFn()
} else{
} else {
isTip.value = true
}
}
onShow(async () => {
await userStore.loadBabyInfo()
console.log('宝宝信息加载完成:', userStore.babyInfo)
publicFn()
await userStore.loadBabyInfo()
console.log('宝宝信息加载完成:', userStore.babyInfo)
publicFn()
})
onMounted(() => {
isClickClose.value = false
md.sensorLogTake({
xcxPage: "小程序页面浏览事件",
pageName: "产检提醒首页"
......@@ -561,8 +613,9 @@ onMounted(() => {
align-items: center;
margin-top: 50rpx;
font-weight: 500;
flex-shrink: 0;
flex-shrink: 0;
height: 32rpx;
.info-c {
width: 2rpx;
height: 22rpx;
......@@ -582,7 +635,8 @@ onMounted(() => {
display: flex;
justify-content: space-between;
margin-bottom: 30rpx;
flex-shrink: 0;
flex-shrink: 0;
.btn-item {
display: flex;
align-items: center;
......@@ -813,6 +867,7 @@ onMounted(() => {
height: 177rpx;
border-radius: 12rpx;
overflow: hidden;
.banner-img {
width: 100%;
height: 100%;
......
......@@ -459,11 +459,14 @@ const onRemind = () => {
}
// 如果授权就不弹出提醒
showPicker.value = isWxNotification.value ? true : false
}
// 提醒关闭
const close = () => {
showPicker.value = false;
}
// 选择提醒事件
......@@ -472,6 +475,7 @@ const handleChange = (e) => {
}
// 确认选择
const handleConfirm = () => {
selectedValue.value = options[pickerValue.value].id;
console.log(selectedValue.value, infoData.value.wxTemplateId, babyId.value)
close();
......
......@@ -380,6 +380,11 @@ const showDatePicker = () => {
});
console.log('显示日期选择器')
md.sensorPopLogTake({
xcxPopExposure: "true",
toolName: "生长曲线",
popName: "选择本次测评日期弹窗"
});
showDatePickerPopup.value = true
}
......
......@@ -58,8 +58,13 @@ class ExposureTracker {
const isVisible = this.isElementInViewport(res, scrollTop);
if (isVisible && !value.isExposed) {
value.isExposed = true;
// 触发埋点
md.sensorLogTake(value.logParams);
if(value.logParams.xcxComponentExposure){
md.sensorComponentLogTake(value.logParams);
}else{
md.sensorLogTake(value.logParams);
}
}
});
});
......
......@@ -10,6 +10,11 @@
xcxClick: '品牌故事-首屏页面点击',
pageName: '品牌故事-首屏页面',
buttonName: `背景图-${swiperNameList[index]}`
}" :data-comlog="{
xcxComponentClick: 'true',
pageName: '品牌故事页',
componentName: '品牌故事页banner',
componentContent: item.title || ''
}" :data-link="item.link" @tap="jumpLink(item.link, item.videoUrl, $event)" class="b-img"
:src="$baseUrl + item.url">
</image>
......@@ -48,6 +53,11 @@
xcxClick: '品牌故事-次屏页面点击',
pageName: '品牌故事-首屏页面',
buttonName: '腰部品牌Video'
}" :data-comlog="{
xcxComponentClick: 'true',
pageName: '品牌故事页',
componentName: '品牌故事视频',
componentContent: video1Channel.title || ''
}" @tap="openChannel(video1Channel, $event)" class="videoposter" :src="$baseUrl + video1Channel.posterUrl">
</image>
......@@ -61,6 +71,11 @@
xcxClick: '品牌故事-次屏页面点击',
pageName: '品牌故事-次屏页面',
buttonName: `${item}`
}" :data-comlog="{
xcxComponentClick: 'true',
pageName: '品牌故事页',
componentName: '飞鹤产品家族',
componentContent: '产品家族切换分类-' + item
}" :class="channelTabIndex === index ? 'tabitem tabActive' : 'tabitem'" v-for="(item, index) in productTabList"
:key="index" :id="'tab-' + index">
{{ item }}
......@@ -79,6 +94,11 @@
xcxClick: '品牌故事-次屏页面点击',
pageName: '品牌故事-次屏页面',
buttonName: `${productTabList[channelTabIndex] + '中的' + infoItem.title}+'商品'`
}" :data-comlog="{
xcxComponentClick: 'true',
pageName: '品牌故事页',
componentName: '飞鹤产品家族',
componentContent: '产品家族商品-' + infoItem.desc
}" @tap="jumpProduct(infoItem, $event)">
<view class="flexbox">
<view class="infotitle">
......@@ -98,6 +118,11 @@
xcxClick: '品牌故事-次屏页面点击',
pageName: '品牌故事-次屏页面',
buttonName: `${productTabList[channelTabIndex] + '中的' + infoItem.title}+'商品'`
}" :data-comlog="{
xcxComponentClick: 'true',
pageName: '品牌故事页',
componentName: '飞鹤产品家族',
componentContent: '产品家族商品-' + infoItem.desc
}" @tap="jumpProduct(infoItem, $event)">
<view class="flexbox">
<view class="infotitle">
......@@ -120,8 +145,12 @@
:src="$baseUrl + video2Channel.videoUrl" :autoplay="false"
:poster="video2Channel.posterUrl ? $baseUrl + video2Channel.posterUrl : ''" object-fit="cover"
@loadedmetadata="onVideoLoadedMeta" @play="onVideo2Play"></video>
<image v-else class="videoposter" @tap="openChannel(video2Channel, $event)"
:src="$baseUrl + video2Channel.posterUrl">
<image v-else class="videoposter" :data-comlog="{
xcxComponentClick: 'true',
pageName: '品牌故事页',
componentName: '品牌故事视频',
componentContent: video2Channel.title || ''
}" @tap="openChannel(video2Channel, $event)" :src="$baseUrl + video2Channel.posterUrl">
</image>
</view>
<view id="thirdScreen" class="ipbox"
......@@ -142,7 +171,7 @@
{{ ipDesc }}
</view>
<view class="ipflex">
<view class="ipbg ip1">
<view class="ipbg ip1" id="ip1" @tap="ipTapEvent(1, $event)">
<store-product appid="wx1ad0903b95889ea1" product-id="10000239570622" custom-content="true">
<image :data-log="{
xcxClick: '品牌故事-三屏页面点击',
......@@ -154,7 +183,7 @@
</view>
<view class="ipright">
<view class="ipbg ip2">
<view class="ipbg ip2" id="ip2" @tap="ipTapEvent(2, $event)">
<store-product appid="wx1ad0903b95889ea1" product-id="10000239356280"
custom-content="true">
<image :data-log="{
......@@ -166,7 +195,7 @@
</store-product>
</view>
<view style="display: flex;justify-content: space-between;margin-top: 20rpx;">
<view class="ipbg ip3">
<view class="ipbg ip3" id="ip3" @tap="ipTapEvent(3, $event)">
<image :data-log="{
xcxClick: '品牌故事-三屏页面点击',
pageName: '品牌故事-三屏页面',
......@@ -175,7 +204,7 @@
</image>
</view>
<view class="ipbg ip4">
<view class="ipbg ip4" id="ip4" @tap="ipTapEvent(4, $event)">
<image :data-log="{
xcxClick: '品牌故事-三屏页面点击',
pageName: '品牌故事-三屏页面',
......@@ -195,12 +224,17 @@
<!-- <text class="subtitle">关注祖国下一代的营养、教育和陪伴</text> -->
<view class="channelscroll">
<view class="box">
<view class="infobox" :key="index" v-for="(infoItem, index) in esgInfoList"
<view class="infobox" :key="index" v-for="(infoItem, index) in esgInfoList" :id="'esg' + (index + 1)"
:style="{ background: `url(${$baseUrl}brandpage/esgItemBg.png) no-repeat center/505rpx 638rpx` }"
:data-log="{
xcxClick: `品牌故事-三屏页面点击`,
pageName: `品牌故事-三屏页面ESG点击`,
buttonName: `${index + 1}-${infoItem.desc}`
}" :data-comlog="{
xcxComponentClick: 'true',
pageName: '品牌故事页',
componentName: '飞鹤ESG',
componentContent: infoItem.desc
}" @tap="jumpLink(infoItem.link, false, $event)">
<image class="infoimg" :src="$baseUrl + infoItem.bgUrl"></image>
<view class="infotitle">{{ infoItem.desc }}</view>
......@@ -338,6 +372,7 @@ export default {
video2Channel: {},
currentPlayingVideo: null, // 当前正在播放的视频标识
videoContexts: {}, // 存储视频上下文,使用id作为key
ipExStr:['鹤小飞商品', '鹤小飞商品', '鹤小飞', '鹤小飞'],
}
},
mounted() {
......@@ -356,572 +391,6 @@ export default {
methods: {
async initBrandInfo() {
const { data } = await fetchBrandJSON();
// const data = {
// "swiperList": [
// {
// "videoUrl": "https://course.feihe.com/momclub-picture/brandpage/bannerVideo.mp4",
// "link": {},
// "url": "brandpage/Banner41.png"
// },
// {
// "link": {
// "extra": {},
// "type": 3,
// "url": "https://mp.weixin.qq.com/s/0eMxbWB3R_0g06HZPUEj5Q"
// },
// "url": "brandpage/Banner42.png"
// },
// {
// "link": {
// "extra": {},
// "type": 3,
// "url": "https://factory.feihe.com/user/#/web"
// },
// "url": "brandpage/Banner44.png"
// }
// ],
// "video2Channel": {
// "finderUserName": "",
// "videoUrl": "brandpage/videoChannel/video2Channel/V1/1.mp4",
// "posterUrl": "",
// "feedId": ""
// },
// "product": [
// [
// {
// "productId": "",
// "shareTitle": "星飞帆经典 3段",
// "link": "",
// "contentImgLen": 20,
// "title": "超凡 吸收",
// "skuId": "",
// "shareImg": "brandpage/products/share/0/0_1.jpg",
// "contentImg": "0-1",
// "desc": "星飞帆经典 3段",
// "bgUrl": "brandpage/pic_0_1.png"
// },
// {
// "productId": "",
// "shareTitle": "星飞帆卓睿 3段",
// "link": "",
// "contentImgLen": 25,
// "title": "顶配 脑育",
// "skuId": "",
// "shareImg": "brandpage/products/share/0/0_2.jpg",
// "contentImg": "0-2",
// "desc": "星飞帆卓睿 3段",
// "bgUrl": "brandpage/pic_0_2.png"
// },
// {
// "productId": "",
// "shareTitle": "星飞帆卓耀 3段",
// "link": "",
// "contentImgLen": 28,
// "title": "亲和 自护",
// "skuId": "",
// "shareImg": "brandpage/products/share/0/0_3.jpg",
// "contentImg": "0-3",
// "desc": "星飞帆卓耀 3段",
// "bgUrl": "brandpage/pic_0_3.png"
// },
// {
// "productId": "749098220531287139",
// "shareTitle": "爱本跃动蛋白营养粉",
// "link": "",
// "contentImgLen": 15,
// "title": " 4维 效力",
// "skuId": "749098220531287140",
// "shareImg": "brandpage/products/share/0/0_4.jpg",
// "contentImg": "0-4",
// "desc": "爱本跃动蛋白营养粉",
// "bgUrl": "brandpage/pic_0_4.png"
// },
// {
// "productId": "693279214116405585",
// "shareTitle": "高钙奶酪泡芙脆",
// "link": "",
// "contentImgLen": 15,
// "title": "高钙 爆脆",
// "skuId": "693279214116405586",
// "shareImg": "brandpage/products/share/0/0_5.jpg",
// "contentImg": "0-5",
// "desc": "高钙奶酪泡芙脆",
// "bgUrl": "brandpage/pic_0_5.png"
// },
// {
// "productId": "543558664688883066",
// "shareTitle": "北纬47度黄糯玉米",
// "link": "",
// "contentImgLen": 5,
// "title": "软糯 Q弹",
// "skuId": "543560605494007100",
// "shareImg": "brandpage/products/share/0/0_6.jpg",
// "contentImg": "0-6",
// "desc": "北纬47度黄糯玉米",
// "bgUrl": "brandpage/pic_0_6.png"
// }
// ],
// [
// {
// "productId": "",
// "shareTitle": "星飞帆经典 3段",
// "link": "",
// "contentImgLen": 20,
// "title": "超凡 吸收",
// "skuId": "",
// "shareImg": "brandpage/products/share/1/1_1.jpg",
// "contentImg": "1-1",
// "desc": "星飞帆经典 3段",
// "bgUrl": "brandpage/pic_1_1.png"
// },
// {
// "productId": "",
// "shareTitle": "星飞帆卓睿 3段",
// "link": "",
// "contentImgLen": 25,
// "title": "顶配 脑育",
// "skuId": "",
// "shareImg": "brandpage/products/share/1/1_2.jpg",
// "contentImg": "1-2",
// "desc": "星飞帆卓睿 3段",
// "bgUrl": "brandpage/pic_1_2.png"
// },
// {
// "productId": "",
// "shareTitle": "星飞帆卓耀 3段",
// "link": "",
// "contentImgLen": 28,
// "title": "亲和 自护",
// "skuId": "",
// "shareImg": "brandpage/products/share/1/1_3.jpg",
// "contentImg": "1-3",
// "desc": "星飞帆卓耀 3段",
// "bgUrl": "brandpage/pic_1_3.png"
// },
// {
// "productId": "",
// "shareTitle": "星飞帆卓睿A2奶源",
// "link": "",
// "contentImgLen": 20,
// "title": "顶配 A 2",
// "skuId": "",
// "shareImg": "brandpage/products/share/1/1_4.jpg",
// "contentImg": "1-4",
// "desc": "星飞帆卓睿A2奶源",
// "bgUrl": "brandpage/pic_1_4.png"
// },
// {
// "productId": "",
// "shareTitle": "臻稚卓蓓 3段",
// "link": "",
// "contentImgLen": 28,
// "title": "活性 有机",
// "skuId": "",
// "shareImg": "brandpage/products/share/1/1_5.jpg",
// "contentImg": "1-5",
// "desc": "臻稚卓蓓 3段",
// "bgUrl": "brandpage/pic_1_5.png"
// },
// {
// "productId": "",
// "shareTitle": "臻爱倍护 3段",
// "link": "",
// "contentImgLen": 20,
// "title": "高端 乳铁",
// "skuId": "",
// "shareImg": "brandpage/products/share/1/1_6.jpg",
// "contentImg": "1-6",
// "desc": "臻爱倍护 3段",
// "bgUrl": "brandpage/pic_1_6.png"
// }
// ],
// [
// {
// "productId": "739634042657637394",
// "shareTitle": "飞鹤臻贵儿童配方奶粉",
// "link": "",
// "contentImgLen": 10,
// "title": "向上 成长",
// "skuId": "739635029460743612",
// "shareImg": "brandpage/products/share/4/4_1.jpg",
// "contentImg": "5-11",
// "desc": "飞鹤臻贵儿童配方奶粉",
// "bgUrl": "brandpage/pic_5_1.png"
// },
// {
// "productId": "770087385697019251",
// "shareTitle": "飞鹤臻贵悦智配方奶粉",
// "link": "",
// "contentImgLen": 10,
// "title": "悦享 活力",
// "skuId": "770087385697019252",
// "shareImg": "brandpage/products/share/4/4_2.jpg",
// "contentImg": "5-21",
// "desc": "飞鹤臻贵悦智配方奶粉",
// "bgUrl": "brandpage/pic_5_2.png"
// },
// {
// "productId": "584206109842248681",
// "shareTitle": "飞鹤牧场浓厚纯牛奶",
// "link": "",
// "contentImgLen": 10,
// "title": "浓厚 醇香",
// "skuId": "743707906122896598",
// "shareImg": "brandpage/products/share/4/4_3.jpg",
// "contentImg": "5-31",
// "desc": "飞鹤牧场浓厚纯牛奶",
// "bgUrl": "brandpage/pic_5_3.png"
// },
// {
// "productId": "411619746805715934",
// "shareTitle": "六水香长粒香大米",
// "link": "",
// "contentImgLen": 8,
// "title": "当季 新米",
// "skuId": "411619746805715935",
// "shareImg": "brandpage/products/share/4/4_4.jpg",
// "contentImg": "5-41",
// "desc": "六水香长粒香大米",
// "bgUrl": "brandpage/pic_5_4.png"
// },
// {
// "productId": "675921531863073227",
// "shareTitle": "红富士晒晒苹果肉",
// "link": "",
// "contentImgLen": 10,
// "title": "三蒸 三晒",
// "skuId": "675921531863073230",
// "shareImg": "brandpage/products/share/4/4_5.jpg",
// "contentImg": "5-51",
// "desc": "红富士晒晒苹果肉",
// "bgUrl": "brandpage/pic_5_5.png"
// },
// {
// "productId": "599340570081015525",
// "shareTitle": "内衣专护洗衣液",
// "link": "",
// "contentImgLen": 11,
// "title": "深层 洁净",
// "skuId": "599340570081015526",
// "shareImg": "brandpage/products/share/4/4_6.jpg",
// "contentImg": "5-61",
// "desc": "内衣专护洗衣液",
// "bgUrl": "brandpage/pic_5_6.png"
// }
// ],
// [
// {
// "productId": "545768683314537529",
// "shareTitle": "北纬47度白甜糯玉米",
// "link": "",
// "contentImgLen": 5,
// "title": "含有 叶酸",
// "skuId": "545770687080957074",
// "shareImg": "brandpage/products/share/4/4_1.jpg",
// "contentImg": "4-1",
// "desc": "北纬47度白甜糯玉米",
// "bgUrl": "brandpage/pic_4_1.png"
// },
// {
// "productId": "555503303308649561",
// "shareTitle": "北纬47度黄糯玉米",
// "link": "",
// "contentImgLen": 5,
// "title": "软糯 Q弹",
// "skuId": "555503303308649562",
// "shareImg": "brandpage/products/share/4/4_2.jpg",
// "contentImg": "4-2",
// "desc": "北纬47度黄糯玉米",
// "bgUrl": "brandpage/pic_4_2.png"
// },
// {
// "productId": "469675861496440509",
// "shareTitle": "北纬47度低GI水果玉米粒袋装",
// "link": "",
// "contentImgLen": 5,
// "title": "开袋 即食",
// "skuId": "469675861496440510",
// "shareImg": "brandpage/products/share/4/4_3.jpg",
// "contentImg": "4-3",
// "desc": "北纬47度低GI\n水果玉米粒袋装",
// "bgUrl": "brandpage/pic_4_3.png"
// },
// {
// "productId": "733411972814471679",
// "shareTitle": "北纬47度东北烧烤味玉米段",
// "link": "",
// "contentImgLen": 5,
// "title": "秘制 工艺",
// "skuId": "733468301522154622",
// "shareImg": "brandpage/products/share/4/4_4.jpg",
// "contentImg": "4-4",
// "desc": "北纬47度东北\n烧烤味玉米段",
// "bgUrl": "brandpage/pic_4_4.png"
// },
// {
// "productId": "701593489939273114",
// "shareTitle": "N47°植物酵素乳",
// "link": "",
// "contentImgLen": 10,
// "title": "0乳糖 低GI",
// "skuId": "701593489939273115",
// "shareImg": "brandpage/products/share/4/4_5.jpg",
// "contentImg": "4-5",
// "desc": "N47°植物酵素乳",
// "bgUrl": "brandpage/pic_4_5.png"
// },
// {
// "productId": "705230699873112222",
// "shareTitle": "N47°水果玉米汁",
// "link": "",
// "contentImgLen": 8,
// "title": "轻卡 低GI",
// "skuId": "705230699873112223",
// "shareImg": "brandpage/products/share/4/4_6.jpg",
// "contentImg": "4-6",
// "desc": "N47°水果玉米汁",
// "bgUrl": "brandpage/pic_4_6.png"
// }
// ],
// [
// {
// "productId": "749098220531287139",
// "shareTitle": "爱本跃动蛋白营养粉",
// "link": "",
// "contentImgLen": 20,
// "title": " 4维 效力",
// "skuId": "749098220531287140",
// "shareImg": "brandpage/products/share/2/2_1.jpg",
// "contentImg": "2-1",
// "desc": "爱本跃动蛋白营养粉",
// "bgUrl": "brandpage/pic_2_1.png"
// },
// {
// "productId": "748659115456528889",
// "shareTitle": "爱本牛初乳",
// "link": "",
// "contentImgLen": 15,
// "title": "初乳 精华",
// "skuId": "7748659115456528890",
// "shareImg": "brandpage/products/share/2/2_2.jpg",
// "contentImg": "2-2",
// "desc": "爱本牛初乳",
// "bgUrl": "brandpage/pic_2_2.png"
// },
// {
// "productId": "768991288915277214",
// "shareTitle": "爱本每日蛋白营养糊",
// "link": "",
// "contentImgLen": 15,
// "title": "每日 蛋白",
// "skuId": "768991288915277215",
// "shareImg": "brandpage/products/share/2/2_3.jpg",
// "contentImg": "2-3",
// "desc": "爱本每日蛋白营养糊",
// "bgUrl": "brandpage/pic_2_3.png"
// },
// {
// "productId": "767546274051183809",
// "shareTitle": "爱本纤纤益生菌羽衣甘蓝蛋白粉",
// "link": "",
// "contentImgLen": 10,
// "title": "腰腹 燃脂",
// "skuId": "767546274051183810",
// "shareImg": "brandpage/products/share/2/2_4.jpg",
// "contentImg": "2-4",
// "desc": "爱本纤纤益生菌\n羽衣甘蓝蛋白粉",
// "bgUrl": "brandpage/pic_2_4.png"
// },
// {
// "productId": "749443379821195324",
// "shareTitle": "爱本参芝初乳肽",
// "link": "",
// "contentImgLen": 10,
// "title": "药食 同源",
// "skuId": "749443379821195325",
// "shareImg": "brandpage/products/share/2/2_5.jpg",
// "contentImg": "2-5",
// "desc": "爱本参芝初乳肽",
// "bgUrl": "brandpage/pic_2_5.png"
// },
// {
// "productId": "753354110711035152",
// "shareTitle": "爱本悦眠功能粉",
// "link": "",
// "contentImgLen": 15,
// "title": "一夜 天亮",
// "skuId": "753354110711035153",
// "shareImg": "brandpage/products/share/2/2_6.jpg",
// "contentImg": "2-6",
// "desc": "爱本悦眠功能粉",
// "bgUrl": "brandpage/pic_2_6.png"
// }
// ],
// [
// {
// "productId": "759563658744492290",
// "shareTitle": "爱上吃菜乳酪",
// "link": "",
// "contentImgLen": 10,
// "title": "高钙 高纤",
// "skuId": "759563658744492293",
// "shareImg": "brandpage/products/share/3/3_1.jpg",
// "contentImg": "3-1",
// "desc": "爱上吃菜乳酪",
// "bgUrl": "brandpage/pic_3_1.png"
// },
// {
// "productId": "693279214116405585",
// "shareTitle": "高钙奶酪泡芙脆",
// "link": "",
// "contentImgLen": 15,
// "title": "高钙 爆脆",
// "skuId": "693279214116405586",
// "shareImg": "brandpage/products/share/3/3_2.jpg",
// "contentImg": "3-2",
// "desc": "高钙奶酪泡芙脆",
// "bgUrl": "brandpage/pic_3_2.png"
// },
// {
// "productId": "772183835488032281",
// "shareTitle": "高纤黑巧乳酪",
// "link": "",
// "contentImgLen": 10,
// "title": "醇香 黑巧",
// "skuId": "772183835488032282",
// "shareImg": "brandpage/products/share/3/3_3.jpg",
// "contentImg": "3-3",
// "desc": "高纤黑巧乳酪",
// "bgUrl": "brandpage/pic_3_3.png"
// },
// {
// "productId": "716141706338247497",
// "shareTitle": "超新星水果奶酪",
// "link": "",
// "contentImgLen": 15,
// "title": "10倍 奶钙",
// "skuId": "716141706338247498",
// "shareImg": "brandpage/products/share/3/3_4.jpg",
// "contentImg": "3-4",
// "desc": "超新星水果奶酪",
// "bgUrl": "brandpage/pic_3_4.png"
// },
// {
// "productId": "717871366421930449",
// "shareTitle": "厚切流心芝士片",
// "link": "",
// "contentImgLen": 10,
// "title": "浓郁 爆浆",
// "skuId": "717871366421930450",
// "shareImg": "brandpage/products/share/3/3_5.jpg",
// "contentImg": "3-5",
// "desc": "厚切流心芝士片",
// "bgUrl": "brandpage/pic_3_5.png"
// },
// {
// "productId": "551135905055024574",
// "shareTitle": "嚼奶粉乳酪",
// "link": "",
// "contentImgLen": 10,
// "title": "洁净 配方",
// "skuId": "596810081919086853",
// "shareImg": "brandpage/products/share/3/3_6.jpg",
// "contentImg": "3-6",
// "desc": "嚼奶粉乳酪",
// "bgUrl": "brandpage/pic_3_6.png"
// }
// ]
// ],
// "videoUrl": "https://course.feihe.com/momclub-picture/brandpage/banner_1%E6%85%A2%E4%BA%BA%E8%8A%82x%E9%A3%9E%E9%B9%A4%2B-%2B%E5%9C%9FFINAL.mp4",
// "erqiPeizhi": {
// "ipImg4": "https://course.feihe.com/momclub-picture/brandpage/ip4.png",
// "title1": "飞鹤产品家族",
// "title2": "飞鹤品牌IP鹤小飞一家",
// "title3": "飞鹤ESG",
// "iphexiaofeiUrl": "https://course.feihe.com/momclub-picture/brandpage/v1_iphexiaofei.png",
// "ipImg1": "https://course.feihe.com/momclub-picture/brandpage/v1_ip1.png",
// "ipImg3": "https://course.feihe.com/momclub-picture/brandpage/ip3.png",
// "ipImg2": "https://course.feihe.com/momclub-picture/brandpage/v1_ip2.png"
// },
// "video1Channel": {
// "finderUserName": "sphgexisAi0pRGm",
// "videoUrl": "brandpage/videoChannel/video1Channel/V2/1.mp4",
// "posterUrl": "",
// "feedId": "export/UzFfAgtgekIEAQAAAAAABbEMmxr36QAAAAstQy6ubaLX4KHWvLEZgBPEgaJkYSYbLr6JzNPgMJp7tTZCYcYsIpU6Z0fgSnSE"
// },
// "esgInfoList": [
// [
// {
// "desc2": "飞鹤践行低碳节能,打造绿色产业链;承担龙头责任,引领行业创新发展;履行社会责任,构建共富共享生态",
// "link": {
// "extra": {},
// "type": 3,
// "url": "https://mp.weixin.qq.com/s/UebPA-2XenAdw7lTs2NttA"
// },
// "desc": "中国飞鹤发布2024年ESG报告",
// "bgUrl": "brandpage/esg1.png"
// },
// {
// "desc2": "中国飞鹤于2025年4月初在全国范围内启动一项总规模12亿元的生育补贴计划,为符合条件的孕期家庭提供不少于1500元的补贴",
// "link": {
// "extra": {},
// "type": 3,
// "url": "https://mp.weixin.qq.com/s/TpjCyjCf2Df3t1RMfi-JKQ"
// },
// "desc": "12亿元生育补贴计划",
// "bgUrl": "brandpage/esg2.png"
// },
// {
// "desc2": "百年大计,教育为本;教育大计,教师为本。近三年来,飞鹤已投入超过6500万元开展专项助教活动,惠及在职专任教师超过28万人",
// "link": {
// "extra": {},
// "type": 3,
// "url": "https://mp.weixin.qq.com/s/fvo6LV95tCIPA_lda9L7zw"
// },
// "desc": "教育公益",
// "bgUrl": "brandpage/esg3.png"
// }
// ]
// ],
// "qrInfoList": [
// {
// "qrUrl": "brandpage/qrhxf_sph.png",
// "title": "视频号",
// "desc": "扫码关注<span style='color:#D3A358;'>鹤小飞一家</span>视频号,看超多有爱的趣味故事"
// },
// {
// "qrUrl": "brandpage/qrhxf_wxxd.png",
// "title": "微信小店",
// "desc": "扫码进入<span style='color:#D3A358;'>鹤小飞一家</span>店铺,挑选精美限量周边"
// }
// ],
// "productTabList": [
// "全部",
// "母婴全阶",
// "星妈优选",
// "北纬47°",
// "功能营养",
// "儿童产品"
// ],
// "swiperIconList": [
// {
// "baseUrl": "brandpage/corn1.png",
// "activeUrl": "brandpage/corn2.png",
// "text": "北纬47°生态"
// },
// {
// "baseUrl": "brandpage/cattle1.png",
// "activeUrl": "brandpage/cattle2.png",
// "text": "13家自有牧场"
// },
// {
// "baseUrl": "brandpage/factory1.png",
// "activeUrl": "brandpage/factory2.png",
// "text": "工厂游预约"
// }
// ],
// "ipDesc": "鹤小飞一家是由鹤爸、鹤妈、鹤小飞(哥哥)、鹤小小(妹妹) 组成的一家。\n四口热爱生活、积极向上,是他们一家对生活的态度。"
// };
if (data) {
this.swiperList = data.swiperList;
this.erqiPeizhi = data.erqiPeizhi;
......@@ -938,10 +407,96 @@ export default {
this.currentVideoUrl = data.videoUrl;
this.video1Channel = data.video1Channel;
this.video2Channel = data.video2Channel;
this.initExposure();
}
},
initExposure() {
md.sensorComponentLogTake({
xcxComponentExposure: "true",
pageName: "品牌故事页",
componentName: "品牌故事页banner",
componentContent: this.swiperList[0]?.title || ''
});
this.productTabList.forEach((item, index) => {
md.sensorComponentLogTake({
xcxComponentExposure: "true",
pageName: "品牌故事页",
componentName: "飞鹤产品家族",
componentContent: "产品家族切换分类-" + item
});
})
if (this.productInfoList.length > 0 && this.productInfoList[0]?.length > 0) {
this.productInfoList[0]?.forEach((item, index) => {
md.sensorComponentLogTake({
xcxComponentExposure: "true",
pageName: "品牌故事页",
componentName: "飞鹤产品家族",
componentContent: "产品家族商品-" + item.shareTitle
});
})
}
this.ipExStr.forEach((item, index) => {
this.exposureTracker.addExposureElement({
id: 'ip' + (index + 1),
logParams: {
xcxComponentExposure: "true",
pageName: "品牌故事页",
componentName: "鹤小飞",
componentContent: item + '-' + this.erqiPeizhi['ipTitle' + (index + 1)]
}
})
})
this.esgInfoList.forEach((item, index) => {
this.exposureTracker.addExposureElement({
id: 'esg' + (index + 1),
logParams: {
xcxComponentExposure: "true",
pageName: "品牌故事页",
componentName: "飞鹤ESG",
componentContent: item.desc
}
})
})
this.exposureTracker.addExposureElements([
{
id: 'brandVideo1',
logParams: {
xcxComponentExposure: 'true',
pageName: '品牌故事页',
componentName: '品牌故事视频',
componentContent: this.video1Channel.title || ''
}
},
{
id: 'brandVideo2',
logParams: {
xcxComponentExposure: 'true',
pageName: '品牌故事页',
componentName: '品牌故事视频',
componentContent: this.video2Channel.title || ''
}
}
])
},
ipTapEvent(index, evt) {
md.sensorComponentLogTake({
xcxComponentClick: "true",
pageName: "品牌故事页",
componentName: "鹤小飞",
componentContent: this.ipExStr[index] + '-' + this.erqiPeizhi['ipTitle' + index]
});
},
intervalChange(e) {
this.swiperIndex = e.target.current;
md.sensorComponentLogTake({
xcxComponentExposure: "true",
pageName: "品牌故事页",
componentName: "品牌故事页banner",
componentContent: this.swiperList[e.target.current]?.title || ''
});
},
jumpSwiper(_index, evt) {//点indicator切换图片
if (evt) {
......@@ -953,6 +508,9 @@ export default {
jumpLink(_link, videoUrl, evt) {
if (evt) {
md.sensorLog(evt);
if (evt.currentTarget.dataset.comlog) {
md.sensorComponentLogTake(evt.currentTarget.dataset.comlog);
}
}
// console.log(_link)
// uni.navigateTo({
......@@ -972,6 +530,9 @@ export default {
jumpProduct(item, evt) {
if (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 tabName = this.productTabList[this.channelTabIndex];
......@@ -982,6 +543,17 @@ export default {
channelTabHandler(_index, evt) {
if (evt) {
md.sensorLog(evt);
if (evt.currentTarget.dataset.comlog) {
md.sensorComponentLogTake(evt.currentTarget.dataset.comlog);
this.productInfoList[_index]?.forEach((item, index) => {
md.sensorComponentLogTake({
xcxComponentExposure: "true",
pageName: "品牌故事页",
componentName: "飞鹤产品家族",
componentContent: "产品家族商品-" + item.shareTitle
});
})
}
}
this.channelTabIndex = _index;
......@@ -1075,6 +647,9 @@ export default {
openChannel(videoChannel, evt) {
if (evt) {
md.sensorLog(evt);
if (evt.currentTarget.dataset.comlog) {
md.sensorComponentLogTake(evt.currentTarget.dataset.comlog);
}
}
const finderUserName = videoChannel.finderUserName;
const feedId = videoChannel.feedId;
......@@ -1147,6 +722,12 @@ export default {
}
}
md.sensorLog(evt);
md.sensorComponentLogTake({
xcxComponentClick: 'true',
pageName: '品牌故事页',
componentName: '品牌故事视频',
componentContent: this.video1Channel.title || ''
});
console.log('视频1开始播放');
this.handleVideoPlay('brandVideo1');
},
......@@ -1164,7 +745,12 @@ export default {
}
}
md.sensorLog(evt);
md.sensorComponentLogTake({
xcxComponentClick: 'true',
pageName: '品牌故事页',
componentName: '品牌故事视频',
componentContent: this.video2Channel.title || ''
});
console.log('视频2开始播放');
this.handleVideoPlay('brandVideo2');
},
......
......@@ -58,7 +58,7 @@
<swiper-item v-for="(item, index) in toolList.tools" :key="index"
:class="['swiperItem', { 'active': currentIndex === index }]">
<view class="tool">
<button v-if="homeStore && !homeStore.isLogin && index>0" open-type="getPhoneNumber"
<button v-if="homeStore && !homeStore.isLogin && index > 0" open-type="getPhoneNumber"
@getphonenumber="onGetPhoneNumber" class="sq_btn"></button>
<image class="tool_bg" :src="$baseUrl + item.icon" @tap="handleToolClick(item)">
</image>
......@@ -80,7 +80,7 @@
<!--推荐工具-->
<!--专家团-->
<view class="et_box">
<view class="et_box" id="expertTeam">
<view class="et_maintitle">{{ expertTeam.maintitle }}</view>
<view :data-log="{
xcxClick: '首页-二屏页面点击',
......@@ -88,7 +88,8 @@
buttonName: '专家团副标题点击'
}" class="et_subtitle">
<view class="txtlink" @tap="showPopup1(1, 1)">星妈会医生在线答疑群,为孩子成长保驾护航</view>
<image class="icon_more" @tap="showPopup1(1, 2)" :src="$baseUrl + 'homepage/et_more.png'"></image>
<image id="et_joingroup" class="icon_more" @tap="showPopup1(1, 2)"
:src="$baseUrl + 'homepage/et_more.png'"></image>
</view>
<view class="et_main_box">
<view class="et_con_bg">
......@@ -126,7 +127,7 @@
<image class="et_con3" v-if="etTabSelIndex == 2" :src="$baseUrl + expertTeam.etConUrl3">
</image>
</view>
<view class="et_more_txt" @tap="onETMore(2, etTabSelIndex)">
<view id="et_more" class="et_more_txt" @tap="onETMore(2, etTabSelIndex)">
<text class="txtlink">点击查看更多</text>
<image class="icon_arrow_yellow" :src="$baseUrl + 'homepage/icon_arrow_yellow.png'"></image>
</view>
......@@ -175,23 +176,35 @@
</view> -->
<view class="channelbox">
<view id="childrenInfoList" class="channelbox">
<text class="maintitle">{{ childrenInfoListMianTitle }}</text>
<view class="subtitle_box">
<text class="subtitle">从专业到实用,一站式解决你的育儿难题</text>
<image class="icon_more" :src="$baseUrl + 'homepage/home_more_btn_v2.png'" :data-log="{
xcxClick: '首页-三屏页面点击',
pageName: '首页-三屏',
buttonName: `次位内容资源位-查看更多文字`
}" @tap="jumpLink(suggest.link, false, false, $event)"></image>
<image id="childrenInfoListMore" class="icon_more" :src="$baseUrl + 'homepage/home_more_btn_v2.png'"
:data-log="{
xcxClick: '首页-三屏页面点击',
pageName: '首页-三屏',
buttonName: `次位内容资源位-查看更多文字`
}" :data-comlog="{
xcxComponentClick: 'true',
pageName: '首页',
componentName: '育儿智库',
componentContent: '育儿智库-more'
}" @tap="jumpLink(suggest.link, false, false, $event)"></image>
</view>
<view class="channelscroll">
<view class="box">
<view class="infobox" :key="index" v-for="(infoItem, index) in childrenInfoList" :data-log="{
xcxClick: '首页-三屏页面点击',
pageName: '首页-三屏',
buttonName: `次位内容资源位-轮播-${index + 1}`
}" @tap="jumpLink(infoItem.link, false, false, $event)">
<view class="infobox" :key="index" :id="'childrenInfoList' + index"
v-for="(infoItem, index) in childrenInfoList" :data-log="{
xcxClick: '首页-三屏页面点击',
pageName: '首页-三屏',
buttonName: `次位内容资源位-轮播-${index + 1}`
}" :data-comlog="{
xcxComponentClick: 'true',
pageName: '首页',
componentName: '育儿智库',
componentContent: infoItem.desc
}" @tap="jumpLink(infoItem.link, false, false, $event)">
<image class="infoimg" :src="$baseUrl + infoItem.bgUrl"></image>
<view class="infotitlebox">
<view class="infotitlecon">
......@@ -261,10 +274,17 @@
<view id="fourthScreen" class="bottomlink">
<image class="bottombg" :src="$baseUrl + 'homepage/bottombg.png'"></image>
<view class="box">
<image class="icon" v-for="(icon, index) in bottomLinkList" :key="index" :data-log="{
xcxClick: '首页-四屏页面点击',
pageName: '首页-四屏',
buttonName: `${qrNameList[index]}`
<image class="icon" :id="'bottomLink' + index" v-for="(icon, index) in bottomLinkList" :key="index"
:data-log="{
xcxClick: '首页-四屏页面点击',
pageName: '首页-四屏',
buttonName: `${qrNameList[index]}`
}" :data-comlog="{
xcxComponentClick: 'true',
xcxComponentExposure: 'true',
pageName: '首页',
componentName: '跳转工具',
componentContent: `${qrNameList[index]}`
}" :src="$baseUrl + icon.bgUrl" :style="icon._style" @tap="showPopup(index, $event)"></image>
</view>
</view>
......@@ -532,8 +552,97 @@ export default {
} else {
this.vipCardList[0] = data.vipConfigList[0];
}
//拿到数据之后,初始化曝光一些节点
this.initExposure();
}
},
initExposure() {
const componentContent = this.toolList.tools?.[this.currentIndex]?.title || '';
md.sensorComponentLogTake({
xcxComponentExposure: "true",
pageName: "首页",
componentName: "工具推荐",
componentContent: componentContent
});
md.sensorComponentLogTake({
xcxComponentExposure: "true",
pageName: "首页",
componentName: "首页banner",
componentContent: this.swiperList[0]?.title || ''
});
const childrenInfoList = this.childrenInfoList;
childrenInfoList.forEach((item, index) => {
this.exposureTracker.addExposureElement({
id: 'childrenInfoList' + index,
logParams: {
xcxComponentExposure: 'true',
pageName: '首页',
componentName: '育儿智库',
componentContent: item.desc
}
});
});
this.qrNameList.forEach((item, index) => {
this.exposureTracker.addExposureElement({
id: 'bottomLink' + index,
logParams: {
xcxComponentExposure: 'true',
pageName: '首页',
componentName: '跳转工具',
componentContent: `${item}`
}
});
});
//动态添加专家团的首屏数据
this.exposureTracker.addExposureElements([{
id: 'expertTeam',
logParams: {
xcxComponentExposure: 'true',
pageName: '首页',
componentName: '专家团',
componentContent: '专家团tab切换-名医专家'
}
},
{
id: 'et_joingroup',
logParams: {
xcxComponentExposure: 'true',
pageName: '首页',
componentName: '专家团',
componentContent: '专家团-进群咨询'
}
}, {
id: 'et_more',
logParams: {
xcxComponentExposure: 'true',
pageName: '首页',
componentName: '专家团',
componentContent: '专家团-查看更多'
}
}, {
id: 'childrenInfoList',
logParams: {
xcxComponentExposure: 'true',
pageName: '首页',
componentName: '育儿智库',
componentContent: '育儿智库'
}
},
{
id: 'childrenInfoListMore',
logParams: {
xcxComponentExposure: 'true',
pageName: '首页',
componentName: '育儿智库',
componentContent: '育儿智库-more'
}
}
]);
},
changeIndicatorDots(e) {
this.indicatorDots = !this.indicatorDots
},
......@@ -553,6 +662,12 @@ export default {
pageName: '首页-首屏',
buttonName: `第${index + 1}张焦点图-入口`,
});
md.sensorComponentLogTake({
xcxComponentClick: "true",
pageName: "首页",
componentName: "首页banner",
componentContent: item.title
});
if (item.videoUrl) {
this.currentVideoUrl = this.$baseUrl + item.videoUrl;
this.showVideo = true;
......@@ -597,6 +712,9 @@ export default {
jumpLink(link, videoUrl, index, evt) {
if (evt) {
md.sensorLog(evt);
if (evt.currentTarget.dataset.comlog) {
md.sensorComponentLog(evt);
}
}
if (videoUrl) {
if (videoUrl.indexOf('http') === -1) {
......@@ -629,6 +747,9 @@ export default {
showPopup(_index, evt) {
if (evt) {
md.sensorLog(evt);
if (evt.currentTarget.dataset.comlog) {
md.sensorComponentLog(evt);
}
}
md.sensorLogTake({
xcxPage: `${this.qrNameList[_index]}拉起半屏二维码入口页面浏览`,
......@@ -650,7 +771,14 @@ export default {
pageName: `首页-二屏`,
buttonName: type == 1 ? '专家团副标题点击' : '专家团进群咨询按钮点击'
});
if (type == 2) {
md.sensorComponentLogTake({
xcxComponentClick: "true",
pageName: "首页",
componentName: "专家团",
componentContent: '专家团-进群咨询'
});
}
if (_index === 3) {
this.qrObj = null;
} else {
......@@ -754,10 +882,23 @@ export default {
onSwiperChange(e) {
this.currentIndex = e.detail.current;
const componentContent = this.toolList.tools?.[this.currentIndex]?.title || '';
md.sensorComponentLogTake({
xcxComponentExposure: "true",
pageName: "首页",
componentName: "工具推荐",
componentContent: componentContent
});
},
onBannerSwiperChange(e) {
this.bannerCurrentIndex = e.detail.current;
md.sensorComponentLogTake({
xcxComponentExposure: "true",
pageName: "首页",
componentName: "首页banner",
componentContent: this.swiperList[e.detail.current].title
});
},
async handleToolClick(item) {
......@@ -766,6 +907,12 @@ export default {
pageName: "首页-二屏",
buttonName: item.title + "工具点击",
});
md.sensorComponentLogTake({
xcxComponentClick: "true",
pageName: "首页",
componentName: "工具推荐",
componentContent: item.title
});
if (item.title === "医生问诊") {
// if (!cfgStatus.value.isRegister) return;
......@@ -817,6 +964,14 @@ export default {
pageName: "首页-二屏",
buttonName: str + "tab按钮点击",
});
md.sensorComponentLogTake({
xcxComponentClick: "true",
xcxComponentExposure: "true",
pageName: "首页",
componentName: "专家团",
componentContent: '专家团tab切换-' + str
});
this.etTabSelIndex = index;
},
onETMore(index, type) {
......@@ -838,6 +993,12 @@ export default {
pageName: "首页-二屏",
buttonName: str + "-点击",
});
md.sensorComponentLogTake({
xcxComponentClick: "true",
pageName: "首页",
componentName: "专家团",
componentContent: str
});
jump({
type: 1,
url: '/pages/expertTeamPage/expertTeamPage?tab=' + (this.etTabSelIndex + 1)
......@@ -848,6 +1009,12 @@ export default {
},
imagePopupJump() {
md.sensorPopLogTake({
xcxPopClick: "true",
toolName: "首页",
popName: this.popupImageObj.title || "北纬47°鲜活溯源之旅",
buttonName: this.popupImageObj.btnName || "立即寻宝"
});
jump({
type: this.popupImageObj.jumpType,
url: this.popupImageObj.jumpUrl,
......@@ -855,6 +1022,11 @@ export default {
});
},
showImagePopup() {
md.sensorPopLogTake({
xcxPopExposure: "true",
toolName: "首页",
popName: this.popupImageObj.title || "北纬47°鲜活溯源之旅"
});
this.$refs.imagePopup.open('center');
},
closePop1() {
......
......@@ -1769,8 +1769,20 @@ import ShengriliTipPanel from '../components/quanyi/shengriliTipPanel.vue';
}
hideLoading();
initExposure();
});
const initExposure = () => {
imgInfos.value.forEach((item, index) => {
md.sensorComponentLogTake({
xcxComponentExposure: "true",
pageName: "积分服务页",
componentName: "会员权益",
componentContent: "会员权益-" + item.name
});
});
}
const initNetData = () => {
console.log('initNetData');
......@@ -2147,7 +2159,12 @@ import ShengriliTipPanel from '../components/quanyi/shengriliTipPanel.vue';
pageName: "积分服务页-首屏",
buttonName: `${item.name}`,
});
md.sensorComponentLogTake({
xcxComponentClick: "true",
pageName: "积分服务页",
componentName: "会员权益",
componentContent: "会员权益-" + item.name
});
console.log('selectIdx.value=', selectIdx.value);
// const url = vipQuanyiUrl.value.url;
......
......@@ -4,7 +4,7 @@
<WheelSelector :options="wheelOptions" :selectedIndex="wheelSelectedIndex"
:bgImg="$baseUrl + 'my/track/track.png'" :iconNormal="$baseUrl + 'my/track/icon_stage_nor.png'"
:iconSelected="$baseUrl + 'my/track/icon_stage_sel.png'"
@update:selectedIndex="(val) => (wheelSelectedIndex = val)" />
@update:selectedIndex="(val) => (wheelSelectedIndex = val)" @change="handleWheelChange" />
</view>
<view class="bg-container" :data-log="{
xcxClick: '我的页面点击',
......@@ -53,8 +53,7 @@
<view class="integral-account">
<text class="integral-account-text"> 账号: </text>
<text class="integral-account-value">
{{ userStore.memberInfo?.mobile || '' }}</text
>
{{ userStore.memberInfo?.mobile || '' }}</text>
</view>
<BabySwitcher v-if="showBabySwitcher" :show="showBabySwitcher" :babyList="babyInfo.allBabyBaseInfo || []"
......@@ -101,33 +100,24 @@
<view class="tool-list">
<view class="tool-item" v-for="item in toolList" :key="item.title" @click="handleToolClick(item)">
<image class="tool-icon" :src="$baseUrl + item.bgUrl" mode="aspectFit" />
<button v-if="(item.title == '医生问诊' || item.title == '产检提醒' || item.title == '喂养记录' || item.title == '生长测评') && !cfgStatus.isRegister" class="tool-btn-register" type="primary"
open-type="getPhoneNumber" @getphonenumber="getRealtimePhoneNumber" />
<button
v-if="(item.title == '医生问诊' || item.title == '产检提醒' || item.title == '喂养记录' || item.title == '生长测评') && !cfgStatus.isRegister"
class="tool-btn-register" type="primary" open-type="getPhoneNumber"
@getphonenumber="getRealtimePhoneNumber" />
</view>
</view>
</view>
<view class="vip-active-area" v-if="pageCfgStore?.contentCfg?.activeInfo?.length > 0">
<text class="vip-title">精彩活动</text>
<swiper
class="vip-active-swiper"
:indicator-dots="pageCfgStore?.contentCfg?.activeInfo?.length > 1"
:autoplay="true"
:circular="true"
indicator-color="#dfddd9"
indicator-active-color="#b27c1e"
:indicator-top="32"
>
<swiper-item v-for="(item, index) in pageCfgStore?.contentCfg?.activeInfo" :key="index">
<image
class="vip-active-img"
:src="item?.img"
mode="aspectFit"
@click="handleVipActiveClick(index, item)"
/>
</swiper-item>
</swiper>
</view>
<text class="vip-title">精彩活动</text>
<swiper class="vip-active-swiper" :indicator-dots="pageCfgStore?.contentCfg?.activeInfo?.length > 1"
:autoplay="true" :circular="true" indicator-color="#dfddd9" indicator-active-color="#b27c1e"
:indicator-top="32">
<swiper-item v-for="(item, index) in pageCfgStore?.contentCfg?.activeInfo" :key="index">
<image class="vip-active-img" :src="item?.img" mode="aspectFit" @click="handleVipActiveClick(index, item)" />
</swiper-item>
</swiper>
</view>
<!-- 协议 -->
<view class="protocol-container">
......@@ -198,8 +188,14 @@ const handleHot = (e) => {
md.sensorLog(e);
console.log("handleHot", type);
md.sensorComponentLogTake({
xcxComponentClick: "true",
pageName: "我的页面",
componentName: "查看协议",
componentContent: type === "member" ? "会员规则" : "隐私协议"
})
if (type === "member") {
navigateTo("/pages/webview/webview?type=MEMBER_URL");
} else if (type === "privacy") {
navigateTo("/pages/webview/webview?type=PRIVACY_URL");
......@@ -228,7 +224,12 @@ const handleToolClick = async (item) => {
pageName: "我的页面",
buttonName: item.title,
});
md.sensorComponentLogTake({
xcxComponentClick: "true",
pageName: "我的页面",
componentName: "工具",
componentContent: item.title
})
// 跳转产检提醒页面判断
// let listData = userStore.babyInfo ? userStore.babyInfo.allBabyBaseInfo : []
......@@ -266,12 +267,12 @@ const handleToolClick = async (item) => {
});
}
// 三个工具校验是否授权
else if (item.title === "生长测评" || item.title === "喂养记录" || item.title === "产检提醒") {
else if (item.title === "生长测评" || item.title === "喂养记录" || item.title === "产检提醒") {
if (!cfgStatus.value.isRegister) return;
jump({ type: item.link.type, url: item.link.url});
}
else {
jump({ type: item.link.type, url: item.link.url});
jump({ type: item.link.type, url: item.link.url });
}
else {
jump({ type: item.link.type, url: item.link.url });
// const extra = item.link.extra;
// if(extra && extra.babyId){
// jump({ type: item.link.type, url: item.link.url+'?babyId='+extra.babyId});
......@@ -290,6 +291,8 @@ const handleToolClick = async (item) => {
// 编辑个人资料
const handleEditProfile = (e) => {
if (
!cfgStatus.value.isRegister ||
!userStore.userInfo ||
......@@ -299,6 +302,12 @@ const handleEditProfile = (e) => {
}
md.sensorLog(e);
md.sensorComponentLogTake({
xcxComponentClick: "true",
pageName: "我的页面",
componentName: "资料编辑",
componentContent: "资料编辑"
})
const type = userStore.babyInfo?.allBabyBaseInfo?.length == 0 ? "add" : "edit";
babyId.value = userStore.babyInfo?.allBabyBaseInfo.find(
......@@ -316,6 +325,69 @@ const onRegisterConfirm = (data) => {
showRegisterLayer.value = false;
};
const handleWheelChange = (val) => {
md.sensorComponentLogTake({
xcxComponentClick: "true",
pageName: "我的页面",
componentName: "月龄定位器",
componentContent: babyInfo.value.babyStage == 2
? "月龄滑动切换-" + val
: "孕周滑动切换-" + val
});
}
const initExposure = () => {
md.sensorComponentLogTake({
xcxComponentExposure: "true",
pageName: "我的页面",
componentName: "资料编辑",
componentContent: "资料编辑"
});
toolList.value.forEach((item, index) => {
md.sensorComponentLogTake({
xcxComponentExposure: "true",
pageName: "我的页面",
componentName: "工具",
componentContent: item.title
});
});
if (pageCfgStore?.contentCfg?.activeInfo?.length > 0) {
pageCfgStore.contentCfg.activeInfo.forEach((item, index) => {
md.sensorComponentLogTake({
xcxComponentExposure: "true",
pageName: "我的页面",
componentName: "精彩活动",
componentContent: "精彩活动-" + item.title
});
});
}
md.sensorComponentLogTake({
xcxComponentExposure: "true",
pageName: "我的页面",
componentName: "查看协议",
componentContent: "会员规则"
});
md.sensorComponentLogTake({
xcxComponentExposure: "true",
pageName: "我的页面",
componentName: "查看协议",
componentContent: "隐私协议"
});
md.sensorComponentLogTake({
xcxComponentExposure: "true",
pageName: "我的页面",
componentName: "月龄定位器",
componentContent: babyInfo.value.babyStage == 2 ? "月龄滑动切换" : "孕周滑动切换"
});
}
// 获取用户信息
const initData = async () => {
if (
......@@ -381,6 +453,25 @@ const handleChangeBaby = (e) => {
}
md.sensorLog(e);
md.sensorComponentLogTake({
xcxComponentClick: "true",
xcxComponentExposure: "true",
pageName: "我的页面",
componentName: "资料编辑",
componentContent: "展开"
})
md.sensorComponentLogTake({
xcxComponentExposure: "true",
pageName: "我的页面",
componentName: "资料编辑",
componentContent: "新增"
})
md.sensorComponentLogTake({
xcxComponentExposure: "true",
pageName: "我的页面",
componentName: "资料编辑",
componentContent: "状态切换"
})
showBabySwitcher.value = true;
};
......@@ -394,6 +485,12 @@ async function onSelectBaby(baby) {
hideLoading();
console.log("onSelectBaby", baby);
md.sensorComponentLogTake({
xcxComponentClick: "true",
pageName: "我的页面",
componentName: "资料编辑",
componentContent: "状态切换"
})
}
function onAddBaby() {
......@@ -402,6 +499,12 @@ function onAddBaby() {
pageName: "我的页面",
buttonName: "新增入口",
});
md.sensorComponentLogTake({
xcxComponentClick: "true",
pageName: "我的页面",
componentName: "资料编辑",
componentContent: "新增"
})
// 跳转到新增宝宝页面
showBabySwitcher.value = false;
......@@ -430,6 +533,10 @@ onMounted(async () => {
console.log("pageCfgStore.contentCfg====", pageCfgStore.contentCfg);
initData();
initExposure();
hideLoading();
......@@ -482,37 +589,41 @@ watch([() => userStore.userInfo, () => userStore.babyInfo], () => {
//会员活动点击事件
const handleVipActiveClick = (index, item) => {
let buttonName = '';
switch(index){
case 0:
buttonName = '第一张焦点图';
break;
case 1:
buttonName = '第二张焦点图';
break;
}
md.sensorLogTake({
xcxClick: "我的页面点击",
pageName: "我的页面",
buttonName: buttonName,
});
const url = item?.url;
const type = item?.type;
const extra = item?.extra;
jump({
type: type,
url: url,
extra:extra
})
}
let buttonName = '';
switch (index) {
case 0:
buttonName = '第一张焦点图';
break;
case 1:
buttonName = '第二张焦点图';
break;
}
md.sensorLogTake({
xcxClick: "我的页面点击",
pageName: "我的页面",
buttonName: buttonName,
});
md.sensorComponentLogTake({
xcxComponentClick: "true",
pageName: "我的页面",
componentName: "精彩活动",
componentContent: "精彩活动-" + item.title
})
const url = item?.url;
const type = item?.type;
const extra = item?.extra;
jump({
type: type,
url: url,
extra: extra
})
}
// 定义页面配置
defineExpose({});
</script>
<style lang="less" scoped>
@import "@/common.less";
......@@ -881,3 +992,4 @@ defineExpose({});
}
}
</style>
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