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
d72bbf88
Commit
d72bbf88
authored
Aug 09, 2021
by
wildfirecode13
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
u
parent
cb7e42e1
Changes
13
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
83 additions
and
916 deletions
+83
-916
assist.do.json
project/mock/webNet/shareAssist/assist.do.json
+1
-1
acquireExperienceAmount.do.json
project/mock/webNet/wallet/acquireExperienceAmount.do.json
+1
-1
alreadyAcquired.do.json
project/mock/webNet/wallet/alreadyAcquired.do.json
+1
-1
myWallet.do.json
project/mock/webNet/wallet/myWallet.do.json
+5
-5
withDraw.do.json
project/mock/webNet/wallet/withDraw.do.json
+1
-1
ResJson.ts
project/src/ResJson.ts
+14
-898
SkinJson.ts
project/src/SkinJson.ts
+13
-1
centerTextField.ts
project/src/centerTextField.ts
+12
-4
getObject.ts
project/src/getObject.ts
+5
-0
assist.ts
project/src/panels/assist.ts
+8
-1
draw.ts
project/src/panels/draw.ts
+3
-1
prize.ts
project/src/panels/prize.ts
+1
-0
IndexScene.ts
project/src/scenes/IndexScene.ts
+18
-2
No files found.
project/mock/webNet/shareAssist/assist.do.json
View file @
d72bbf88
{
"code"
:
null
,
"data"
:
"123"
,
"data"
:
"123
4567890123
"
,
"message"
:
null
,
"success"
:
true
}
\ No newline at end of file
project/mock/webNet/wallet/acquireExperienceAmount.do.json
View file @
d72bbf88
{
"code"
:
null
,
"data"
:
2
000
,
"data"
:
500
000
,
"message"
:
null
,
"success"
:
true
}
\ No newline at end of file
project/mock/webNet/wallet/alreadyAcquired.do.json
View file @
d72bbf88
{
"code"
:
null
,
"data"
:
true
,
"data"
:
1
,
"message"
:
null
,
"success"
:
true
}
\ No newline at end of file
project/mock/webNet/wallet/myWallet.do.json
View file @
d72bbf88
...
...
@@ -2,15 +2,15 @@
"code"
:
null
,
"data"
:
{
"alreadyOpenAccount"
:
false
,
"assistFriendNum"
:
0
,
"assistFriendNum"
:
1
,
"canWithdraw"
:
true
,
"experienceAmount"
:
1234
,
"experienceAmount"
:
22233
,
"maxExperienceAmount"
:
2500
,
"millionShares"
:
null
,
"otherExperienceAmount"
:
0
,
"otherExperienceAmount"
:
1
,
"sevenDayAnnualization"
:
"2.250%"
,
"sumIncome"
:
0.01
,
"yesterdayIncome"
:
0.012
"sumIncome"
:
123456
,
"yesterdayIncome"
:
0.012
3456789
},
"message"
:
null
,
"success"
:
true
...
...
project/mock/webNet/wallet/withDraw.do.json
View file @
d72bbf88
...
...
@@ -2,5 +2,5 @@
"code"
:
"200010"
,
"data"
:
2000
,
"message"
:
"收益未满7天不能提现"
,
"success"
:
fals
e
"success"
:
tru
e
}
\ No newline at end of file
project/src/ResJson.ts
View file @
d72bbf88
This diff is collapsed.
Click to expand it.
project/src/SkinJson.ts
View file @
d72bbf88
...
...
@@ -917,12 +917,24 @@ export const SkinJson ={
"y"
:
383
,
"type"
:
"text"
,
"props"
:
{
"text"
:
"1000
元
"
,
"text"
:
"1000"
,
"size"
:
60
,
"fillColor"
:
"#ff2f50"
,
"textAlpha"
:
1
}
},
{
"name"
:
"index_experienceAmountTips2"
,
"x"
:
302
,
"y"
:
403
,
"type"
:
"text"
,
"props"
:
{
"text"
:
"元"
,
"size"
:
30
,
"fillColor"
:
"#ff2f50"
,
"textAlpha"
:
1
}
},
{
"name"
:
"index_drawBtn"
,
"x"
:
205
,
...
...
project/src/centerTextField.ts
View file @
d72bbf88
export
default
(
txt
)
=>
{
txt
.
x
=
0
;
txt
.
textWidth
=
750
;
txt
.
textAlign
=
'center'
;
const
func
=
(
txt
,
width
,
offset
)
=>
{
txt
.
x
=
offset
||
0
;
txt
.
textWidth
=
width
||
750
;
txt
.
textAlign
=
'center'
;
}
export
default
(
txt
,
width
?,
offset
?)
=>
{
if
(
txt
instanceof
Array
)
{
txt
.
forEach
(
item
=>
func
(
item
,
width
,
offset
))
}
else
{
func
(
txt
,
width
,
offset
)
}
}
\ No newline at end of file
project/src/getObject.ts
View file @
d72bbf88
...
...
@@ -10,4 +10,9 @@ getObject = (object:FYGE.Container, name:string)=>{
return
null
;
}
export
const
getObjects
=
(
object
:
FYGE
.
Container
,
names
:
string
[])
=>
{
return
names
.
map
(
name
=>
getObject
(
object
,
name
))
}
export
default
getObject
\ No newline at end of file
project/src/panels/assist.ts
View file @
d72bbf88
import
{
RES
}
from
"../../module/RES"
;
import
{
Panel
}
from
"../../module/views/Panel"
;
import
centerTextField
from
"../centerTextField"
;
import
getObject
from
"../getObject"
;
export
class
AssistPanel
extends
Panel
{
...
...
@@ -21,6 +22,12 @@ export class AssistPanel extends Panel {
super
.
start
(
data
);
getObject
(
this
,
'assist_amout'
).
text
=
`
${
data
}
`
const
prize_tips1
=
getObject
(
this
,
'assist_tips'
);
const
prize_tips2
=
getObject
(
this
,
'assist_amout'
);
prize_tips2
.
text
=
data
;
const
w
=
prize_tips1
.
textWidth
+
prize_tips2
.
textWidth
;
prize_tips2
.
x
=
(
595
-
w
)
/
2
;
prize_tips1
.
x
=
prize_tips2
.
x
+
prize_tips2
.
textWidth
;
centerTextField
(
getObject
(
this
,
'assist_tips2'
),
595
)
}
}
\ No newline at end of file
project/src/panels/draw.ts
View file @
d72bbf88
import
{
RES
}
from
"../../module/RES"
;
import
{
Panel
}
from
"../../module/views/Panel"
;
import
getObject
from
"../getObject"
;
import
centerTextField
from
"../centerTextField"
;
import
getObject
,
{
getObjects
}
from
"../getObject"
;
export
class
DrawPanel
extends
Panel
{
initUi
()
{
...
...
@@ -19,6 +20,7 @@ export class DrawPanel extends Panel {
async
start
(
data
)
{
super
.
start
(
data
);
centerTextField
(
getObject
(
this
,
'draw_tips'
),
597
);
getObject
(
this
,
'draw_tips'
).
text
=
`成功获得奖励金
${
data
}
元\n奖励将于24小时内发放到您的账户`
}
}
\ No newline at end of file
project/src/panels/prize.ts
View file @
d72bbf88
...
...
@@ -28,6 +28,7 @@ export class PrizePanel extends Panel {
const
w
=
prize_tips1
.
textWidth
+
prize_tips2
.
textWidth
;
prize_tips2
.
x
=
(
595
-
w
)
/
2
;
prize_tips1
.
x
=
prize_tips2
.
x
+
prize_tips2
.
textWidth
;
prize_tip3
.
textWidth
=
595
;
prize_tip3
.
x
=
0
;
prize_tip3
.
textAlign
=
'center'
;
...
...
project/src/scenes/IndexScene.ts
View file @
d72bbf88
...
...
@@ -2,11 +2,12 @@ import { unwatchPageVisibility, watchPageVisibility } from '@spark/utils';
import
{
showPanel
,
showToast
}
from
"../../module/ctrls"
;
import
PanelCtrl
from
'../../module/ctrls/panelCtrl'
;
import
{
Scene
}
from
"../../module/views/Scene"
;
import
centerTextField
from
'../centerTextField'
;
import
Marquee
from
'../common/Marquee'
;
import
{
ProgressBarS
}
from
'../common/ProgressBarS'
;
import
{
hideShareMask
,
showShareMask
}
from
'../common/ShareMask'
;
import
{
MAX_MONEY
}
from
'../datas'
;
import
getObject
from
'../getObject'
;
import
getObject
,
{
getObjects
}
from
'../getObject'
;
import
getQueryParams
from
'../getQueryParams'
;
import
{
DrawPanel
}
from
'../panels/draw'
;
import
{
RulePanel
}
from
'../panels/rule'
;
...
...
@@ -18,12 +19,18 @@ import { getPxTokenSave, getWebData, sendWebNet, WebNetName } from '../WebNet';
export
class
IndexScene
extends
Scene
{
updateIndexUI
({
experienceAmount
,
yesterdayIncome
,
sumIncome
,
sevenDayAnnualization
,
assistFriendNum
,
otherExperienceAmount
})
{
getObject
(
this
,
'index_experienceAmountTips'
).
text
=
experienceAmount
;
getObject
(
this
,
'index_experienceAmountTips'
).
text
=
experienceAmount
||
"0"
;
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
}
元`
;
const
prize_tips1
=
getObject
(
this
,
'index_experienceAmountTips2'
);
const
prize_tips2
=
getObject
(
this
,
'index_experienceAmountTips'
);
const
w
=
prize_tips1
.
textWidth
+
prize_tips2
.
textWidth
;
prize_tips2
.
x
=
(
750
-
w
)
/
2
;
prize_tips1
.
x
=
prize_tips2
.
x
+
prize_tips2
.
textWidth
;
let
percent
=
0.05
;
if
(
experienceAmount
/
MAX_MONEY
>
percent
)
{
...
...
@@ -63,6 +70,15 @@ export class IndexScene extends Scene {
this
.
page
.
view
.
addChild
(
getObject
(
this
,
'index_wrapper'
));
getObject
(
this
,
'index_drawGrayBtn'
).
visible
=
false
;
centerTextField
(
getObjects
(
this
,[
'index_yesterdayIncomeTips'
,
'index_invitePercentTips'
,
'index_inviteTips'
]));
centerTextField
(
getObject
(
this
,
'index_sumIncomeTips'
),
0
,
-
144
+
5
);
centerTextField
(
getObject
(
this
,
'index_sevenDayAnnualizationTips'
),
0
,
140
);
}
async
start
(
data
)
{
...
...
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