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
1ba45eac
Commit
1ba45eac
authored
Aug 03, 2021
by
wildfirecode13
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
bb129785
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
4674 additions
and
25 deletions
+4674
-25
canshare.do.json
project/mock/webNet/game/canshare.do.json
+0
-0
index.do.json
project/mock/webNet/game/index.do.json
+2
-9
package.json
project/package.json
+3
-2
Main.ts
project/src/Main.ts
+2
-1
WebNet.ts
project/src/WebNet.ts
+5
-4
IndexScene.ts
project/src/template/IndexScene.ts
+23
-9
yarn.lock
project/yarn.lock
+4639
-0
No files found.
project/mock/webNet/game/
isNewbi
e.do.json
→
project/mock/webNet/game/
canshar
e.do.json
View file @
1ba45eac
File moved
project/mock/webNet/game/index.do.json
View file @
1ba45eac
...
@@ -3,14 +3,7 @@
...
@@ -3,14 +3,7 @@
"message"
:
""
,
"message"
:
""
,
"code"
:
""
,
"code"
:
""
,
"data"
:
{
"data"
:
{
"ruleIdList"
:
[
"shareCode"
:
"123"
,
"ru_1"
,
"isNewbie"
:
true
"ru_2"
,
"ru_3"
,
"ru_4"
],
"drawStatus"
:
12
,
"prizeId"
:
"aa"
,
"gameCounts"
:
1
}
}
}
}
\ No newline at end of file
project/package.json
View file @
1ba45eac
...
@@ -12,16 +12,17 @@
...
@@ -12,16 +12,17 @@
"mock-webpack-plugin"
:
"^2.0.0"
,
"mock-webpack-plugin"
:
"^2.0.0"
,
"path"
:
"^0.12.7"
,
"path"
:
"^0.12.7"
,
"progress"
:
"^2.0.0"
,
"progress"
:
"^2.0.0"
,
"readline"
:
"^1.3.0"
,
"ts-loader"
:
"^4.0.0"
,
"ts-loader"
:
"^4.0.0"
,
"tslint"
:
"^5.9.1"
,
"tslint"
:
"^5.9.1"
,
"typescript"
:
"^3.5.1"
,
"typescript"
:
"^3.5.1"
,
"webpack"
:
"^4.1.0"
,
"webpack"
:
"^4.1.0"
,
"webpack-cli"
:
"^3.1.1"
,
"webpack-cli"
:
"^3.1.1"
,
"webpack-dev-server"
:
"^3.1.0"
,
"webpack-dev-server"
:
"^3.1.0"
,
"webpack-merge"
:
"^4.1.2"
,
"webpack-merge"
:
"^4.1.2"
"readline"
:
"^1.3.0"
},
},
"dependencies"
:
{
"dependencies"
:
{
"@spark/utils"
:
"^2.0.46"
,
"duiba-utils"
:
"^1.0.9"
"duiba-utils"
:
"^1.0.9"
},
},
"scripts"
:
{
"scripts"
:
{
...
...
project/src/Main.ts
View file @
1ba45eac
...
@@ -10,6 +10,7 @@ import { LoadingScene } from "./template/LoadingScene";
...
@@ -10,6 +10,7 @@ import { LoadingScene } from "./template/LoadingScene";
import
{
destroyWebNetData
}
from
"./WebNet"
;
import
{
destroyWebNetData
}
from
"./WebNet"
;
import
{
StartScene
}
from
"./template/StartScene"
;
import
{
StartScene
}
from
"./template/StartScene"
;
import
{
NewbieScene
}
from
"./template/NewbieScene"
;
import
{
NewbieScene
}
from
"./template/NewbieScene"
;
import
{
IndexScene
}
from
"./template/IndexScene"
;
/**
/**
...
@@ -62,7 +63,7 @@ export class Main {
...
@@ -62,7 +63,7 @@ export class Main {
//h5环境时,隐藏加载中
//h5环境时,隐藏加载中
if
(
FYGE
.
getEnv
()
==
"web"
&&
document
.
getElementById
(
"__loading__"
))
document
.
getElementById
(
"__loading__"
).
style
.
display
=
"none"
;
if
(
FYGE
.
getEnv
()
==
"web"
&&
document
.
getElementById
(
"__loading__"
))
document
.
getElementById
(
"__loading__"
).
style
.
display
=
"none"
;
//显示场景
//显示场景
changeScene
(
Newbie
Scene
)
changeScene
(
Index
Scene
)
}
}
/**
/**
...
...
project/src/WebNet.ts
View file @
1ba45eac
...
@@ -19,6 +19,10 @@ export enum WebNetName {
...
@@ -19,6 +19,10 @@ export enum WebNetName {
* 首页
* 首页
*/
*/
index
=
"/projectx/{projectId}/game/index.do"
,
index
=
"/projectx/{projectId}/game/index.do"
,
/**
* 是否可分享
*/
canshare
=
"/projectx/{projectId}/game/canshare.do"
,
/**
/**
* 参与
* 参与
*/
*/
...
@@ -27,10 +31,7 @@ export enum WebNetName {
...
@@ -27,10 +31,7 @@ export enum WebNetName {
* 获取结果
* 获取结果
*/
*/
queryResult
=
"/projectx/{projectId}/game/queryResult.do"
,
queryResult
=
"/projectx/{projectId}/game/queryResult.do"
,
/**
* is newbie?
*/
isNewbie
=
"/projectx/{projectId}/isNewbie.do"
,
/**
/**
* 获取规则
* 获取规则
*/
*/
...
...
project/src/template/IndexScene.ts
View file @
1ba45eac
import
{
showPanel
}
from
"../../module/ctrls"
;
import
{
unwatchPageVisibility
,
watchPageVisibility
}
from
'@spark/utils'
;
import
{
changeScene
,
showPanel
}
from
"../../module/ctrls"
;
import
{
Scene
}
from
"../../module/views/Scene"
;
import
{
Scene
}
from
"../../module/views/Scene"
;
import
getObject
from
"../getObject"
;
import
{
PrizePanel
}
from
"../panels/prize"
;
import
{
PrizePanel
}
from
"../panels/prize"
;
import
{
sendWebNet
,
WebNetName
}
from
'../WebNet'
;
import
{
NewbieScene
}
from
'./NewbieScene'
;
export
class
IndexScene
extends
Scene
{
export
class
IndexScene
extends
Scene
{
get
groupNames
()
{
return
[
"index"
]
}
get
groupNames
()
{
return
[
"index"
]
}
get
skinName
()
{
return
"index"
}
get
skinName
()
{
return
"index"
}
initUi
()
{
initUi
()
{
super
.
initUi
();
super
.
initUi
();
}
}
...
@@ -16,17 +16,31 @@ export class IndexScene extends Scene {
...
@@ -16,17 +16,31 @@ export class IndexScene extends Scene {
console
.
log
(
this
);
console
.
log
(
this
);
this
.
addEventListener
(
FYGE
.
MouseEvent
.
CLICK
,()
=>
{
// setTimeout(() => {
showPanel
(
PrizePanel
);
// changeScene(NewbieScene)
},
this
);
// }, 1000);
}
async
onPageVisibilityChange
(
visible
)
{
console
.
log
(
'页面'
+
visible
?
'可见'
:
'不可见'
);
if
(
visible
)
{
var
res
=
await
sendWebNet
(
WebNetName
.
index
)
if
(
res
&&
res
.
success
&&
res
.
data
)
{
// showPanel(PrizePanel);
}
else
{
// showPanel(PrizePanel);
}
}
}
}
initEvents
()
{
initEvents
()
{
super
.
initEvents
();
super
.
initEvents
();
watchPageVisibility
(
this
.
onPageVisibilityChange
)
}
}
removeEvents
()
{
removeEvents
()
{
super
.
removeEvents
();
super
.
removeEvents
();
unwatchPageVisibility
(
this
.
onPageVisibilityChange
)
}
}
}
}
project/yarn.lock
0 → 100644
View file @
1ba45eac
This source diff could not be displayed because it is too large. You can
view the blob
instead.
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