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

feat: fixbug

parent 5198e7ea
...@@ -72,6 +72,12 @@ const selectedFeedText = ref('母乳+奶粉混合喂养') ...@@ -72,6 +72,12 @@ const selectedFeedText = ref('母乳+奶粉混合喂养')
const selectFeed = (index) => { const selectFeed = (index) => {
selectIndex.value = index selectIndex.value = index
emit('update:selectedIndex', index) emit('update:selectedIndex', index)
md.sensorPopLogTake({
xcxPopClick: "true",
toolName: "生长曲线",
popName: "喂养方式选择弹窗",
buttonName: feedOptions.value[index].name
});
} }
// 取消按钮事件 // 取消按钮事件
...@@ -103,7 +109,7 @@ const handleOkTouchEnd = () => { ...@@ -103,7 +109,7 @@ const handleOkTouchEnd = () => {
// 发送事件通知主页面 // 发送事件通知主页面
emit('change', selectedFeed, index)//只能传一个参数 emit('change', selectedFeed, index)//只能传一个参数
closePopup() closePopup("nonePop")
} }
// 点击喂养方式选择 // 点击喂养方式选择
...@@ -126,26 +132,27 @@ const onFeedChange = (feedOption, index) => { ...@@ -126,26 +132,27 @@ const onFeedChange = (feedOption, index) => {
}, 300) }, 300)
} }
const closePopup = () => { const closePopup = (type) => {
md.sensorPopLogTake({ if (type !== 'nonePop') {
xcxPopClick: "true",
toolName: "生长曲线",
popName: "喂养方式选择弹窗",
buttonName: "取消"
});
emit('update:visible', false)
}
watch(() => props.visible, (newVal) => {
if (newVal) {
md.sensorPopLogTake({ md.sensorPopLogTake({
xcxPopExposure: "true", xcxPopClick: "true",
toolName: "生长曲线", toolName: "生长曲线",
popName: "喂养方式选择弹窗" popName: "喂养方式选择弹窗",
buttonName: "取消"
}); });
} }
}) emit('update:visible', false)
watch(() => props.visible, (newVal) => {
if (newVal) {
md.sensorPopLogTake({
xcxPopExposure: "true",
toolName: "生长曲线",
popName: "喂养方式选择弹窗"
});
}
})
}
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
......
...@@ -146,6 +146,7 @@ ...@@ -146,6 +146,7 @@
<script setup> <script setup>
import { getCurrentInstance, computed,onMounted } from 'vue' import { getCurrentInstance, computed,onMounted } from 'vue'
import { YEAR_GIFT_IMAGES } from './yearGiftImages.js' import { YEAR_GIFT_IMAGES } from './yearGiftImages.js'
import md from '../../md.js'
// 获取全局属性 // 获取全局属性
const { proxy } = getCurrentInstance() const { proxy } = getCurrentInstance()
......
This diff is collapsed.
...@@ -218,9 +218,9 @@ const onAdd = () => { ...@@ -218,9 +218,9 @@ const onAdd = () => {
}) })
popup.value.open() popup.value.open()
md.sensorComponentLogTake({ md.sensorComponentLogTake({
xcxComponentExposure: "true", xcxPopExposure: "true",
toolName: "产检提醒", toolName: "产检提醒",
componentName: "选择产检项目弹窗" popName: "选择产检项目弹窗"
}); });
// 回显数据 // 回显数据
...@@ -230,7 +230,15 @@ const onAdd = () => { ...@@ -230,7 +230,15 @@ const onAdd = () => {
} }
} }
// 关闭项目弹窗 // 关闭项目弹窗
const onPopupClose = () => { const onPopupClose = (type) => {
if (type !== 'nonePop') {
md.sensorPopLogTake({
xcxPopClick: "true",
toolName: "产检提醒",
popName: "选择产检项目弹窗",
buttonName: "关闭"
});
}
wx.setPageStyle({ wx.setPageStyle({
style: { style: {
overflow: 'auto' overflow: 'auto'
...@@ -238,12 +246,7 @@ const onPopupClose = () => { ...@@ -238,12 +246,7 @@ 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) => {
...@@ -259,9 +262,9 @@ const toggleSelect = (airport) => { ...@@ -259,9 +262,9 @@ const toggleSelect = (airport) => {
itemName: airport.itemName itemName: airport.itemName
}); });
md.sensorComponentLogTake({ md.sensorComponentLogTake({
xcxComponentClick: "true", xcxPopClick: "true",
toolName: "产检提醒", toolName: "产检提醒",
componentName: "选择产检项目弹窗", popName: "选择产检项目弹窗",
buttonName: airport.itemName buttonName: airport.itemName
}); });
} else { } else {
...@@ -277,11 +280,11 @@ const saveSelection = () => { ...@@ -277,11 +280,11 @@ const saveSelection = () => {
const uniqueMap = new Map(); const uniqueMap = new Map();
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("nonePop");
md.sensorComponentLogTake({ md.sensorPopLogTake({
xcxComponentClick: "true", xcxPopClick: "true",
toolName: "产检提醒", toolName: "产检提醒",
componentName: "选择产检项目弹窗", popName: "选择产检项目弹窗",
buttonName: "确认" buttonName: "确认"
}); });
}; };
......
...@@ -3590,7 +3590,7 @@ async function onSuccessJump() { ...@@ -3590,7 +3590,7 @@ async function onSuccessJump() {
xcxPopClick: "true", xcxPopClick: "true",
toolName: "喂养记录", toolName: "喂养记录",
popName: "添加成功弹窗", popName: "添加成功弹窗",
buttonName: "关闭" buttonName: "咨询专家"
}); });
} }
...@@ -3601,7 +3601,7 @@ function onSuccessClose() { ...@@ -3601,7 +3601,7 @@ function onSuccessClose() {
xcxPopClick: "true", xcxPopClick: "true",
toolName: "喂养记录", toolName: "喂养记录",
popName: "添加成功弹窗", popName: "添加成功弹窗",
buttonName: "咨询专家" buttonName: "关闭"
}); });
// 跳转至记录页面 // 跳转至记录页面
uni.navigateTo({ uni.navigateTo({
......
...@@ -731,13 +731,16 @@ function editRecord(index) { ...@@ -731,13 +731,16 @@ function editRecord(index) {
} }
function closeEditPopup() { function closeEditPopup(type) {
md.sensorPopLogTake({ if (type !== 'nonePop') {
xcxPopClick: "true", md.sensorPopLogTake({
toolName: "喂养记录", xcxPopClick: "true",
popName: "日历页确认修改内容弹窗", toolName: "喂养记录",
buttonName: "取消" popName: "日历页确认修改内容弹窗",
buttonName: "取消"
}); });
}
showEditPopup.value = false showEditPopup.value = false
editingRecord.value = null editingRecord.value = null
editForm.value = { time: '', type: '', content: '' } editForm.value = { time: '', type: '', content: '' }
...@@ -886,7 +889,7 @@ async function saveEditRecord() { ...@@ -886,7 +889,7 @@ async function saveEditRecord() {
icon: 'none' icon: 'none'
}) })
closeEditPopup() closeEditPopup('nonePop')
// 清空缓存,确保获取最新数据 // 清空缓存,确保获取最新数据
clearCache() clearCache()
......
...@@ -195,6 +195,7 @@ const visible = ref(false) ...@@ -195,6 +195,7 @@ const visible = ref(false)
// 时间 // 时间
const time = ref('') const time = ref('')
const isClickClose = ref(false)
// 保存要修改的id // 保存要修改的id
const editId = ref(null) const editId = ref(null)
...@@ -343,14 +344,17 @@ const onBtn = (type) => { ...@@ -343,14 +344,17 @@ const onBtn = (type) => {
} }
// 提醒关闭 // 提醒关闭
const close = () => { const close = (type) => {
if (type !== 'nonePop') {
md.sensorPopLogTake({
xcxPopClick: "true",
toolName: "产检提醒",
popName: "设置提醒时间弹窗",
buttonName: "取消"
});
}
showPicker.value = false; showPicker.value = false;
md.sensorPopLogTake({
xcxPopClick: "true",
toolName: "产检提醒",
popName: "设置提醒时间弹窗",
buttonName: "取消"
});
} }
// 选择提醒事件 // 选择提醒事件
const handleChange = (e) => { const handleChange = (e) => {
...@@ -366,7 +370,7 @@ const handleConfirm = () => { ...@@ -366,7 +370,7 @@ const handleConfirm = () => {
}); });
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("nonePop");
// 订阅提醒 // 订阅提醒
uni.requestSubscribeMessage({ uni.requestSubscribeMessage({
tmplIds: [homeInfo.value.wxTemplateId], tmplIds: [homeInfo.value.wxTemplateId],
...@@ -381,6 +385,9 @@ const handleConfirm = () => { ...@@ -381,6 +385,9 @@ const handleConfirm = () => {
} }
watch(visible, (newVal) => { watch(visible, (newVal) => {
if (!newVal) { if (!newVal) {
if (isClickClose.value) {
return
}
md.sensorPopLogTake({ md.sensorPopLogTake({
xcxPopClick: "true", xcxPopClick: "true",
toolName: "产检提醒", toolName: "产检提醒",
...@@ -401,6 +408,7 @@ const onEdit = (id, newTime) => { ...@@ -401,6 +408,7 @@ const onEdit = (id, newTime) => {
time.value = newTime time.value = newTime
visible.value = true visible.value = true
editId.value = id editId.value = id
isClickClose.value = false
md.sensorPopLogTake({ md.sensorPopLogTake({
xcxPopExposure: "true", xcxPopExposure: "true",
toolName: "产检提醒", toolName: "产检提醒",
...@@ -416,6 +424,7 @@ const handleDateConfirm = (date) => { ...@@ -416,6 +424,7 @@ const handleDateConfirm = (date) => {
time.value = date; time.value = date;
console.log(editId.value, time.value) console.log(editId.value, time.value)
onEditTime() onEditTime()
isClickClose.value = true
md.sensorPopLogTake({ md.sensorPopLogTake({
xcxPopClick: "true", xcxPopClick: "true",
toolName: "产检提醒", toolName: "产检提醒",
...@@ -574,7 +583,7 @@ onShow(async () => { ...@@ -574,7 +583,7 @@ onShow(async () => {
publicFn() publicFn()
}) })
onMounted(() => { onMounted(() => {
isClickClose.value = false
md.sensorLogTake({ md.sensorLogTake({
xcxPage: "小程序页面浏览事件", xcxPage: "小程序页面浏览事件",
pageName: "产检提醒首页" pageName: "产检提醒首页"
......
...@@ -118,6 +118,11 @@ ...@@ -118,6 +118,11 @@
xcxClick: '品牌故事-次屏页面点击', xcxClick: '品牌故事-次屏页面点击',
pageName: '品牌故事-次屏页面', pageName: '品牌故事-次屏页面',
buttonName: `${productTabList[channelTabIndex] + '中的' + infoItem.title}+'商品'` buttonName: `${productTabList[channelTabIndex] + '中的' + infoItem.title}+'商品'`
}" :data-comlog="{
xcxComponentClick: 'true',
pageName: '品牌故事页',
componentName: '飞鹤产品家族',
componentContent: '产品家族商品-' + infoItem.desc
}" @tap="jumpProduct(infoItem, $event)"> }" @tap="jumpProduct(infoItem, $event)">
<view class="flexbox"> <view class="flexbox">
<view class="infotitle"> <view class="infotitle">
......
...@@ -663,7 +663,7 @@ export default { ...@@ -663,7 +663,7 @@ export default {
buttonName: `第${index + 1}张焦点图-入口`, buttonName: `第${index + 1}张焦点图-入口`,
}); });
md.sensorComponentLogTake({ md.sensorComponentLogTake({
xcxComponentExposure: "true", xcxComponentClick: "true",
pageName: "首页", pageName: "首页",
componentName: "首页banner", componentName: "首页banner",
componentContent: item.title componentContent: item.title
......
...@@ -439,7 +439,7 @@ const handleChangeBaby = (e) => { ...@@ -439,7 +439,7 @@ const handleChangeBaby = (e) => {
xcxComponentExposure: "true", xcxComponentExposure: "true",
pageName: "我的页面", pageName: "我的页面",
componentName: "资料编辑", componentName: "资料编辑",
componentContent: "状态展开" componentContent: "展开"
}) })
md.sensorComponentLogTake({ md.sensorComponentLogTake({
xcxComponentExposure: "true", xcxComponentExposure: "true",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment