Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
TianGongKaiWu-20251203
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
SparkProjects
TianGongKaiWu-20251203
Commits
6c59e854
Commit
6c59e854
authored
Dec 17, 2025
by
天马流星拳
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 优化排行榜展示和奖品领取逻辑
- 调整排行榜高度和展开时的显示数量 - 修改持仓弹窗标题为图片展示 - 优化奖品领取流程,直接展示奖品信息 - 更新mock数据,添加更多排行榜示例数据 - 修复排行榜排名显示逻辑
parent
8b274b4b
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
96 additions
and
64 deletions
+96
-64
main.ts
mock/main.ts
+57
-36
title.png
src/assets/positionPop/title.png
+0
-0
HomePage.less
src/pages/HomePage/HomePage.less
+2
-1
HomePage.tsx
src/pages/HomePage/HomePage.tsx
+5
-3
myqradespage.jsx
src/pages/myQradesPage/myqradespage.jsx
+29
-19
positionpop.jsx
src/panels/positionpop/positionpop.jsx
+1
-1
positionpop.less
src/panels/positionpop/positionpop.less
+2
-4
No files found.
mock/main.ts
View file @
6c59e854
...
...
@@ -341,41 +341,62 @@ export default [
score
:
0
,
//收益率
meFlag
:
false
//是否是我,为true是
},
// {
// index: 6, //排名,null表示未上榜,前端判断大于等于100,展示99+
// userName:'136xxxx7894', // 用户名
// userId:1, //用户id
// score: -123, //收益率
// meFlag: false //是否是我,为true是
// },
// {
// index: 7, //排名,null表示未上榜,前端判断大于等于100,展示99+
// userName:'136xxxx7894', // 用户名
// userId:1, //用户id
// score: 43.18, //收益率
// meFlag: false //是否是我,为true是
// },
// {
// index: 8, //排名,null表示未上榜,前端判断大于等于100,展示99+
// userName:'136xxxx7894', // 用户名
// userId:1, //用户id
// score: 43.18, //收益率
// meFlag: false //是否是我,为true是
// },
// {
// index: 9, //排名,null表示未上榜,前端判断大于等于100,展示99+
// userName:'136xxxx7894', // 用户名
// userId:1, //用户id
// score: 43.18, //收益率
// meFlag: false //是否是我,为true是
// },
// {
// index: 10, //排名,null表示未上榜,前端判断大于等于100,展示99+
// userName:'136xxxx7894', // 用户名
// userId:1, //用户id
// score: 43.18, //收益率
// meFlag: false //是否是我,为true是
// }
{
index
:
6
,
//排名,null表示未上榜,前端判断大于等于100,展示99+
userName
:
'136xxxx7894'
,
// 用户名
userId
:
1
,
//用户id
score
:
-
123
,
//收益率
meFlag
:
false
//是否是我,为true是
},
{
index
:
7
,
//排名,null表示未上榜,前端判断大于等于100,展示99+
userName
:
'136xxxx7894'
,
// 用户名
userId
:
1
,
//用户id
score
:
43.18
,
//收益率
meFlag
:
false
//是否是我,为true是
},
{
index
:
8
,
//排名,null表示未上榜,前端判断大于等于100,展示99+
userName
:
'136xxxx7894'
,
// 用户名
userId
:
1
,
//用户id
score
:
43.18
,
//收益率
meFlag
:
false
//是否是我,为true是
},
{
index
:
9
,
//排名,null表示未上榜,前端判断大于等于100,展示99+
userName
:
'136xxxx7894'
,
// 用户名
userId
:
1
,
//用户id
score
:
43.18
,
//收益率
meFlag
:
false
//是否是我,为true是
},
{
index
:
10
,
//排名,null表示未上榜,前端判断大于等于100,展示99+
userName
:
'136xxxx7894'
,
// 用户名
userId
:
1
,
//用户id
score
:
43.18
,
//收益率
meFlag
:
false
//是否是我,为true是
},
{
index
:
11
,
//排名,null表示未上榜,前端判断大于等于100,展示99+
userName
:
'136xxxx7894'
,
// 用户名
userId
:
1
,
//用户id
score
:
43.18
,
//收益率
meFlag
:
false
//是否是我,为true是
},
{
index
:
12
,
//排名,null表示未上榜,前端判断大于等于100,展示99+
userName
:
'136xxxx7894'
,
// 用户名
userId
:
1
,
//用户id
score
:
43.18
,
//收益率
meFlag
:
false
//是否是我,为true是
},
{
index
:
13
,
//排名,null表示未上榜,前端判断大于等于100,展示99+
userName
:
'136xxxx7894'
,
// 用户名
userId
:
1
,
//用户id
score
:
43.18
,
//收益率
meFlag
:
false
//是否是我,为true是
}
],
// 理财排行榜-我的排名
myRank
:{
...
...
@@ -442,7 +463,7 @@ export default [
"cycleStartTime"
:
1765210868000
,
//理财周期起始时间(毫秒时间戳)
"cycleEndTime"
:
1765383668000
,
//理财周期结束时间(毫秒时间戳)"
"rank"
:
1
,
//必须 收益率排名,返回null表示未上榜,前端判断是否大于等于100,大于等于100展示99+
"drawStatus"
:
2
,
// 抽奖状态,0-直接领奖,1-点击抽奖(盲盒形式),2-已领奖
"drawStatus"
:
0
,
// 抽奖状态,0-直接领奖,1-点击抽奖(盲盒形式),2-已领奖
"joinStatus"
:
true
,
// 参与状态,true-当月已参与,false-当月未参与
"prizeInfo"
:{
"prizeId"
:
1
,
//奖品id
...
...
src/assets/positionPop/title.png
0 → 100644
View file @
6c59e854
7.48 KB
src/pages/HomePage/HomePage.less
View file @
6c59e854
...
...
@@ -332,7 +332,8 @@
.postRanking_item_box{
margin-top: 0.1rem;
margin-left: 14px;
height: 160px;
// height: 160px;
height: 170px;
overflow: hidden;
.postRanking_item{
width: 629px;
...
...
src/pages/HomePage/HomePage.tsx
View file @
6c59e854
...
...
@@ -261,7 +261,9 @@ class HomePage extends React.Component<any, any> {
</
div
>
<
div
className=
{
`postRanking_item_box ${this.state.isExpand ? 'expandSty3' : ''}`
}
>
{
(()
=>
{
const
filteredRanks
=
rankInfos
.
filter
(
item
=>
item
.
index
&&
item
.
index
>=
4
&&
item
.
index
<=
100
);
const
filteredRanks
=
rankInfos
.
filter
(
item
=>
{
return
item
.
index
&&
item
.
index
>=
4
&&
(
this
.
state
.
isExpand
?
item
.
index
<=
100
:
item
.
index
<=
5
);
});
return
filteredRanks
.
length
>
0
?
(
filteredRanks
.
map
((
item
,
index
)
=>
(
<
div
key=
{
`rank_${item.index}`
}
className=
{
`postRanking_item`
}
>
...
...
@@ -282,7 +284,7 @@ class HomePage extends React.Component<any, any> {
</
div
>
{
/* 我的排名 */
}
<
div
className=
'postRanking_myRanking'
>
<
span
className=
'span-1'
>
{
myRank
.
index
==
null
?
'未上榜'
:
myRank
.
index
>
=
100
?
'99+'
:
myRank
.
index
}
</
span
>
<
span
className=
'span-1'
>
{
myRank
.
index
==
null
?
'未上榜'
:
myRank
.
index
>
100
?
'99+'
:
myRank
.
index
}
</
span
>
<
span
className=
'span-2'
>
{
myRank
.
userName
}
(我)
</
span
>
{
/* <span className='span-3'>+{myRank.score}%</span> */
}
<
span
className=
'span-3'
>
{
myRank
.
score
!=
null
?
(
myRank
.
score
>
0
?
`+${myRank.score}`
:
myRank
.
score
)
:
'-'
}
%
</
span
>
...
...
@@ -420,4 +422,4 @@ class HomePage extends React.Component<any, any> {
);
}
}
export
default
HomePage
;
export
default
HomePage
;
\ No newline at end of file
src/pages/myQradesPage/myqradespage.jsx
View file @
6c59e854
...
...
@@ -43,27 +43,37 @@ class Myqradespage extends React.Component {
}
// 点击立即领取
clickClaim
=
_asyncThrottle
(()
=>
{
this
.
getdrawJoin
();
const
{
prizeInfo
}
=
this
.
state
.
info
;
ModalCtrl
.
showModal
(
PrizePanel
,
{
optionImg
:
prizeInfo
.
prizeImg
,
optionName
:
prizeInfo
.
prizeName
,
}
)
setTimeout
(()
=>
{
this
.
getdrawIndex
();
},
2000
);
// this.getdrawJoin();
// Toast.show("领取成功");
})
// 领取奖品
getdrawJoin
=
async
()
=>
{
const
{
code
,
data
,
message
,
success
}
=
await
API
.
drawJoin
({});
if
(
success
)
{
if
(
data
.
prizeId
==
'thanks'
){
ModalCtrl
.
showModal
(
NoPrizePanel
);
}
else
{
ModalCtrl
.
showModal
(
PrizePanel
,
{
optionImg
:
data
.
optionImg
,
optionName
:
data
.
optionName
,
}
);
}
this
.
getdrawIndex
();
}
}
//
getdrawJoin = async () => {
//
const {code, data, message, success} = await API.drawJoin({});
//
if (success) {
//
if(data.prizeId == 'thanks'){
//
ModalCtrl.showModal(NoPrizePanel);
//
}
//
else{
//
ModalCtrl.showModal(PrizePanel,
//
{
//
optionImg: data.optionImg,
//
optionName: data.optionName,
//
}
//
);
//
}
//
this.getdrawIndex();
//
}
//
}
// 立即查看
clickView
=
()
=>
{
const
{
url
,
recordId
}
=
this
.
state
.
info
.
prizeInfo
;
...
...
@@ -79,7 +89,7 @@ class Myqradespage extends React.Component {
<
span
className=
"bg"
></
span
>
<
span
className=
"back"
onClick=
{
()
=>
this
.
clickBack
()
}
></
span
>
{
this
.
state
.
info
.
drawStatus
==
1
&&
(
(
this
.
state
.
info
.
drawStatus
==
0
||
this
.
state
.
info
.
drawStatus
==
1
)
&&
(
<>
<
div
className=
"lottery"
></
div
>
<
span
className=
"icon3"
></
span
>
...
...
src/panels/positionpop/positionpop.jsx
View file @
6c59e854
...
...
@@ -70,7 +70,7 @@ class Positionpop extends React.Component {
</
div
>
</
div
>
<
span
className=
"name"
>
{
this
.
state
.
info
.
userName
}
</
span
>
<
span
className=
"title"
>
持仓情况
</
span
>
<
span
className=
"title"
></
span
>
{
/* <span className="icon1"></span> */
}
</
div
>
);
...
...
src/panels/positionpop/positionpop.less
View file @
6c59e854
...
...
@@ -180,14 +180,12 @@
}
.title {
width:
20
1px;
width:
19
1px;
height: 46px;
left: 144px;
top: 561px;
position: absolute;
font-size: 48px;
line-height: 46px;
color: rgba(91, 34, 0, 1);
.sparkBg("positionPop/title.png");
}
.icon1 {
...
...
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