Commit a85f2a68 authored by wildfirecode's avatar wildfirecode

1

parent 552e2862
...@@ -32,22 +32,24 @@ export default class StartPanel extends Panel { ...@@ -32,22 +32,24 @@ export default class StartPanel extends Panel {
this['empty'].visible = false; this['empty'].visible = false;
NetManager.ins.hc_levelNumRank(() => { NetManager.ins.hc_levelNumRank(() => {
let { data: friends } = DataManager.ins.getData('hc_levelNumRank'); let friends = DataManager.ins.getData('hc_levelNumRank').data;
if (friends == null)
friends = { rank: [] };
friends = friends.rank; friends = friends.rank;
if(friends && friends.length > 0 ) { if (friends && friends.length > 0) {
this.friendlist.visible = true; this.friendlist.visible = true;
if (friends.length > 5) if (friends.length > 5)
friends.length = 5; friends.length = 5;
friends.forEach((ele,index) => { friends.forEach((ele, index) => {
ele.rank = index + 1; ele.rank = index + 1;
}); });
const ac = new eui.ArrayCollection(friends); const ac = new eui.ArrayCollection(friends);
this.friendlist.dataProvider = ac; this.friendlist.dataProvider = ac;
} }
else { else {
this['empty'].visible = true; this['empty'].visible = true;
} }
}, data) }, data)
setGlow(this['levelTxt'], 0xfa4b09, 1); setGlow(this['levelTxt'], 0xfa4b09, 1);
......
{
"success": true,
"code": "0000000000",
"desc": "OK",
"timestamp": 1571044339755,
"data": {
"levelNum": 1,
"rank": [
{
"nickName": "https://wx.qlogo.cn/mmopen/vi_32/5icsJibet91SjpqD2GygMAA5twUoqVTiaOqS3NQNia0Jbuia2fZxlh03AIyiaaVTRRKOxo1Ym17icjBBkiaMhicv3zhXgRQ/132",
"avatar": "https://wx.qlogo.cn/mmopen/vi_32/5icsJibet91SjpqD2GygMAA5twUoqVTiaOqS3NQNia0Jbuia2fZxlh03AIyiaaVTRRKOxo1Ym17icjBBkiaMhicv3zhXgRQ/132",
"stars": 3,
"maxScore": 31940,
"rank": null,
"levelNum": null,
"consumerId": null
}
,
{
"nickName": "https://wx.qlogo.cn/mmopen/vi_32/5icsJibet91SjpqD2GygMAA5twUoqVTiaOqS3NQNia0Jbuia2fZxlh03AIyiaaVTRRKOxo1Ym17icjBBkiaMhicv3zhXgRQ/132",
"avatar": "https://wx.qlogo.cn/mmopen/vi_32/5icsJibet91SjpqD2GygMAA5twUoqVTiaOqS3NQNia0Jbuia2fZxlh03AIyiaaVTRRKOxo1Ym17icjBBkiaMhicv3zhXgRQ/132",
"stars": 3,
"maxScore": 31940,
"rank": null,
"levelNum": null,
"consumerId": null
}
]
}
}
\ No newline at end of file
{ {"success":true,"code":"0000000000","desc":"OK","timestamp":1571045294822,"data":null}
"success": true, \ No newline at end of file
"code": "0000000000",
"desc": "OK",
"timestamp": 1571044339755,
"data": {
"levelNum": 1,
"rank": [
{
"nickName": "https://wx.qlogo.cn/mmopen/vi_32/5icsJibet91SjpqD2GygMAA5twUoqVTiaOqS3NQNia0Jbuia2fZxlh03AIyiaaVTRRKOxo1Ym17icjBBkiaMhicv3zhXgRQ/132",
"avatar": "https://wx.qlogo.cn/mmopen/vi_32/5icsJibet91SjpqD2GygMAA5twUoqVTiaOqS3NQNia0Jbuia2fZxlh03AIyiaaVTRRKOxo1Ym17icjBBkiaMhicv3zhXgRQ/132",
"stars": 3,
"maxScore": 31940,
"rank": null,
"levelNum": null,
"consumerId": null
}
,
{
"nickName": "https://wx.qlogo.cn/mmopen/vi_32/5icsJibet91SjpqD2GygMAA5twUoqVTiaOqS3NQNia0Jbuia2fZxlh03AIyiaaVTRRKOxo1Ym17icjBBkiaMhicv3zhXgRQ/132",
"avatar": "https://wx.qlogo.cn/mmopen/vi_32/5icsJibet91SjpqD2GygMAA5twUoqVTiaOqS3NQNia0Jbuia2fZxlh03AIyiaaVTRRKOxo1Ym17icjBBkiaMhicv3zhXgRQ/132",
"stars": 3,
"maxScore": 31940,
"rank": null,
"levelNum": null,
"consumerId": null
}
]
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment