-- 战绩界面 local ClubZhanJiView = class("ClubZhanJiView", require("core.luaScript.Views.Club.ClubZhanJiView")) local ClubDefine = require("luaScript.Protocol.Club.ClubDefine") function ClubZhanJiView:ctor(...) ClubZhanJiView.super.ctor(self,...) end --显示战绩总消耗 function ClubZhanJiView:onShowConsume(event) if not event then return; end local roomNum = event.roomNum or 0; --成局数 local cardCost = event.cardCost or 0; --房卡消耗 local activityCardCost = event.activityCardCost or 0; --活动房卡消耗 local costCardCount = event.costCardCount or 0;--扣卡局数 local notcostCardCount = event.notCostCardCount or 0--未扣卡局数 --总共局数 self.ui.Items.Text_jushu_count:setText(roomNum.."场"); --扣卡局数 self.ui.Items.Text_jushu_kouka:setText(string.format("%d场", costCardCount or 0)); --未扣卡局数 self.ui.Items.Text_jushu_weikoukaju:setText(string.format("%d场", notcostCardCount or 0)); --消耗总房卡 self.ui.Items.Text_fangka_count:setText(cardCost.."张"); --活动房卡消耗 if event.activityCardCost and event.activityCardCost > 0 then self.ui.Items.Text_font_huodong_fangka:setVisible(true) self.ui.Items.Text_huodong_fangka_count:setText(activityCardCost.."张"); else self.ui.Items.Text_font_huodong_fangka:setVisible(false) end end function ClubZhanJiView:updateTongJiItem(uiItem,tongjiInfo) --日期 uiItem.Items.Text_data:setText(string.format("%s",tongjiInfo.create_date)) --开房成局 uiItem.Items.Text_chengju_count:setText(tonumber(tongjiInfo.openhouse_count)) --扣卡局 uiItem.Items.Text_kouka_count:setText(tonumber(tongjiInfo.cost_card_count)) --未扣卡局 uiItem.Items.Text_weikouka_count:setText(tonumber(tongjiInfo.not_cost_card_count)) --大家赢 uiItem.Items.Text_win_count:setText(tonumber(tongjiInfo.play_win_number)) --馆主消耗 uiItem.Items.Text_xiaohao_count:setText(tonumber(tongjiInfo.owner_card_consume_count)) --馆主专属房卡/房卡消耗 uiItem.Items.Text_zhuanshu_xiaohao:setText(tonumber(tongjiInfo.owner_props_card_count)) uiItem.Items.Button_XianQiang:registerClick(function() local view = import("luaScript.Views.Club.ClubZhanJiTongJiView"):new(tongjiInfo.list) view:setAnchorPoint(cc.p(0.5, 0.5)) app:showWaitDialog(view) end) end --点击层 --[[function ClubZhanJiView:onTouch() self.ui.Items.Layout_timeselect:setVisible(false) self.ui.Items.Layout_time_select:setVisible(false); self.ui.Items.Layout_riqi:setVisible(false); self.ui.Items.Layout_btn_menu:setVisible(false); end--]] return ClubZhanJiView