From bcf90d8834d63f16dc678ecfa1488c057d66916d Mon Sep 17 00:00:00 2001 From: xiekaidong Date: Tue, 20 Jun 2023 18:30:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=98=BE=E7=A4=BAbug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/app/ui/shop/cell/chapter_sell_cell.lua | 4 +++- lua/app/ui/shop/shop_comp.lua | 7 +++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/lua/app/ui/shop/cell/chapter_sell_cell.lua b/lua/app/ui/shop/cell/chapter_sell_cell.lua index 6c1bdc7b..ac075bf7 100644 --- a/lua/app/ui/shop/cell/chapter_sell_cell.lua +++ b/lua/app/ui/shop/cell/chapter_sell_cell.lua @@ -32,8 +32,10 @@ function ChapterSellCell:refresh() cfgInfo.id = actIdList[i] table.insert(self.actChapterCfg, cfgInfo) end - self.scrollRect:refillCells(#self.actChapterCfg) + local count = #self.actChapterCfg + self.scrollRect:refillCells(count) self.contentObj:setAnchoredPositionX(0) + self.scrollRect:moveToIndex(count) end function ChapterSellCell:getCellHeight() diff --git a/lua/app/ui/shop/shop_comp.lua b/lua/app/ui/shop/shop_comp.lua index d1aeee09..0f8307b5 100644 --- a/lua/app/ui/shop/shop_comp.lua +++ b/lua/app/ui/shop/shop_comp.lua @@ -164,9 +164,15 @@ function ShopComp:refresh() self.discountNode:setAnchoredPositionX(0) DataManager.ShopData:markShopDiscountRedPoint() self.subTitleBtn1:removeRedPoint() + if DataManager.ShopData:getRp() then + self.subTitleBtn2:addRedPoint(84, 24) + else + self.subTitleBtn2:removeRedPoint() + end else self.mainNode:setAnchoredPositionX(0) self.discountNode:setAnchoredPositionX(GConst.NOT_VISIBLE_POS) + self.subTitleBtn2:removeRedPoint() if DataManager.ShopData:getShopDiscountRedPoint() then self.subTitleBtn1:addRedPoint(-84, 24) else @@ -174,6 +180,7 @@ function ShopComp:refresh() end end + self:refreshTitle() self:refreshDiscountPage() self:refreshMainPage()