Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
飞
飞鹤小程序
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
FH
飞鹤小程序
Commits
1cf3fe1e
Commit
1cf3fe1e
authored
Aug 14, 2025
by
王炽
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab2.dui88.com/fh/20250528_FHQ1
parents
76ecfc19
7eb36b4f
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
391 additions
and
49 deletions
+391
-49
addPostnatal.vue
pages/addPostnatal/addPostnatal.vue
+38
-0
editPostnatal.vue
pages/editPostnatal/editPostnatal.vue
+23
-0
feedingAnalysis.vue
pages/feedingAnalysis/feedingAnalysis.vue
+37
-0
feedingIndex.vue
pages/feedingIndex/feedingIndex.vue
+90
-17
feedingRecord.vue
pages/feedingRecord/feedingRecord.vue
+49
-1
myReportCard.vue
pages/myReportCard/myReportCard.vue
+19
-0
postnatalCheckUp.vue
pages/postnatalCheckUp/postnatalCheckUp.vue
+52
-18
productionCalendar.vue
pages/productionCalendar/productionCalendar.vue
+18
-12
productionDetails.vue
pages/productionDetails/productionDetails.vue
+61
-0
syWebview.vue
pages/syWebview/syWebview.vue
+4
-1
No files found.
pages/addPostnatal/addPostnatal.vue
View file @
1cf3fe1e
...
...
@@ -146,6 +146,7 @@ import {
// 导入日期选择器组件
import
DatePicker
from
'@/components/DatePicker.vue'
import
{
useUserStore
}
from
"@/stores/user"
;
import
md
from
'../../md'
;
// 获取用户信息
const
userStore
=
useUserStore
();
...
...
@@ -190,6 +191,11 @@ const onPopupClose2 = () => {
}
// 修改时间
const
onChangeTime
=
()
=>
{
md
.
sensorLogTake
({
xcxClick
:
"小程序页面点击事件"
,
pageName
:
"新增产检页"
,
buttonName
:
"产检时间选择"
,
});
visible
.
value
=
true
;
}
// 选择日期回调确认
...
...
@@ -200,6 +206,11 @@ const handleDateConfirm = (date) => {
}
// 添加项目
const
onAdd
=
()
=>
{
md
.
sensorLogTake
({
xcxClick
:
"小程序页面点击事件"
,
pageName
:
"新增产检页"
,
buttonName
:
"产检项目添加"
,
});
wx
.
setPageStyle
({
style
:
{
overflow
:
'hidden'
...
...
@@ -259,6 +270,12 @@ const saveSelection = () => {
// };
// 删除所选产品项目
const
onDelete
=
(
id
)
=>
{
md
.
sensorLogTake
({
xcxClick
:
"小程序页面点击事件"
,
pageName
:
"新增产检页"
,
buttonName
:
"删除产检项目"
,
});
listData
.
value
.
filter
((
item
,
index
)
=>
{
if
(
item
.
id
==
id
)
{
listData
.
value
.
splice
(
index
,
1
)
...
...
@@ -283,6 +300,12 @@ const onImageDel = (e) => {
}
// 上传图片
const
onUpload
=
throttleTap
(()
=>
{
md
.
sensorLogTake
({
xcxClick
:
"小程序页面点击事件"
,
pageName
:
"新增产检页"
,
buttonName
:
"上传报告单"
,
});
if
(
bgdImgList
.
value
.
length
==
15
)
{
uni
.
showToast
({
title
:
"最多上传15张图片"
,
...
...
@@ -322,6 +345,11 @@ const onUpload = throttleTap(() => {
// 保存
const
onSave
=
throttleTap
(
async
()
=>
{
md
.
sensorLogTake
({
xcxClick
:
"小程序页面点击事件"
,
pageName
:
"新增产检页"
,
buttonName
:
"保存"
,
});
if
(
listData
.
value
.
length
==
0
)
{
uni
.
showToast
({
title
:
'还没有添加产检项哦'
,
...
...
@@ -363,6 +391,12 @@ const onSave = throttleTap( async () => {
// 查看更多
const
onSeeBtn
=
()
=>
{
md
.
sensorLogTake
({
xcxClick
:
"小程序页面点击事件"
,
pageName
:
"新增产检页"
,
buttonName
:
"查看全部"
,
});
// 跳转
uni
.
navigateTo
({
url
:
'/pages/myReportCard/myReportCard'
...
...
@@ -378,6 +412,10 @@ const getList = async () => {
}
}
onLoad
((
options
)
=>
{
md
.
sensorLogTake
({
xcxPage
:
"小程序页面浏览事件"
,
pageName
:
"新增产检页"
});
if
(
Object
.
keys
(
options
).
length
>
0
&&
options
.
time
)
{
time
.
value
=
options
.
time
}
else
{
...
...
pages/editPostnatal/editPostnatal.vue
View file @
1cf3fe1e
...
...
@@ -93,6 +93,7 @@ import {
hideLoading
}
from
'@/utils/index.js'
;
import
{
onLoad
}
from
'@dcloudio/uni-app'
import
md
from
'../../md'
;
import
{
getUpdate
,
...
...
@@ -133,6 +134,12 @@ const onPopupClose2 = () => {
// 添加项目
const
onAdd
=
()
=>
{
md
.
sensorLogTake
({
xcxClick
:
"小程序页面点击事件"
,
pageName
:
"修改产检项目页"
,
buttonName
:
"添加产检项目"
,
});
wx
.
setPageStyle
({
style
:
{
overflow
:
'hidden'
...
...
@@ -192,6 +199,12 @@ const saveSelection = () => {
// };
// 删除所选产品项目
const
onDelete
=
(
id
)
=>
{
md
.
sensorLogTake
({
xcxClick
:
"小程序页面点击事件"
,
pageName
:
"修改产检项目页"
,
buttonName
:
"删除产检项目"
,
});
listData
.
value
.
filter
((
item
,
index
)
=>
{
if
(
item
.
id
==
id
)
{
listData
.
value
.
splice
(
index
,
1
)
...
...
@@ -202,6 +215,12 @@ const onDelete = (id) => {
// 保存
const
onSave
=
throttleTap
(
async
()
=>
{
md
.
sensorLogTake
({
xcxClick
:
"小程序页面点击事件"
,
pageName
:
"修改产检项目页"
,
buttonName
:
"保存"
,
});
if
(
listData
.
value
.
length
==
0
)
{
uni
.
showToast
({
title
:
'还没有添加产检项哦'
,
...
...
@@ -249,6 +268,10 @@ const getList = async () => {
}
}
onLoad
((
options
)
=>
{
md
.
sensorLogTake
({
xcxPage
:
"小程序页面浏览事件"
,
pageName
:
"修改产检项目页"
});
const
{
id
,
examinationItems
}
=
JSON
.
parse
(
options
.
item
)
console
.
log
(
id
,
examinationItems
)
editId
.
value
=
id
...
...
pages/feedingAnalysis/feedingAnalysis.vue
View file @
1cf3fe1e
...
...
@@ -189,6 +189,7 @@ import { ref, computed, onMounted, onUnmounted, watch, nextTick, getCurrentInsta
import
{
onLoad
,
onShow
}
from
'@dcloudio/uni-app'
import
{
feedingRecordsStatisticsPeriod
,
feedingRecordsByDate
,
feedingRecords
as
feedingRecordsAPI
,
feedingRecordsDelete
}
from
'@/api/feeding.js'
import
{
useUserStore
}
from
'@/stores/user.js'
import
md
from
'../../md'
;
// API 集成说明:
// 1. 使用 /c/feeding/statistics/period GET 方法查询统计图表数据
...
...
@@ -737,6 +738,11 @@ function calculateBabyAge(birthday) {
// 编辑记录
function
editRecord
(
index
)
{
md
.
sensorLogTake
({
xcxClick
:
"小程序页面点击事件"
,
pageName
:
"统计页"
,
buttonName
:
"修改"
,
});
console
.
log
(
'编辑记录:'
,
index
)
const
record
=
todayRecords
.
value
[
index
]
...
...
@@ -811,6 +817,11 @@ function editRecord(index) {
// 删除记录
async
function
deleteRecord
(
record
)
{
md
.
sensorLogTake
({
xcxClick
:
"小程序页面点击事件"
,
pageName
:
"统计页"
,
buttonName
:
"删除"
,
});
console
.
log
(
'删除记录:'
,
record
)
deletingRecord
.
value
=
record
showDelPopup
.
value
=
true
...
...
@@ -861,6 +872,11 @@ async function confirmDelRecord() {
// 返回上一页
function
goBack
()
{
md
.
sensorLogTake
({
xcxClick
:
"小程序页面点击事件"
,
pageName
:
"统计页"
,
buttonName
:
"返回"
,
});
// uni.navigateBack()
uni
.
redirectTo
({
url
:
'/pages/feedingRecord/feedingRecord'
...
...
@@ -936,12 +952,22 @@ function generateWeekData(weekOffset = 0, targetDate = null) {
// 上一周
async
function
prevWeek
()
{
md
.
sensorLogTake
({
xcxClick
:
"小程序页面点击事件"
,
pageName
:
"统计页"
,
buttonName
:
"日期切换按钮左"
,
});
currentWeek
.
value
--
await
updateChartData
(
false
)
// 切换周时使用默认选择
}
// 下一周
async
function
nextWeek
()
{
md
.
sensorLogTake
({
xcxClick
:
"小程序页面点击事件"
,
pageName
:
"统计页"
,
buttonName
:
"日期切换按钮右"
,
});
currentWeek
.
value
++
await
updateChartData
(
false
)
// 切换周时使用默认选择
}
...
...
@@ -1011,6 +1037,11 @@ async function updateChartData(keepCurrentSelection = false) {
// 点击柱状图切换日期
async
function
onBarClick
(
day
)
{
md
.
sensorLogTake
({
xcxClick
:
"小程序页面点击事件"
,
pageName
:
"统计页"
,
buttonName
:
"日期选择按钮"
,
});
console
.
log
(
'柱状图点击事件触发:'
,
day
)
console
.
log
(
'当前 chartData:'
,
chartData
.
value
)
console
.
log
(
'当前 selectedDate:'
,
selectedDate
.
value
)
...
...
@@ -1278,6 +1309,12 @@ async function initializeApiData() {
// 页面挂载时初始化数据
onMounted
(
async
()
=>
{
md
.
sensorLogTake
({
xcxPage
:
"小程序页面浏览事件"
,
pageName
:
"统计页"
,
});
// 加载宝宝信息
await
userStore
.
loadBabyInfo
()
console
.
log
(
'宝宝信息加载完成:'
,
userStore
.
babyInfo
)
...
...
pages/feedingIndex/feedingIndex.vue
View file @
1cf3fe1e
...
...
@@ -1422,26 +1422,60 @@ function setRecordMethod(method) {
// 手动记录、计时器记录、语音记录
if
(
method
===
'manual'
)
{
md
.
sensorLogTake
({
xcxClick
:
"小程序页面点击事件"
,
pageName
:
"喂养工具首页"
,
buttonName
:
"手动记录"
,
});
if
(
selectedType
.
value
===
'breastfeeding'
)
{
md
.
sensorLogTake
({
xcxClick
:
"小程序页面点击事件"
,
pageName
:
"喂养工具首页"
,
buttonName
:
"母乳亲喂手动记录"
,
});
}
if
(
selectedType
.
value
===
'bottle'
)
{
md
.
sensorLogTake
({
xcxClick
:
"小程序页面点击事件"
,
pageName
:
"喂养工具首页"
,
buttonName
:
"母乳瓶喂手动记录"
,
});
}
if
(
selectedType
.
value
===
'formula'
)
{
md
.
sensorLogTake
({
xcxClick
:
"小程序页面点击事件"
,
pageName
:
"喂养工具首页"
,
buttonName
:
"奶粉喂养手动记录"
,
});
}
}
if
(
method
===
'voice'
)
{
md
.
sensorLogTake
({
xcxClick
:
"小程序页面点击事件"
,
pageName
:
"喂养工具首页"
,
buttonName
:
"语音记录"
,
});
if
(
selectedType
.
value
===
'breastfeeding'
)
{
md
.
sensorLogTake
({
xcxClick
:
"小程序页面点击事件"
,
pageName
:
"喂养工具首页"
,
buttonName
:
"母乳亲喂语音记录"
,
});
}
if
(
selectedType
.
value
===
'bottle'
)
{
md
.
sensorLogTake
({
xcxClick
:
"小程序页面点击事件"
,
pageName
:
"喂养工具首页"
,
buttonName
:
"母乳瓶喂语音记录"
,
});
}
if
(
selectedType
.
value
===
'formula'
)
{
md
.
sensorLogTake
({
xcxClick
:
"小程序页面点击事件"
,
pageName
:
"喂养工具首页"
,
buttonName
:
"奶粉喂养语音记录"
,
});
}
}
if
(
method
===
'timer'
)
{
md
.
sensorLogTake
({
xcxClick
:
"小程序页面点击事件"
,
pageName
:
"喂养工具首页"
,
buttonName
:
"计时器记录"
,
buttonName
:
"
母乳亲喂
计时器记录"
,
});
}
...
...
@@ -1776,11 +1810,35 @@ async function completeRecord() {
}
md
.
sensorLogTake
({
xcxClick
:
"小程序页面点击事件"
,
pageName
:
"喂养工具首页"
,
buttonName
:
"完成记录"
,
});
if
(
selectedType
.
value
===
'breastfeeding'
)
{
md
.
sensorLogTake
({
xcxClick
:
"小程序页面点击事件"
,
pageName
:
"喂养工具首页"
,
buttonName
:
"母乳亲喂完成记录"
,
});
}
if
(
selectedType
.
value
===
'bottle'
)
{
md
.
sensorLogTake
({
xcxClick
:
"小程序页面点击事件"
,
pageName
:
"喂养工具首页"
,
buttonName
:
"母乳瓶喂完成记录"
,
});
}
if
(
selectedType
.
value
===
'formula'
)
{
md
.
sensorLogTake
({
xcxClick
:
"小程序页面点击事件"
,
pageName
:
"喂养工具首页"
,
buttonName
:
"奶粉喂养完成记录"
,
});
}
if
(
selectedType
.
value
===
'food'
)
{
md
.
sensorLogTake
({
xcxClick
:
"小程序页面点击事件"
,
pageName
:
"喂养工具首页"
,
buttonName
:
"辅食完成记录"
,
});
}
try
{
isSubmitting
.
value
=
true
...
...
@@ -2200,6 +2258,11 @@ function enterEditMode() {
// 如果已经在编辑模式,则取消编辑
cancelEditMode
()
}
else
{
md
.
sensorLogTake
({
xcxClick
:
"小程序页面点击事件"
,
pageName
:
"喂养工具首页"
,
buttonName
:
"辅食删除"
,
});
// 保存原始辅食数据,保持顺序
foodSelectionState
.
value
.
originalFoodData
=
{
selectedItems
:
[...
feedingData
.
value
.
food
.
selectedItems
],
...
...
@@ -2263,6 +2326,11 @@ function cancelEditMode() {
}
async
function
exitEditMode
()
{
md
.
sensorLogTake
({
xcxClick
:
"小程序页面点击事件"
,
pageName
:
"喂养工具首页"
,
buttonName
:
"辅食删除完成"
,
});
// 防连点检查
if
(
foodSelectionState
.
value
.
isDeletingFood
)
{
console
.
log
(
'防连点:删除完成按钮被阻止'
)
...
...
@@ -2333,6 +2401,11 @@ async function exitEditMode() {
}
function
showAddFoodPopup
(
categoryName
)
{
md
.
sensorLogTake
({
xcxClick
:
"小程序页面点击事件"
,
pageName
:
"喂养工具首页"
,
buttonName
:
"辅食添加"
+
categoryName
,
});
// 防连点检查
if
(
foodSelectionState
.
value
.
isAddingFood
)
{
console
.
log
(
'防连点:添加辅食按钮被阻止'
)
...
...
@@ -2816,7 +2889,7 @@ async function startRecording() {
pageName
:
"喂养工具首页"
,
buttonName
:
"语音识别录制开始按钮"
,
});
console
.
log
(
'开始录音请求...'
)
console
.
log
(
'当前录音状态:'
,
{
isRecording
:
recordingState
.
value
.
isRecording
,
...
...
pages/feedingRecord/feedingRecord.vue
View file @
1cf3fe1e
...
...
@@ -23,7 +23,7 @@
<!-- 日期选择器和统计按钮 -->
<view
class=
"date-stats-row"
>
<view
class=
"date-selector"
>
<view
class=
"date-selector"
@
click=
"showDatePicker"
>
<uni-datetime-picker
ref=
"datePickerRef"
v-model=
"currentSelectedDate"
type=
"date"
:start=
"earliestDateString"
:end=
"todayDateString"
@
change=
"onDateChange"
:clear-icon=
"false"
:border=
"false"
>
<view
class=
"date-display"
>
...
...
@@ -204,6 +204,7 @@ import { onLoad, onShow } from '@dcloudio/uni-app'
import
BabySwitchPopup
from
'@/components/BabySwitchPopup.vue'
import
{
feedingRecordsByDate
,
feedingRecordsCalendarStatus
,
feedingRecords
as
feedingRecordsAPI
,
feedingRecordsDelete
}
from
'@/api/feeding.js'
import
{
useUserStore
}
from
'@/stores/user.js'
import
md
from
'../../md'
// API 集成说明:
// 1. 使用 /c/feeding/records GET 方法查询指定日期的喂养记录列表
...
...
@@ -398,6 +399,16 @@ const calendarDates = computed(() => {
return
dates
})
function
showDatePicker
()
{
md
.
sensorLogTake
({
xcxClick
:
"小程序页面点击事件"
,
pageName
:
"喂养记录页"
,
buttonName
:
"日期下拉按钮"
,
});
}
function
goToFeedingIndex
()
{
uni
.
navigateBack
()
}
...
...
@@ -515,6 +526,11 @@ function selectDate(dateObj) {
}
function
toggleCalendarExpand
()
{
md
.
sensorLogTake
({
xcxClick
:
"小程序页面点击事件"
,
pageName
:
"喂养记录页"
,
buttonName
:
"日历展开按钮"
,
});
isCalendarExpanded
.
value
=
!
isCalendarExpanded
.
value
}
...
...
@@ -629,6 +645,11 @@ function getRecordBgColor(type) {
}
async
function
deleteRecord
(
recordId
)
{
md
.
sensorLogTake
({
xcxClick
:
"小程序页面点击事件"
,
pageName
:
"喂养记录页"
,
buttonName
:
"删除"
,
});
console
.
log
(
'删除记录:'
,
recordId
)
// 设置要删除的记录ID并显示确认弹窗
deletingRecordId
.
value
=
recordId
...
...
@@ -636,6 +657,11 @@ async function deleteRecord(recordId) {
}
function
editRecord
(
index
)
{
md
.
sensorLogTake
({
xcxClick
:
"小程序页面点击事件"
,
pageName
:
"喂养记录页"
,
buttonName
:
"修改"
,
});
const
record
=
todayRecords
.
value
[
index
]
if
(
!
record
)
return
...
...
@@ -870,6 +896,11 @@ async function saveEditRecord() {
}
function
goToFeedingAnalysis
()
{
md
.
sensorLogTake
({
xcxClick
:
"小程序页面点击事件"
,
pageName
:
"喂养记录页"
,
buttonName
:
"统计"
,
});
uni
.
redirectTo
({
url
:
'/pages/feedingAnalysis/feedingAnalysis'
})
...
...
@@ -877,11 +908,22 @@ function goToFeedingAnalysis() {
// 返回上一页
function
goBack
()
{
md
.
sensorLogTake
({
xcxClick
:
"小程序页面点击事件"
,
pageName
:
"喂养记录页"
,
buttonName
:
"返回"
,
});
uni
.
navigateBack
()
}
// 宝宝切换相关方法
function
showBabySwitch
()
{
md
.
sensorLogTake
({
xcxClick
:
"小程序页面点击事件"
,
pageName
:
"喂养记录页"
,
buttonName
:
"切换宝宝"
,
});
// 只有当有多个宝宝时才显示切换弹窗
if
(
babyList
.
value
.
length
>
1
)
{
showBabySwitchPopup
.
value
=
true
...
...
@@ -1496,6 +1538,12 @@ watch(currentDate, (newDate, oldDate) => {
},
{
immediate
:
false
})
onMounted
(
async
()
=>
{
md
.
sensorLogTake
({
xcxPage
:
"小程序页面浏览事件"
,
pageName
:
"喂养记录页"
,
});
// 组件挂载后的操作
// 加载宝宝信息
await
userStore
.
loadBabyInfo
()
...
...
pages/myReportCard/myReportCard.vue
View file @
1cf3fe1e
...
...
@@ -118,6 +118,11 @@ const listData = ref([])
// 跳转小程序
const
onJump
=
async
()
=>
{
md
.
sensorLogTake
({
xcxClick
:
"小程序页面点击事件"
,
pageName
:
"我的报告单页"
,
buttonName
:
'专家在线咨询'
});
const
res
=
await
getHealthField
();
if
(
!
res
.
success
)
{
...
...
@@ -172,6 +177,11 @@ const getProject = (projects) => {
// 删除事件
const
onDelete
=
throttleTap
((
id
)
=>
{
console
.
log
(
id
)
md
.
sensorLogTake
({
xcxClick
:
"小程序页面点击事件"
,
pageName
:
"我的报告单页"
,
buttonName
:
'删除'
});
uni
.
showModal
({
// title: '提示',
content
:
'确认删除吗?'
,
...
...
@@ -187,6 +197,11 @@ const onDelete = throttleTap((id) => {
})
// 返回上一页面
const
backHandler
=
()
=>
{
md
.
sensorLogTake
({
xcxClick
:
"小程序页面点击事件"
,
pageName
:
"我的报告单页"
,
buttonName
:
'返回'
});
uni
.
navigateBack
();
}
// 删除报告单
...
...
@@ -221,6 +236,10 @@ const getReportListFn = async () => {
}
onLoad
(()
=>
{
md
.
sensorLogTake
({
xcxPage
:
"小程序页面浏览事件"
,
pageName
:
"我的报告单页"
});
// 我的报告单
getReportListFn
()
})
...
...
pages/postnatalCheckUp/postnatalCheckUp.vue
View file @
1cf3fe1e
...
...
@@ -257,6 +257,26 @@ const backHandler = () => {
// 点击轮播图事件
const
handleBannerClick
=
(
item
,
index
)
=>
{
console
.
log
(
item
)
let
buttonName
=
''
;
switch
(
index
){
case
0
:
buttonName
=
'第一张焦点图'
;
break
;
case
1
:
buttonName
=
'第二张焦点图'
;
break
;
case
2
:
buttonName
=
'第三张焦点图'
;
break
;
case
3
:
buttonName
=
'第四张焦点图'
;
break
;
}
md
.
sensorLogTake
({
xcxClick
:
"小程序页面点击事件"
,
pageName
:
"产检提醒首页"
,
buttonName
:
buttonName
,
});
// 跳转
if
(
item
?.
url
!=
""
)
{
jump
({
...
...
@@ -265,26 +285,15 @@ const handleBannerClick = (item, index) => {
})
}
// let buttonName = '';
// switch(index){
// case 0:
// buttonName = '第一张焦点图';
// break;
// case 1:
// buttonName = '第二张焦点图';
// break;
// case 2:
// buttonName = '第三张焦点图';
// break;
// }
// md.sensorLogTake({
// xcxClick: "产品提醒页-首屏页面点击",
// pageName: "产品提醒页-首屏",
// buttonName: buttonName,
// });
}
// 新增体检
const
onAdd
=
()
=>
{
md
.
sensorLogTake
({
xcxClick
:
"小程序页面点击事件"
,
pageName
:
"产检提醒首页"
,
buttonName
:
'添加'
});
uni
.
navigateTo
({
url
:
'/pages/addPostnatal/addPostnatal'
})
...
...
@@ -293,24 +302,36 @@ const onAdd = () => {
const
onBtn
=
(
type
)
=>
{
// const items = JSON.stringify(homeInfo.value)
// type 0 提醒 1 报告单 2 日历
let
buttonName
=
''
switch
(
type
)
{
case
0
:
// 如果授权就不弹出提醒
showPicker
.
value
=
isWxNotification
.
value
?
true
:
false
showPicker
.
value
=
isWxNotification
.
value
?
true
:
false
buttonName
=
'提醒'
break
;
case
1
:
uni
.
navigateTo
({
url
:
'/pages/myReportCard/myReportCard'
})
buttonName
=
'报告单'
break
;
case
2
:
uni
.
navigateTo
({
url
:
`/pages/productionCalendar/productionCalendar`
})
buttonName
=
'日历'
break
;
default
:
break
;
}
md
.
sensorLogTake
({
xcxClick
:
"小程序页面点击事件"
,
pageName
:
"产检提醒首页"
,
buttonName
:
buttonName
,
});
}
// 提醒关闭
const
close
=
()
=>
{
...
...
@@ -341,6 +362,12 @@ const handleConfirm = () => {
// 编辑时间
const
onEdit
=
(
id
,
newTime
)
=>
{
md
.
sensorLogTake
({
xcxClick
:
"小程序页面点击事件"
,
pageName
:
"产检提醒首页"
,
buttonName
:
'选择时间'
,
});
console
.
log
(
id
,
newTime
)
time
.
value
=
newTime
visible
.
value
=
true
...
...
@@ -503,6 +530,13 @@ onShow(async () => {
console
.
log
(
'宝宝信息加载完成:'
,
userStore
.
babyInfo
)
publicFn
()
})
onMounted
(()
=>
{
md
.
sensorLogTake
({
xcxPage
:
"小程序页面浏览事件"
,
pageName
:
"产检提醒首页"
});
})
</
script
>
<
style
lang=
"less"
scoped
>
...
...
pages/productionCalendar/productionCalendar.vue
View file @
1cf3fe1e
...
...
@@ -131,7 +131,8 @@ import {
import
{
getInfo
}
from
'../../api/obstetric.js'
;
import
{
console
}
from
'inspector'
;
import
md
from
'../../md'
;
// 获取用户信息
const
userStore
=
useUserStore
();
const
babyInfo
=
ref
(
userStore
?.
babyInfo
||
{})
...
...
@@ -379,10 +380,20 @@ const calendarDates = computed(() => {
})
// 返回
const
backHandler
=
()
=>
{
md
.
sensorLogTake
({
xcxClick
:
"小程序页面点击事件"
,
pageName
:
"产检日历页"
,
buttonName
:
'返回'
});
uni
.
navigateBack
()
}
// 跳转新增产检页面
const
onAdd
=
()
=>
{
md
.
sensorLogTake
({
xcxClick
:
"小程序页面点击事件"
,
pageName
:
"产检日历页"
,
buttonName
:
'新增产检'
});
uni
.
navigateTo
({
url
:
`/pages/addPostnatal/addPostnatal?time=
${
currentSelectedDate
.
value
}
`
})
...
...
@@ -423,17 +434,12 @@ const getInfoFn = async () => {
});
}
}
// onLoad((option) => {
// console.log('option:', option)
// info.value = JSON.parse(option.item)
// // 使用真实的今天日期
// const today = new Date()
// const todayString = formatDateString(today)
// currentSelectedDate.value = todayString
// currentDate.value = new Date(today.getFullYear(), today.getMonth(), 1) // 当前月份的第一天
// currentMonthKey.value = `${today.getFullYear()}-${today.getMonth()}` // 设置月份键
// console.log('初始化今日日期:', todayString, '当前月份:', currentDate.value, '月份键:', currentMonthKey.value)
// })
onLoad
((
option
)
=>
{
md
.
sensorLogTake
({
xcxPage
:
"小程序页面浏览事件"
,
pageName
:
"产检日历页"
});
})
onShow
(()
=>
{
// 使用真实的今天日期
const
today
=
new
Date
()
...
...
pages/productionDetails/productionDetails.vue
View file @
1cf3fe1e
...
...
@@ -170,6 +170,7 @@ import {
getDeleteReportImg
}
from
'../../api/obstetric.js'
;
import
{
useUserStore
}
from
"@/stores/user"
;
import
md
from
'../../md'
;
// 用户信息
const
userStore
=
useUserStore
();
const
babyId
=
ref
(
userStore
.
babyInfo
?.
content
?.
id
)
...
...
@@ -288,6 +289,27 @@ const updateActiveTab = (scrollTop) => {
// 点击tab滚动到对应区域
const
scrollToSection
=
(
index
)
=>
{
let
buttonName
=
''
switch
(
index
)
{
case
0
:
buttonName
=
'产检须知'
;
break
;
case
1
:
buttonName
=
'产检项目'
;
break
;
case
2
:
buttonName
=
'本次报告单'
;
break
;
default
:
break
;
}
md
.
sensorLogTake
({
xcxClick
:
"小程序页面点击事件"
,
pageName
:
"产检详情页"
,
buttonName
:
buttonName
,
});
activeIndex
.
value
=
index
;
scrolling
.
value
=
true
;
...
...
@@ -354,6 +376,12 @@ const onImageDel = (id) => {
}
// 上传图片
const
onUpload
=
throttleTap
(()
=>
{
md
.
sensorLogTake
({
xcxClick
:
"小程序页面点击事件"
,
pageName
:
"产检详情页"
,
buttonName
:
"上传报告单"
,
});
if
(
bgdImgList
.
value
.
length
==
15
)
{
uni
.
showToast
({
title
:
"最多上传15张图片"
,
...
...
@@ -401,6 +429,12 @@ const onUpload = throttleTap(() => {
// 查看更多
const
onSeeBtn
=
()
=>
{
md
.
sensorLogTake
({
xcxClick
:
"小程序页面点击事件"
,
pageName
:
"产检详情页"
,
buttonName
:
"查看全部"
,
})
uni
.
navigateTo
({
url
:
'/pages/myReportCard/myReportCard'
})
...
...
@@ -408,6 +442,12 @@ const onSeeBtn = () => {
// 打开提醒弹窗
const
onRemind
=
()
=>
{
md
.
sensorLogTake
({
xcxClick
:
"小程序页面点击事件"
,
pageName
:
"产检详情页"
,
buttonName
:
"提醒"
,
})
// 产检时间
const
checkupDate
=
new
Date
(
infoData
.
value
.
checkupDate
)
...
...
@@ -475,6 +515,12 @@ const getWxNotificationFn = async (notificationDate, wxTemplateId, babyId) => {
}
// 完成检查
const
onComplete
=
()
=>
{
md
.
sensorLogTake
({
xcxClick
:
"小程序页面点击事件"
,
pageName
:
"产检详情页"
,
buttonName
:
"完成检查"
,
})
if
(
infoData
.
value
.
checkupDate
==
''
)
{
uni
.
showToast
({
title
:
'请选择产检日期'
,
...
...
@@ -495,6 +541,12 @@ const onComplete = () => {
// 修改时间
const
onChangeTime
=
throttleTap
((
date
)
=>
{
md
.
sensorLogTake
({
xcxClick
:
"小程序页面点击事件"
,
pageName
:
"产检详情页"
,
buttonName
:
"选择时间"
,
})
visible
.
value
=
true
time
.
value
=
date
})
...
...
@@ -512,6 +564,11 @@ const handleDateConfirm = (date) => {
// 修改项目
const
onModify
=
(
item
)
=>
{
md
.
sensorLogTake
({
xcxClick
:
"小程序页面点击事件"
,
pageName
:
"产检详情页"
,
buttonName
:
"修改项目"
,
})
console
.
log
(
item
)
const
items
=
JSON
.
stringify
(
item
)
uni
.
navigateTo
({
...
...
@@ -582,6 +639,10 @@ const getSettingFn = () => {
}
// 获取传过来的参数
onLoad
((
options
)
=>
{
md
.
sensorLogTake
({
xcxPage
:
"小程序页面浏览事件"
,
pageName
:
"产检详情页"
});
console
.
log
(
options
)
// 获取传过来的参数:id
editId
.
value
=
options
.
id
...
...
pages/syWebview/syWebview.vue
View file @
1cf3fe1e
...
...
@@ -114,7 +114,10 @@ onLoad(async (options) => {
const
unionId
=
globalStore
.
unionId
// scene 需要使用 decodeURIComponent 才能获取到生成二维码时传入的 scene
const
scene
=
decodeURIComponent
(
options
.
scene
)
// const scene = decodeURIComponent(options.scene)
// options.scene = null
// console.warn("scene", scene)
// 将 options 的所有参数原样作为查询参数传给 H5,并补齐 cuk
const
params
=
{
...(
options
||
{})
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment