Commit 354ae77c authored by wildfirecode's avatar wildfirecode

1

parent 6c421aec
...@@ -23,20 +23,20 @@ export default class FriendPanel extends Panel { ...@@ -23,20 +23,20 @@ export default class FriendPanel extends Panel {
this['empty'].visible = false; this['empty'].visible = false;
NetManager.ins.hc_totalNumRank(() => { NetManager.ins.hc_totalNumRank(() => {
const { data: hc_totalNumRank } = DataManager.ins.getData('hc_totalNumRank'); const { data: hc_totalNumRank } = DataManager.ins.getData('hc_totalNumRank');
const { list, user } = hc_totalNumRank; const { rank, userRank } = hc_totalNumRank;
if (user) { if (userRank) {
this.progress.textFlow = (new egret.HtmlTextParser).parser( this.progress.textFlow = (new egret.HtmlTextParser).parser(
`第<font color=0xfff000><b>${user.levelNum}</b></font>关`); `第<font color=0xfff000><b>${userRank.levelNum}</b></font>关`);
this.score.textFlow = (new egret.HtmlTextParser).parser( this.score.textFlow = (new egret.HtmlTextParser).parser(
`<font color=0xfff000><b>${user.maxScore}</b></font>分`); `<font color=0xfff000><b>${userRank.maxScore}</b></font>分`);
this['rankTxt'].text = user.rank this['rankTxt'].text = userRank.rank
this['star'].text = `X${user.stars}` this['star'].text = `X${userRank.stars}`
} }
if (list && list.length > 0) { if (rank && rank.length > 0) {
this.list.visible = true; this.list.visible = true;
this['empty'].visible = false; this['empty'].visible = false;
const ac = new eui.ArrayCollection(list); const ac = new eui.ArrayCollection(rank);
this.list.dataProvider = ac; this.list.dataProvider = ac;
} else { } else {
this.list.visible = false; this.list.visible = false;
......
{
"success": true,
"code": null,
"desc": null,
"timestamp": 1566199822308,
"data": {
"user": {
"levelNum": 555,
"nickName": "奈何本人没文化,一句卧槽行天下",
"avatar": "http://yun.dui88.com/images/201604/c6s5l4dgea.jpg",
"stars": 666,
"maxScore": 1234567,
"rank": 123
},
"list":[
{
"levelNum": 11,
"nickName": "1奈何本人没文化,一句卧槽行天下",
"avatar": "http://yun.dui88.com/images/201604/c6s5l4dgea.jpg",
"stars": 11,
"maxScore": 111111,
"rank": 1
},
{
"levelNum": 22,
"nickName": "2奈何本人没文化,一句卧槽行天下",
"avatar": "http://yun.dui88.com/images/201604/c6s5l4dgea.jpg",
"stars": 22,
"maxScore": 222222,
"rank": 2
},
{
"levelNum": 33,
"nickName": "3奈何本人没文化,一句卧槽行天下",
"avatar": "http://yun.dui88.com/images/201604/c6s5l4dgea.jpg",
"stars": 33,
"maxScore": 33333,
"rank": 3
},
{
"levelNum": 44,
"nickName": "3奈何本人没文化,一句卧槽行天下",
"avatar": "http://yun.dui88.com/images/201604/c6s5l4dgea.jpg",
"stars": 44,
"maxScore": 4444444,
"rank": 4
},
{
"levelNum": 55,
"nickName": "3奈何本人没文化,一句卧槽行天下",
"avatar": "http://yun.dui88.com/images/201604/c6s5l4dgea.jpg",
"stars": 55,
"maxScore": 1234567,
"rank": 5
},
{
"levelNum": 55,
"nickName": "3奈何本人没文化,一句卧槽行天下",
"avatar": "http://yun.dui88.com/images/201604/c6s5l4dgea.jpg",
"stars": 55,
"maxScore": 1234567,
"rank": 5
},
{
"levelNum": 9999,
"nickName": "99奈何本人没文化,一句卧槽行天下",
"avatar": "http://yun.dui88.com/images/201604/c6s5l4dgea.jpg",
"stars": 55,
"maxScore": 1234567,
"rank": 999
}
]
}
}
\ No newline at end of file
{ {
"success": true, "success": true,
"code": null, "code": "0000000000",
"desc": null, "desc": "OK",
"timestamp": 1566199822308, "timestamp": 1571043800755,
"data": { "data": {
"user": { "userRank": {
"levelNum": 555, "nickName": "https://wx.qlogo.cn/mmopen/vi_32/5icsJibet91SjpqD2GygMAA5twUoqVTiaOqS3NQNia0Jbuia2fZxlh03AIyiaaVTRRKOxo1Ym17icjBBkiaMhicv3zhXgRQ/132",
"nickName": "奈何本人没文化,一句卧槽行天下", "avatar": "https://wx.qlogo.cn/mmopen/vi_32/5icsJibet91SjpqD2GygMAA5twUoqVTiaOqS3NQNia0Jbuia2fZxlh03AIyiaaVTRRKOxo1Ym17icjBBkiaMhicv3zhXgRQ/132",
"avatar": "http://yun.dui88.com/images/201604/c6s5l4dgea.jpg", "stars": 83,
"stars": 666, "maxScore": 7220,
"maxScore": 1234567, "rank": 1,
"rank": 123 "levelNum": 32,
"consumerId": 1539361
}, },
"list":[ "rank": [
{ {
"levelNum": 11, "nickName": "https://wx.qlogo.cn/mmopen/vi_32/5icsJibet91SjpqD2GygMAA5twUoqVTiaOqS3NQNia0Jbuia2fZxlh03AIyiaaVTRRKOxo1Ym17icjBBkiaMhicv3zhXgRQ/132",
"nickName": "1奈何本人没文化,一句卧槽行天下", "avatar": "https://wx.qlogo.cn/mmopen/vi_32/5icsJibet91SjpqD2GygMAA5twUoqVTiaOqS3NQNia0Jbuia2fZxlh03AIyiaaVTRRKOxo1Ym17icjBBkiaMhicv3zhXgRQ/132",
"avatar": "http://yun.dui88.com/images/201604/c6s5l4dgea.jpg", "stars": 83,
"stars": 11, "maxScore": 7220,
"maxScore": 111111, "rank": 1,
"rank": 1 "levelNum": 32,
}, "consumerId": 1539361
{
"levelNum": 22,
"nickName": "2奈何本人没文化,一句卧槽行天下",
"avatar": "http://yun.dui88.com/images/201604/c6s5l4dgea.jpg",
"stars": 22,
"maxScore": 222222,
"rank": 2
},
{
"levelNum": 33,
"nickName": "3奈何本人没文化,一句卧槽行天下",
"avatar": "http://yun.dui88.com/images/201604/c6s5l4dgea.jpg",
"stars": 33,
"maxScore": 33333,
"rank": 3
},
{
"levelNum": 44,
"nickName": "3奈何本人没文化,一句卧槽行天下",
"avatar": "http://yun.dui88.com/images/201604/c6s5l4dgea.jpg",
"stars": 44,
"maxScore": 4444444,
"rank": 4
},
{
"levelNum": 55,
"nickName": "3奈何本人没文化,一句卧槽行天下",
"avatar": "http://yun.dui88.com/images/201604/c6s5l4dgea.jpg",
"stars": 55,
"maxScore": 1234567,
"rank": 5
},
{
"levelNum": 55,
"nickName": "3奈何本人没文化,一句卧槽行天下",
"avatar": "http://yun.dui88.com/images/201604/c6s5l4dgea.jpg",
"stars": 55,
"maxScore": 1234567,
"rank": 5
},
{
"levelNum": 9999,
"nickName": "99奈何本人没文化,一句卧槽行天下",
"avatar": "http://yun.dui88.com/images/201604/c6s5l4dgea.jpg",
"stars": 55,
"maxScore": 1234567,
"rank": 999
} }
] ]
} }
......
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