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
2c92e520
Commit
2c92e520
authored
Aug 03, 2021
by
wildfirecode13
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
72c654c1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
53 additions
and
3 deletions
+53
-3
Main.ts
project/src/Main.ts
+23
-3
getQueryParams.ts
project/src/getQueryParams.ts
+4
-0
ShareScene.ts
project/src/template/ShareScene.ts
+26
-0
No files found.
project/src/Main.ts
View file @
2c92e520
...
...
@@ -7,11 +7,16 @@ import { changeScene, showWaiting, destroyAllCtrls, showPanel, hideWaiting } fro
import
{
ResJson
}
from
"./ResJson"
;
import
{
SkinJson
}
from
"./SkinJson"
;
import
{
LoadingScene
}
from
"./template/LoadingScene"
;
import
{
destroyWebNetData
}
from
"./WebNet"
;
import
{
destroyWebNetData
,
sendWebNet
,
WebNetName
}
from
"./WebNet"
;
import
{
StartScene
}
from
"./template/StartScene"
;
import
{
NewbieScene
}
from
"./template/NewbieScene"
;
import
{
IndexScene
}
from
"./template/IndexScene"
;
import
{
ShareScene
}
from
"./template/ShareScene"
;
import
{
ShareFailPanel
}
from
"./panels/share_fail"
;
import
{
ShareSuccessPanel
}
from
"./panels/share_success"
;
import
{
isFromShare
}
from
"duiba-utils"
;
const
isShare
=
()
=>
{
return
!!
1
};
/**
* 全局事件,为了和小程序交互
...
...
@@ -59,11 +64,26 @@ export class Main {
console
.
log
(
"初始化皮肤配置完成"
)
//加载通用资源
await
RES
.
loadGroup
(
"common"
);
console
.
log
(
"通用资源加载完成"
)
await
console
.
log
(
"通用资源加载完成"
)
//h5环境时,隐藏加载中
if
(
FYGE
.
getEnv
()
==
"web"
&&
document
.
getElementById
(
"__loading__"
))
document
.
getElementById
(
"__loading__"
).
style
.
display
=
"none"
;
//显示场景
changeScene
(
IndexScene
)
if
(
isShare
())
{
changeScene
(
ShareScene
);
}
else
{
const
indexResult
=
await
sendWebNet
(
WebNetName
.
index
)
if
(
indexResult
&&
indexResult
.
success
&&
indexResult
.
data
)
{
if
(
indexResult
.
data
.
isNewbie
)
changeScene
(
NewbieScene
)
else
changeScene
(
IndexScene
)
}
else
{
//网络异常??
}
}
}
/**
...
...
project/src/getQueryParams.ts
0 → 100644
View file @
2c92e520
export
default
()
=>
{
}
\ No newline at end of file
project/src/template/ShareScene.ts
0 → 100644
View file @
2c92e520
import
{
showPanel
}
from
"../../module/ctrls"
;
import
{
Scene
}
from
"../../module/views/Scene"
;
import
getObject
from
"../getObject"
;
import
{
PrizePanel
}
from
"../panels/prize"
;
export
class
ShareScene
extends
Scene
{
get
groupNames
()
{
return
[
"share"
]
}
get
skinName
()
{
return
"share"
}
initUi
()
{
super
.
initUi
();
}
async
start
(
data
)
{
super
.
start
();
}
initEvents
()
{
super
.
initEvents
();
}
removeEvents
()
{
super
.
removeEvents
();
}
}
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