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
8c430def
Commit
8c430def
authored
Jan 03, 2025
by
罗睿卓
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
emrge
parent
4104a036
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
43 additions
and
21 deletions
+43
-21
RankScene.ts
assets/Scripts/Scenes/RankScene.ts
+24
-2
Start.scene
assets/Start/Start.scene
+1
-1
index.html
build/web-mobile/index.html
+12
-12
personRank.do.json
preview-template/mock/rank/personRank.do.json
+3
-3
builder.json
profiles/v2/packages/builder.json
+3
-3
No files found.
assets/Scripts/Scenes/RankScene.ts
View file @
8c430def
...
...
@@ -333,7 +333,8 @@ export class RankScence extends Scene {
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"
;
// cell.getChildByName(`length`).getComponent(Label).string = (score > 99999999 ? "99999999+" : score) || "0";
cell
.
getChildByName
(
`length`
).
getComponent
(
Label
).
string
=
(
this
.
formatNumberWithUnit
(
score
))
||
"0"
;
}
onMyCellDisplay
=
(
cell
:
Node
,
data
,
tab
)
=>
{
...
...
@@ -365,8 +366,29 @@ export class RankScence extends Scene {
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"
;
// cell.getChildByName(`length`).getComponent(Label).string = (score > 99999999 ? "99999999+" : score) || "0";
cell
.
getChildByName
(
`length`
).
getComponent
(
Label
).
string
=
(
this
.
formatNumberWithUnit
(
score
))
||
"0"
;
}
formatNumberWithUnit
=
(
num
)
=>
{
if
(
num
<
10000
)
{
return
num
;
// 如果小于一万,直接返回原数
}
else
if
(
num
<
100000000
)
{
// 大于一万小于一亿,转为以万为单位
const
numInWan
=
num
/
10000
;
// 使用slice截取小数点后三位,不四舍五入
const
formattedNum
=
(
numInWan
+
''
).
slice
(
0
,
numInWan
.
toString
().
includes
(
'.'
)
?
numInWan
.
toString
().
indexOf
(
'.'
)
+
4
:
numInWan
.
toString
().
length
);
return
formattedNum
+
'万'
;
}
else
{
// 大于等于一亿,转为以亿为单位
const
numInYi
=
num
/
100000000
;
// 使用slice截取小数点后三位,不四舍五入
const
formattedNum
=
(
numInYi
+
''
).
slice
(
0
,
numInYi
.
toString
().
includes
(
'.'
)
?
numInYi
.
toString
().
indexOf
(
'.'
)
+
4
:
numInYi
.
toString
().
length
);
return
formattedNum
+
'亿'
;
}
}
onPrizeCellDisplay
=
(
cell
:
Node
,
data
)
=>
{
if
(
!
data
)
return
...
...
assets/Start/Start.scene
View file @
8c430def
...
...
@@ -187,7 +187,7 @@
"_priority": 65535,
"_fov": 45,
"_fovAxis": 0,
"_orthoHeight":
556.2162162162163
,
"_orthoHeight":
486.8682328907048
,
"_near": 1,
"_far": 2000,
"_color": {
...
...
build/web-mobile/index.html
View file @
8c430def
...
...
@@ -98,14 +98,14 @@
</style>
<script
src=
"//yun.duiba.com.cn/db_games/ccc_game/template3d/17358
20937146
/src/assets/plugin/zepto.min.js"
></script>
<script
src=
"//yun.duiba.com.cn/db_games/ccc_game/template3d/17358
20937146
/src/assets/plugin/declare-process.js"
></script>
<script
src=
"//yun.duiba.com.cn/db_games/ccc_game/template3d/17358
20937146
/src/assets/plugin/SVGA.Lite.v2.1.1.js"
></script>
<script
src=
"//yun.duiba.com.cn/db_games/ccc_game/template3d/17358
20937146
/src/assets/plugin/jszip.min.v3.10.1.js"
></script>
<script
src=
"//yun.duiba.com.cn/db_games/ccc_game/template3d/17358
20937146
/src/assets/plugin/rem.min.js"
></script>
<script
src=
"//yun.duiba.com.cn/db_games/ccc_game/template3d/17358
94067318
/src/assets/plugin/zepto.min.js"
></script>
<script
src=
"//yun.duiba.com.cn/db_games/ccc_game/template3d/17358
94067318
/src/assets/plugin/declare-process.js"
></script>
<script
src=
"//yun.duiba.com.cn/db_games/ccc_game/template3d/17358
94067318
/src/assets/plugin/SVGA.Lite.v2.1.1.js"
></script>
<script
src=
"//yun.duiba.com.cn/db_games/ccc_game/template3d/17358
94067318
/src/assets/plugin/jszip.min.v3.10.1.js"
></script>
<script
src=
"//yun.duiba.com.cn/db_games/ccc_game/template3d/17358
94067318
/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/17358
20937146
/style.css" />-->
<!-- <link rel="stylesheet" type="text/css" href="//yun.duiba.com.cn/db_games/ccc_game/template3d/17358
20937146
/custom.css" />-->
<!-- <link rel="stylesheet" type="text/css" href="//yun.duiba.com.cn/db_games/ccc_game/template3d/17358
94067318
/style.css" />-->
<!-- <link rel="stylesheet" type="text/css" href="//yun.duiba.com.cn/db_games/ccc_game/template3d/17358
94067318
/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/17358
20937146
/src/polyfills.bundle.js"
charset=
"utf-8"
></script>
<script
src=
"//yun.duiba.com.cn/db_games/ccc_game/template3d/17358
94067318
/src/polyfills.bundle.js"
charset=
"utf-8"
></script>
<!-- SystemJS support. -->
<script
src=
"//yun.duiba.com.cn/db_games/ccc_game/template3d/17358
20937146
/src/system.bundle.js"
charset=
"utf-8"
></script>
<script
src=
"//yun.duiba.com.cn/db_games/ccc_game/template3d/17358
94067318
/src/system.bundle.js"
charset=
"utf-8"
></script>
<!-- Import map -->
<!--<script src="https://yun.duiba.com.cn/db_games/ccc_game/template3d/17358
20937146
/src/import-map.json" type="systemjs-importmap" charset="utf-8"></script>-->
<!--<script src="https://yun.duiba.com.cn/db_games/ccc_game/template3d/17358
94067318
/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/17358
20937146
/cocos-js/cc.js"
}}
{
"imports"
:{
"cc"
:
"//yun.duiba.com.cn/db_games/ccc_game/template3d/17358
94067318
/cocos-js/cc.js"
}}
</script>
<script>
System
.
import
(
'//yun.duiba.com.cn/db_games/ccc_game/template3d/17358
20937146
/index.js'
).
catch
(
function
(
err
)
{
System
.
import
(
'//yun.duiba.com.cn/db_games/ccc_game/template3d/17358
94067318
/index.js'
).
catch
(
function
(
err
)
{
console
.
error
(
err
);
})
</script>
...
...
preview-template/mock/rank/personRank.do.json
View file @
8c430def
...
...
@@ -36,21 +36,21 @@
"index"
:
1
,
"meFlag"
:
false
,
"nickname"
:
"很忙的"
,
"score"
:
1734
"score"
:
173
121212
4
},
{
"avatar"
:
null
,
"index"
:
2
,
"meFlag"
:
false
,
"nickname"
:
""
,
"score"
:
831
"score"
:
8
11
31
},
{
"avatar"
:
"https://yun.duiba.com.cn/polaris/ba61811a5478a6caeaaa38d4249ef72e.49306f269dd1c03fd4ee21a62068e3b880a46c9c.jpeg"
,
"index"
:
3
,
"meFlag"
:
false
,
"nickname"
:
"15323巴啦啦"
,
"score"
:
682
"score"
:
1
682
},
{
"avatar"
:
"https://yun.duiba.com.cn/polaris/ba61811a5478a6caeaaa38d4249ef72e.49306f269dd1c03fd4ee21a62068e3b880a46c9c.jpeg"
,
...
...
profiles/v2/packages/builder.json
View file @
8c430def
...
...
@@ -45,8 +45,8 @@
"progress"
:
1
,
"state"
:
"success"
,
"stage"
:
"build"
,
"message"
:
"2025-1-
2 20:32:38 build success in 3 min 41
s!"
,
"detailMessage"
:
"builder:build-project-total (22
1324
ms)
\r
"
,
"message"
:
"2025-1-
3 16:51:38 build success in 3 min 50
s!"
,
"detailMessage"
:
"builder:build-project-total (22
9417
ms)
\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"
:
"2025-1-
2 20:28:56
"
,
"time"
:
"2025-1-
3 16:47:47
"
,
"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