Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
MingSnake_241120
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
MingSnake_241120
Commits
70c58532
Commit
70c58532
authored
Dec 14, 2024
by
王杰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 排行榜
parent
e6df2de8
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
86 additions
and
53 deletions
+86
-53
RankPosterPanel.prefab
assets/Bundles/RankPosterPanel/RankPosterPanel.prefab
+10
-10
RankPosterPanel.ts
assets/Scripts/Panels/RankPosterPanel.ts
+1
-1
RankScene.ts
assets/Scripts/Scenes/RankScene.ts
+57
-20
index.html
build/web-mobile/index.html
+12
-12
index.do.json
preview-template/mock/home/index.do.json
+1
-0
friendRank.do.json
preview-template/mock/rank/friendRank.do.json
+2
-3
personRank.do.json
preview-template/mock/rank/personRank.do.json
+0
-2
provinceRank.do.json
preview-template/mock/rank/provinceRank.do.json
+0
-2
builder.json
profiles/v2/packages/builder.json
+3
-3
No files found.
assets/Bundles/RankPosterPanel/RankPosterPanel.prefab
View file @
70c58532
...
...
@@ -158,8 +158,8 @@
},
"_lpos": {
"__type__": "cc.Vec3",
"x": -30
0
,
"y":
47
,
"x": -30
5.38
,
"y":
63.13999999999993
,
"z": 0
},
"_lrot": {
...
...
@@ -199,7 +199,7 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width":
57.59999084472656
,
"width":
0
,
"height": 126
},
"_anchorPoint": {
...
...
@@ -235,11 +235,11 @@
"b": 0,
"a": 255
},
"_string": "
0
",
"_string": "",
"_horizontalAlign": 1,
"_verticalAlign": 1,
"_actualFontSize":
10
0,
"_fontSize":
10
0,
"_actualFontSize":
6
0,
"_fontSize":
6
0,
"_fontFamily": "Arial",
"_lineHeight": 100,
"_overflow": 0,
...
...
@@ -298,9 +298,9 @@
},
"_alignFlags": 9,
"_target": null,
"_left":
4
5,
"_left":
39.62000000000000
5,
"_right": 0,
"_top": 1
20
,
"_top": 1
03.86000000000007
,
"_bottom": 0,
"_horizontalCenter": 0,
"_verticalCenter": 0,
...
...
@@ -532,7 +532,7 @@
"_lpos": {
"__type__": "cc.Vec3",
"x": -300,
"y": -
24.5300000000000
3,
"y": -
8.39000000000004
3,
"z": 0
},
"_lrot": {
...
...
@@ -673,7 +673,7 @@
"_target": null,
"_left": 45,
"_right": 0,
"_top": 2
41.93000000000004
,
"_top": 2
25.79000000000005
,
"_bottom": 0,
"_horizontalCenter": 0,
"_verticalCenter": 0,
...
...
assets/Scripts/Panels/RankPosterPanel.ts
View file @
70c58532
...
...
@@ -25,7 +25,7 @@ export default class RankPosterPanel extends Panel {
console
.
log
(
"RankPosterPanel"
,
this
.
data
);
this
.
rankIndex
.
string
=
`
${
this
.
data
.
rankIndex
>
200
?
"200+"
:
this
.
data
.
rankIndex
?
this
.
data
.
rankIndex
:
0
}
`
;
this
.
rankIndex
.
string
=
this
.
data
.
rankIndex
this
.
rankName
.
string
=
`
${
this
.
data
.
rankName
}
`
;
this
.
qrcode
.
spriteFrame
=
shareStore
.
inviteInfo
.
qrCode
;
this
.
scheduleOnce
(
this
.
copyRenderTex
,
0.5
);
...
...
assets/Scripts/Scenes/RankScene.ts
View file @
70c58532
...
...
@@ -94,9 +94,18 @@ export class RankScence extends Scene {
currentTime
=
0
;
isCountingDown
=
true
;
shengMyRank
=
0
;
singleMyRank
=
0
;
friendMyRank
=
0
;
shengMyRank
=
{
index
:
0
,
score
:
0
};
singleMyRank
=
{
index
:
0
,
score
:
0
};
friendMyRank
=
{
index
:
0
,
score
:
0
};
onLoad
()
{
this
.
tab
=
TAB
.
SINGLE
;
...
...
@@ -174,8 +183,34 @@ export class RankScence extends Scene {
const
rankLog
=
(
this
.
tab
==
TAB
.
SHENG
)
?
13
:
(
this
.
tab
==
TAB
.
SINGLE
)
?
14
:
15
;
sendLog
(
LOG_TYPE
.
CLICK
,
rankLog
)
const
rankIndex
=
(
this
.
tab
==
TAB
.
SHENG
)
?
this
.
shengMyRank
:
(
this
.
tab
==
TAB
.
SINGLE
)
?
this
.
singleMyRank
:
this
.
friendMyRank
;
const
rankName
=
(
this
.
tab
==
TAB
.
SHENG
)
?
"省份榜"
:
(
this
.
tab
==
TAB
.
SINGLE
)
?
"个人榜"
:
"好友榜"
;
let
rankIndex
let
rankName
if
(
this
.
tab
==
TAB
.
SHENG
)
{
rankName
=
"省份榜"
if
(
this
.
shengMyRank
?.
index
)
{
rankIndex
=
this
.
shengMyRank
.
index
>
200
?
"200+"
:
this
.
shengMyRank
.
index
}
else
{
rankIndex
=
"暂无排名"
}
}
if
(
this
.
tab
==
TAB
.
SINGLE
)
{
rankName
=
"个人榜"
if
(
this
.
singleMyRank
?.
index
)
{
rankIndex
=
this
.
singleMyRank
.
index
>
200
?
"200+"
:
this
.
singleMyRank
.
index
}
else
{
rankIndex
=
"暂无排名"
}
}
if
(
this
.
tab
==
TAB
.
FRIEND
)
{
rankName
=
"好友榜"
if
(
this
.
friendMyRank
?.
index
)
{
console
.
log
(
"我看看这里的index呢?"
);
rankIndex
=
this
.
friendMyRank
.
index
>
1000
?
"1000+"
:
this
.
friendMyRank
.
index
}
else
{
rankIndex
=
"暂无排名"
}
}
showPanel
(
RankPosterPanel
,
{
rankName
:
rankName
,
rankIndex
:
rankIndex
})
});
...
...
@@ -201,12 +236,11 @@ export class RankScence extends Scene {
if
(
!
success
)
return
;
this
.
shengDate
=
data
.
rankInfos
;
console
.
log
(
data
.
provinceEntryScore
);
this
.
Sheng_title
.
string
=
`超过
${
data
.
provinceEntryScore
}
长度的玩家数`
;
this
.
Sheng_List
.
reloadData
();
this
.
onMyCellDisplay
(
this
.
Sheng_MY
,
data
.
myRankInfo
);
this
.
shengMyRank
=
data
.
myRankInfo
?.
index
;
this
.
onMyCellDisplay
(
this
.
Sheng_MY
,
data
.
myRankInfo
,
"SHENG"
);
this
.
shengMyRank
=
data
.
myRankInfo
this
.
Sheng_List
.
node
.
active
=
this
.
shengDate
.
length
>
0
;
this
.
Sheng_List_None
.
active
=
this
.
shengDate
.
length
<=
0
;
// 如果没有数据隐藏
...
...
@@ -221,8 +255,8 @@ export class RankScence extends Scene {
this
.
Single_List
.
reloadData
();
this
.
PrizeDate
=
data
.
awardConfigs
;
this
.
Prize_List
.
reloadData
();
this
.
onMyCellDisplay
(
this
.
Single_MY
,
data
.
myRankInfo
);
this
.
singleMyRank
=
data
.
myRankInfo
?.
index
;
this
.
onMyCellDisplay
(
this
.
Single_MY
,
data
.
myRankInfo
,
"SINGLE"
);
this
.
singleMyRank
=
data
.
myRankInfo
this
.
Single_List
.
node
.
active
=
this
.
singleDate
.
length
>
0
;
this
.
Single_List_None
.
active
=
this
.
singleDate
.
length
<=
0
;
// 如果没有数据隐藏
...
...
@@ -237,8 +271,8 @@ export class RankScence extends Scene {
this
.
friendDate
=
data
.
rankInfos
;
this
.
Friend_List
.
reloadData
();
this
.
onMyCellDisplay
(
this
.
Friend_MY
,
data
.
myRankInfo
);
this
.
friendMyRank
=
data
.
myRankInfo
?.
index
;
this
.
onMyCellDisplay
(
this
.
Friend_MY
,
data
.
myRankInfo
,
"FRIEND"
);
this
.
friendMyRank
=
data
.
myRankInfo
this
.
Friend_List
.
node
.
active
=
this
.
friendDate
.
length
>
0
;
this
.
Friend_List_None
.
active
=
this
.
friendDate
.
length
<=
0
;
...
...
@@ -270,40 +304,43 @@ export class RankScence extends Scene {
let
rankTxt
=
index
;
if
(
!
score
&&
(
!
index
||
index
==
-
1
))
{
if
(
score
&&
(
!
index
||
index
==
-
1
))
{
rankTxt
=
"-"
;
}
if
(
(
score
&&
(
!
index
||
index
==
-
1
))
||
index
>
200
)
{
if
(
this
.
tab
!=
TAB
.
FRIEND
&&
index
>
200
)
{
rankTxt
=
"200+"
;
}
if
(
this
.
tab
==
TAB
.
FRIEND
&&
index
>
1000
)
{
rankTxt
=
"1000+"
;
}
cell
.
getChildByName
(
`rank`
).
getComponent
(
Label
).
string
=
rankTxt
;
cell
.
getChildByName
(
`sheng`
).
getComponent
(
Label
).
string
=
province
||
strFormat
(
`
${
nickname
||
"鸣鸣很忙用户"
}
`
,
12
);
cell
.
getChildByName
(
`length`
).
getComponent
(
Label
).
string
=
(
score
>
99999999
?
"99999999+"
:
score
)
||
"0"
;
}
onMyCellDisplay
=
(
cell
:
Node
,
data
)
=>
{
onMyCellDisplay
=
(
cell
:
Node
,
data
,
tab
)
=>
{
if
(
!
data
)
return
let
{
index
=
0
,
province
=
""
,
score
=
0
,
nickname
=
""
}
=
data
;
let
rankTxt
=
index
;
if
(
!
score
&&
(
!
index
||
index
==
-
1
))
{
if
(
score
&&
(
!
index
||
index
==
-
1
))
{
rankTxt
=
"-"
;
}
if
(
(
score
&&
(
!
index
||
index
==
-
1
))
||
index
>
200
)
{
if
(
tab
!=
TAB
.
FRIEND
&&
index
>
200
)
{
rankTxt
=
"200+"
;
}
if
(
tab
==
TAB
.
FRIEND
&&
index
>
1000
)
{
rankTxt
=
"1000+"
;
}
cell
.
getChildByName
(
`rank`
).
getComponent
(
Label
).
string
=
rankTxt
;
cell
.
getChildByName
(
`sheng`
).
getComponent
(
Label
).
string
=
province
||
strFormat
(
`
${
nickname
||
"鸣鸣很忙用户"
}
`
,
12
)
+
"(我)"
;
cell
.
getChildByName
(
`length`
).
getComponent
(
Label
).
string
=
(
score
>
99999999
?
"99999999+"
:
score
)
||
"0"
;
}
onPrizeCellDisplay
=
(
cell
:
Node
,
data
)
=>
{
if
(
!
data
)
return
...
...
build/web-mobile/index.html
View file @
70c58532
...
...
@@ -98,14 +98,14 @@
</style>
<script
src=
"//yun.duiba.com.cn/db_games/ccc_game/template3d/173415
6027335
/src/assets/plugin/zepto.min.js"
></script>
<script
src=
"//yun.duiba.com.cn/db_games/ccc_game/template3d/173415
6027335
/src/assets/plugin/declare-process.js"
></script>
<script
src=
"//yun.duiba.com.cn/db_games/ccc_game/template3d/173415
6027335
/src/assets/plugin/SVGA.Lite.v2.1.1.js"
></script>
<script
src=
"//yun.duiba.com.cn/db_games/ccc_game/template3d/173415
6027335
/src/assets/plugin/jszip.min.v3.10.1.js"
></script>
<script
src=
"//yun.duiba.com.cn/db_games/ccc_game/template3d/173415
6027335
/src/assets/plugin/rem.min.js"
></script>
<script
src=
"//yun.duiba.com.cn/db_games/ccc_game/template3d/173415
8262639
/src/assets/plugin/zepto.min.js"
></script>
<script
src=
"//yun.duiba.com.cn/db_games/ccc_game/template3d/173415
8262639
/src/assets/plugin/declare-process.js"
></script>
<script
src=
"//yun.duiba.com.cn/db_games/ccc_game/template3d/173415
8262639
/src/assets/plugin/SVGA.Lite.v2.1.1.js"
></script>
<script
src=
"//yun.duiba.com.cn/db_games/ccc_game/template3d/173415
8262639
/src/assets/plugin/jszip.min.v3.10.1.js"
></script>
<script
src=
"//yun.duiba.com.cn/db_games/ccc_game/template3d/173415
8262639
/src/assets/plugin/rem.min.js"
></script>
<script
src=
"//res.wx.qq.com/open/js/jweixin-1.6.0.js"
></script>
<!-- <link rel="stylesheet" type="text/css" href="//yun.duiba.com.cn/db_games/ccc_game/template3d/173415
6027335
/style.css" />-->
<!-- <link rel="stylesheet" type="text/css" href="//yun.duiba.com.cn/db_games/ccc_game/template3d/173415
6027335
/custom.css" />-->
<!-- <link rel="stylesheet" type="text/css" href="//yun.duiba.com.cn/db_games/ccc_game/template3d/173415
8262639
/style.css" />-->
<!-- <link rel="stylesheet" type="text/css" href="//yun.duiba.com.cn/db_games/ccc_game/template3d/173415
8262639
/custom.css" />-->
<!-- <script src="//yun-duiba-credits-test.duibatest.com.cn/TNGD_GAMES/libs/eruda.min.js"></script>-->
<!-- <script>eruda.init()</script>-->
...
...
@@ -118,20 +118,20 @@
</div>
<!-- Polyfills bundle. -->
<script
src=
"//yun.duiba.com.cn/db_games/ccc_game/template3d/173415
6027335
/src/polyfills.bundle.js"
charset=
"utf-8"
></script>
<script
src=
"//yun.duiba.com.cn/db_games/ccc_game/template3d/173415
8262639
/src/polyfills.bundle.js"
charset=
"utf-8"
></script>
<!-- SystemJS support. -->
<script
src=
"//yun.duiba.com.cn/db_games/ccc_game/template3d/173415
6027335
/src/system.bundle.js"
charset=
"utf-8"
></script>
<script
src=
"//yun.duiba.com.cn/db_games/ccc_game/template3d/173415
8262639
/src/system.bundle.js"
charset=
"utf-8"
></script>
<!-- Import map -->
<!--<script src="https://yun.duiba.com.cn/db_games/ccc_game/template3d/173415
6027335
/src/import-map.json" type="systemjs-importmap" charset="utf-8"></script>-->
<!--<script src="https://yun.duiba.com.cn/db_games/ccc_game/template3d/173415
8262639
/src/import-map.json" type="systemjs-importmap" charset="utf-8"></script>-->
<script
type=
"systemjs-importmap"
charset=
"utf-8"
>
{
"imports"
:{
"cc"
:
"//yun.duiba.com.cn/db_games/ccc_game/template3d/173415
6027335
/cocos-js/cc.js"
}}
{
"imports"
:{
"cc"
:
"//yun.duiba.com.cn/db_games/ccc_game/template3d/173415
8262639
/cocos-js/cc.js"
}}
</script>
<script>
System
.
import
(
'//yun.duiba.com.cn/db_games/ccc_game/template3d/173415
6027335
/index.js'
).
catch
(
function
(
err
)
{
System
.
import
(
'//yun.duiba.com.cn/db_games/ccc_game/template3d/173415
8262639
/index.js'
).
catch
(
function
(
err
)
{
console
.
error
(
err
);
})
</script>
...
...
preview-template/mock/home/index.do.json
View file @
70c58532
...
...
@@ -48,6 +48,7 @@
"prizeImage"
:
"//yun.dui88.com/images/201907/tua0um9jjp.jpg"
}
],
"rankPopList"
:
[],
"signPopFlag"
:
false
},
"message"
:
null
,
...
...
preview-template/mock/rank/friendRank.do.json
View file @
70c58532
...
...
@@ -2,12 +2,11 @@
"code"
:
"ullamco deserunt dolor consectetur proident"
,
"data"
:
{
"myRankInfo"
:
{
"index"
:
2
79
,
"index"
:
18
79
,
"score"
:
948
,
"nickname"
:
"
好友的我的
"
,
"nickname"
:
""
,
"avatar"
:
"sint dolore ipsum"
},
"myRankInfo"
:
null
,
"rankInfos"
:
[
{
"index"
:
-1
,
...
...
preview-template/mock/rank/personRank.do.json
View file @
70c58532
...
...
@@ -7,7 +7,6 @@
"nickname"
:
"个人的我看看"
,
"avatar"
:
"do"
},
"myRankInfo"
:
null
,
"rankInfos"
:
[
{
"index"
:
505466
,
...
...
@@ -107,7 +106,6 @@
"sendCount"
:
16180576.760792673
}
],
"rankInfos"
:
[],
"currentTime"
:
70912012.27585727
,
"endTime"
:
1733896500000
},
...
...
preview-template/mock/rank/provinceRank.do.json
View file @
70c58532
...
...
@@ -13,7 +13,6 @@
"score"
:
58265
,
"province"
:
"省我的"
},
"myRankInfo"
:
null
,
"rankInfos"
:
[
{
"index"
:
8
,
...
...
@@ -76,7 +75,6 @@
"meFlag"
:
false
}
],
"rankInfos"
:[],
"todayAwardConfig"
:
{
"prizeName"
:
"sint esse"
,
"prizeImage"
:
"voluptate amet qui Duis ut"
,
...
...
profiles/v2/packages/builder.json
View file @
70c58532
...
...
@@ -45,8 +45,8 @@
"progress"
:
1
,
"state"
:
"success"
,
"stage"
:
"build"
,
"message"
:
"2024-12-14 14:
01:32 build success in 1 min 4 s
!"
,
"detailMessage"
:
"
%c兑吧发布插件 >> 版本号:1734156027335
\r
color: green
\r
"
,
"message"
:
"2024-12-14 14:
39:42 build success in 2 min
!"
,
"detailMessage"
:
"
Asset DB is resume!
\r
"
,
"options"
:
{
"name"
:
"cocos-template-3d"
,
"server"
:
""
,
...
...
@@ -109,7 +109,7 @@
"__version__"
:
"1.3.8"
,
"logDest"
:
"project://temp/builder/log/web-mobile2024-11-6 15-39.log"
},
"time"
:
"2024-12-14 14:
00:27
"
,
"time"
:
"2024-12-14 14:
37:42
"
,
"dirty"
:
false
}
}
...
...
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