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

feat: fixbug

parent 5198e7ea
......@@ -72,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
});
}
// 取消按钮事件
......@@ -103,7 +109,7 @@ const handleOkTouchEnd = () => {
// 发送事件通知主页面
emit('change', selectedFeed, index)//只能传一个参数
closePopup()
closePopup("nonePop")
}
// 点击喂养方式选择
......@@ -126,26 +132,27 @@ const onFeedChange = (feedOption, index) => {
}, 300)
}
const closePopup = () => {
md.sensorPopLogTake({
xcxPopClick: "true",
toolName: "生长曲线",
popName: "喂养方式选择弹窗",
buttonName: "取消"
});
emit('update:visible', false)
}
watch(() => props.visible, (newVal) => {
if (newVal) {
const closePopup = (type) => {
if (type !== 'nonePop') {
md.sensorPopLogTake({
xcxPopExposure: "true",
xcxPopClick: "true",
toolName: "生长曲线",
popName: "喂养方式选择弹窗"
popName: "喂养方式选择弹窗",
buttonName: "取消"
});
}
})
emit('update:visible', false)
watch(() => props.visible, (newVal) => {
if (newVal) {
md.sensorPopLogTake({
xcxPopExposure: "true",
toolName: "生长曲线",
popName: "喂养方式选择弹窗"
});
}
})
}
</script>
<style lang="less" scoped>
......
......@@ -146,6 +146,7 @@
<script setup>
import { getCurrentInstance, computed,onMounted } from 'vue'
import { YEAR_GIFT_IMAGES } from './yearGiftImages.js'
import md from '../../md.js'
// 获取全局属性
const { proxy } = getCurrentInstance()
......
This diff is collapsed.
......@@ -218,9 +218,9 @@ const onAdd = () => {
})
popup.value.open()
md.sensorComponentLogTake({
xcxComponentExposure: "true",
xcxPopExposure: "true",
toolName: "产检提醒",
componentName: "选择产检项目弹窗"
popName: "选择产检项目弹窗"
});
// 回显数据
......@@ -230,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'
......@@ -238,12 +246,7 @@ const onPopupClose = () => {
})
selectedAirports.value = []
popup.value.close()
md.sensorComponentLogTake({
xcxComponentClick: "true",
toolName: "产检提醒",
componentName: "选择产检项目弹窗",
buttonName: "关闭"
});
}
// 检查是否已选中
const isSelected = (id) => {
......@@ -259,9 +262,9 @@ const toggleSelect = (airport) => {
itemName: airport.itemName
});
md.sensorComponentLogTake({
xcxComponentClick: "true",
xcxPopClick: "true",
toolName: "产检提醒",
componentName: "选择产检项目弹窗",
popName: "选择产检项目弹窗",
buttonName: airport.itemName
});
} else {
......@@ -277,11 +280,11 @@ const saveSelection = () => {
const uniqueMap = new Map();
combined.forEach(item => uniqueMap.set(item.id, item));
listData.value = Array.from(uniqueMap.values());
onPopupClose();
md.sensorComponentLogTake({
xcxComponentClick: "true",
onPopupClose("nonePop");
md.sensorPopLogTake({
xcxPopClick: "true",
toolName: "产检提醒",
componentName: "选择产检项目弹窗",
popName: "选择产检项目弹窗",
buttonName: "确认"
});
};
......
......@@ -3590,7 +3590,7 @@ async function onSuccessJump() {
xcxPopClick: "true",
toolName: "喂养记录",
popName: "添加成功弹窗",
buttonName: "关闭"
buttonName: "咨询专家"
});
}
......@@ -3601,7 +3601,7 @@ function onSuccessClose() {
xcxPopClick: "true",
toolName: "喂养记录",
popName: "添加成功弹窗",
buttonName: "咨询专家"
buttonName: "关闭"
});
// 跳转至记录页面
uni.navigateTo({
......
......@@ -731,13 +731,16 @@ function editRecord(index) {
}
function closeEditPopup() {
md.sensorPopLogTake({
xcxPopClick: "true",
toolName: "喂养记录",
popName: "日历页确认修改内容弹窗",
buttonName: "取消"
function closeEditPopup(type) {
if (type !== 'nonePop') {
md.sensorPopLogTake({
xcxPopClick: "true",
toolName: "喂养记录",
popName: "日历页确认修改内容弹窗",
buttonName: "取消"
});
}
showEditPopup.value = false
editingRecord.value = null
editForm.value = { time: '', type: '', content: '' }
......@@ -886,7 +889,7 @@ async function saveEditRecord() {
icon: 'none'
})
closeEditPopup()
closeEditPopup('nonePop')
// 清空缓存,确保获取最新数据
clearCache()
......
......@@ -195,6 +195,7 @@ const visible = ref(false)
// 时间
const time = ref('')
const isClickClose = ref(false)
// 保存要修改的id
const editId = ref(null)
......@@ -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;
md.sensorPopLogTake({
xcxPopClick: "true",
toolName: "产检提醒",
popName: "设置提醒时间弹窗",
buttonName: "取消"
});
}
// 选择提醒事件
const handleChange = (e) => {
......@@ -366,7 +370,7 @@ const handleConfirm = () => {
});
selectedValue.value = options[pickerValue.value].id;
console.log(selectedValue.value, homeInfo.value.wxTemplateId, babyId.value)
close();
close("nonePop");
// 订阅提醒
uni.requestSubscribeMessage({
tmplIds: [homeInfo.value.wxTemplateId],
......@@ -381,6 +385,9 @@ const handleConfirm = () => {
}
watch(visible, (newVal) => {
if (!newVal) {
if (isClickClose.value) {
return
}
md.sensorPopLogTake({
xcxPopClick: "true",
toolName: "产检提醒",
......@@ -401,6 +408,7 @@ const onEdit = (id, newTime) => {
time.value = newTime
visible.value = true
editId.value = id
isClickClose.value = false
md.sensorPopLogTake({
xcxPopExposure: "true",
toolName: "产检提醒",
......@@ -416,6 +424,7 @@ const handleDateConfirm = (date) => {
time.value = date;
console.log(editId.value, time.value)
onEditTime()
isClickClose.value = true
md.sensorPopLogTake({
xcxPopClick: "true",
toolName: "产检提醒",
......@@ -574,7 +583,7 @@ onShow(async () => {
publicFn()
})
onMounted(() => {
isClickClose.value = false
md.sensorLogTake({
xcxPage: "小程序页面浏览事件",
pageName: "产检提醒首页"
......
......@@ -118,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">
......
......@@ -663,7 +663,7 @@ export default {
buttonName: `第${index + 1}张焦点图-入口`,
});
md.sensorComponentLogTake({
xcxComponentExposure: "true",
xcxComponentClick: "true",
pageName: "首页",
componentName: "首页banner",
componentContent: item.title
......
......@@ -439,7 +439,7 @@ const handleChangeBaby = (e) => {
xcxComponentExposure: "true",
pageName: "我的页面",
componentName: "资料编辑",
componentContent: "状态展开"
componentContent: "展开"
})
md.sensorComponentLogTake({
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