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

feat: 弹窗

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