Commit fe823538 authored by 张九刚's avatar 张九刚

feat: 弹窗

parent 67e3f569
......@@ -3,7 +3,7 @@
{
"videoUrl": "https://course.feihe.com/momclub-picture/brandpage/bannerVideo.mp4",
"link": {},
"title":"北纬47°黄金种植带",
"title": "北纬47°黄金种植带",
"url": "brandpage/Banner41.png"
},
{
......@@ -12,7 +12,7 @@
"type": 3,
"url": "https://mp.weixin.qq.com/s/0eMxbWB3R_0g06HZPUEj5Q"
},
"title":"飞鹤自由牧场",
"title": "飞鹤自由牧场",
"url": "brandpage/Banner42.png"
},
{
......@@ -21,7 +21,7 @@
"type": 1,
"url": "/reservation/home/index"
},
"title":"飞鹤哈尔滨智能产业园",
"title": "飞鹤哈尔滨智能产业园",
"url": "brandpage/Banner44.png"
}
],
......@@ -30,7 +30,7 @@
"videoUrl": "brandpage/videoChannel/video2Channel/V1/1.mp4",
"posterUrl": "",
"feedId": "",
"title":"品牌故事视频2"
"title": "品牌故事视频2"
},
"product": [
[
......@@ -488,10 +488,10 @@
"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",
"ipTitle1":"毛绒可爱发卡",
"ipTitle2":"大容量吨吨桶水杯",
"ipTitle3":"视频号",
"ipTitle4":"小红书"
"ipTitle1": "毛绒可爱发卡",
"ipTitle2": "大容量吨吨桶水杯",
"ipTitle3": "视频号",
"ipTitle4": "小红书"
},
"video1Channel": {
"finderUserName": "sphgexisAi0pRGm",
......
......@@ -86,7 +86,9 @@
"jumpType": 1,
"imageUrl": "homepage/popImg/popBgImg2.jpg",
"jumpExtra": {},
"jumpUrl": "/pages/syWebview/syWebview?p=xmh11"
"jumpUrl": "/pages/syWebview/syWebview?p=xmh11",
"title":"北纬47°鲜活溯源之旅",
"btnName":"立即寻宝"
},
"voiceStory": {
"link": {
......@@ -103,14 +105,14 @@
"type": 1,
"url": "/pages/syWebview/syWebview?p=xmh09"
},
"title":"北纬47°鲜活溯源之旅",
"type": 1,
"title": "北纬47°鲜活溯源之旅",
"url": "homepage/homeSwiper/V1/7.jpg"
},
{
"videoUrl": "homepage/homeSwiper/V1/2.m4v",
"link": {},
"title":"成为妈妈更懂妈妈",
"title": "成为妈妈更懂妈妈",
"url": "homepage/homeSwiper/V1/2.png"
},
{
......@@ -123,7 +125,7 @@
"type": 2,
"url": "/subPackages/shopMainList/topicNew/index?id=1001087"
},
"title":"28会员日",
"title": "28会员日",
"url": "homepage/homeSwiper/V1/28会员日.jpg"
}
],
......
......@@ -432,7 +432,7 @@
"appId": "wx4205ec55b793245e"
},
"type": 1,
"title": "北纬47鲜活溯源之旅",
"title":"北纬47°鲜活溯源之旅",
"url": "/pages/syWebview/syWebview?p=xmh12"
}
],
......
......@@ -217,6 +217,12 @@ const onAdd = () => {
}
})
popup.value.open()
md.sensorComponentLogTake({
xcxComponentExposure: "true",
toolName: "产检提醒",
componentName: "选择产检项目弹窗"
});
// 回显数据
if (listData.value.length > 0) {
// 回显数据 - 将 listData 中的数据同步到 selectedAirports
......@@ -232,6 +238,12 @@ const onPopupClose = () => {
})
selectedAirports.value = []
popup.value.close()
md.sensorComponentLogTake({
xcxComponentClick: "true",
toolName: "产检提醒",
componentName: "选择产检项目弹窗",
buttonName: "关闭"
});
}
// 检查是否已选中
const isSelected = (id) => {
......@@ -246,6 +258,12 @@ const toggleSelect = (airport) => {
id: airport.id,
itemName: airport.itemName
});
md.sensorComponentLogTake({
xcxComponentClick: "true",
toolName: "产检提醒",
componentName: "选择产检项目弹窗",
buttonName: airport.itemName
});
} else {
selectedAirports.value.splice(index, 1);
}
......@@ -260,6 +278,12 @@ const saveSelection = () => {
combined.forEach(item => uniqueMap.set(item.id, item));
listData.value = Array.from(uniqueMap.values());
onPopupClose();
md.sensorComponentLogTake({
xcxComponentClick: "true",
toolName: "产检提醒",
componentName: "选择产检项目弹窗",
buttonName: "确认"
});
};
// // 移除已选项目
// const removeSelected = (airport) => {
......
......@@ -117,7 +117,8 @@
<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,
......@@ -356,7 +358,12 @@ 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();
......@@ -372,7 +379,16 @@ const handleConfirm = () => {
}
})
}
watch(visible, (newVal) => {
if (!newVal) {
md.sensorPopLogTake({
xcxPopClick: "true",
toolName: "产检提醒",
popName: "选择产检时间弹窗",
buttonName: "取消"
});
}
})
// 编辑时间
const onEdit = (id, newTime) => {
md.sensorLogTake({
......@@ -385,13 +401,27 @@ const onEdit = (id, newTime) => {
time.value = newTime
visible.value = true
editId.value = id
md.sensorPopLogTake({
xcxPopExposure: "true",
toolName: "产检提醒",
popName: "选择产检时间弹窗"
});
}
// 选择日期回调确认
const handleDateConfirm = (date) => {
console.log('选择的日期是:', date);
time.value = date;
console.log(editId.value, time.value)
onEditTime()
md.sensorPopLogTake({
xcxPopClick: "true",
toolName: "产检提醒",
popName: "选择产检时间弹窗",
buttonName: "确认"
});
}
// 添加计算滚动位置的方法
const scrollToCurrentWeek = async () => {
......
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