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
841774fe
Commit
841774fe
authored
Aug 09, 2021
by
wildfirecode13
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
u
parent
2aa8705c
Changes
8
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
1359 additions
and
34 deletions
+1359
-34
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
+3
-3
skin.json
project/resource/skin.json
+1306
-1
SkinJson.ts
project/src/SkinJson.ts
+4
-1
rule.ts
project/src/panels/rule.ts
+14
-6
IndexScene.ts
project/src/scenes/IndexScene.ts
+23
-7
NewbieScene.ts
project/src/scenes/NewbieScene.ts
+7
-14
No files found.
project/mock/webNet/wallet/acquireExperienceAmount.do.json
View file @
841774fe
{
{
"code"
:
null
,
"code"
:
null
,
"data"
:
1
000
,
"data"
:
2
000
,
"message"
:
null
,
"message"
:
null
,
"success"
:
true
"success"
:
true
}
}
\ No newline at end of file
project/mock/webNet/wallet/alreadyAcquired.do.json
View file @
841774fe
{
{
"code"
:
null
,
"code"
:
null
,
"data"
:
fals
e
,
"data"
:
tru
e
,
"message"
:
null
,
"message"
:
null
,
"success"
:
true
"success"
:
true
}
}
\ No newline at end of file
project/mock/webNet/wallet/myWallet.do.json
View file @
841774fe
...
@@ -4,13 +4,13 @@
...
@@ -4,13 +4,13 @@
"alreadyOpenAccount"
:
false
,
"alreadyOpenAccount"
:
false
,
"assistFriendNum"
:
0
,
"assistFriendNum"
:
0
,
"canWithdraw"
:
false
,
"canWithdraw"
:
false
,
"experienceAmount"
:
1
000
,
"experienceAmount"
:
1
234
,
"maxExperienceAmount"
:
2500
,
"maxExperienceAmount"
:
2500
,
"millionShares"
:
null
,
"millionShares"
:
null
,
"otherExperienceAmount"
:
0
,
"otherExperienceAmount"
:
0
,
"sevenDayAnnualization"
:
"2.250%"
,
"sevenDayAnnualization"
:
"2.250%"
,
"sumIncome"
:
0.0
0
,
"sumIncome"
:
0.0
1
,
"yesterdayIncome"
:
0.0
0
"yesterdayIncome"
:
0.0
12
},
},
"message"
:
null
,
"message"
:
null
,
"success"
:
true
"success"
:
true
...
...
project/resource/skin.json
View file @
841774fe
This diff is collapsed.
Click to expand it.
project/src/SkinJson.ts
View file @
841774fe
...
@@ -444,6 +444,7 @@ export const SkinJson ={
...
@@ -444,6 +444,7 @@ export const SkinJson ={
}
}
},
},
{
{
"id"
:
"ruleTxt"
,
"name"
:
"rule_tips"
,
"name"
:
"rule_tips"
,
"x"
:
83
,
"x"
:
83
,
"y"
:
240
,
"y"
:
240
,
...
@@ -456,6 +457,7 @@ export const SkinJson ={
...
@@ -456,6 +457,7 @@ export const SkinJson ={
}
}
},
},
{
{
"id"
:
"knowBtn"
,
"name"
:
"rule_ok"
,
"name"
:
"rule_ok"
,
"x"
:
127
,
"x"
:
127
,
"y"
:
713
,
"y"
:
713
,
...
@@ -465,6 +467,7 @@ export const SkinJson ={
...
@@ -465,6 +467,7 @@ export const SkinJson ={
}
}
},
},
{
{
"id"
:
"closeBtn"
,
"name"
:
"rule_close"
,
"name"
:
"rule_close"
,
"x"
:
560
,
"x"
:
560
,
"y"
:
0
,
"y"
:
0
,
...
@@ -890,7 +893,7 @@ export const SkinJson ={
...
@@ -890,7 +893,7 @@ export const SkinJson ={
"y"
:
560
,
"y"
:
560
,
"type"
:
"text"
,
"type"
:
"text"
,
"props"
:
{
"props"
:
{
"text"
:
"
100
"
,
"text"
:
""
,
"size"
:
40
,
"size"
:
40
,
"fillColor"
:
"#c75b2b"
,
"fillColor"
:
"#c75b2b"
,
"textAlpha"
:
1
"textAlpha"
:
1
...
...
project/src/panels/rule.ts
View file @
841774fe
import
{
RES
}
from
"../../module/RES"
;
import
{
Panel
}
from
"../../module/views/Panel"
;
import
{
Panel
}
from
"../../module/views/Panel"
;
import
{
Tools
}
from
"../Tools"
;
import
{
Tools
}
from
"../Tools"
;
import
{
getWebData
,
sendWebNet
,
WebNetName
}
from
"../WebNet"
;
import
{
getWebData
,
sendWebNet
,
WebNetName
}
from
"../WebNet"
;
let
section
;
let
section
;
export
class
RulePanel
extends
Panel
{
export
class
RulePanel
extends
Panel
{
get
groupNames
()
{
return
[
"
RulePanel
"
]
}
get
groupNames
()
{
return
[
"
rule
"
]
}
get
skinName
()
{
return
"
RulePanel
"
}
get
skinName
()
{
return
"
rule
"
}
ruleTxt
:
FYGE
.
TextField
;
ruleTxt
:
FYGE
.
TextField
;
knowBtn
:
FYGE
.
Button
;
knowBtn
:
FYGE
.
Button
;
closeBtn
:
FYGE
.
Button
;
closeBtn
:
FYGE
.
Button
;
...
@@ -15,8 +16,15 @@ export class RulePanel extends Panel {
...
@@ -15,8 +16,15 @@ export class RulePanel extends Panel {
return
[
this
.
closeBtn
,
this
.
knowBtn
];
return
[
this
.
closeBtn
,
this
.
knowBtn
];
}
}
initUi
(){
super
.
initUi
();
var
skin
=
RES
.
getSkinDataByName
(
this
.
skinName
);
this
.
position
.
set
(
skin
.
x
,
skin
.
y
);
}
async
start
(
data
)
{
async
start
(
data
)
{
super
.
start
();
super
.
start
();
//取接口数据
//取接口数据
const
res
=
await
sendWebNet
(
WebNetName
.
projectRule
)
const
res
=
await
sendWebNet
(
WebNetName
.
projectRule
)
if
(
!
res
.
success
)
return
if
(
!
res
.
success
)
return
...
@@ -50,10 +58,10 @@ export class RulePanel extends Panel {
...
@@ -50,10 +58,10 @@ export class RulePanel extends Panel {
section
.
id
=
"rule"
;
section
.
id
=
"rule"
;
section
.
style
.
overflowX
=
"hidden"
;
section
.
style
.
overflowX
=
"hidden"
;
section
.
style
.
overflowY
=
"auto"
;
section
.
style
.
overflowY
=
"auto"
;
section
.
style
.
width
=
61
0
+
"px"
;
section
.
style
.
width
=
43
0
+
"px"
;
section
.
style
.
height
=
816
+
"px"
;
section
.
style
.
height
=
400
+
"px"
;
section
.
style
.
lineHeight
=
4
8
+
"px"
;
section
.
style
.
lineHeight
=
4
0
+
"px"
;
section
.
style
.
fontSize
=
this
.
ruleTxt
.
size
+
'px'
;
section
.
style
.
fontSize
=
30
+
'px'
;
section
.
style
.
color
=
this
.
ruleTxt
.
fillColor
;
section
.
style
.
color
=
this
.
ruleTxt
.
fillColor
;
section
.
style
.
whiteSpace
=
"pre-line"
;
section
.
style
.
whiteSpace
=
"pre-line"
;
section
.
innerHTML
=
ruleStr
;
section
.
innerHTML
=
ruleStr
;
...
...
project/src/scenes/IndexScene.ts
View file @
841774fe
...
@@ -3,10 +3,12 @@ import { showPanel } from "../../module/ctrls";
...
@@ -3,10 +3,12 @@ import { showPanel } from "../../module/ctrls";
import
PanelCtrl
from
'../../module/ctrls/panelCtrl'
;
import
PanelCtrl
from
'../../module/ctrls/panelCtrl'
;
import
{
Scene
}
from
"../../module/views/Scene"
;
import
{
Scene
}
from
"../../module/views/Scene"
;
import
Marquee
from
'../common/Marquee'
;
import
Marquee
from
'../common/Marquee'
;
import
{
ProgressBarS
}
from
'../common/ProgressBarS'
;
import
{
hideShareMask
}
from
'../common/ShareMask'
;
import
{
hideShareMask
}
from
'../common/ShareMask'
;
import
getObject
from
'../getObject'
;
import
getObject
from
'../getObject'
;
import
getQueryParams
from
'../getQueryParams'
;
import
getQueryParams
from
'../getQueryParams'
;
import
{
DrawPanel
}
from
'../panels/draw'
;
import
{
DrawPanel
}
from
'../panels/draw'
;
import
{
RulePanel
}
from
'../panels/rule'
;
import
{
ShareFailPanel
}
from
'../panels/share_fail'
;
import
{
ShareFailPanel
}
from
'../panels/share_fail'
;
import
{
ShareSuccessPanel
}
from
'../panels/share_success'
;
import
{
ShareSuccessPanel
}
from
'../panels/share_success'
;
import
{
getStageHeight
,
getStageOffset
}
from
'../stage'
;
import
{
getStageHeight
,
getStageOffset
}
from
'../stage'
;
...
@@ -14,8 +16,21 @@ import updateShare from '../updateShare';
...
@@ -14,8 +16,21 @@ import updateShare from '../updateShare';
import
{
getPxTokenSave
,
sendWebNet
,
WebNetName
}
from
'../WebNet'
;
import
{
getPxTokenSave
,
sendWebNet
,
WebNetName
}
from
'../WebNet'
;
export
class
IndexScene
extends
Scene
{
export
class
IndexScene
extends
Scene
{
onclick_index_drawBtn
()
{
updateIndexUI
({
experienceAmount
,
yesterdayIncome
,
sumIncome
,
sevenDayAnnualization
})
{
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'
}
元`
;
let
percent
=
0.05
;
if
(
experienceAmount
/
1000000
>
percent
)
{
percent
=
experienceAmount
/
1000000
;
}
const
progressBar
=
new
ProgressBarS
(
getObject
(
this
,
'index_progress'
));
progressBar
.
value
=
percent
;
}
onclick_index_drawBtn
()
{
getPxTokenSave
().
then
(
token
=>
{
getPxTokenSave
().
then
(
token
=>
{
sendWebNet
(
WebNetName
.
withDraw
,
{
token
:
token
}).
then
(
res
=>
{
sendWebNet
(
WebNetName
.
withDraw
,
{
token
:
token
}).
then
(
res
=>
{
showPanel
(
DrawPanel
);
showPanel
(
DrawPanel
);
...
@@ -33,13 +48,7 @@ export class IndexScene extends Scene {
...
@@ -33,13 +48,7 @@ export class IndexScene extends Scene {
this
.
page
.
view
.
addChild
(
getObject
(
this
,
'index_wrapper'
));
this
.
page
.
view
.
addChild
(
getObject
(
this
,
'index_wrapper'
));
getObject
(
this
,
'index_millionSharesTips'
).
visible
=
false
;
getObject
(
this
,
'index_drawGrayBtn'
).
visible
=
false
;
getObject
(
this
,
'index_drawGrayBtn'
).
visible
=
false
;
getObject
(
this
.
page
,
'index_task1'
).
visible
=
false
;
// getObject(this.page,'task2new').visible=false;
getObject
(
this
.
page
,
'index_task2'
).
visible
=
false
;
}
}
async
start
(
data
)
{
async
start
(
data
)
{
...
@@ -71,6 +80,7 @@ export class IndexScene extends Scene {
...
@@ -71,6 +80,7 @@ export class IndexScene extends Scene {
getPxTokenSave
().
then
(
token
=>
{
getPxTokenSave
().
then
(
token
=>
{
sendWebNet
(
WebNetName
.
myWallet
,
{
token
:
token
}).
then
(
myWalletResult
=>
{
sendWebNet
(
WebNetName
.
myWallet
,
{
token
:
token
}).
then
(
myWalletResult
=>
{
console
.
log
(
'获取钱包信息'
);
console
.
log
(
'获取钱包信息'
);
this
.
updateIndexUI
(
myWalletResult
.
data
);
getPxTokenSave
().
then
(
token
=>
{
getPxTokenSave
().
then
(
token
=>
{
sendWebNet
(
WebNetName
.
createItem
,
{
token
:
token
}).
then
(
createItemResult
=>
{
sendWebNet
(
WebNetName
.
createItem
,
{
token
:
token
}).
then
(
createItemResult
=>
{
updateShare
(
'inIndexScene'
,
createItemResult
.
data
,)
updateShare
(
'inIndexScene'
,
createItemResult
.
data
,)
...
@@ -106,16 +116,22 @@ export class IndexScene extends Scene {
...
@@ -106,16 +116,22 @@ export class IndexScene extends Scene {
}
}
}
}
onclick_index_ruleBtn
()
{
showPanel
(
RulePanel
);
}
initEvents
()
{
initEvents
()
{
super
.
initEvents
();
super
.
initEvents
();
watchPageVisibility
(
this
.
onPageVisibilityChange
);
watchPageVisibility
(
this
.
onPageVisibilityChange
);
getObject
(
this
,
'index_drawBtn'
).
addEventListener
(
FYGE
.
MouseEvent
.
CLICK
,
this
.
onclick_index_drawBtn
,
this
)
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
)
}
}
removeEvents
()
{
removeEvents
()
{
super
.
removeEvents
();
super
.
removeEvents
();
unwatchPageVisibility
(
this
.
onPageVisibilityChange
)
unwatchPageVisibility
(
this
.
onPageVisibilityChange
)
getObject
(
this
,
'index_drawBtn'
).
removeEventListener
(
FYGE
.
MouseEvent
.
CLICK
,
this
.
onclick_index_drawBtn
,
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
)
}
}
get
groupNames
()
{
return
[
"index"
]
}
get
groupNames
()
{
return
[
"index"
]
}
...
...
project/src/scenes/NewbieScene.ts
View file @
841774fe
...
@@ -5,6 +5,7 @@ import Group from "../common/Group";
...
@@ -5,6 +5,7 @@ import Group from "../common/Group";
import
Marquee
from
"../common/Marquee"
;
import
Marquee
from
"../common/Marquee"
;
import
{
hideShareMask
}
from
"../common/ShareMask"
;
import
{
hideShareMask
}
from
"../common/ShareMask"
;
import
TestButton
from
"../common/TestButton"
;
import
TestButton
from
"../common/TestButton"
;
import
getObject
from
"../getObject"
;
import
getQueryParams
from
"../getQueryParams"
;
import
getQueryParams
from
"../getQueryParams"
;
import
{
PrizePanel
}
from
"../panels/prize"
;
import
{
PrizePanel
}
from
"../panels/prize"
;
import
{
RulePanel
}
from
"../panels/rule"
;
import
{
RulePanel
}
from
"../panels/rule"
;
...
@@ -12,8 +13,6 @@ import { getPxTokenSave, sendWebNet, WebNetName } from "../WebNet";
...
@@ -12,8 +13,6 @@ import { getPxTokenSave, sendWebNet, WebNetName } from "../WebNet";
import
{
IndexScene
}
from
"./IndexScene"
;
import
{
IndexScene
}
from
"./IndexScene"
;
let
prize
;
let
prize
;
export
class
NewbieScene
extends
Scene
{
export
class
NewbieScene
extends
Scene
{
prizeBtn
:
FYGE
.
Sprite
;
ruleBtn
:
FYGE
.
Sprite
;
onPageVisibilityChange
=
async
(
visible
)
=>
{
onPageVisibilityChange
=
async
(
visible
)
=>
{
if
(
getQueryParams
().
disablewatch
==
1
)
{
console
.
log
(
'disable watch'
);
return
;
}
if
(
getQueryParams
().
disablewatch
==
1
)
{
console
.
log
(
'disable watch'
);
return
;
}
console
.
log
(
'页面visible'
,
visible
);
console
.
log
(
'页面visible'
,
visible
);
...
@@ -46,7 +45,7 @@ export class NewbieScene extends Scene {
...
@@ -46,7 +45,7 @@ export class NewbieScene extends Scene {
}
}
onClick_
prize
Btn
()
{
onClick_
open
Btn
()
{
this
.
openPrize
()
this
.
openPrize
()
}
}
...
@@ -56,13 +55,6 @@ export class NewbieScene extends Scene {
...
@@ -56,13 +55,6 @@ export class NewbieScene extends Scene {
initUi
()
{
initUi
()
{
super
.
initUi
();
super
.
initUi
();
const
group
=
new
Group
();
this
.
addChild
(
group
)
this
.
prizeBtn
=
new
TestButton
(
'立即拆开'
);
group
.
add
(
this
.
prizeBtn
);
this
.
ruleBtn
=
new
TestButton
(
'规则按钮'
);
group
.
add
(
this
.
ruleBtn
);
sendWebNet
(
WebNetName
.
carouselInfo
).
then
(
res
=>
{
sendWebNet
(
WebNetName
.
carouselInfo
).
then
(
res
=>
{
console
.
log
(
'carouselInfo '
,
res
);
console
.
log
(
'carouselInfo '
,
res
);
...
@@ -83,14 +75,15 @@ export class NewbieScene extends Scene {
...
@@ -83,14 +75,15 @@ export class NewbieScene extends Scene {
initEvents
()
{
initEvents
()
{
super
.
initEvents
();
super
.
initEvents
();
watchPageVisibility
(
this
.
onPageVisibilityChange
);
watchPageVisibility
(
this
.
onPageVisibilityChange
);
this
.
prizeBtn
.
addEventListener
(
FYGE
.
MouseEvent
.
CLICK
,
this
.
onClick_prize
Btn
,
this
);
getObject
(
this
,
'newbie_open'
).
addEventListener
(
FYGE
.
MouseEvent
.
CLICK
,
this
.
onClick_open
Btn
,
this
);
this
.
ruleBtn
.
addEventListener
(
FYGE
.
MouseEvent
.
CLICK
,
this
.
onClick_ruleBtn
,
this
);
getObject
(
this
,
'newbie_rule'
)
.
addEventListener
(
FYGE
.
MouseEvent
.
CLICK
,
this
.
onClick_ruleBtn
,
this
);
}
}
removeEvents
()
{
removeEvents
()
{
super
.
removeEvents
();
super
.
removeEvents
();
unwatchPageVisibility
(
this
.
onPageVisibilityChange
)
unwatchPageVisibility
(
this
.
onPageVisibilityChange
)
this
.
prizeBtn
.
removeEventListener
(
FYGE
.
MouseEvent
.
CLICK
,
this
.
onClick_prize
Btn
,
this
);
getObject
(
this
,
'newbie_open'
).
removeEventListener
(
FYGE
.
MouseEvent
.
CLICK
,
this
.
onClick_open
Btn
,
this
);
this
.
ruleBtn
.
removeEventListener
(
FYGE
.
MouseEvent
.
CLICK
,
this
.
onClick_ruleBtn
,
this
);
getObject
(
this
,
'newbie_rule'
)
.
removeEventListener
(
FYGE
.
MouseEvent
.
CLICK
,
this
.
onClick_ruleBtn
,
this
);
}
}
get
groupNames
()
{
return
[
"newbie"
]
}
get
groupNames
()
{
return
[
"newbie"
]
}
...
...
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