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
12e0aa33
Commit
12e0aa33
authored
Nov 02, 2025
by
spc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
md
parent
e3268191
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
724 additions
and
18 deletions
+724
-18
CanEatAnswerPopup.vue
components/CanEatAnswerPopup.vue
+11
-0
md.js
md.js
+2
-2
index.vue
pages/index/index.vue
+20
-2
addressEdit.vue
v3/addressList/addressEdit.vue
+51
-0
addressList.vue
v3/addressList/addressList.vue
+59
-0
goodDetail.vue
v3/goodDetail/goodDetail.vue
+63
-4
index.vue
v3/more/index.vue
+49
-0
orderDetail.vue
v3/orderDetail/orderDetail.vue
+92
-0
orderList.vue
v3/orderList/orderList.vue
+32
-0
payResultPage.vue
v3/payResultPage/payResultPage.vue
+71
-0
settlementCenter.vue
v3/settlementCenter/settlementCenter.vue
+77
-10
Home.vue
views/Home.vue
+80
-0
My.vue
views/My.vue
+117
-0
No files found.
components/CanEatAnswerPopup.vue
View file @
12e0aa33
...
...
@@ -47,6 +47,8 @@
</
template
>
<
script
>
import
md
from
'../md'
;
export
default
{
name
:
'CanEatAnswerPopup'
,
props
:
{
...
...
@@ -158,6 +160,15 @@ export default {
}
});
this
.
$refs
.
answerPopup
.
open
();
// 添加曝光埋点
this
.
$nextTick
(()
=>
{
md
.
sensorPopLogTake
({
xcxPopExposure
:
"true"
,
toolName
:
"能不能吃"
,
popName
:
"解析弹窗"
});
});
},
closePopup
()
{
// 恢复背景页面滚动(小程序原生方式)
...
...
md.js
View file @
12e0aa33
...
...
@@ -148,13 +148,13 @@ const sensorPopLog = (evt) => {
trackObj
[
key
]
=
logObj
[
key
];
}
if
(
xcxPopExposure
&&
xcxPopExposure
.
length
>
0
)
{
//
console.warn("-----xcxPopExposure-----", trackObj);
console
.
warn
(
"-----xcxPopExposure-----"
,
trackObj
);
sensors
.
track
(
"xcxPopExposure"
,
{
...
trackObj
,
});
}
if
(
xcxPopClick
&&
xcxPopClick
.
length
>
0
)
{
//
console.warn("-----xcxPopClick-----", trackObj);
console
.
warn
(
"-----xcxPopClick-----"
,
trackObj
);
sensors
.
track
(
"xcxPopClick"
,
{
...
trackObj
,
});
...
...
pages/index/index.vue
View file @
12e0aa33
...
...
@@ -9,8 +9,9 @@
<!-- 邀请奖品弹窗 -->
<InvitePrizePanel
:visible=
"globalStore.isShowInvitePrizePanel"
:inviteCount=
"globalStore.inviteCount"
:prizeName=
"globalStore.prizeName"
:prizeImage=
"globalStore.prizeImage"
:prizeType=
"globalStore.prizeType"
:memberId=
"globalStore.memberId"
@
close=
"handleCloseInvitePrizePanel"
@
record=
"handleInvitePrizePanelRecord"
@
prize=
"handleInvitePrizePanelPrize"
/>
:prizeName=
"globalStore.prizeName"
:prizeImage=
"globalStore.prizeImage"
:prizeType=
"globalStore.prizeType"
:memberId=
"globalStore.memberId"
@
close=
"handleCloseInvitePrizePanel"
@
record=
"handleInvitePrizePanelRecord"
@
prize=
"handleInvitePrizePanelPrize"
/>
<!-- 任务完成弹窗 -->
<!--
<TaskComplete
...
...
@@ -151,6 +152,12 @@ function handleTabClick({ index }) {
// 处理授权手机号按钮点击
const
handleAuthPhoneClick
=
()
=>
{
md
.
sensorComponentLogTake
({
xcxComponentClick
:
"true"
,
pageName
:
`
${[
'首页'
,
'品牌'
,
'积分'
,
'我的'
][
globalStore
.
curTabIndex
]}
`
,
componentName
:
"去授权手机号引导"
,
componentContent
:
"去授权手机号引导"
});
jump
({
type
:
JumpType
.
INNER
,
url
:
"/pages/activity/register"
,
...
...
@@ -223,6 +230,17 @@ const handleTaskComplete = async (taskIdParam) => {
onShow
(
async
()
=>
{
console
.
log
(
'onShow--index'
);
if
(
!
userStore
.
memberInfo
?.
mobile
)
{
md
.
sensorComponentLogTake
({
xcxComponentExposure
:
"true"
,
pageName
:
`
${[
'首页'
,
'品牌'
,
'积分'
,
'我的'
][
globalStore
.
curTabIndex
]}
`
,
componentName
:
"去授权手机号引导"
,
componentContent
:
"去授权手机号引导"
});
}
//完成了浏览任务
if
(
taskId
.
value
>
0
)
{
await
handleTaskComplete
(
taskId
.
value
);
...
...
v3/addressList/addressEdit.vue
View file @
12e0aa33
...
...
@@ -96,6 +96,7 @@
<
script
>
import
{
getAddressDetail
,
saveAddress
,
updateAddress
,
deleteAddress
,
getAddressList
,
setDefaultAddress
,
getRegionList
}
from
'@/api/address.js'
;
import
md
from
'../../md'
;
export
default
{
data
()
{
...
...
@@ -169,7 +170,34 @@ export default {
this
.
loadAddressDetail
();
}
},
mounted
()
{
// 新增模式,在组件挂载后添加曝光埋点
if
(
!
this
.
isEditMode
)
{
this
.
$nextTick
(()
=>
{
this
.
initExposure
();
});
}
},
methods
:
{
// 初始化曝光埋点
initExposure
()
{
// 设为默认地址曝光
md
.
sensorComponentLogTake
({
xcxComponentExposure
:
"true"
,
pageName
:
"收货地址填写页"
,
componentName
:
"收货地址填写"
,
componentContent
:
"设为默认地址"
});
// 保存按钮曝光
md
.
sensorComponentLogTake
({
xcxComponentExposure
:
"true"
,
pageName
:
"收货地址填写页"
,
componentName
:
"收货地址填写"
,
componentContent
:
"保存"
});
},
// 加载地址详情
async
loadAddressDetail
()
{
if
(
!
this
.
addressId
)
return
;
...
...
@@ -198,6 +226,11 @@ export default {
};
console
.
log
(
'填充后的表单数据:'
,
this
.
formData
);
// 数据加载完成后,添加曝光埋点
this
.
$nextTick
(()
=>
{
this
.
initExposure
();
});
}
else
{
uni
.
showToast
({
title
:
response
.
msg
||
'获取地址详情失败'
,
...
...
@@ -655,6 +688,16 @@ export default {
// 切换默认地址
toggleDefault
()
{
// 添加点击埋点(只有当设为默认时记录)
if
(
!
this
.
formData
.
isDefault
)
{
md
.
sensorComponentLogTake
({
xcxComponentClick
:
"true"
,
pageName
:
"收货地址填写页"
,
componentName
:
"收货地址填写"
,
componentContent
:
"设为默认地址"
});
}
// 如果当前要设为默认,需要先取消其他默认地址
if
(
!
this
.
formData
.
isDefault
)
{
this
.
setAsDefault
();
...
...
@@ -726,6 +769,14 @@ export default {
// 处理保存操作
handleSave
()
{
// 添加点击埋点
md
.
sensorComponentLogTake
({
xcxComponentClick
:
"true"
,
pageName
:
"收货地址填写页"
,
componentName
:
"收货地址填写"
,
componentContent
:
"保存"
});
// 防连点检查
if
(
this
.
isSubmitting
)
return
;
this
.
isSubmitting
=
true
...
...
v3/addressList/addressList.vue
View file @
12e0aa33
...
...
@@ -52,6 +52,7 @@
<
script
>
import
{
getAddressList
,
deleteAddress
,
updateAddress
}
from
'@/api/address.js'
;
import
md
from
'../../md'
;
export
default
{
data
()
{
...
...
@@ -77,6 +78,35 @@ export default {
}
},
methods
:
{
// 初始化曝光埋点
initExposure
()
{
// 遍历地址列表,为每个地址的编辑、删除按钮添加曝光埋点
this
.
addressList
.
forEach
(()
=>
{
// 编辑按钮曝光
md
.
sensorComponentLogTake
({
xcxComponentExposure
:
"true"
,
pageName
:
"收货地址管理页"
,
componentName
:
"收货地址管理"
,
componentContent
:
"编辑"
});
// 删除按钮曝光
md
.
sensorComponentLogTake
({
xcxComponentExposure
:
"true"
,
pageName
:
"收货地址管理页"
,
componentName
:
"收货地址管理"
,
componentContent
:
"删除"
});
});
// 添加地址按钮曝光(固定显示)
md
.
sensorComponentLogTake
({
xcxComponentExposure
:
"true"
,
pageName
:
"收货地址管理页"
,
componentName
:
"收货地址管理"
,
componentContent
:
"添加地址"
});
},
// 处理地址点击
handleAddressTap
(
address
)
{
if
(
this
.
fromSettlement
)
{
...
...
@@ -141,6 +171,11 @@ export default {
})).
reverse
();
// 倒序排列,最新的地址在前面
console
.
log
(
'处理后的地址列表(倒序):'
,
this
.
addressList
);
// 数据加载完成后,添加曝光埋点
this
.
$nextTick
(()
=>
{
this
.
initExposure
();
});
}
else
{
uni
.
showToast
({
title
:
response
.
msg
||
'获取地址列表失败'
,
...
...
@@ -172,6 +207,14 @@ export default {
// 编辑地址
editAddress
(
id
)
{
// 添加点击埋点
md
.
sensorComponentLogTake
({
xcxComponentClick
:
"true"
,
pageName
:
"收货地址管理页"
,
componentName
:
"收货地址管理"
,
componentContent
:
"编辑"
});
// 防连点检查
if
(
this
.
isSubmitting
)
return
;
this
.
isSubmitting
=
true
;
...
...
@@ -188,6 +231,14 @@ export default {
// 添加地址
addAddress
()
{
// 添加点击埋点
md
.
sensorComponentLogTake
({
xcxComponentClick
:
"true"
,
pageName
:
"收货地址管理页"
,
componentName
:
"收货地址管理"
,
componentContent
:
"添加地址"
});
// 防连点检查
if
(
this
.
isSubmitting
)
return
;
...
...
@@ -215,6 +266,14 @@ export default {
// 确认删除
confirmDelete
(
index
)
{
// 添加点击埋点
md
.
sensorComponentLogTake
({
xcxComponentClick
:
"true"
,
pageName
:
"收货地址管理页"
,
componentName
:
"收货地址管理"
,
componentContent
:
"删除"
});
// 防连点检查
if
(
this
.
isSubmitting
)
return
;
this
.
currentDeleteIndex
=
index
;
...
...
v3/goodDetail/goodDetail.vue
View file @
12e0aa33
...
...
@@ -131,12 +131,12 @@
</view>
<!-- 兑换确认弹窗 -->
<view
class=
"modal-overlay"
v-if=
"showConfirmModal"
@
click=
"closeModal"
>
<view
class=
"modal-overlay"
v-if=
"showConfirmModal"
@
click=
"closeModal
(true)
"
>
<view
class=
"modal-content"
@
click
.
stop
>
<view
class=
"modal-title"
>
兑换确认
</view>
<view
class=
"modal-message"
>
本次兑换需要消耗
{{
goodsData
.
points
}}{{
goodsData
.
creditsTypeName
||
'积分'
}}
</view>
<view
class=
"modal-buttons"
>
<view
class=
"modal-btn cancel-btn"
@
click=
"closeModal"
>
<view
class=
"modal-btn cancel-btn"
@
click=
"closeModal
(true)
"
>
<image
:src=
"$baseUrl + 'homepage/Q3Res/buyCancelBtn.png'"
mode=
"aspectFill"
></image>
</view>
<view
class=
"modal-btn confirm-btn"
@
click=
"confirmExchange"
>
...
...
@@ -146,7 +146,7 @@
<view
class=
"modal-disclaimer"
>
{{
isPhysicalGoods
()
?
'已发货商品非质量问题不退不换'
:
'兑换完成后不退不换'
}}
</view>
</view>
<!-- 关闭按钮 -->
<view
class=
"modal-close-btn"
@
click=
"closeModal"
>
<view
class=
"modal-close-btn"
@
click=
"closeModal
(true)
"
>
<image
:src=
"$baseUrl + 'homepage/Q3Res/commonCloseBtn1.png'"
mode=
"aspectFit"
></image>
</view>
</view>
...
...
@@ -158,6 +158,7 @@ import { fetchGoodsDetail, fetchSeckillDetail, fetchGoodsPrice, fetchTradeCredit
import
{
useUserStore
}
from
'@/stores/user'
;
import
{
jump
,
JumpType
}
from
'../../utils'
;
import
{
useHomeStore
}
from
'../../stores/home'
;
import
md
from
'../../md'
;
export
default
{
data
()
{
...
...
@@ -256,7 +257,30 @@ export default {
return
'canExchange'
;
}
},
watch
:
{
showConfirmModal
(
newVal
)
{
if
(
newVal
)
{
// 弹窗显示时添加曝光埋点
this
.
$nextTick
(()
=>
{
md
.
sensorPopLogTake
({
xcxPopExposure
:
"true"
,
toolName
:
"积分商品"
,
popName
:
"兑换确认弹窗"
});
});
}
}
},
onLoad
(
options
)
{
md
.
sensorComponentLogTake
({
xcxComponentExposure
:
"true"
,
pageName
:
"商品详情页"
,
componentName
:
"商品详情"
,
componentContent
:
"立即兑换"
});
console
.
log
(
'页面参数:'
,
options
);
// 保存初始参数,用于页面返回时刷新
this
.
initOptions
=
{
...
options
};
...
...
@@ -782,6 +806,12 @@ export default {
// 处理兑换
handleExchange
()
{
md
.
sensorComponentLogTake
({
xcxComponentClick
:
"true"
,
pageName
:
"商品详情页"
,
componentName
:
"立即兑换"
,
componentContent
:
"立即兑换"
});
console
.
log
(
'handleExchange 被调用'
);
console
.
log
(
'登录状态:'
,
this
.
cfgStatus
.
isRegister
);
console
.
log
(
'canExchange:'
,
this
.
canExchange
);
...
...
@@ -810,6 +840,12 @@ export default {
this
.
openSpecModal
();
}
else
{
// 非实物商品:直接显示兑换确认弹窗
// 先添加曝光埋点
md
.
sensorPopLogTake
({
xcxPopExposure
:
"true"
,
toolName
:
"积分商品"
,
popName
:
"兑换确认弹窗"
});
this
.
showConfirmModal
=
true
;
}
},
...
...
@@ -904,17 +940,40 @@ export default {
await
this
.
navigateToSettlement
();
}
else
{
// 非实物商品:显示兑换确认弹窗
// 先添加曝光埋点
md
.
sensorPopLogTake
({
xcxPopExposure
:
"true"
,
toolName
:
"积分商品"
,
popName
:
"兑换确认弹窗"
});
this
.
showConfirmModal
=
true
;
}
},
// 关闭弹窗
closeModal
()
{
closeModal
(
isCancel
=
false
)
{
// 只有在用户点击取消或关闭按钮时才记录取消埋点
if
(
isCancel
)
{
md
.
sensorPopLogTake
({
xcxPopClick
:
"true"
,
toolName
:
"积分商品"
,
popName
:
"兑换确认弹窗"
,
buttonName
:
"取消"
});
}
this
.
showConfirmModal
=
false
;
},
// 确认兑换
async
confirmExchange
()
{
// 添加确定按钮点击埋点
md
.
sensorPopLogTake
({
xcxPopClick
:
"true"
,
toolName
:
"积分商品"
,
popName
:
"兑换确认弹窗"
,
buttonName
:
"确定"
});
// 防连点检查
if
(
this
.
isSubmitting
)
return
;
this
.
isSubmitting
=
true
;
...
...
v3/more/index.vue
View file @
12e0aa33
...
...
@@ -78,6 +78,7 @@
<
script
>
import
{
jump
,
JumpType
}
from
'../../utils'
;
import
md
from
'../../md'
;
export
default
{
data
()
{
...
...
@@ -112,11 +113,59 @@ export default {
]
}
},
onLoad
()
{
// 页面加载时添加曝光埋点
this
.
$nextTick
(()
=>
{
this
.
initExposure
();
});
},
methods
:
{
// 初始化曝光埋点
initExposure
()
{
// 为所有菜单项添加曝光埋点
const
menuNames
=
{
modifyPhone
:
'修改手机号'
,
partnership
:
'异业合作'
,
feedback
:
'意见反馈'
,
userPolicy
:
'用户政策'
,
privacyPolicy
:
'隐私协议'
,
cancelAccount
:
'注销账号'
};
Object
.
values
(
menuNames
).
forEach
((
menuName
)
=>
{
md
.
sensorComponentLogTake
({
xcxComponentExposure
:
"true"
,
pageName
:
"更多页"
,
componentName
:
"更多"
,
componentContent
:
menuName
});
});
},
// 处理菜单项点击
handleItemTap
(
itemId
)
{
console
.
log
(
'点击了菜单项:'
,
itemId
)
// 菜单项名称映射
const
menuNames
=
{
modifyPhone
:
'修改手机号'
,
partnership
:
'异业合作'
,
feedback
:
'意见反馈'
,
userPolicy
:
'用户政策'
,
privacyPolicy
:
'隐私协议'
,
cancelAccount
:
'注销账号'
};
// 添加点击埋点
if
(
menuNames
[
itemId
])
{
md
.
sensorComponentLogTake
({
xcxComponentClick
:
"true"
,
pageName
:
"更多页"
,
componentName
:
"更多"
,
componentContent
:
menuNames
[
itemId
]
});
}
// 根据不同的菜单项执行不同的操作
switch
(
itemId
)
{
case
'modifyPhone'
:
...
...
v3/orderDetail/orderDetail.vue
View file @
12e0aa33
...
...
@@ -229,6 +229,7 @@ import { getOrderDetail } from '@/api/user.js';
import
{
useHomeStore
}
from
'@/stores/home'
;
import
{
jump
,
JumpType
}
from
'@/utils/index'
;
import
{
fetchOrderCancel
}
from
'../../api/goods'
;
import
md
from
'../../md'
;
export
default
{
data
()
{
...
...
@@ -374,6 +375,68 @@ export default {
}
},
methods
:
{
// 初始化曝光埋点
initExposure
()
{
const
pageInfo
=
this
.
getPageInfo
();
// 客服曝光埋点(所有订单类型都有)
md
.
sensorComponentLogTake
({
xcxComponentExposure
:
"true"
,
pageName
:
pageInfo
.
pageName
,
componentName
:
pageInfo
.
componentName
,
componentContent
:
"客服"
});
// 根据订单类型添加不同的曝光埋点
if
(
this
.
orderData
.
productType
===
'physical'
)
{
// 实物订单:申请退货按钮曝光
if
(
this
.
showActionButton
)
{
md
.
sensorComponentLogTake
({
xcxComponentExposure
:
"true"
,
pageName
:
pageInfo
.
pageName
,
componentName
:
pageInfo
.
componentName
,
componentContent
:
"申请退货"
});
}
}
else
if
(
this
.
orderData
.
productType
===
'virtual'
&&
this
.
orderData
.
virtualType
===
'coupon'
)
{
// 优选券:去使用按钮曝光
if
(
this
.
showActionButton
)
{
md
.
sensorComponentLogTake
({
xcxComponentExposure
:
"true"
,
pageName
:
pageInfo
.
pageName
,
componentName
:
pageInfo
.
componentName
,
componentContent
:
"去使用"
});
}
}
// 异业卡券只有客服,不需要额外曝光埋点
},
// 获取页面信息(根据订单类型)
getPageInfo
()
{
if
(
this
.
orderData
.
productType
===
'physical'
)
{
return
{
pageName
:
"实物订单详情页"
,
componentName
:
"实物订单详情"
};
}
else
if
(
this
.
orderData
.
productType
===
'virtual'
&&
this
.
orderData
.
virtualType
===
'card'
)
{
return
{
pageName
:
"异业卡券订单详情页"
,
componentName
:
"异业卡券订单详情"
};
}
else
if
(
this
.
orderData
.
productType
===
'virtual'
&&
this
.
orderData
.
virtualType
===
'coupon'
)
{
return
{
pageName
:
"优选券订单详情页"
,
componentName
:
"优选券订单详情"
};
}
// 默认值
return
{
pageName
:
"订单详情页"
,
componentName
:
"订单详情"
};
},
// 获取状态图标
getStatusIcon
()
{
const
iconMap
=
{
...
...
@@ -395,6 +458,10 @@ export default {
if
(
response
.
ok
&&
response
.
data
)
{
this
.
mapApiDataToOrderData
(
response
.
data
);
// 数据加载完成后,添加曝光埋点
this
.
$nextTick
(()
=>
{
this
.
initExposure
();
});
}
else
{
uni
.
showToast
({
title
:
response
.
msg
||
'获取订单详情失败'
,
...
...
@@ -711,13 +778,29 @@ export default {
// 处理操作按钮点击
async
handleAction
()
{
const
pageInfo
=
this
.
getPageInfo
();
if
(
this
.
orderData
.
productType
===
'physical'
&&
this
.
orderData
.
statusCode
===
'waiting_ship'
)
{
// 添加申请退货点击埋点
md
.
sensorComponentLogTake
({
xcxComponentClick
:
"true"
,
pageName
:
pageInfo
.
pageName
,
componentName
:
pageInfo
.
componentName
,
componentContent
:
"申请退货"
});
// 显示自定义确认弹窗
this
.
showRefundModal
=
true
;
}
// 优选券(coupon)的"去使用"按钮点击跳转
if
(
this
.
orderData
.
productType
===
'virtual'
&&
this
.
orderData
.
virtualType
===
'coupon'
&&
this
.
orderData
.
statusCode
!==
'failed'
&&
this
.
orderData
.
statusCode
!==
'cancelled'
)
{
// 添加去使用点击埋点
md
.
sensorComponentLogTake
({
xcxComponentClick
:
"true"
,
pageName
:
pageInfo
.
pageName
,
componentName
:
pageInfo
.
componentName
,
componentContent
:
"去使用"
});
// 点击跳转优惠券页面(星妈优选券包)
this
.
navigateToCoupon
()
}
...
...
@@ -791,6 +874,15 @@ export default {
// 处理客服按钮点击
handleServiceClick
()
{
// 添加客服点击埋点
const
pageInfo
=
this
.
getPageInfo
();
md
.
sensorComponentLogTake
({
xcxComponentClick
:
"true"
,
pageName
:
pageInfo
.
pageName
,
componentName
:
pageInfo
.
componentName
,
componentContent
:
"客服"
});
console
.
log
(
'客服点击'
);
const
homeStore
=
useHomeStore
();
const
{
...
...
v3/orderList/orderList.vue
View file @
12e0aa33
...
...
@@ -90,6 +90,7 @@
<
script
>
import
{
getExchangeList
}
from
'@/api/user.js'
;
import
{
jump
,
JumpType
}
from
'../../utils'
;
import
md
from
'../../md'
;
export
default
{
data
()
{
...
...
@@ -109,6 +110,24 @@ export default {
}
},
methods
:
{
// 初始化曝光埋点
initExposure
()
{
// 遍历订单列表,为显示"查看详情"按钮的订单添加曝光埋点
this
.
orderList
.
forEach
((
order
)
=>
{
// 只有当订单状态不是 pending_payment、pending_use、pending_take 时才显示"查看详情"按钮
if
(
order
.
status
!==
'pending_payment'
&&
order
.
status
!==
'pending_use'
&&
order
.
status
!==
'pending_take'
)
{
md
.
sensorComponentLogTake
({
xcxComponentExposure
:
"true"
,
pageName
:
"我的订单页"
,
componentName
:
"我的订单"
,
componentContent
:
"查看详情"
});
}
});
},
// 加载兑换记录列表
async
loadExchangeList
(
isRefresh
=
false
)
{
if
(
this
.
loading
)
return
;
...
...
@@ -140,6 +159,11 @@ export default {
// 更新nextId,判断是否还有更多数据
this
.
nextId
=
response
.
data
.
nextId
||
null
;
this
.
hasMore
=
!!
this
.
nextId
;
// 数据加载完成后,添加曝光埋点
this
.
$nextTick
(()
=>
{
this
.
initExposure
();
});
}
else
{
// API调用失败
console
.
warn
(
'API调用失败:'
,
response
.
msg
);
...
...
@@ -323,6 +347,14 @@ export default {
// 查看订单详情
viewOrderDetail
(
order
)
{
// 添加点击埋点
md
.
sensorComponentLogTake
({
xcxComponentClick
:
"true"
,
pageName
:
"我的订单页"
,
componentName
:
"我的订单"
,
componentContent
:
"查看详情"
});
uni
.
navigateTo
({
url
:
`/v3/orderDetail/orderDetail?orderId=
${
order
.
orderId
}
`
});
...
...
v3/payResultPage/payResultPage.vue
View file @
12e0aa33
...
...
@@ -69,6 +69,7 @@
import
{
useHomeStore
}
from
'@/stores/home'
;
import
{
usePageCfgStore
}
from
'@/stores/pageCfg'
;
import
{
jump
,
JumpType
}
from
'../../utils'
;
import
md
from
'../../md'
;
export
default
{
data
()
{
...
...
@@ -173,10 +174,63 @@ export default {
this
.
resultData
.
buy_num
=
parseInt
(
options
.
buy_num
)
||
1
;
console
.
log
(
'支付结果数据:'
,
this
.
resultData
);
// 添加曝光埋点 - 使用 nextTick 确保数据已加载
this
.
$nextTick
(()
=>
{
this
.
initExposure
();
});
},
mounted
()
{
// 如果数据未加载完成,等待后再次尝试曝光埋点
setTimeout
(()
=>
{
this
.
initExposure
();
},
500
);
},
methods
:
{
// 初始化曝光埋点
initExposure
()
{
// 操作按钮曝光埋点(根据成功失败状态)
const
actionContent
=
this
.
isSuccess
?
'查看订单'
:
'返回首页'
;
md
.
sensorComponentLogTake
({
xcxComponentExposure
:
"true"
,
pageName
:
"订单完成页"
,
componentName
:
"订单完成"
,
componentContent
:
actionContent
});
// 客服曝光埋点
md
.
sensorComponentLogTake
({
xcxComponentExposure
:
"true"
,
pageName
:
"订单完成页"
,
componentName
:
"订单完成"
,
componentContent
:
"客服"
});
// Banner曝光埋点 - 遍历所有banner
if
(
this
.
pageCfgStore
?.
contentCfg
?.
activeInfo
?.
length
>
0
)
{
this
.
pageCfgStore
.
contentCfg
.
activeInfo
.
forEach
((
item
)
=>
{
const
bannerName
=
item
?.
title
||
item
?.
name
||
item
?.
bgUrl
?.
split
(
'/'
).
pop
()
||
'活动banner'
;
md
.
sensorComponentLogTake
({
xcxComponentExposure
:
"true"
,
pageName
:
"订单完成页"
,
componentName
:
"订单完成"
,
componentContent
:
bannerName
});
});
}
},
// 处理操作按钮点击
handleAction
()
{
// 添加点击埋点
const
actionContent
=
this
.
isSuccess
?
'查看订单'
:
'返回首页'
;
md
.
sensorComponentLogTake
({
xcxComponentClick
:
"true"
,
pageName
:
"订单完成页"
,
componentName
:
"订单完成"
,
componentContent
:
actionContent
});
if
(
this
.
isSuccess
)
{
// 查看订单 - 跳转到订单详情页面
if
(
this
.
resultData
.
orderId
)
{
...
...
@@ -211,6 +265,14 @@ export default {
// 处理客服按钮点击
handleServiceClick
()
{
// 添加点击埋点
md
.
sensorComponentLogTake
({
xcxComponentClick
:
"true"
,
pageName
:
"订单完成页"
,
componentName
:
"订单完成"
,
componentContent
:
"客服"
});
console
.
log
(
'客服点击'
);
const
homeStore
=
useHomeStore
();
const
{
...
...
@@ -229,6 +291,15 @@ export default {
// 处理活动banner点击
handleVipActiveClick
(
index
,
item
)
{
// 添加点击埋点
const
bannerName
=
item
?.
title
||
item
?.
name
||
item
?.
bgUrl
?.
split
(
'/'
).
pop
()
||
'活动banner'
;
md
.
sensorComponentLogTake
({
xcxComponentClick
:
"true"
,
pageName
:
"订单完成页"
,
componentName
:
"订单完成"
,
componentContent
:
bannerName
});
console
.
log
(
'活动banner点击:'
,
item
);
// 只保留跳转功能,从item.link获取跳转参数
...
...
v3/settlementCenter/settlementCenter.vue
View file @
12e0aa33
...
...
@@ -87,13 +87,13 @@
</view>
</view>
<!-- 兑换确认弹窗 -->
<view
class=
"modal-overlay"
v-if=
"showConfirmModal"
@
click=
"closeModal"
>
<view
class=
"modal-overlay"
v-if=
"showConfirmModal"
@
click=
"closeModal
(true)
"
>
<view
class=
"modal-content"
@
click
.
stop
>
<view
class=
"modal-title"
>
兑换确认
</view>
<view
class=
"modal-message"
>
本次兑换需要消耗
{{
goodsInfo
.
points
*
goodsInfo
.
quantity
}}{{
goodsInfo
.
creditsTypeName
||
'积分'
}}
</view>
<view
class=
"modal-buttons"
>
<view
class=
"modal-btn cancel-btn"
@
click=
"closeModal"
>
<view
class=
"modal-btn cancel-btn"
@
click=
"closeModal
(true)
"
>
<image
:src=
"$baseUrl + 'homepage/Q3Res/buyCancelBtn.png'"
mode=
"aspectFill"
></image>
</view>
<view
class=
"modal-btn confirm-btn"
@
click=
"confirmExchange"
>
...
...
@@ -103,7 +103,7 @@
<view
class=
"modal-disclaimer"
>
{{
isPhysicalGoods
()
?
'已发货商品非质量问题不退不换'
:
'兑换完成后不退不换'
}}
</view>
</view>
<!-- 关闭按钮 -->
<view
class=
"modal-close-btn"
@
click=
"closeModal"
>
<view
class=
"modal-close-btn"
@
click=
"closeModal
(true)
"
>
<image
:src=
"$baseUrl + 'homepage/Q3Res/commonCloseBtn1.png'"
mode=
"aspectFit"
></image>
</view>
</view>
...
...
@@ -152,9 +152,10 @@ import { fetchTradeCredits, fetchSeckillTakeOrder } from '@/api/goods.js';
import
{
getAddressList
}
from
'@/api/address.js'
;
import
{
useHomeStore
}
from
'@/stores/home'
;
import
{
jump
,
JumpType
}
from
'../../utils'
;
import
md
from
'../../md'
;
export
default
{
data
()
{
data
()
{
return
{
orderNotes
:
''
,
// 订单来源子渠道
...
...
@@ -192,9 +193,36 @@ export default {
}
}
},
watch
:
{
showConfirmModal
(
newVal
)
{
if
(
newVal
)
{
// 弹窗显示时添加曝光埋点
this
.
$nextTick
(()
=>
{
md
.
sensorPopLogTake
({
xcxPopExposure
:
"true"
,
toolName
:
"积分商品"
,
popName
:
"兑换确认弹窗"
});
});
}
}
},
onLoad
(
options
)
{
console
.
log
(
'结算页面参数:'
,
options
);
md
.
sensorComponentLogTake
({
xcxComponentExposure
:
"true"
,
pageName
:
"实物订单结算页"
,
componentName
:
"实物订单结算"
,
componentContent
:
"提交订单"
});
md
.
sensorComponentLogTake
({
xcxComponentExposure
:
"true"
,
pageName
:
"实物订单结算页"
,
componentName
:
"实物订单结算"
,
componentContent
:
"客服"
});
// 初始化homeStore
this
.
homeStore
=
useHomeStore
();
...
...
@@ -259,7 +287,7 @@ export default {
// 判断是否为秒杀
this
.
isSeckill
=
!!
(
options
.
isSeckill
===
'true'
||
options
.
isSeckill
===
true
||
options
.
activityId
);
// 解析秒杀参数
if
(
this
.
isSeckill
)
{
this
.
seckillParams
=
{
...
...
@@ -424,6 +452,14 @@ export default {
// 提交订单
async
submitOrder
()
{
// 添加点击埋点
md
.
sensorComponentLogTake
({
xcxComponentClick
:
"true"
,
pageName
:
"实物订单结算页"
,
componentName
:
"实物订单结算"
,
componentContent
:
"提交订单"
});
try
{
// 检查是否有收货地址
if
(
!
this
.
hasAddress
||
!
this
.
selectedAddress
)
{
...
...
@@ -445,16 +481,39 @@ export default {
// 显示确认兑换弹窗
showExchangeConfirmModal
()
{
// 先添加曝光埋点
md
.
sensorPopLogTake
({
xcxPopExposure
:
"true"
,
toolName
:
"积分商品"
,
popName
:
"兑换确认弹窗"
});
this
.
showConfirmModal
=
true
;
},
// 关闭弹窗
closeModal
()
{
closeModal
(
isCancel
=
false
)
{
// 只有在用户点击取消或关闭按钮时才记录取消埋点
if
(
isCancel
)
{
md
.
sensorPopLogTake
({
xcxPopClick
:
"true"
,
toolName
:
"积分商品"
,
popName
:
"兑换确认弹窗"
,
buttonName
:
"取消"
});
}
this
.
showConfirmModal
=
false
;
},
// 确认兑换
async
confirmExchange
()
{
// 添加确定按钮点击埋点
md
.
sensorPopLogTake
({
xcxPopClick
:
"true"
,
toolName
:
"积分商品"
,
popName
:
"兑换确认弹窗"
,
buttonName
:
"确定"
});
// 防连点检查
if
(
this
.
isSubmitting
)
return
;
this
.
isSubmitting
=
true
;
...
...
@@ -484,7 +543,7 @@ export default {
});
let
response
;
if
(
this
.
isSeckill
)
{
// 秒杀商品:调用秒杀下单接口
const
seckillOrderParams
=
{
...
...
@@ -495,12 +554,12 @@ export default {
addressId
:
this
.
orderParams
.
addressId
||
''
,
buyNum
:
this
.
orderParams
.
buy_num
||
1
};
// 添加备注(如果有)
if
(
this
.
orderParams
.
remark
)
{
seckillOrderParams
.
remark
=
this
.
orderParams
.
remark
;
}
console
.
log
(
'秒杀下单参数:'
,
seckillOrderParams
);
response
=
await
fetchSeckillTakeOrder
(
seckillOrderParams
);
console
.
log
(
'秒杀下单结果:'
,
response
);
...
...
@@ -567,7 +626,7 @@ export default {
buy_num
:
this
.
orderParams
.
buy_num
,
// 订单来源子渠道
orderSubSource
:
this
.
orderSubSource
,
// 秒杀相关参数
isSeckill
:
this
.
isSeckill
,
activityId
:
this
.
seckillParams
.
activityId
||
''
,
...
...
@@ -595,6 +654,14 @@ export default {
// 处理客服按钮点击
handleServiceClick
()
{
// 添加点击埋点
md
.
sensorComponentLogTake
({
xcxComponentClick
:
"true"
,
pageName
:
"实物订单结算页"
,
componentName
:
"实物订单结算"
,
componentContent
:
"客服"
});
console
.
log
(
'客服点击'
);
const
homeStore
=
useHomeStore
();
const
{
...
...
views/Home.vue
View file @
12e0aa33
...
...
@@ -673,6 +673,8 @@ export default {
this
.
popupImageObj
=
data
.
popupImageObj
||
{};
this
.
floatIcon
=
data
.
floatIcon
||
{};
if
(
this
.
homeStore
.
isLogin
)
{
this
.
vipCardList
[
0
]
=
data
.
vipConfigList
.
find
(
item
=>
item
.
grade
===
this
.
homeStore
.
homeInfo
?.
grade
);
...
...
@@ -689,6 +691,52 @@ export default {
}
},
initExposure
()
{
if
(
this
.
canEatData
&&
this
.
canEatData
.
id
)
{
if
(
this
.
canEatData
.
isAnswered
||
this
.
canEatData
.
myAnswer
)
{
md
.
sensorComponentLogTake
({
xcxComponentExposure
:
"true"
,
pageName
:
"首页"
,
componentName
:
"能不能吃"
,
componentContent
:
"查看问题解析"
});
}
if
(
!
this
.
canEatData
.
isAnswered
&&
!
this
.
canEatData
.
myAnswer
)
{
md
.
sensorComponentLogTake
({
xcxComponentExposure
:
"true"
,
pageName
:
"首页"
,
componentName
:
"能不能吃"
,
componentContent
:
"能吃"
});
md
.
sensorComponentLogTake
({
xcxComponentExposure
:
"true"
,
pageName
:
"首页"
,
componentName
:
"能不能吃"
,
componentContent
:
"少吃"
});
md
.
sensorComponentLogTake
({
xcxComponentExposure
:
"true"
,
pageName
:
"首页"
,
componentName
:
"能不能吃"
,
componentContent
:
"慎吃"
});
md
.
sensorComponentLogTake
({
xcxComponentExposure
:
"true"
,
pageName
:
"首页"
,
componentName
:
"能不能吃"
,
componentContent
:
"禁吃"
});
}
}
if
(
this
.
floatIcon
?.
imageUrl
)
{
md
.
sensorComponentLogTake
({
xcxComponentExposure
:
"true"
,
pageName
:
"首页"
,
componentName
:
"悬浮窗"
,
componentContent
:
"悬浮窗"
});
}
const
componentContent
=
this
.
toolList
.
tools
?.[
this
.
currentIndex
]?.
title
||
''
;
md
.
sensorComponentLogTake
({
xcxComponentExposure
:
"true"
,
...
...
@@ -1036,6 +1084,15 @@ export default {
// 处理能不能吃答题
async
handleCanEatAnswer
(
answerIndex
)
{
// 添加埋点
const
answerTexts
=
[
'能吃'
,
'少吃'
,
'慎吃'
,
'禁吃'
];
md
.
sensorComponentLogTake
({
xcxComponentClick
:
"true"
,
pageName
:
"首页"
,
componentName
:
"能不能吃"
,
componentContent
:
answerTexts
[
answerIndex
]
||
'能吃'
});
// 添加登录检查
if
(
!
this
.
homeStore
.
isLogin
)
{
jump
({
...
...
@@ -1137,6 +1194,15 @@ export default {
// 显示金币动画
this
.
showGoldCoinAnimation
=
true
;
// 添加金币动画模块曝光埋点
this
.
$nextTick
(()
=>
{
md
.
sensorPopLogTake
({
xcxPopExposure
:
"true"
,
toolName
:
"能不能吃"
,
popName
:
"答题结果弹窗"
});
});
// 保存当前的canEatData状态,防止被fetchCanEatData覆盖
const
currentCanEatData
=
{
...
this
.
canEatData
};
...
...
@@ -1249,6 +1315,14 @@ export default {
// 查看问题解析
viewAnalysis
()
{
// 添加埋点
md
.
sensorComponentLogTake
({
xcxComponentClick
:
"true"
,
pageName
:
"首页"
,
componentName
:
"能不能吃"
,
componentContent
:
"查看问题解析"
});
console
.
warn
(
'查看解析数据:'
,
this
.
canEatData
);
if
(
this
.
canEatData
&&
this
.
canEatData
.
myAnswer
&&
this
.
canEatData
.
correct
!==
undefined
)
{
// 将正确答案从数字格式转换为文案格式
...
...
@@ -1492,6 +1566,12 @@ export default {
// 悬浮图片点击事件
onfloatIconClick
()
{
md
.
sensorComponentLogTake
({
xcxComponentClick
:
"true"
,
pageName
:
"首页"
,
componentName
:
"悬浮窗"
,
componentContent
:
"悬浮窗"
});
// 如果正在拖拽,则不触发点击事件
if
(
!
this
.
isDragging
)
{
// 记录点击日志
...
...
views/My.vue
View file @
12e0aa33
...
...
@@ -311,6 +311,14 @@ const points = ref(0);
const
babyId
=
ref
(
0
);
const
handleTaskClick
=
async
()
=>
{
// 添加点击埋点
md
.
sensorComponentLogTake
({
xcxComponentClick
:
"true"
,
pageName
:
"我的页面"
,
componentName
:
"做任务赚更多积分"
,
componentContent
:
"去做任务"
});
// 检查登录状态
if
(
!
cfgStatus
.
value
.
isRegister
)
{
// 未登录,跳转到登录注册页面
...
...
@@ -372,6 +380,14 @@ const navigateToCoupon = () => {
// 需要登录的优惠券页面跳转
const
navigateToCouponWithLogin
=
()
=>
{
// 添加点击埋点
md
.
sensorComponentLogTake
({
xcxComponentClick
:
"true"
,
pageName
:
"我的页面"
,
componentName
:
"拓展工具"
,
componentContent
:
"我的优惠券"
});
// 检查登录状态
if
(
!
cfgStatus
.
value
.
isRegister
)
{
// 未登录,跳转到登录注册页面
...
...
@@ -404,6 +420,26 @@ const navigateTo = (url) => {
const
navigateToWithLogin
=
(
url
)
=>
{
console
.
warn
(
'navigateToWithLogin'
,
url
);
console
.
warn
(
'cfgStatus.value.isRegister'
,
cfgStatus
.
value
.
isRegister
);
// 添加点击埋点 - 根据 URL 判断是哪个菜单项
let
componentContent
=
''
;
if
(
url
.
includes
(
'/v3/orderList/orderList'
))
{
componentContent
=
'我的订单'
;
}
else
if
(
url
.
includes
(
'/v3/addressList/addressList'
))
{
componentContent
=
'收货地址管理'
;
}
else
if
(
url
.
includes
(
'/v3/more/index'
))
{
componentContent
=
'更多'
;
}
if
(
componentContent
)
{
md
.
sensorComponentLogTake
({
xcxComponentClick
:
"true"
,
pageName
:
"我的页面"
,
componentName
:
"拓展工具"
,
componentContent
:
componentContent
});
}
// 检查登录状态
if
(
!
cfgStatus
.
value
.
isRegister
)
{
// 未登录,跳转到登录注册页面
...
...
@@ -585,6 +621,32 @@ const initExposure = () => {
componentContent
:
babyInfo
.
value
.
babyStage
==
2
?
"月龄滑动切换"
:
"孕周滑动切换"
});
// 添加拓展工具菜单曝光埋点
md
.
sensorComponentLogTake
({
xcxComponentExposure
:
"true"
,
pageName
:
"我的页面"
,
componentName
:
"拓展工具"
,
componentContent
:
"我的订单"
});
md
.
sensorComponentLogTake
({
xcxComponentExposure
:
"true"
,
pageName
:
"我的页面"
,
componentName
:
"拓展工具"
,
componentContent
:
"收货地址管理"
});
md
.
sensorComponentLogTake
({
xcxComponentExposure
:
"true"
,
pageName
:
"我的页面"
,
componentName
:
"拓展工具"
,
componentContent
:
"我的优惠券"
});
md
.
sensorComponentLogTake
({
xcxComponentExposure
:
"true"
,
pageName
:
"我的页面"
,
componentName
:
"拓展工具"
,
componentContent
:
"更多"
});
...
...
@@ -595,6 +657,54 @@ onShow(async () => {
await
userStore
.
loadMemberInfo
();
points
.
value
=
userStore
.
memberInfo
?.
points
;
console
.
log
(
'userStore.memberInfo='
,
userStore
.
memberInfo
)
// 添加宝宝信息引导模块曝光埋点
if
(
cfgStatus
.
value
.
isRegister
&&
(
!
babyInfo
.
value
?.
allBabyBaseInfo
||
babyInfo
.
value
?.
allBabyBaseInfo
?.
length
===
0
))
{
md
.
sensorComponentLogTake
({
xcxComponentExposure
:
"true"
,
pageName
:
"我的页面"
,
componentName
:
"添加宝宝信息引导"
,
componentContent
:
"添加宝宝信息引导"
});
}
// 添加做任务赚更多积分模块曝光埋点
if
(
!
cfgStatus
.
value
.
isRegister
||
(
babyInfo
.
value
?.
allBabyBaseInfo
&&
babyInfo
.
value
?.
allBabyBaseInfo
?.
length
>
0
))
{
md
.
sensorComponentLogTake
({
xcxComponentExposure
:
"true"
,
pageName
:
"我的页面"
,
componentName
:
"做任务赚更多积分"
,
componentContent
:
"去做任务"
});
}
// 添加拓展工具菜单曝光埋点
md
.
sensorComponentLogTake
({
xcxComponentExposure
:
"true"
,
pageName
:
"我的页面"
,
componentName
:
"拓展工具"
,
componentContent
:
"我的订单"
});
md
.
sensorComponentLogTake
({
xcxComponentExposure
:
"true"
,
pageName
:
"我的页面"
,
componentName
:
"拓展工具"
,
componentContent
:
"收货地址管理"
});
md
.
sensorComponentLogTake
({
xcxComponentExposure
:
"true"
,
pageName
:
"我的页面"
,
componentName
:
"拓展工具"
,
componentContent
:
"我的优惠券"
});
md
.
sensorComponentLogTake
({
xcxComponentExposure
:
"true"
,
pageName
:
"我的页面"
,
componentName
:
"拓展工具"
,
componentContent
:
"更多"
});
console
.
warn
(
"AAAAAAAA"
)
})
// 获取用户信息
...
...
@@ -717,6 +827,13 @@ async function onSelectBaby(baby) {
}
function
handleAddBabyInfoClick
()
{
// 添加点击埋点
md
.
sensorComponentLogTake
({
xcxComponentClick
:
"true"
,
pageName
:
"我的页面"
,
componentName
:
"添加宝宝信息引导"
,
componentContent
:
"添加宝宝信息引导"
});
// 显示RegisterLayer弹窗
showRegisterLayer
.
value
=
true
;
}
...
...
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