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
dfa080e4
Commit
dfa080e4
authored
Sep 09, 2025
by
spc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed
parent
5f3c87c2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
37 deletions
+40
-37
act0915.vue
activity0915/act0915/act0915.vue
+25
-31
lottery.vue
activity0915/lottery/lottery.vue
+10
-4
lotterypage.less
activity0915/lottery/lotterypage.less
+5
-2
No files found.
activity0915/act0915/act0915.vue
View file @
dfa080e4
<
template
>
<view
class=
"act915page"
v-if=
"!loading"
>
<span
class=
"act915pagebg"
:style=
"getBackgroundStyle()"
></span>
<span
class=
"act915pagegoods1"
:style=
"
{ backgroundImage: `url(${$baseUrl}${getImageUrl('goods1')})` }">
</span>
<span
class=
"act915pagegoods1"
:style=
"
{ backgroundImage: `url(${$baseUrl}${getImageUrl('goods1')})` }"
@click="handleGoods1Click">
</span>
<!-- 商品3区域 - 分成3个点击区域 -->
<view
class=
"act915pagegoods3-container"
>
<span
class=
"act915pagegoods3bg"
...
...
@@ -167,17 +168,7 @@ const getShareData = (type) => {
}
}
// 分享配置 - uni-app方式
const
onShareAppMessage
=
()
=>
{
console
.
log
(
'onShareAppMessage 被调用'
)
return
getShareData
()
}
// 分享到朋友圈
const
onShareTimeline
=
()
=>
{
console
.
log
(
'onShareTimeline 被调用'
)
return
getShareData
()
}
// 响应式数据
const
currentState
=
ref
(
'normal'
)
// 页面状态
...
...
@@ -222,6 +213,13 @@ const getBackgroundStyle = () => {
}
}
// 商品1区域点击处理
const handleGoods1Click = () => {
console.log('点击商品1区域')
jump(config.value?.goods?.goods1?.link)
}
// 获取图片URL的辅助函数
const getImageUrl = (imageKey) => {
// 根据不同的图片类型从对应的结构中获取
...
...
@@ -322,9 +320,9 @@ const fetchAct915HomeData = async () => {
const data = response.data
// 更新邀请相关数据
invitationCode.value = data.invitationCode
|| ''
invitationText.value = data.invitationText
|| '飞鹤915活动'
invitationImageUrl.value = data.invitationImageUrl
|| ''
invitationCode.value = data.invitationCode
invitationText.value = data.invitationText
invitationImageUrl.value = data.invitationImageUrl
invitedCount.value = data.invitedCount || 0
nextRewardNeedCount.value = data.nextRewardNeedCount || 2
unclaimedPrizes.value = data.unclaimedPrizes || []
...
...
@@ -509,7 +507,7 @@ const handleInvitationAssist = async (incomingCode) => {
return Promise.resolve();
} else {
uni.showToast({
title:
'助力失败'
,
title:
res.message
,
icon: 'none',
duration: 2000
});
...
...
@@ -518,7 +516,7 @@ const handleInvitationAssist = async (incomingCode) => {
} catch (error) {
console.error('助力请求失败:', error)
uni.showToast({
title:
'助力失败'
,
title:
error.message
,
icon: 'none',
duration: 2000
});
...
...
@@ -536,21 +534,6 @@ const handleInviteClick = () => {
showMask.value = true
return
}
// 已登录用户直接分享,不需要助力
console.log('用户已登录,直接分享')
console.log('当前分享配置:', getShareData())
// 先隐藏朋友圈分享
uni.hideShareMenu({
menus: ['shareTimeline']
})
// 显示分享菜单
uni.showShareMenu({
withShareTicket: true,
menus: ['shareAppMessage']
});
}
// 页面初始化逻辑
...
...
@@ -580,6 +563,17 @@ onMounted(async () => {
// 即使登录失败也执行页面初始化
await initPage()
}
// 先隐藏朋友圈分享
uni.hideShareMenu({
menus: ['shareTimeline']
})
// 显示分享菜单
uni.showShareMenu({
withShareTicket: true,
menus: ['shareAppMessage']
});
});
// Phone authorization
...
...
activity0915/lottery/lottery.vue
View file @
dfa080e4
...
...
@@ -83,7 +83,8 @@
<div
class=
"lotterypagenoticecontext-container"
:class=
"
{ 'no-transition': isResetting }"
:style="{ transform: `translateY(-${currentNoticeIndex * 40}rpx)` }">
<span
class=
"lotterypagenoticecontext"
v-for=
"(notice, index) in displayNotices"
:key=
"`$
{notice.userNickname}-${index}`">
{{
formatNotice
(
notice
.
userNickname
,
notice
.
prizeName
)
:key=
"`$
{notice.userNickname}-${index}`"
:style="{ top: `${index * 40}rpx` }">
{{
formatNotice
(
notice
.
userNickname
,
notice
.
prizeName
)
}}
</span>
</div>
</div>
...
...
@@ -181,7 +182,12 @@ const recentNotices = computed(() => {
if
(
winningCarousel
.
value
.
length
>
0
)
{
notices
=
winningCarousel
.
value
.
slice
(
0
,
20
);
}
else
{
// 提供默认数据确保轮播能正常工作
notices
=
[
{
userNickname
:
'用户1'
,
prizeName
:
'奖品A'
},
{
userNickname
:
'用户2'
,
prizeName
:
'奖品B'
},
{
userNickname
:
'用户3'
,
prizeName
:
'奖品C'
}
];
}
// 如果只有1条数据,复制成3条以确保轮播效果
...
...
@@ -233,7 +239,7 @@ const handleAwardClick = () => {
// 这里可以根据实际需求调整环境判断逻辑
// 例如:根据域名、配置等判断当前环境
const
currentEnv
=
'
uat2
'
// 可以动态获取
const
currentEnv
=
'
prod
'
// 可以动态获取
const
appIdMap
=
{
'uat2'
:
'wxabebc35e71e66795'
,
...
...
@@ -339,7 +345,7 @@ const startNoticeCarousel = () => {
// 下一帧恢复过渡动效
setTimeout
(()
=>
{
isResetting
.
value
=
false
},
0
)
},
100
)
// 确保重置完成
}
},
3000
)
// 每3秒切换一次
}
...
...
activity0915/lottery/lotterypage.less
View file @
dfa080e4
...
...
@@ -403,12 +403,15 @@
.lotterypagenoticecontext {
width: 482rpx;
height: 40rpx;
position: relative;
position: absolute;
top: 0;
left: 0;
font-size: 24rpx;
line-height: 40rpx;
color: rgba(255, 255, 255, 1);
display: block;
margin-bottom: 0;
margin: 0;
padding: 0;
}
.lotterypagenoticeconsoundicon {
...
...
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