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
c4bfd66a
Commit
c4bfd66a
authored
Aug 06, 2021
by
wildfirecode13
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
e39c2fb3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
26 deletions
+31
-26
prize.ts
project/src/panels/prize.ts
+1
-1
IndexScene.ts
project/src/scenes/IndexScene.ts
+30
-25
No files found.
project/src/panels/prize.ts
View file @
c4bfd66a
...
...
@@ -41,7 +41,7 @@ export class PrizePanel extends Panel {
progressBar
.
value
=
percent
;
getPxTokenSave
().
then
(
token
=>
{
sendWebNet
(
WebNetName
.
createItem
).
then
(
createItemResult
=>
{
sendWebNet
(
WebNetName
.
createItem
,{
token
:
token
}
).
then
(
createItemResult
=>
{
updateShare
(
'inPrizePanel'
,
createItemResult
.
data
)
});
})
...
...
project/src/scenes/IndexScene.ts
View file @
c4bfd66a
...
...
@@ -14,32 +14,32 @@ import updateShare from '../updateShare';
import
{
getPxTokenSave
,
sendWebNet
,
WebNetName
}
from
'../WebNet'
;
export
class
IndexScene
extends
Scene
{
onclick_index_drawBtn
(){
onclick_index_drawBtn
()
{
getPxTokenSave
().
then
(
token
=>
{
sendWebNet
(
WebNetName
.
withDraw
,
{
token
:
token
}).
then
(
res
=>
{
getPxTokenSave
().
then
(
token
=>
{
sendWebNet
(
WebNetName
.
withDraw
,
{
token
:
token
}).
then
(
res
=>
{
showPanel
(
DrawPanel
);
});
})
})
}
page
:
FYGE
.
ScrollPage
;
page
:
FYGE
.
ScrollPage
;
initUi
()
{
super
.
initUi
();
const
page
=
this
.
page
=
new
FYGE
.
ScrollPage
(
750
,
getStageHeight
(),
1624
,
true
,
true
);
const
page
=
this
.
page
=
new
FYGE
.
ScrollPage
(
750
,
getStageHeight
(),
1624
,
true
,
true
);
this
.
addChild
(
page
);
page
.
y
=
getStageOffset
();
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_millionSharesTips'
).
visible
=
false
;
getObject
(
this
,
'index_drawGrayBtn'
).
visible
=
false
;
getObject
(
this
.
page
,
'index_task1'
).
visible
=
false
;
getObject
(
this
.
page
,
'index_task1'
).
visible
=
false
;
// getObject(this.page,'task2new').visible=false;
getObject
(
this
.
page
,
'index_task2'
).
visible
=
false
;
getObject
(
this
.
page
,
'index_task2'
).
visible
=
false
;
}
async
start
(
data
)
{
...
...
@@ -63,33 +63,38 @@ export class IndexScene extends Scene {
str
=
str
.
replace
(
'{amount}'
,
item
.
amount
);
return
str
});
const
q
=
getObject
(
this
,
'index_wrapper'
).
addChild
(
new
Marquee
(
datas
));
q
.
x
=
135
;
q
.
y
=
191
;
const
q
=
getObject
(
this
,
'index_wrapper'
).
addChild
(
new
Marquee
(
datas
));
q
.
x
=
135
;
q
.
y
=
191
;
window
[
'q'
]
=
q
;
});
getPxTokenSave
().
then
(
token
=>
{
sendWebNet
(
WebNetName
.
createItem
).
then
(
createItemResult
=>
{
updateShare
(
'inIndexScene'
,
createItemResult
.
data
,)
sendWebNet
(
WebNetName
.
myWallet
,
{
token
:
token
}).
then
(
myWalletResult
=>
{
console
.
log
(
'获取钱包信息'
);
getPxTokenSave
().
then
(
token
=>
{
sendWebNet
(
WebNetName
.
createItem
,
{
token
:
token
}).
then
(
createItemResult
=>
{
updateShare
(
'inIndexScene'
,
createItemResult
.
data
,)
});
})
});
})
})
}
async
showSharePanel
()
{
getPxTokenSave
().
then
(
token
=>
{
sendWebNet
(
WebNetName
.
myWallet
,
{
token
:
token
}).
then
(
myWalletResult
=>
{
if
(
myWalletResult
.
data
.
experienceAmount
>=
myWalletResult
.
data
.
maxExperienceAmount
)
{
getPxTokenSave
().
then
(
token
=>
{
sendWebNet
(
WebNetName
.
myWallet
,
{
token
:
token
}).
then
(
myWalletResult
=>
{
if
(
myWalletResult
.
data
.
experienceAmount
>=
myWalletResult
.
data
.
maxExperienceAmount
)
{
showPanel
(
ShareFailPanel
);
}
else
{
}
else
{
showPanel
(
ShareSuccessPanel
);
}
});
})
})
}
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
);
if
(
!
visible
)
return
;
const
current
=
PanelCtrl
.
instance
.
current
;
...
...
@@ -104,13 +109,13 @@ export class IndexScene extends Scene {
initEvents
()
{
super
.
initEvents
();
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
)
}
removeEvents
()
{
super
.
removeEvents
();
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
)
}
get
groupNames
()
{
return
[
"index"
]
}
...
...
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