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
5e928fba
Commit
5e928fba
authored
Aug 09, 2021
by
wildfirecode13
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
u
parent
841774fe
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
9 deletions
+18
-9
withDraw.do.json
project/mock/webNet/wallet/withDraw.do.json
+1
-1
datas.ts
project/src/datas.ts
+1
-0
draw.ts
project/src/panels/draw.ts
+2
-2
IndexScene.ts
project/src/scenes/IndexScene.ts
+14
-6
No files found.
project/mock/webNet/wallet/withDraw.do.json
View file @
5e928fba
{
"code"
:
"200010"
,
"data"
:
1
000
,
"data"
:
2
000
,
"message"
:
"收益未满7天不能提现"
,
"success"
:
true
}
\ No newline at end of file
project/src/datas.ts
0 → 100644
View file @
5e928fba
export
const
MAX_MONEY
=
10
*
10000
;
\ No newline at end of file
project/src/panels/draw.ts
View file @
5e928fba
...
...
@@ -10,7 +10,7 @@ export class DrawPanel extends Panel {
}
//两个按钮都是关闭作用
get
closeBtns
()
{
return
[
getObject
(
this
,
'draw_close
btn'
),
getObject
(
this
,
'draw_okbtn
'
)];
return
[
getObject
(
this
,
'draw_close
'
),
getObject
(
this
,
'draw_ok
'
)];
}
get
groupNames
()
{
return
[
"draw"
]
}
...
...
@@ -19,6 +19,6 @@ export class DrawPanel extends Panel {
async
start
(
data
)
{
super
.
start
(
data
);
getObject
(
this
,
'draw_tips'
).
text
=
`成功获得奖励金
${
data
}
元\n奖励将于24小时内发放到您的账户`
}
}
\ No newline at end of file
project/src/scenes/IndexScene.ts
View file @
5e928fba
...
...
@@ -4,7 +4,8 @@ import PanelCtrl from '../../module/ctrls/panelCtrl';
import
{
Scene
}
from
"../../module/views/Scene"
;
import
Marquee
from
'../common/Marquee'
;
import
{
ProgressBarS
}
from
'../common/ProgressBarS'
;
import
{
hideShareMask
}
from
'../common/ShareMask'
;
import
{
hideShareMask
,
showShareMask
}
from
'../common/ShareMask'
;
import
{
MAX_MONEY
}
from
'../datas'
;
import
getObject
from
'../getObject'
;
import
getQueryParams
from
'../getQueryParams'
;
import
{
DrawPanel
}
from
'../panels/draw'
;
...
...
@@ -16,24 +17,29 @@ import updateShare from '../updateShare';
import
{
getPxTokenSave
,
sendWebNet
,
WebNetName
}
from
'../WebNet'
;
export
class
IndexScene
extends
Scene
{
updateIndexUI
({
experienceAmount
,
yesterdayIncome
,
sumIncome
,
sevenDayAnnualization
})
{
updateIndexUI
({
experienceAmount
,
yesterdayIncome
,
sumIncome
,
sevenDayAnnualization
,
assistFriendNum
,
otherExperienceAmount
})
{
getObject
(
this
,
'index_experienceAmountTips'
).
text
=
experienceAmount
;
getObject
(
this
,
'index_sumIncomeTips'
).
text
=
sumIncome
||
'0'
;
getObject
(
this
,
'index_sevenDayAnnualizationTips'
).
text
=
sevenDayAnnualization
;
getObject
(
this
,
'index_yesterdayIncomeTips'
).
text
=
`昨日收益:
${
yesterdayIncome
||
'0'
}
元`
;
getObject
(
this
,
'index_invitePercentTips'
).
text
=
`
${
experienceAmount
}
/1000000`
;
getObject
(
this
,
'index_inviteTips'
).
text
=
`已有
${
assistFriendNum
}
位好友助力,体验金增加
${
otherExperienceAmount
}
元`
;
let
percent
=
0.05
;
if
(
experienceAmount
/
1000000
>
percent
)
{
percent
=
experienceAmount
/
1000000
;
if
(
experienceAmount
/
MAX_MONEY
>
percent
)
{
percent
=
experienceAmount
/
MAX_MONEY
;
}
const
progressBar
=
new
ProgressBarS
(
getObject
(
this
,
'index_progress'
));
progressBar
.
value
=
percent
;
}
onclick_index_inviteBtn
()
{
showShareMask
();
}
onclick_index_drawBtn
()
{
getPxTokenSave
().
then
(
token
=>
{
sendWebNet
(
WebNetName
.
withDraw
,
{
token
:
token
}).
then
(
res
=>
{
showPanel
(
DrawPanel
);
showPanel
(
DrawPanel
,
res
.
data
);
});
})
}
...
...
@@ -125,11 +131,13 @@ export class IndexScene extends Scene {
watchPageVisibility
(
this
.
onPageVisibilityChange
);
getObject
(
this
,
'index_drawBtn'
).
addEventListener
(
FYGE
.
MouseEvent
.
CLICK
,
this
.
onclick_index_drawBtn
,
this
)
getObject
(
this
,
'index_rulebtn'
).
addEventListener
(
FYGE
.
MouseEvent
.
CLICK
,
this
.
onclick_index_ruleBtn
,
this
)
getObject
(
this
,
'index_inviteBtn'
).
addEventListener
(
FYGE
.
MouseEvent
.
CLICK
,
this
.
onclick_index_inviteBtn
,
this
)
}
removeEvents
()
{
super
.
removeEvents
();
unwatchPageVisibility
(
this
.
onPageVisibilityChange
)
getObject
(
this
,
'index_inviteBtn'
).
removeEventListener
(
FYGE
.
MouseEvent
.
CLICK
,
this
.
onclick_index_inviteBtn
,
this
)
getObject
(
this
,
'index_drawBtn'
).
removeEventListener
(
FYGE
.
MouseEvent
.
CLICK
,
this
.
onclick_index_drawBtn
,
this
)
getObject
(
this
,
'index_rulebtn'
).
removeEventListener
(
FYGE
.
MouseEvent
.
CLICK
,
this
.
onclick_index_ruleBtn
,
this
)
}
...
...
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