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
17f97d19
Commit
17f97d19
authored
Aug 16, 2021
by
wildfirecode13
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
u
parent
db67683b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
2 deletions
+13
-2
index.do.json
project/mock/webNet/dazzle/index.do.json
+1
-1
cost.ts
project/src/panels/cost.ts
+8
-0
IndexScene.ts
project/src/scenes/IndexScene.ts
+4
-1
No files found.
project/mock/webNet/dazzle/index.do.json
View file @
17f97d19
...
...
@@ -2,7 +2,7 @@
"code"
:
null
,
"data"
:
{
"surplusCount"
:
0
,
"credits"
:
5
,
"credits"
:
23
5
,
"needCredits"
:
10
,
"type"
:
1
,
"isMember"
:
1
...
...
project/src/panels/cost.ts
View file @
17f97d19
import
{
showPanel
}
from
"../../module/ctrls"
;
import
{
RES
}
from
"../../module/RES"
;
import
{
layers
}
from
"../../module/views/layers"
;
import
{
Panel
}
from
"../../module/views/Panel"
;
import
centerTextField
from
"../common/centerTextField"
;
import
getObject
from
"../common/getObject"
;
...
...
@@ -28,6 +29,11 @@ export class CostPanel extends Panel {
const
result
=
await
sendWebNet
(
WebNetName
.
getCreditCost
,
{
toPlaywayId
:
'dazzle'
,
toActionId
:
'drawPrize'
});
if
(
result
&&
result
.
success
)
{
const
prizeData
=
await
sendWebNetWithToken
(
WebNetName
.
drawPrize
,
{
ticket
:
result
.
data
});
sendWebNet
(
WebNetName
.
index
).
then
(
res
=>
{
layers
.
stage
.
dispatchEvent
(
'updateIndexData'
)
})
if
(
prizeData
&&
prizeData
.
success
)
{
if
(
prizeData
.
data
&&
prizeData
.
data
.
options
)
{
if
(
prizeData
.
data
.
options
.
optionId
==
"thanks"
)
{
...
...
@@ -37,6 +43,8 @@ export class CostPanel extends Panel {
}
}
}
}
}
...
...
project/src/scenes/IndexScene.ts
View file @
17f97d19
...
...
@@ -88,6 +88,8 @@ export class IndexScene extends Scene {
sendLog
(
"click"
,
9
);
this
.
handleShare
();
},
this
);
this
.
stage
.
addEventListener
(
'updateIndexData'
,
this
.
getIndex
,
this
);
}
initContainer
()
{
...
...
@@ -138,7 +140,8 @@ export class IndexScene extends Scene {
showPanel
(
timesNotEnoughPanel
);
}
else
{
showPanel
(
getTimesPanel
);
await
getWebData
(
WebNetName
.
getFreeCount
);
await
sendWebNet
(
WebNetName
.
getFreeCount
);
await
sendWebNet
(
WebNetName
.
index
);
this
.
getIndex
();
}
}
...
...
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