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
67b5eacc
Commit
67b5eacc
authored
Aug 10, 2021
by
wildfirecode13
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
u
parent
f7049f14
Changes
11
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
71 additions
and
940 deletions
+71
-940
alreadyAcquired.do.json
project/mock/webNet/wallet/alreadyAcquired.do.json
+1
-1
myWallet.do.json
project/mock/webNet/wallet/myWallet.do.json
+1
-1
package.json
project/package.json
+2
-1
res.json
project/resource/res.json
+4
-0
index.svga
project/resource/svga/index.svga
+0
-0
open.svga
project/resource/svga/open.svga
+0
-0
prize.svga
project/resource/svga/prize.svga
+0
-0
ResJson.ts
project/src/ResJson.ts
+18
-909
IndexScene.ts
project/src/scenes/IndexScene.ts
+38
-28
NewbieScene.ts
project/src/scenes/NewbieScene.ts
+2
-0
yarn.lock
project/yarn.lock
+5
-0
No files found.
project/mock/webNet/wallet/alreadyAcquired.do.json
View file @
67b5eacc
{
{
"code"
:
null
,
"code"
:
null
,
"data"
:
1
,
"data"
:
0
,
"message"
:
null
,
"message"
:
null
,
"success"
:
true
"success"
:
true
}
}
\ No newline at end of file
project/mock/webNet/wallet/myWallet.do.json
View file @
67b5eacc
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
"alreadyOpenAccount"
:
false
,
"alreadyOpenAccount"
:
false
,
"assistFriendNum"
:
1
,
"assistFriendNum"
:
1
,
"canWithdraw"
:
true
,
"canWithdraw"
:
true
,
"experienceAmount"
:
233
,
"experienceAmount"
:
51200
,
"maxExperienceAmount"
:
2500
,
"maxExperienceAmount"
:
2500
,
"millionShares"
:
null
,
"millionShares"
:
null
,
"otherExperienceAmount"
:
1
,
"otherExperienceAmount"
:
1
,
...
...
project/package.json
View file @
67b5eacc
...
@@ -24,7 +24,8 @@
...
@@ -24,7 +24,8 @@
"dependencies"
:
{
"dependencies"
:
{
"@spark/share"
:
"^2.0.90"
,
"@spark/share"
:
"^2.0.90"
,
"@spark/utils"
:
"^2.0.46"
,
"@spark/utils"
:
"^2.0.46"
,
"duiba-utils"
:
"^1.0.9"
"duiba-utils"
:
"^1.0.9"
,
"svga-parser"
:
"^2.0.0"
},
},
"scripts"
:
{
"scripts"
:
{
"clearSameImg"
:
"node scripts/clearSameImg && node scripts/flushRes"
,
"clearSameImg"
:
"node scripts/clearSameImg && node scripts/flushRes"
,
...
...
project/resource/res.json
View file @
67b5eacc
...
@@ -55,6 +55,10 @@
...
@@ -55,6 +55,10 @@
{
{
"keys"
:
"share_success_bg.png,share_success_btn.png,share_success_close.png,share_success_okbtn.png,share_success_title.png"
,
"keys"
:
"share_success_bg.png,share_success_btn.png,share_success_close.png,share_success_okbtn.png,share_success_title.png"
,
"name"
:
"share_success"
"name"
:
"share_success"
},
{
"keys"
:
"index.svga,open.svga,prize.svga"
,
"name"
:
"svga"
}
}
],
],
"path"
:
"./resource/"
"path"
:
"./resource/"
...
...
project/resource/svga/index.svga
0 → 100644
View file @
67b5eacc
File added
project/resource/svga/open.svga
0 → 100644
View file @
67b5eacc
File added
project/resource/svga/prize.svga
0 → 100644
View file @
67b5eacc
File added
project/src/ResJson.ts
View file @
67b5eacc
This diff is collapsed.
Click to expand it.
project/src/scenes/IndexScene.ts
View file @
67b5eacc
...
@@ -18,47 +18,56 @@ import updateShareFunc from '../share';
...
@@ -18,47 +18,56 @@ import updateShareFunc from '../share';
import
{
getPxTokenSave
,
getWebData
,
sendWebNet
,
WebNetName
}
from
'../WebNet'
;
import
{
getPxTokenSave
,
getWebData
,
sendWebNet
,
WebNetName
}
from
'../WebNet'
;
export
class
IndexScene
extends
Scene
{
export
class
IndexScene
extends
Scene
{
updateIndexUI
({
experienceAmount
,
yesterdayIncome
,
sumIncome
,
sevenDayAnnualization
,
assistFriendNum
,
otherExperienceAmount
})
{
updateIndexUI
({
experienceAmount
,
yesterdayIncome
,
sumIncome
,
sevenDayAnnualization
,
assistFriendNum
,
otherExperienceAmount
})
{
getObject
(
this
,
'index_experienceAmountTips'
).
text
=
experienceAmount
||
"0"
;
getObject
(
this
,
'index_experienceAmountTips'
).
text
=
experienceAmount
||
"0"
;
getObject
(
this
,
'index_sumIncomeTips'
).
text
=
sumIncome
||
'0'
;
getObject
(
this
,
'index_sumIncomeTips'
).
text
=
sumIncome
||
'0'
;
getObject
(
this
,
'index_sevenDayAnnualizationTips'
).
text
=
sevenDayAnnualization
;
getObject
(
this
,
'index_sevenDayAnnualizationTips'
).
text
=
sevenDayAnnualization
;
getObject
(
this
,
'index_yesterdayIncomeTips'
).
text
=
`昨日收益:
${
yesterdayIncome
||
'0'
}
元`
;
getObject
(
this
,
'index_yesterdayIncomeTips'
).
text
=
`昨日收益:
${
yesterdayIncome
||
'0'
}
元`
;
getObject
(
this
,
'index_invitePercentTips'
).
text
=
`
${
experienceAmount
}
/1000000`
;
getObject
(
this
,
'index_invitePercentTips'
).
text
=
`
${
experienceAmount
}
/1000000`
;
getObject
(
this
,
'index_inviteTips'
).
text
=
`已有
${
assistFriendNum
}
位好友助力,体验金增加
${
otherExperienceAmount
}
元`
;
getObject
(
this
,
'index_inviteTips'
).
text
=
`已有
${
assistFriendNum
}
位好友助力,体验金增加
${
otherExperienceAmount
}
元`
;
const
prize_tips1
=
getObject
(
this
,
'index_experienceAmountTips2'
);
const
index_experienceAmountTips2
=
getObject
(
this
,
'index_experienceAmountTips2'
);
const
prize_tips2
=
getObject
(
this
,
'index_experienceAmountTips'
);
const
index_experienceAmountTips
=
getObject
(
this
,
'index_experienceAmountTips'
);
const
w
=
prize_tips1
.
textWidth
+
prize_tips2
.
textWidth
;
index_experienceAmountTips2
.
x
=
375
+
experienceAmount
.
toString
().
length
*
18
;
prize_tips2
.
x
=
(
750
-
w
)
/
2
;
// const w = index_experienceAmountTips2.textWidth + index_experienceAmountTips.textWidth;
prize_tips1
.
x
=
prize_tips2
.
x
+
prize_tips2
.
textWidth
;
// index_experienceAmountTips.x = (750 - w) / 2;
// index_experienceAmountTips2.x = index_experienceAmountTips.x + index_experienceAmountTips.textWidth;
let
percent
=
0.05
;
let
percent
=
0.05
;
if
(
experienceAmount
/
MAX_MONEY
>
percent
)
{
if
(
experienceAmount
/
MAX_MONEY
>
percent
)
{
percent
=
experienceAmount
/
MAX_MONEY
;
percent
=
experienceAmount
/
MAX_MONEY
;
}
}
const
progressBar
=
new
ProgressBarS
(
getObject
(
this
,
'index_progress'
));
const
progressBar
=
new
ProgressBarS
(
getObject
(
this
,
'index_progress'
));
progressBar
.
value
=
percent
;
progressBar
.
value
=
percent
;
const
__tmp__
=
{
a
:
0
};
FYGE
.
Tween
.
get
(
__tmp__
,
{
loop
:
false
,
onChange
:
(
param
)
=>
{
index_experienceAmountTips
.
text
=
Math
.
ceil
(
experienceAmount
*
__tmp__
.
a
)
+
''
;
progressBar
.
value
=
percent
*
__tmp__
.
a
;
}
}).
to
({
a
:
1
},
700
)
}
}
onclick_index_inviteBtn
()
{
onclick_index_inviteBtn
()
{
showShareMask
();
showShareMask
();
}
}
onclick_index_drawBtn
()
{
onclick_index_drawBtn
()
{
const
{
canWithdraw
}
=
getWebData
(
WebNetName
.
myWallet
).
data
;
const
{
canWithdraw
}
=
getWebData
(
WebNetName
.
myWallet
).
data
;
if
(
canWithdraw
)
{
if
(
canWithdraw
)
{
showWaiting
();
showWaiting
();
getPxTokenSave
().
then
(
token
=>
{
getPxTokenSave
().
then
(
token
=>
{
sendWebNet
(
WebNetName
.
withDraw
,
{
token
:
token
}).
then
(
res
=>
{
sendWebNet
(
WebNetName
.
withDraw
,
{
token
:
token
}).
then
(
res
=>
{
hideWaiting
();
hideWaiting
();
if
(
res
.
success
)
if
(
res
.
success
)
showPanel
(
DrawPanel
,
res
.
data
);
showPanel
(
DrawPanel
,
res
.
data
);
});
});
})
})
}
else
{
}
else
{
showToast
(
'收益未满7天,不能提现哦~'
)
showToast
(
'收益未满7天,不能提现哦~'
)
}
}
}
}
page
:
FYGE
.
ScrollPage
;
page
:
FYGE
.
ScrollPage
;
...
@@ -73,14 +82,15 @@ export class IndexScene extends Scene {
...
@@ -73,14 +82,15 @@ export class IndexScene extends Scene {
getObject
(
this
,
'index_drawGrayBtn'
).
visible
=
false
;
getObject
(
this
,
'index_drawGrayBtn'
).
visible
=
false
;
centerTextField
(
getObjects
(
this
,[
centerTextField
(
getObjects
(
this
,
[
'index_yesterdayIncomeTips'
,
'index_yesterdayIncomeTips'
,
'index_invitePercentTips'
,
'index_invitePercentTips'
,
'index_experienceAmountTips'
,
'index_inviteTips'
'index_inviteTips'
]));
]));
centerTextField
(
getObject
(
this
,
'index_sumIncomeTips'
),
0
,
-
144
+
5
);
centerTextField
(
getObject
(
this
,
'index_sumIncomeTips'
),
0
,
-
144
+
5
);
centerTextField
(
getObject
(
this
,
'index_sevenDayAnnualizationTips'
),
0
,
140
);
centerTextField
(
getObject
(
this
,
'index_sevenDayAnnualizationTips'
),
0
,
140
);
}
}
async
start
(
data
)
{
async
start
(
data
)
{
...
@@ -159,7 +169,7 @@ export class IndexScene extends Scene {
...
@@ -159,7 +169,7 @@ export class IndexScene extends Scene {
getObject
(
this
,
'index_rulebtn'
).
addEventListener
(
FYGE
.
MouseEvent
.
CLICK
,
this
.
onclick_index_ruleBtn
,
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
)
getObject
(
this
,
'index_inviteBtn'
).
addEventListener
(
FYGE
.
MouseEvent
.
CLICK
,
this
.
onclick_index_inviteBtn
,
this
)
}
}
removeEvents
()
{
removeEvents
()
{
super
.
removeEvents
();
super
.
removeEvents
();
unwatchPageVisibility
(
this
.
onPageVisibilityChange
)
unwatchPageVisibility
(
this
.
onPageVisibilityChange
)
...
...
project/src/scenes/NewbieScene.ts
View file @
67b5eacc
...
@@ -59,6 +59,8 @@ export class NewbieScene extends Scene {
...
@@ -59,6 +59,8 @@ export class NewbieScene extends Scene {
initUi
()
{
initUi
()
{
super
.
initUi
();
super
.
initUi
();
// loadSvga()
sendWebNet
(
WebNetName
.
carouselInfo
).
then
(
res
=>
{
sendWebNet
(
WebNetName
.
carouselInfo
).
then
(
res
=>
{
const
template
=
'{phone}邀请了1位好友,获得了{amount}体验金'
;
const
template
=
'{phone}邀请了1位好友,获得了{amount}体验金'
;
...
...
project/yarn.lock
View file @
67b5eacc
...
@@ -4026,6 +4026,11 @@ supports-color@^6.1.0:
...
@@ -4026,6 +4026,11 @@ supports-color@^6.1.0:
dependencies:
dependencies:
has-flag "^3.0.0"
has-flag "^3.0.0"
svga-parser@^2.0.0:
version "2.0.0"
resolved "http://npm.dui88.com:80/svga-parser/-/svga-parser-2.0.0.tgz#c1e17e64b8ac4dced28fa4dfc6c53d11a5121446"
integrity sha1-weF+ZLisTc7Sj6TfxsU9EaUSFEY=
tapable@^1.0.0, tapable@^1.1.3:
tapable@^1.0.0, tapable@^1.1.3:
version "1.1.3"
version "1.1.3"
resolved "http://npm.dui88.com:80/tapable/-/tapable-1.1.3.tgz#a1fccc06b58db61fd7a45da2da44f5f3a3e67ba2"
resolved "http://npm.dui88.com:80/tapable/-/tapable-1.1.3.tgz#a1fccc06b58db61fd7a45da2da44f5f3a3e67ba2"
...
...
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