|
- -- 战绩界面
- local ClubZhanJiTongJiView = class("ClubZhanJiTongJiView", require("core.luaScript.Views.Club.ClubZhanJiTongJiView"))
-
-
- function ClubZhanJiTongJiView:ctor(list)
- ClubZhanJiTongJiView.super.ctor(self,list)
- end
-
- function ClubZhanJiTongJiView:onEnter()
- ClubZhanJiTongJiView.super.onEnter(self)
- end
-
- --战绩统计查询成功
- function ClubZhanJiTongJiView:updateList()
- local uiScrollView = self.ui.Items.ScrollView--self.ui.Items.ScrollView_TongJi
- uiScrollView:getInnerContainer():setAutoSize(true)
- uiScrollView:removeAllChildren();
-
- --战绩统计内容
- local uiTemplate = self.ui.Items.Layout_tongji_content;
- for k, tongjiInfo in pairsByKeysEx(self.list) do
- local uiItem = uiTemplate:getCopied()
- uiItem.Items = getUIItems(uiItem)
-
- --名字
- --local gameName = getSubGameName(tongjiInfo.game_id) or ("未知游戏"..tongjiInfo.game_id)
- local gameName = getSubGameRuleName(tongjiInfo.game_id, tongjiInfo.gamerule) or getSubGameName(tongjiInfo.game_id) or ("未知游戏"..tongjiInfo.game_id)
- uiItem.Items.Text_data:setText(gameName)
-
- --开房成局
- uiItem.Items.Text_chengju_count:setText(tonumber(tongjiInfo.openhouse_count))
-
- --扣卡局
- uiItem.Items.Text_kouka_count:setText(tonumber(tongjiInfo.owner_openhouse_count or 0))
-
- --未扣卡局
- uiItem.Items.Text_weikouka_count:setText(tonumber(tongjiInfo.owner_unconsume_count or 0))
-
- --馆主消耗
- uiItem.Items.Text_xiaohao_count:setText(tonumber(tongjiInfo.owner_card_consume_count))
-
- --馆主专属房卡/房卡消耗
- uiItem.Items.Text_zhuanshu_xiaohao:setText(tonumber(tongjiInfo.owner_props_card_count))
-
- uiScrollView:addChild(uiItem)
- end
-
- uiScrollView:jumpToTopOnSizeChanged()
- end
-
- return ClubZhanJiTongJiView
|