增加优惠入口红点逻辑

This commit is contained in:
Fang 2023-08-01 18:19:29 +08:00
parent 2d139dd23f
commit 591aee945b
2 changed files with 10 additions and 1 deletions

View File

@ -53,11 +53,12 @@ function SideBarDiscountCell:getSpineName()
end
function SideBarDiscountCell:onClick()
DataManager.ShopData:markEntranceDiscountRedPoint()
EventManager:dispatchEvent(EventManager.CUSTOM_EVENT.GO_SHOP, {page = GConst.ShopConst.PAGE_TYPE.DISCOUNT})
end
function SideBarDiscountCell:getIsShowRedPoint()
return false
return DataManager.ShopData:getEntranceDiscountRedPoint()
end
return SideBarDiscountCell

View File

@ -980,6 +980,14 @@ function ShopData:markShopDiscountRedPoint()
LocalData:setShopDiscountRedPointTime(today)
end
function ShopData:getEntranceDiscountRedPoint()
return not self.isClickedDiscount
end
function ShopData:markEntranceDiscountRedPoint()
self.isClickedDiscount = true
end
function ShopData:checkLoginPopInfo()
-- 初始化礼包弹出逻辑
local actPopUpGifts = self:getPopUpGiftByType(PayManager.PURCHARSE_TYPE.ACT_GIFT)