Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
wfc13
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
wildfirecode13
wfc13
Commits
2e0068a1
Commit
2e0068a1
authored
Aug 05, 2021
by
wildfirecode13
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
de5e6189
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
10 deletions
+40
-10
carouselInfo.do.json
project/mock/webNet/carousel/carouselInfo.do.json
+19
-0
WebNet.ts
project/src/WebNet.ts
+2
-0
NewbieScene.ts
project/src/scenes/NewbieScene.ts
+19
-10
No files found.
project/mock/webNet/carousel/carouselInfo.do.json
0 → 100644
View file @
2e0068a1
{
"code"
:
null
,
"data"
:
[
{
"nickname"
:
"123"
,
"amount"
:
"999"
},
{
"nickname"
:
"789"
,
"amount"
:
"777"
},
{
"nickname"
:
"456"
,
"amount"
:
"888"
}
],
"message"
:
"sed dolor nulla sint ut"
,
"success"
:
true
}
\ No newline at end of file
project/src/WebNet.ts
View file @
2e0068a1
...
...
@@ -23,6 +23,8 @@ export enum WebNetName {
* 是否可分享
*/
canshare
=
"/projectx/{projectId}/game/canshare.do"
,
carouselInfo
=
"/projectx/{projectId}/carousel/carouselInfo.do"
,
/**
* 参与
*/
...
...
project/src/scenes/NewbieScene.ts
View file @
2e0068a1
...
...
@@ -7,6 +7,7 @@ import TestButton from "../common/TestButton";
import
getQueryParams
from
"../getQueryParams"
;
import
{
PrizePanel
}
from
"../panels/prize"
;
import
{
RulePanel
}
from
"../panels/rule"
;
import
{
sendWebNet
,
WebNetName
}
from
"../WebNet"
;
import
{
IndexScene
}
from
"./IndexScene"
;
let
prize
;
export
class
NewbieScene
extends
Scene
{
...
...
@@ -40,7 +41,7 @@ export class NewbieScene extends Scene {
onClick_prizeBtn
()
{
this
.
openPrize
(
this
.
data
);
}
onClick_ruleBtn
()
{
showPanel
(
RulePanel
);
}
...
...
@@ -54,15 +55,23 @@ export class NewbieScene extends Scene {
this
.
ruleBtn
=
new
TestButton
(
'规则按钮'
);
group
.
add
(
this
.
ruleBtn
);
const
q
=
this
.
addChild
(
new
Marquee
(
[
'159****1111邀请了11位好友,获得了yyy体验金'
,
'138****2222邀请了22位好友,获得了xxxx体验金'
,
'189****3333邀请了33位好友,获得了zzzzz体验金'
,
]
));
q
.
y
=
300
;
q
.
x
=
50
;
sendWebNet
(
WebNetName
.
carouselInfo
).
then
(
res
=>
{
console
.
log
(
'carouselInfo '
,
res
);
const
template
=
'{phone}邀请了{friend}位好友,获得了{amount}体验金'
;
const
datas
=
res
.
data
.
map
(
item
=>
{
let
str
=
template
.
replace
(
'{phone}'
,
item
.
nickname
);
str
=
str
.
replace
(
'{friend}'
,
item
.
friend
);
str
=
str
.
replace
(
'{amount}'
,
item
.
amount
);
return
str
});
const
q
=
this
.
addChild
(
new
Marquee
(
datas
));
q
.
y
=
300
;
q
.
x
=
50
;
});
}
initEvents
()
{
...
...
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