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
48a8bedb
Commit
48a8bedb
authored
Nov 14, 2025
by
spc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed
parent
78d11b62
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
69 additions
and
6 deletions
+69
-6
index.vue
pages/index/index.vue
+7
-2
Integral.vue
views/Integral.vue
+62
-4
No files found.
pages/index/index.vue
View file @
48a8bedb
...
@@ -256,8 +256,13 @@ onMounted(async () => {
...
@@ -256,8 +256,13 @@ onMounted(async () => {
// 关闭了任务奖励弹窗
// 关闭了任务奖励弹窗
const
handleCloseTaskCompleteTips
=
async
()
=>
{
const
handleCloseTaskCompleteTips
=
async
()
=>
{
globalStore
.
isShowTaskComplete
=
false
;
globalStore
.
isShowTaskComplete
=
false
;
await
checkAndUpdateTaskResult
();
await
checkAndUpdateTaskResult
();
// 如果当前在积分权益页,通过事件通知 Integral 组件刷新数据
if
(
globalStore
.
curTabIndex
===
2
)
{
uni
.
$emit
(
'refreshIntegralData'
);
}
};
};
// 完成任务并显示完成提示
// 完成任务并显示完成提示
...
...
views/Integral.vue
View file @
48a8bedb
...
@@ -631,7 +631,7 @@
...
@@ -631,7 +631,7 @@
<
template
v
-
else
>
<
template
v
-
else
>
<
text
v
-
if
=
"Number(goodItem?.priceMarket) && Number(goodItem?.credits)"
class
=
"num0"
<
text
v
-
if
=
"Number(goodItem?.priceMarket) && Number(goodItem?.credits)"
class
=
"num0"
>
低至
{{
goodItem
?.
credits
}}
<
text
class
=
"price-text0"
>
积分
<
/tex
t
>
{{
goodItem
?.
credits
}}
<
text
class
=
"price-text0"
>
积分
<
/tex
t
><
text
class
=
"price-text1"
>+<
/text><text class="price-text0">¥</
text
><
text
class
=
"price-text1"
>+<
/text><text class="price-text0">¥</
text
>
{{
goodItem
?.
priceMarket
/
100
}}
<
/tex
t
>
{{
goodItem
?.
priceMarket
/
100
}}
<
/tex
t
>
>
...
@@ -2093,9 +2093,58 @@ watch(
...
@@ -2093,9 +2093,58 @@ watch(
console
.
log
(
'isVisible:'
,
isVisible
);
console
.
log
(
'isVisible:'
,
isVisible
);
}
,
}
,
{
immediate
:
true
}
{
immediate
:
true
}
);
);
// 刷新积分页数据的公共方法
const
refreshIntegralData
=
async
()
=>
{
try
{
const
{
data
}
=
await
fetchIntegralJSON
(
globalStore
.
getPreviewScene
(
'integral'
));
integralData
.
value
=
{
...
data
}
;
// 重新初始化相关数据
let
bannerData
=
integralData
?.
value
?.
banner
;
vipActive
.
value
=
[];
bannerData
?.
forEach
((
item
)
=>
{
vipActive
.
value
.
push
({
img
:
item
.
url
,
url
:
item
.
link
.
url
,
type
:
item
.
link
.
type
,
extra
:
item
.
link
.
extra
,
title
:
item
.
title
,
}
);
}
);
goodsDataArr
.
value
=
integralData
?.
value
?.
goodsList
;
swiperData
.
value
=
integralData
.
value
?.
swiper
;
vipLvIcons
.
value
=
integralData
.
value
?.
viplv
?.
imgs
;
vipLvIconBgs
.
value
=
integralData
.
value
?.
viplv
?.
imgBgs
;
vipLvNameImgs
.
value
=
integralData
.
value
?.
viplv
?.
vipNameImgs
;
vipIntegral
.
value
=
integralData
.
value
?.
vipIntegral
;
clickMore
.
value
=
integralData
.
value
?.
clickMore
;
tabInfo
.
value
=
integralData
.
value
?.
goodsListData
?.
tabInfo
;
listCommon
.
value
=
integralData
.
value
?.
goodsListData
?.
listCommon
;
goodsData
.
value
=
integralData
.
value
?.
goodsListData
?.
goodsData
;
productIdUrl
.
value
=
integralData
.
value
?.
goodsListData
?.
productIdUrl
;
vipRule
.
value
=
integralData
.
value
?.
qunyiInfo
?.
vipRule
;
imgInfos
.
value
=
integralData
.
value
?.
qunyiInfo
?.
imgInfos
;
vipQuanyiUrl
.
value
=
integralData
.
value
?.
qunyiInfo
?.
vipQuanyiUrl
;
vipQuanyiData
.
value
=
integralData
.
value
?.
qunyiInfo
?.
vipLvsQuanyi
;
tupianBanben
.
value
=
integralData
.
value
?.
tupianBanben
;
quanyiBgs
.
value
=
integralData
.
value
?.
qunyiInfo
?.
quanyiBgs
;
quanyitiaozhuanInfo
.
value
=
integralData
.
value
?.
quanyitiaozhuanInfo
;
quanyiListIcon
.
value
=
[];
imgInfos
.
value
?.
forEach
((
element
,
index
)
=>
{
quanyiListIcon
.
value
.
push
(
element
.
img
);
privilegeSizes
.
value
[
index
]
=
{
width
:
element
.
width
,
height
:
element
.
height
,
name
:
element
.
name
}
;
}
);
}
catch
(
error
)
{
console
.
error
(
'刷新积分页数据失败:'
,
error
);
}
}
;
onMounted
(
async
()
=>
{
onMounted
(
async
()
=>
{
// showSignedTips.value = true;
// showSignedTips.value = true;
showLoading
();
showLoading
();
...
@@ -2209,6 +2258,9 @@ onMounted(async () => {
...
@@ -2209,6 +2258,9 @@ onMounted(async () => {
hideLoading
();
hideLoading
();
initExposure
();
initExposure
();
// 监听刷新积分页数据事件
uni
.
$on
(
'refreshIntegralData'
,
refreshIntegralData
);
//曝光埋点累计积分
//曝光埋点累计积分
if
(
memberInfo
.
value
.
grade
==
0
&&
!
memberInfo
.
value
.
orderUpgrade
&&
points
.
value
>=
1
)
{
if
(
memberInfo
.
value
.
grade
==
0
&&
!
memberInfo
.
value
.
orderUpgrade
&&
points
.
value
>=
1
)
{
md
.
sensorComponentLogTake
({
md
.
sensorComponentLogTake
({
...
@@ -2232,6 +2284,11 @@ onMounted(async () => {
...
@@ -2232,6 +2284,11 @@ onMounted(async () => {
}
}
}
);
}
);
// 组件卸载时取消事件监听
onBeforeUnmount
(()
=>
{
uni
.
$off
(
'refreshIntegralData'
,
refreshIntegralData
);
}
);
const
initExposure
=
()
=>
{
const
initExposure
=
()
=>
{
imgInfos
.
value
?.
forEach
((
item
,
index
)
=>
{
imgInfos
.
value
?.
forEach
((
item
,
index
)
=>
{
md
.
sensorComponentLogTake
({
md
.
sensorComponentLogTake
({
...
@@ -3044,8 +3101,9 @@ const handleSigninClick = throttleTap(async () => {
...
@@ -3044,8 +3101,9 @@ const handleSigninClick = throttleTap(async () => {
}
, 1000);
}
, 1000);
// 关闭签到提示弹窗
// 关闭签到提示弹窗
const handleCloseSignedTips = () => {
const handleCloseSignedTips = async() => {
showSignedTips.value = false;
showSignedTips.value = false;
await refreshIntegralData();
}
;
}
;
// 关闭签到规则说明弹窗
// 关闭签到规则说明弹窗
...
...
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