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
f401f413
Commit
f401f413
authored
Jun 17, 2025
by
tao.huang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 埋点
parent
73871a9c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
111 additions
and
9 deletions
+111
-9
person.vue
pages/person/person.vue
+24
-0
My.vue
views/My.vue
+87
-9
No files found.
pages/person/person.vue
View file @
f401f413
...
...
@@ -11,6 +11,11 @@
class=
"banner_upload"
:src=
"$baseUrl + 'person/customer.png'"
mode=
"aspectFit"
:data-log=
"
{
xcxClick: '我的页面-信息修改页点击',
pageName: '我的页面-信息修改页',
buttonName: '上传背景',
}"
@click="handleUploadBackground"
/>
...
...
@@ -225,6 +230,7 @@ import { uploadImage } from "../../api/common.js";
import
{
showLoading
,
hideLoading
}
from
"../../utils/index.js"
;
import
{
updateBabyInfo
,
getGestationalWeeks
}
from
"../../api/user.js"
;
import
{
usePageCfgStore
}
from
"../../stores/pageCfg"
;
import
md
from
"../../md.js"
;
const
userStore
=
useUserStore
();
const
pageType
=
ref
(
"add"
);
...
...
@@ -505,6 +511,12 @@ const onRadioChange = (e, name) => {
formData
.
value
[
name
]
=
e
.
detail
.
value
;
};
const
onSubmit
=
async
(
e
)
=>
{
md
.
sensorLogTake
({
xcxClick
:
"我的页面-信息修改页点击"
,
pageName
:
"我的页面-信息修改页"
,
buttonName
:
"保存"
,
});
// 获取当前阶段需要校验的字段
const
fieldsToValidate
=
FormMap
[
formData
.
value
.
babyStage
].
filter
(
(
field
)
=>
field
!==
"babyStage"
...
...
@@ -588,6 +600,12 @@ const handleReturn = () => {
};
const
handleFormBottomBtn
=
()
=>
{
md
.
sensorLogTake
({
xcxClick
:
"我的页面-信息修改页点击"
,
pageName
:
"我的页面-信息修改页"
,
buttonName
:
pageStatus
.
value
.
formStatus
==
1
?
"收起"
:
"展开"
,
});
pageStatus
.
value
.
formStatus
=
pageStatus
.
value
.
formStatus
==
1
?
2
:
1
;
};
...
...
@@ -607,6 +625,7 @@ const onChooseAvatar = async (e) => {
};
const
handleUploadBackground
=
async
(
e
)
=>
{
md
.
sensorLog
(
e
);
// 唤起图片选择器
uni
.
chooseImage
({
count
:
1
,
...
...
@@ -720,6 +739,11 @@ const initData = () => {
};
onMounted
(()
=>
{
md
.
sensorLogTake
({
xcxPage
:
"宝宝信息页面浏览"
,
pageName
:
"我的页面-信息修改页"
,
});
initData
();
});
...
...
views/My.vue
View file @
f401f413
...
...
@@ -10,7 +10,15 @@
@
update:selectedIndex=
"(val) => (wheelSelectedIndex = val)"
/>
</view>
<view
class=
"bg-container"
@
click=
"handleEditProfile"
>
<view
class=
"bg-container"
:data-log=
"
{
xcxClick: '我的页面点击',
pageName: '我的页面',
buttonName: '个人信息修改',
}"
@click="handleEditProfile"
>
<image
class=
"bg-img"
:src=
"
...
...
@@ -42,7 +50,15 @@
:style=
"
{ 'min-height': cfgStatus.showDetail ? '343rpx' : '180rpx' }"
>
<view
class=
"user-header"
>
<view
class=
"avatar-container"
@
click=
"handleEditProfile"
>
<view
class=
"avatar-container"
:data-log=
"
{
xcxClick: '我的页面点击',
pageName: '我的页面',
buttonName: '个人信息修改',
}"
@click="handleEditProfile"
>
<image
class=
"avatar"
:src=
"
...
...
@@ -60,7 +76,15 @@
/>
<view
class=
"user-detail"
>
<view
class=
"user-detail-nickname"
@
click=
"handleChangeBaby"
>
<view
class=
"user-detail-nickname"
:data-log=
"
{
xcxClick: '我的页面点击',
pageName: '我的页面',
buttonName: '宝宝信息切换',
}"
@click="handleChangeBaby"
>
<text
class=
"nickname"
>
{{
babyInfo
?.
babyStage
===
0
?
"备孕"
...
...
@@ -115,7 +139,7 @@
<text
v-if=
"wheelOptions[wheelSelectedIndex]?.desc.length > 46"
class=
"desc-more"
@
click=
"
cfgStatus.openBabyCardDesc = !cfgStatus.openBabyCardDesc
"
@
click=
"
handleOpenClick
"
>
{{
cfgStatus
.
openBabyCardDesc
?
"点击收起"
:
"点击展开"
}}
</text
>
</view>
...
...
@@ -150,8 +174,26 @@
<!-- 协议 -->
<view
class=
"protocol-container"
>
<image
:src=
"$baseUrl + 'my/protocol.png'"
mode=
"aspectFit"
/>
<view
class=
"hot-member"
@
click=
"handleHot"
data-type=
"member"
></view>
<view
class=
"hot-privacy"
@
click=
"handleHot"
data-type=
"privacy"
></view>
<view
class=
"hot-member"
:data-log=
"
{
xcxClick: '我的页面点击',
pageName: '我的页面',
buttonName: '会员规则',
}"
@click="handleHot"
data-type="member"
>
</view>
<view
class=
"hot-privacy"
:data-log=
"
{
xcxClick: '我的页面点击',
pageName: '我的页面',
buttonName: '隐私协议',
}"
@click="handleHot"
data-type="privacy"
>
</view>
</view>
<RegisterLayer
v-model=
"showRegisterLayer"
@
confirm=
"onRegisterConfirm"
/>
</view>
...
...
@@ -167,6 +209,7 @@ import { usePageCfgStore } from "@/stores/pageCfg";
import
{
jump
,
JumpType
}
from
"@/utils"
;
import
{
getHealthField
}
from
"@/api/common"
;
import
{
hideLoading
,
showLoading
}
from
"../utils"
;
import
md
from
"../md.js"
;
const
{
proxy
}
=
getCurrentInstance
();
const
$baseUrl
=
proxy
.
$baseUrl
;
...
...
@@ -191,6 +234,7 @@ const showBabySwitcher = ref(false);
const
handleHot
=
(
e
)
=>
{
const
type
=
e
.
currentTarget
.
dataset
.
type
;
md
.
sensorLog
(
e
);
console
.
log
(
"handleHot"
,
type
);
...
...
@@ -217,6 +261,12 @@ const navigateTo = (url) => {
};
const
handleToolClick
=
async
(
item
)
=>
{
md
.
sensorLogTake
({
xcxClick
:
"我的页面点击"
,
pageName
:
"我的页面"
,
buttonName
:
item
.
title
,
});
if
(
item
.
title
===
"医生问诊"
)
{
if
(
!
cfgStatus
.
value
.
isRegister
)
return
;
...
...
@@ -254,11 +304,17 @@ const handleToolClick = async (item) => {
};
// 编辑个人资料
const
handleEditProfile
=
()
=>
{
if
(
!
cfgStatus
.
value
.
isRegister
||
!
userStore
.
userInfo
||
JSON
.
stringify
(
userStore
.
userInfo
)
===
"{}"
)
{
const
handleEditProfile
=
(
e
)
=>
{
if
(
!
cfgStatus
.
value
.
isRegister
||
!
userStore
.
userInfo
||
JSON
.
stringify
(
userStore
.
userInfo
)
===
"{}"
)
{
return
;
}
md
.
sensorLog
(
e
);
const
type
=
userStore
.
babyInfo
?.
allBabyBaseInfo
?.
length
==
0
?
"add"
:
"edit"
;
const
babyId
=
userStore
.
babyInfo
?.
allBabyBaseInfo
.
find
(
...
...
@@ -320,10 +376,13 @@ const getRealtimePhoneNumber = async (e) => {
});
};
const
handleChangeBaby
=
()
=>
{
const
handleChangeBaby
=
(
e
)
=>
{
if
(
!
cfgStatus
.
value
.
isRegister
)
{
return
;
}
md
.
sensorLog
(
e
);
showBabySwitcher
.
value
=
true
;
};
...
...
@@ -339,13 +398,32 @@ async function onSelectBaby(baby) {
}
function
onAddBaby
()
{
md
.
sensorLogTake
({
xcxClick
:
"我的页面点击"
,
pageName
:
"我的页面"
,
buttonName
:
"新增入口"
,
});
// 跳转到新增宝宝页面
showBabySwitcher
.
value
=
false
;
navigateTo
(
"/pages/person/person?type=add"
);
}
const
handleOpenClick
=
()
=>
{
md
.
sensorLogTake
({
xcxClick
:
"我的页面点击"
,
pageName
:
"我的页面"
,
buttonName
:
cfgStatus
.
value
.
openBabyCardDesc
?
"收起"
:
"展开"
,
});
cfgStatus
.
value
.
openBabyCardDesc
=
!
cfgStatus
.
value
.
openBabyCardDesc
;
};
// 页面加载
onMounted
(
async
()
=>
{
md
.
sensorLogTake
({
xcxPage
:
"我的页面浏览"
,
pageName
:
"我的页面"
,
});
showLoading
();
await
pageCfgStore
.
fetchCfg
();
initData
();
...
...
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