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
de3ab299
Commit
de3ab299
authored
Aug 04, 2021
by
wildfirecode13
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
bed44ef6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
4 deletions
+35
-4
IndexScene.ts
project/src/scenes/IndexScene.ts
+8
-2
NewbieScene.ts
project/src/scenes/NewbieScene.ts
+27
-2
No files found.
project/src/scenes/IndexScene.ts
View file @
de3ab299
...
...
@@ -13,7 +13,13 @@ export class IndexScene extends Scene {
}
async
start
(
data
)
{
super
.
start
();
super
.
start
(
data
);
data
=
data
||
{};
const
{
action
,
from
}
=
data
;
console
.
log
(
'IndexScene'
,
'from='
,
from
,
'action'
,
action
);
if
(
action
==
'doShareCallback'
)
{
}
// console.log(this);
...
...
@@ -23,7 +29,7 @@ export class IndexScene extends Scene {
}
onPageVisibilityChange
=
async
(
visible
)
=>
{
console
.
log
(
'页面
'
+
visible
?
'可见'
:
'不可见'
);
console
.
log
(
'页面
visible'
,
visible
);
const
current
=
PanelCtrl
.
instance
.
current
;
if
(
visible
&&
!
current
)
{
var
res
=
await
sendWebNet
(
WebNetName
.
canshare
)
...
...
project/src/scenes/NewbieScene.ts
View file @
de3ab299
import
{
showPanel
}
from
"../../module/ctrls"
;
import
{
unwatchPageVisibility
,
watchPageVisibility
}
from
"@spark/utils"
;
import
{
changeScene
,
closeCurrentPanel
,
showPanel
}
from
"../../module/ctrls"
;
import
PanelCtrl
from
"../../module/ctrls/panelCtrl"
;
import
{
Scene
}
from
"../../module/views/Scene"
;
import
{
PrizePanel
}
from
"../panels/prize"
;
import
{
ShareFailPanel
}
from
"../panels/share_fail"
;
import
{
ShareSuccessPanel
}
from
"../panels/share_success"
;
import
{
sendWebNet
,
WebNetName
}
from
"../WebNet"
;
import
{
IndexScene
}
from
"./IndexScene"
;
let
prize
;
export
class
NewbieScene
extends
Scene
{
onPageVisibilityChange
=
async
(
visible
)
=>
{
console
.
log
(
'页面visible'
,
visible
);
if
(
!
prize
)
{
console
.
log
(
'没有领体验金'
);
return
;
};
if
(
visible
)
{
closeCurrentPanel
();
changeScene
(
IndexScene
,{
from
:
'NewbieScene'
,
action
:
'doShareCallback'
});
}
}
get
groupNames
()
{
return
[
"newbie"
]
}
get
skinName
()
{
return
"newbie"
}
...
...
@@ -11,17 +30,23 @@ export class NewbieScene extends Scene {
async
start
(
data
)
{
super
.
start
();
this
.
addEventListener
(
FYGE
.
MouseEvent
.
CLICK
,
()
=>
{
prize
=
1
;
showPanel
(
PrizePanel
,
data
);
},
this
);
}
initEvents
()
{
super
.
initEvents
();
watchPageVisibility
(
this
.
onPageVisibilityChange
)
}
removeEvents
()
{
super
.
removeEvents
();
unwatchPageVisibility
(
this
.
onPageVisibilityChange
)
}
...
...
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