Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Y
yyh
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wildfirecode13
yyh
Commits
d584849b
Commit
d584849b
authored
Dec 07, 2019
by
wangzhujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
123
parent
4ede3aaf
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
67 additions
and
23 deletions
+67
-23
default.thm.json
egret/resource/default.thm.json
+2
-1
Main.ts
egret/src/Main.ts
+3
-1
RankPanel.ts
egret/src/rankPanel/RankPanel.ts
+13
-19
StartScene.ts
egret/src/startScene/StartScene.ts
+11
-1
sceneTypes.ts
egret/src/types/sceneTypes.ts
+1
-0
PKScorePanel.ts
egret/src/yazuwei/PKScorePanel.ts
+12
-0
homeBaseInfo.json
mock/yzw/homeBaseInfo.json
+25
-1
No files found.
egret/resource/default.thm.json
View file @
d584849b
...
...
@@ -30,7 +30,8 @@
"resource/skins/PKSkin.exml"
,
"resource/skins/HeadItemSkin.exml"
,
"resource/skins/PKRuleSkin.exml"
,
"resource/skins/PKPrizeSkin.exml"
"resource/skins/PKPrizeSkin.exml"
,
"resource/skins/PKScoreSkin.exml"
],
"path"
:
"resource/default.thm.json"
...
...
egret/src/Main.ts
View file @
d584849b
...
...
@@ -35,6 +35,7 @@ import NoCreditsPanel from './yazuwei/NoCreditsPanel';
import
PKScene
from
'./yazuwei/PKScene'
;
import
PKRulePanel
from
'./yazuwei/PKRulePanel'
;
import
PKPrizePanel
from
'./yazuwei/PKPrizePanel'
;
import
PKScorePanel
from
'./yazuwei/PKScorePanel'
;
class
Main
extends
MainBase
{
...
...
@@ -67,7 +68,8 @@ class Main extends MainBase {
PanelCtrl
.
instance
.
registerClass
(
ModuleTypes
.
PLACE_PANEL
,
PlacePanel
)
PanelCtrl
.
instance
.
registerClass
(
ModuleTypes
.
NOCREDITS_PANEL
,
NoCreditsPanel
)
PanelCtrl
.
instance
.
registerClass
(
ModuleTypes
.
PKRULE_PANEL
,
PKRulePanel
);
PanelCtrl
.
instance
.
registerClass
(
ModuleTypes
.
PKPRIZE_PANEL
,
PKPrizePanel
)
PanelCtrl
.
instance
.
registerClass
(
ModuleTypes
.
PKPRIZE_PANEL
,
PKPrizePanel
);
PanelCtrl
.
instance
.
registerClass
(
ModuleTypes
.
PKSCORE_PANEL
,
PKScorePanel
);
// NetManager.ins.onNotSuccess = (msg) => {
// showAlertPanel(msg)
...
...
egret/src/rankPanel/RankPanel.ts
View file @
d584849b
import
Panel
from
"../views/Panel"
;
import
Waiting
from
"../waiting/Waiting"
;
import
NetConst
from
"../NetConst"
;
import
NetConst
,
{
yzwNet
}
from
"../NetConst"
;
import
SceneCtrl
from
"../ctrls/sceneCtrl"
;
import
{
ModuleTypes
}
from
"../types/sceneTypes"
;
import
{
DataManager
}
from
"../../libs/tw/manager/DataManager"
;
import
submitAfterDostart
from
"../../libs/new_tw/ctrls/submitAfterDostart"
;
import
ToastCtrl
from
"../ctrls/toastCtrl"
;
export
default
class
RankPanel
extends
Panel
{
protected
get
skinKey
()
{
return
'Rank'
}
public
rankList
:
eui
.
Scroller
;
public
rankGroup
:
eui
.
Group
;
public
closeBtn
:
eui
.
Button
;
public
myrank
:
eui
.
Label
;
public
myscore
:
eui
.
Label
;
public
mycake
:
eui
.
Label
;
public
myrank
:
eui
.
Component
;
constructor
(){
super
();
...
...
@@ -28,11 +27,16 @@ export default class RankPanel extends Panel{
onTap_closeBtn
(
e
)
{
Waiting
.
instance
.
show
();
NetConst
.
ajaxElement
((
s
)
=>
{
yzwNet
.
homeBaseInfo
((
s
)
=>
{
if
(
!
s
){
ToastCtrl
.
instance
.
show
(
"网络异常请重试~"
);
return
;
}
Waiting
.
instance
.
hide
();
this
.
hidePanel
();
// SceneCtrl.instance.change(ModuleTypes.START_SCENE);
})
let
data
=
DataManager
.
ins
.
getData
(
"homeBaseInfo"
).
data
;
this
.
hidePanel
()
SceneCtrl
.
instance
.
change
(
ModuleTypes
.
START_SCENE
,
data
);
},
window
[
'projectId'
])
}
showPanel
(){
if
(
DataManager
.
ins
.
getData
(
'recentRankList'
).
data
){
...
...
@@ -122,17 +126,7 @@ export default class RankPanel extends Panel{
}
if
(
DataManager
.
ins
.
getData
(
'recentRankList'
).
data
.
currentRankList
.
currentUserRankInfo
){
if
(
DataManager
.
ins
.
getData
(
'recentRankList'
).
data
.
currentRankList
.
currentUserRankInfo
.
rank
<=
5000
){
this
.
myrank
.
size
=
36
this
.
myrank
.
text
=
DataManager
.
ins
.
getData
(
'recentRankList'
).
data
.
currentRankList
.
currentUserRankInfo
.
rank
;
}
else
{
this
.
myrank
.
size
=
24
;
this
.
myrank
.
text
=
"暂未上榜"
;
}
this
.
mycake
.
text
=
DataManager
.
ins
.
getData
(
'recentRankList'
).
data
.
currentRankList
.
currentUserRankInfo
.
maxScore
;
}
}
}
...
...
egret/src/startScene/StartScene.ts
View file @
d584849b
...
...
@@ -91,7 +91,17 @@ export default class StartScene extends Scene {
}
}
//显示PK结果弹窗
if
(
data
.
pkResult
){
let
now
=
new
Date
();
let
year
=
now
.
getFullYear
();
let
mon
=
now
.
getMonth
()
+
1
;
let
day
=
now
.
getDate
();
if
(
!
GCache
.
readCache
((
year
+
"/"
+
mon
+
"/"
+
day
))){
GCache
.
writeCache
((
year
+
"/"
+
mon
+
"/"
+
day
),
true
)
PanelCtrl
.
instance
.
show
(
ModuleTypes
.
PKSCORE_PANEL
,
this
.
startdata
);
}
}
}
noCredits
(){
...
...
egret/src/types/sceneTypes.ts
View file @
d584849b
...
...
@@ -35,6 +35,7 @@ export enum ModuleTypes {
PK_SCENE
,
PKRULE_PANEL
,
PKPRIZE_PANEL
,
PKSCORE_PANEL
,
...
...
egret/src/yazuwei/PKScorePanel.ts
0 → 100644
View file @
d584849b
import
Panel
from
"../views/Panel"
;
export
default
class
PKScorePanel
extends
Panel
{
protected
get
skinKey
(){
return
'PKScore'
}
constructor
(
data
){
super
();
this
.
initUI
(
data
);
}
initUI
(
data
){
}
}
\ No newline at end of file
mock/yzw/homeBaseInfo.json
View file @
d584849b
...
...
@@ -4,7 +4,31 @@
"currentLevel"
:
5
,
"treasureBoxNum"
:
1
,
"currentScore"
:
1
,
"pkResult"
:
"后续补上"
,
"pkResult"
:{
"myTeamSteps"
:
100
,
"enemyTeamSteps"
:
2000
,
"pkResult"
:
1
,
"myTeamMembers"
:[
{
"steps"
:
122
,
"phone"
:
182677888
,
"score"
:
10
,
"myFlag"
:
0
},
{
"steps"
:
122
,
"phone"
:
182677888
,
"score"
:
10
,
"myFlag"
:
1
},
{
"steps"
:
122
,
"phone"
:
182677888
,
"score"
:
10
,
"myFlag"
:
1
}
]
},
"nextLevelScore"
:
11111
,
"activityJoinNum"
:
1
},
...
...
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