Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
xiaoxiaole
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
xiaoxiaole
Commits
dfedb06a
Commit
dfedb06a
authored
Oct 11, 2019
by
邱旭
Browse files
Options
Browse Files
Download
Plain Diff
1
parents
7c3f0db5
0a4b334d
Changes
19
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
228 additions
and
36 deletions
+228
-36
index.html
egret/index.html
+4
-0
MainBase.ts
egret/libs/new_wx/MainBase.ts
+8
-4
sceneTypes.ts
egret/libs/new_wx/types/sceneTypes.ts
+1
-0
NetManager.ts
egret/libs/tw/manager/NetManager.ts
+31
-1
h5.tmproject
egret/resource/TextureMerger/h5.tmproject
+1
-0
main2.tmproject
egret/resource/TextureMerger/main2.tmproject
+1
-1
default.res.json
egret/resource/default.res.json
+4
-0
default.thm.json
egret/resource/default.thm.json
+1
-0
FriendSkin.exml
egret/resource/skins/FriendSkin.exml
+1
-1
H5Skin.exml
egret/resource/skins/H5Skin.exml
+4
-0
MapSkin.exml
egret/resource/skins/MapSkin.exml
+1
-1
H5Scene.ts
egret/src/H5Scene.ts
+13
-0
MapScene.ts
egret/src/mapScene/MapScene.ts
+42
-18
FriendItem2Renderer.ts
egret/src/panels/FriendItem2Renderer.ts
+6
-3
FriendPanel.ts
egret/src/panels/FriendPanel.ts
+24
-1
StartPanel.ts
egret/src/panels/StartPanel.ts
+11
-6
config.js
mock/config.js
+6
-0
levelNumRank.json
mock/happyclear/levelNumRank.json
+50
-0
userInfo.json
mock/happyclear/userInfo.json
+19
-0
No files found.
egret/index.html
View file @
dfedb06a
...
...
@@ -48,6 +48,7 @@
<script
src=
"libs/pad-zeropadding.js"
></script>
<img
id=
"pic"
style=
"width:100%;position: absolute;z-index: 999;display: none;"
/>
<script>
<<<<<<<
HEAD
/*
* 邀请有礼分享
*/
...
...
@@ -99,6 +100,9 @@
}
</script>
<script>
=======
// window.isInvitePage = 1;
>>>>>>>
0
a4b334dc0c6f0151f4a6f5714102d247466ff04
window
[
'signconfigs'
]
=
[
{
nums
:
'0.15元'
,
type
:
'quan15'
},
{
nums
:
'*1'
,
type
:
'hammer'
},
...
...
egret/libs/new_wx/MainBase.ts
View file @
dfedb06a
...
...
@@ -49,6 +49,7 @@ import FriendPanel from "../../src/panels/FriendPanel";
import
InviteRulePanel
from
"../../src/panels/InviteRulePanel"
;
import
InvitePrizePanel
from
"../../src/panels/InvitePrizePanel"
;
import
BagPanel
from
"../../src/panels/BagPanel"
;
import
H5Scene
from
"../../src/H5Scene"
;
export
default
class
MainBase
extends
eui
.
UILayer
{
constructor
()
{
...
...
@@ -94,6 +95,7 @@ export default class MainBase extends eui.UILayer {
];
const
scenes
=
[
[
ModuleTypes
.
INVITE_SCENE
,
{
cls
:
H5Scene
}],
[
ModuleTypes
.
START_SCENE
,
{
cls
:
StartScene
}],
[
ModuleTypes
.
MAP_SCENE
,
{
cls
:
MapScene
}],
[
ModuleTypes
.
PLAY_SCENE
,
{
cls
:
PlayScene
}],
...
...
@@ -259,8 +261,10 @@ export default class MainBase extends eui.UILayer {
}
}
this
.
createGameScene
();
if
(
window
[
'isInvitePage'
]
==
1
)
SceneCtrl
.
instance
.
change
(
ModuleTypes
.
INVITE_SCENE
);
else
this
.
createGameScene
();
}
private
svgaList
=
[];
private
async
loadResource
()
{
...
...
@@ -323,9 +327,9 @@ export default class MainBase extends eui.UILayer {
]);
MapScene
.
adData
=
DataManager
.
ins
.
getData
(
'hc_advert'
);
Buried
.
init
();
Buried
.
init
();
///////////
SceneCtrl
.
instance
.
change
(
ModuleTypes
.
START_SCENE
,
this
.
svgaList
);
NetManager
.
ins
.
getShareInfo
(()
=>
{
...
...
egret/libs/new_wx/types/sceneTypes.ts
View file @
dfedb06a
export
enum
ModuleTypes
{
INVITE_SCENE
,
START_SCENE
,
MAP_SCENE
,
PLAY_SCENE
,
...
...
egret/libs/tw/manager/NetManager.ts
View file @
dfedb06a
...
...
@@ -1269,7 +1269,7 @@ export class NetManager extends ABNetManager {
this
.
send
(
net
);
}
public
mapRank
(
callback
:
Function
):
void
{
public
hc_
mapRank
(
callback
:
Function
):
void
{
const
net
:
INetData
=
{
name
:
'mapRank'
,
uri
:
window
[
'duiba'
]
+
'/customActivity/happyclear/mapRank'
,
...
...
@@ -1283,6 +1283,36 @@ export class NetManager extends ABNetManager {
};
this
.
send
(
net
);
}
public
hc_levelNumRank
(
callback
:
Function
,
levelNum
):
void
{
const
net
:
INetData
=
{
name
:
'hc_levelNumRank'
,
uri
:
window
[
'duiba'
]
+
'/customActivity/happyclear/levelNumRank'
,
type
:
'post'
,
dataType
:
'json'
,
param
:
{
activityId
:
DataManager
.
ins
.
customCfgData
.
actId
,
levelNum
:
levelNum
},
hideMsg
:
true
,
callback
:
callback
};
this
.
send
(
net
);
}
public
hc_userInfo
(
callback
:
Function
):
void
{
const
net
:
INetData
=
{
name
:
'hc_userInfo'
,
uri
:
window
[
'duiba'
]
+
'/customActivity/happyclear/userInfo'
,
type
:
'post'
,
dataType
:
'json'
,
param
:
{
activityId
:
DataManager
.
ins
.
customCfgData
.
actId
},
hideMsg
:
true
,
callback
:
callback
};
this
.
send
(
net
);
}
public
hc_advert
(
callback
:
Function
):
void
{
const
net
:
INetData
=
{
...
...
egret/resource/TextureMerger/h5.tmproject
0 → 100644
View file @
dfedb06a
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"h5","version":5,"files":["../assets/shop/按钮 副本.png"]}
\ No newline at end of file
egret/resource/TextureMerger/main2.tmproject
View file @
dfedb06a
This diff is collapsed.
Click to expand it.
egret/resource/default.res.json
View file @
dfedb06a
...
...
@@ -95,6 +95,10 @@
{
"keys"
:
"bonusFra1_png,bonusFra10_png,bonusFra11_png,bonusFra12_png,bonusFra13_png,bonusFra14_png,bonusFra15_png,bonusFra16_png,bonusFra17_png,bonusFra18_png,bonusFra19_png,bonusFra2_png,bonusFra20_png,bonusFra21_png,bonusFra22_png,bonusFra23_png,bonusFra24_png,bonusFra25_png,bonusFra26_png,bonusFra27_png,bonusFra3_png,bonusFra4_png,bonusFra5_png,bonusFra6_png,bonusFra7_png,bonusFra8_png,bonusFra9_png,bonusShoot_png,bonusTime_png,boom1_png,boom10_png,boom11_png,boom12_png,boom13_png,boom14_png,boom15_png,boom16_png,boom17_png,boom18_png,boom2_png,boom3_png,boom4_png,boom5_png,boom6_png,boom7_png,boom8_png,boom9_png,boomBtn_png,chooseRect_png,dangqianfenshu_png,ele0_png,ele0Exp_png,ele0Line_png,ele1_png,ele1Exp_png,ele1Line_png,ele2_png,ele2Exp_png,ele2Line_png,ele3_png,ele3Exp_png,ele3Line_png,ele4_png,ele4Exp_png,ele4Line_png,ele5_png,ele6_png,ele7_png,ele8_png,eleDis1_png,eleDis10_png,eleDis11_png,eleDis12_png,eleDis13_png,eleDis14_png,eleDis15_png,eleDis16_png,eleDis17_png,eleDis18_png,eleDis19_png,eleDis2_png,eleDis3_png,eleDis4_png,eleDis5_png,eleDis6_png,eleDis7_png,eleDis8_png,eleDis9_png,exLighting1_png,exLighting11_png,exLighting14_png,exLighting16_png,exLighting18_png,exLighting19_png,exLighting21_png,exLighting23_png,exLighting25_png,exLighting27_png,exLighting29_png,exLighting3_png,exLighting32_png,exLighting34_png,exLighting5_png,exLighting7_png,exLighting9_png,guideBg_png,guideKnowBtn_png,guidePropBoom_png,guidePropCow_png,guidePropHammer_png,guidePropHand_png,guidePropMsgPanel_png,guidePropShoe_png,guideTxt1_png,guideTxt2_png,guideTxt3_png,guideTxt4_png,guideTxt5_png,hammerBtn_png,ice2_png,ice3_png,ice4_png,ice5_png,ice6_png,leftArrow_png,lightedStar_png,lineLight_png,lockDown_png,lockUp_png,lockVine_png,magicLion_png,magicLionBg_png,mainMusicBtnOff_png,mainMusicBtnOn_png,mainQuestionBtn_png,mainQuitBtn_png,mainSettingBg_png,mainSoundBtnOff_png,mainSoundBtnOn_png,main_mapbottom_png,playSceneBg_jpg,progressDown_png,propNum0_png,propNum1_png,propNum2_png,propNum3_png,propNum4_png,propNum5_png,propNum6_png,propNum7_png,propNum8_png,propNum9_png,propNumBg_png,rectLat_png,rightArrow_png,rightMark_png,rock2_png,rock3_png,rock4_png,rock5_png,rock6_png,scoreNumber0_png,scoreNumber1_png,scoreNumber2_png,scoreNumber3_png,scoreNumber4_png,scoreNumber5_png,scoreNumber6_png,scoreNumber7_png,scoreNumber8_png,scoreNumber9_png,setting_png,starProgress_png,stepAni1_png,stepAni10_png,stepAni11_png,stepAni2_png,stepAni3_png,stepAni4_png,stepAni5_png,stepAni6_png,stepAni7_png,stepAni8_png,stepAni9_png,stepBtn_png,stepNumber0_png,stepNumber1_png,stepNumber2_png,stepNumber3_png,stepNumber4_png,stepNumber5_png,stepNumber6_png,stepNumber7_png,stepNumber8_png,stepNumber9_png,stepsBoard_png,targetBoard_png,targetNumber0_png,targetNumber1_png,targetNumber2_png,targetNumber3_png,targetNumber4_png,targetNumber5_png,targetNumber6_png,targetNumber7_png,targetNumber8_png,targetNumber9_png,unlightedStar_png,yezi1_png"
,
"name"
:
"main2"
},
{
"keys"
:
"按钮 副本_png"
,
"name"
:
"h5"
}
],
"resources"
:
[
...
...
egret/resource/default.thm.json
View file @
dfedb06a
...
...
@@ -20,6 +20,7 @@
"resource/skins/FriendItem2Skin.exml"
,
"resource/skins/FriendItemSkin.exml"
,
"resource/skins/FriendSkin.exml"
,
"resource/skins/H5Skin.exml"
,
"resource/skins/IconButtonSkin.exml"
,
"resource/skins/InviteItemSkin.exml"
,
"resource/skins/InvitePrizePanelSkin.exml"
,
...
...
egret/resource/skins/FriendSkin.exml
View file @
dfedb06a
...
...
@@ -49,7 +49,7 @@
<e:Image
id=
"avatar0"
y=
"0"
source=
"testavatar_png"
width=
"60"
height=
"60"
x=
"0"
/>
<e:Rect
id=
"avatarMask0"
width=
"60"
height=
"60"
y=
"0"
ellipseWidth=
"60"
ellipseHeight=
"60"
/>
</e:Group>
<e:Label
id=
"n
ickNameTxt
"
text=
"nickname"
y=
"245"
textColor=
"0x784325"
horizontalCenter=
"6.5"
/>
<e:Label
id=
"n
ameTxt0
"
text=
"nickname"
y=
"245"
textColor=
"0x784325"
horizontalCenter=
"6.5"
/>
<e:Label
id=
"rankTxt"
text=
"73"
x=
"112"
y=
"311"
width=
"86"
textAlign=
"center"
verticalAlign=
"middle"
height=
"52"
size=
"48"
/>
<e:Label
id=
"nameTxt"
text=
"Label"
x=
"306"
y=
"307"
size=
"24"
/>
<e:Label
id=
"progress"
text=
"第15关"
x=
"306"
y=
"340.79"
size=
"24"
/>
...
...
egret/resource/skins/H5Skin.exml
0 → 100644
View file @
dfedb06a
<?xml version="1.0" encoding="utf-8"?>
<e:Skin
class=
"H5Skin"
width=
"750"
height=
"1206"
xmlns:e=
"http://ns.egret.com/eui"
>
<e:Label
text=
"这里是h5页面"
horizontalCenter=
"0"
verticalCenter=
"0"
textColor=
"0xa02c2c"
size=
"65"
/>
</e:Skin>
\ No newline at end of file
egret/resource/skins/MapSkin.exml
View file @
dfedb06a
...
...
@@ -96,7 +96,7 @@
</e:Button>
<e:Group
x=
"84.67"
y=
"0"
>
<e:Image
source=
"invite_txtbg_png"
x=
"0"
y=
"0"
touchEnabled=
"false"
/>
<e:Label
id=
"inviteTips"
text=
"待领取
"
horizontalCenter=
"0"
verticalCenter=
"0"
verticalAlign=
"middle"
textAlign=
"center"
textColor=
"0xffffff"
size=
"18
"
/>
<e:Label
id=
"inviteTips"
text=
"待领取
取"
horizontalCenter=
"0"
verticalCenter=
"0"
verticalAlign=
"middle"
textAlign=
"center"
textColor=
"0xffffff"
size=
"16
"
/>
</e:Group>
</e:Group>
<e:Group
x=
"30"
scaleX=
"1.4"
scaleY=
"1.4"
bottom=
"23"
>
...
...
egret/src/H5Scene.ts
0 → 100644
View file @
dfedb06a
import
Scene
from
"../libs/new_wx/components/Scene"
;
export
default
class
H5Scene
extends
Scene
{
async
start
(
data
?)
{
super
.
start
();
console
.
log
(
666
)
}
get
skinKey
()
{
return
'H5'
}
}
egret/src/mapScene/MapScene.ts
View file @
dfedb06a
...
...
@@ -34,7 +34,7 @@ export default class MapScene extends Scene {
async
start
(
data
?)
{
super
.
start
();
this
.
updateMyInfo
();
this
.
updateAdData
();
this
[
'avatar'
].
mask
=
this
[
'avatarMask'
];
...
...
@@ -55,7 +55,7 @@ export default class MapScene extends Scene {
const
oldTimerStr
=
localStorage
.
getItem
(
'nowTimerStr'
+
window
[
'CFG'
].
consumerId
);
if
(
!
readCache
()
&&
getHomeData
().
levels
.
length
<=
0
)
{
//引导
const
guide
=
new
GuideCon
(()
=>
{
const
guide
=
new
GuideCon
(()
=>
{
const
{
signInfoVO
}
=
DataManager
.
ins
.
getData
(
'getSignInfo'
);
if
(
signInfoVO
.
continueDay
>=
7
)
return
;
if
(
signInfoVO
.
todaySigned
==
0
&&
oldTimerStr
!=
nowTimerStr
)
{
...
...
@@ -76,7 +76,7 @@ export default class MapScene extends Scene {
}
}
},
window
[
'signActivityId'
]);
...
...
@@ -121,8 +121,8 @@ export default class MapScene extends Scene {
const
element
=
MapScene
.
iconHash
[
key
];
element
.
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
()
=>
{
if
(
(
levelOrder
>
(
homeData
.
levels
.
length
+
1
)
&&
levelOrder
>
1
)
||
(
levelOrder
>
window
[
'last_level'
])
(
levelOrder
>
(
homeData
.
levels
.
length
+
1
)
&&
levelOrder
>
1
)
||
(
levelOrder
>
window
[
'last_level'
])
)
{
// showToast('必须通关前面的关卡才能开启本关');
console
.
log
(
'必须通关前面的关卡才能开启本关'
);
...
...
@@ -185,14 +185,26 @@ export default class MapScene extends Scene {
}
}
updateAdData
(){
updateMyInfo
()
{
this
[
'avatar'
].
visible
=
false
;
this
[
'nameTxt'
].
text
=
''
;
NetManager
.
ins
.
hc_userInfo
(()
=>
{
this
[
'avatar'
].
visible
=
true
;
const
{
data
}
=
DataManager
.
ins
.
getData
(
'hc_userInfo'
);
this
[
'avatar'
].
source
=
data
.
avatar
;
this
[
'nameTxt'
].
text
=
getNick
(
data
.
nickname
);
});
}
updateAdData
()
{
// if(){
// this['adBtn'].visible=false;
// }
// this['adBtn'].source = '';
this
[
'adBtn'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
()
=>
{
this
[
'adBtn'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
()
=>
{
// window.location.href = '';
},
this
);
},
this
);
}
destroy
()
{
...
...
@@ -274,17 +286,17 @@ export default class MapScene extends Scene {
updateScene
()
{
this
.
updateHomeData
();
}
addAvatar
(
level
,
data
?)
{
addAvatar
(
level
,
data
?)
{
const
item
=
MapScene
.
starHash
[
level
];
const
parent
=
item
.
parent
;
const
avatar
=
new
AvatarComp
();
const
avatar
=
new
AvatarComp
();
avatar
.
loadSkin
();
avatar
.
start
(
data
);
parent
.
addChild
(
avatar
);
avatar
.
x
=
item
.
x
;
avatar
.
y
=
item
.
y
-
avatar
.
height
;
avatar
.
x
=
item
.
x
;
avatar
.
y
=
item
.
y
-
avatar
.
height
;
}
updateAvatars
(){
updateAvatars
()
{
// 4 70
this
.
addAvatar
(
4
);
this
.
addAvatar
(
70
);
...
...
@@ -343,9 +355,10 @@ export default class MapScene extends Scene {
}
this
[
'bloodTxt'
].
text
=
`
${
data
.
remainEnargy
}
`
;
}
onTap_taskBtn
(){
onTap_taskBtn
()
{
PanelCtrl
.
instance
.
show
(
'task'
);
}
<<<<<<<
HEAD
onTap_inviteBtn
(){
NetManager
.
ins
.
getInvateInfo
((
success
,
res
)
=>
{
if
(
!
success
||
!
res
.
data
){
...
...
@@ -353,17 +366,21 @@ export default class MapScene extends Scene {
}
PanelCtrl
.
instance
.
show
(
'invite'
,
res
.
data
);
});
=======
onTap_inviteBtn
()
{
PanelCtrl
.
instance
.
show
(
'invite'
);
>>>>>>>
0
a4b334dc0c6f0151f4a6f5714102d247466ff04
}
onTap_friendBtn
(){
onTap_friendBtn
()
{
PanelCtrl
.
instance
.
show
(
'friend'
);
}
onTap_adBtn
(){
onTap_adBtn
()
{
console
.
log
(
'onTap_adBtn'
)
}
onTap_signBtn
(){
onTap_signBtn
()
{
NetManager
.
ins
.
getSignInfo
(()
=>
{
PanelCtrl
.
instance
.
show
(
'sign'
);
},
window
[
'signActivityId'
])
},
window
[
'signActivityId'
])
}
protected
initEvents
()
{
...
...
@@ -546,3 +563,10 @@ export default class MapScene extends Scene {
get
skinKey
()
{
return
'Map'
}
}
export
const
getNick
=
(
nickname
)
=>
{
if
(
!
nickname
)
return
nickname
;
const
max
=
4
;
if
(
nickname
.
length
>
max
)
return
nickname
.
slice
(
0
,
max
)
+
'...'
;
return
nickname
;
}
\ No newline at end of file
egret/src/panels/FriendItem2Renderer.ts
View file @
dfedb06a
import
getSkinPath
from
"../../libs/new_wx/utils/getSkinPath"
;
import
{
getNick
}
from
"../mapScene/MapScene"
;
export
default
class
FriendItem2Renderer
extends
eui
.
ItemRenderer
{
constructor
()
{
...
...
@@ -8,7 +9,7 @@ export default class FriendItem2Renderer extends eui.ItemRenderer {
score
:
eui
.
Label
;
dataChanged
()
{
const
rank
=
this
.
data
;
const
{
rank
,
nickName
,
avatar
,
maxScore
}
=
this
.
data
;
this
[
'avatar'
].
mask
=
this
[
'avatarMask'
];
...
...
@@ -25,9 +26,11 @@ export default class FriendItem2Renderer extends eui.ItemRenderer {
this
[
'rankbg'
].
visible
=
true
;
}
this
[
'nameTxt'
].
text
=
this
.
data
+
'name'
;
this
[
'avatar'
].
source
=
avatar
this
[
'nameTxt'
].
text
=
getNick
(
nickName
);
this
.
score
.
textFlow
=
(
new
egret
.
HtmlTextParser
).
parser
(
`分数:<font color=0xff4501><b>
${
15
}
</b></font>分`
);
`分数:<font color=0xff4501><b>
${
maxScore
}
</b></font>分`
);
}
}
\ No newline at end of file
egret/src/panels/FriendPanel.ts
View file @
dfedb06a
import
Panel
from
"../../libs/new_wx/components/Panel"
;
import
FriendItemRenderer
from
"./FriendItemRenderer"
;
import
{
NetManager
}
from
"../../libs/tw/manager/NetManager"
;
import
{
DataManager
}
from
"../../libs/tw/manager/DataManager"
;
import
{
getNick
}
from
"../mapScene/MapScene"
;
export
default
class
FriendPanel
extends
Panel
{
public
list
:
eui
.
List
;
...
...
@@ -8,7 +11,10 @@ export default class FriendPanel extends Panel {
start
(
data
)
{
super
.
start
();
this
.
showlog
();
this
.
progress
.
textFlow
=
(
new
egret
.
HtmlTextParser
).
parser
(
this
.
updateMyInfo
();
this
.
progress
.
textFlow
=
(
new
egret
.
HtmlTextParser
).
parser
(
`第<font color=0xfff000><b>
${
15
}
</b></font>关`
);
this
.
score
.
textFlow
=
(
new
egret
.
HtmlTextParser
).
parser
(
`分数:<font color=0xfff000><b>
${
15
}
</b></font>分`
);
...
...
@@ -23,6 +29,23 @@ export default class FriendPanel extends Panel {
this
[
'btn'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTapInvite
,
this
);
}
private
updateMyInfo
()
{
this
[
'avatar'
].
visible
=
false
;
this
[
'avatar0'
].
visible
=
false
;
this
[
'nameTxt'
].
text
=
''
;
this
[
'nameTxt0'
].
text
=
''
;
NetManager
.
ins
.
hc_userInfo
(()
=>
{
this
[
'avatar'
].
visible
=
true
;
this
[
'avatar0'
].
visible
=
true
;
const
{
data
}
=
DataManager
.
ins
.
getData
(
'hc_userInfo'
);
this
[
'avatar'
].
source
=
this
[
'avatar0'
].
source
=
data
.
avatar
;
this
[
'nameTxt'
].
text
=
getNick
(
data
.
nickname
);
this
[
'nameTxt0'
].
text
=
getNick
(
data
.
nickname
);
});
}
showlog
()
{
// NetManager.ins.showLog(getlogItem(3));
// NetManager.ins.showLog(getlogItem(4));
...
...
egret/src/panels/StartPanel.ts
View file @
dfedb06a
...
...
@@ -18,6 +18,7 @@ import { ElementType } from "../something/enum/ElementType";
import
{
PassType
}
from
"../something/enum/PassType"
;
import
FriendItem2Renderer
from
"./FriendItem2Renderer"
;
import
TargetItemRenderer
from
"./TargetItemRenderer"
;
import
{
DataManager
}
from
"../../libs/tw/manager/DataManager"
;
export
default
class
StartPanel
extends
Panel
{
private
_level
;
...
...
@@ -25,14 +26,18 @@ export default class StartPanel extends Panel {
public
friendlist
:
eui
.
List
;
start
(
data
)
{
super
.
start
();
this
.
friendlist
.
useVirtualLayout
=
false
;
this
.
friendlist
.
itemRenderer
=
FriendItem2Renderer
;
const
friends
=
[
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
,
10
];
if
(
friends
.
length
>
5
)
friends
.
length
=
5
;
const
ac
=
new
eui
.
ArrayCollection
(
friends
);
this
.
friendlist
.
dataProvider
=
ac
;
this
.
friendlist
.
visible
=
false
;
NetManager
.
ins
.
hc_levelNumRank
(()
=>
{
this
.
friendlist
.
visible
=
true
;
const
{
data
:
friends
}
=
DataManager
.
ins
.
getData
(
'hc_levelNumRank'
);
if
(
friends
.
length
>
5
)
friends
.
length
=
5
;
const
ac
=
new
eui
.
ArrayCollection
(
friends
);
this
.
friendlist
.
dataProvider
=
ac
;
},
data
)
setGlow
(
this
[
'levelTxt'
],
0xfa4b09
,
1
);
this
[
'levelTxt'
].
text
=
`第
${
data
}
关`
;
...
...
mock/config.js
View file @
dfedb06a
const
path
=
require
(
'path'
);
const
config
=
{
'/customActivity/happyclear/userInfo'
:
{
data
:
'./happyclear/userInfo.json'
},
'/customActivity/happyclear/levelNumRank'
:
{
data
:
'./happyclear/levelNumRank.json'
},
'/customActivity/happyclear/mapRank'
:
{
data
:
'./happyclear/mapRank.json'
},
...
...
mock/happyclear/levelNumRank.json
0 → 100644
View file @
dfedb06a
{
"success"
:
true
,
"code"
:
null
,
"desc"
:
null
,
"timestamp"
:
1566199822308
,
"data"
:
[
{
"nickName"
:
"奈何本人没文化,一句卧槽行天下"
,
"avatar"
:
"http://yun.dui88.com/images/201604/c6s5l4dgea.jpg"
,
"stars"
:
1
,
"maxScore"
:
11
,
"rank"
:
"1"
},
{
"nickName"
:
"2奈何本人没文化,一句卧槽行天下"
,
"avatar"
:
"http://yun.dui88.com/images/201604/c6s5l4dgea.jpg"
,
"stars"
:
1
,
"maxScore"
:
22
,
"rank"
:
"2"
},
{
"nickName"
:
"3奈何本人没文化,一句卧槽行天下"
,
"avatar"
:
"http://yun.dui88.com/images/201604/c6s5l4dgea.jpg"
,
"stars"
:
1
,
"maxScore"
:
333
,
"rank"
:
"3"
},
{
"nickName"
:
"4奈何本人没文化,一句卧槽行天下"
,
"avatar"
:
"http://yun.dui88.com/images/201604/c6s5l4dgea.jpg"
,
"stars"
:
1
,
"maxScore"
:
44444
,
"rank"
:
"4"
},
{
"nickName"
:
"5奈何本人没文化,一句卧槽行天下"
,
"avatar"
:
"http://yun.dui88.com/images/201604/c6s5l4dgea.jpg"
,
"stars"
:
1
,
"maxScore"
:
123
,
"rank"
:
"5"
},
{
"nickName"
:
"6奈何本人没文化,一句卧槽行天下"
,
"avatar"
:
"http://yun.dui88.com/images/201604/c6s5l4dgea.jpg"
,
"stars"
:
1
,
"maxScore"
:
555555
,
"rank"
:
"6"
}
]
}
\ No newline at end of file
mock/happyclear/userInfo.json
0 → 100644
View file @
dfedb06a
{
"success"
:
true
,
"code"
:
"0000000000"
,
"desc"
:
"OK"
,
"timestamp"
:
1570785133074
,
"data"
:{
"id"
:
27
,
"consumerId"
:
1539361
,
"appId"
:
1
,
"partnerUserId"
:
"1"
,
"nickname"
:
"奈何本人没文化,一句卧槽行天下"
,
"avatar"
:
"http://yun.dui88.com/images/201604/c6s5l4dgea.jpg"
,
"email"
:
null
,
"sex"
:
null
,
"gmtCreate"
:
1447904240000
,
"gmtModified"
:
1564034789000
}
}
\ No newline at end of file
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