From 8891f004ffd005316eeb1dc5ef1dba744e337a53 Mon Sep 17 00:00:00 2001 From: chenxi Date: Mon, 12 Jun 2023 18:25:14 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=A1=E6=A0=B8=E6=A8=A1=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/app/first/first.lua | 1 + lua/app/module/shop/shop_manager.lua | 3 +++ lua/app/ui/main_city/cell/side_bar_base_cell.lua | 12 ++++++++++++ lua/app/ui/main_city/cell/side_bar_idle_cell.lua | 4 ++++ .../main_city/cell/side_bar_seven_days_cell.lua | 4 ++++ lua/app/ui/main_city/main_city_ui.lua | 16 ++++++++++------ lua/app/ui/shop/shop_comp.lua | 9 ++++++++- lua/app/ui/task/task_main_ui.lua | 15 +++++++++++++++ lua/app/userdata/shop/shop_data.lua | 4 +++- 9 files changed, 60 insertions(+), 8 deletions(-) diff --git a/lua/app/first/first.lua b/lua/app/first/first.lua index 81d15463..d6011462 100644 --- a/lua/app/first/first.lua +++ b/lua/app/first/first.lua @@ -357,6 +357,7 @@ function First:requestAddress(callback, times, totalTimes) local serverResult = json.decode(rsp.Data) if serverResult then responded = true + CS.BF.BFMain.IsShenhe = (serverResult.env == "audit" and CS.UnityEngine.Application.platform == CS.UnityEngine.RuntimePlatform.IPhonePlayer) -- 如果已经成功过了 不作处理 if self.hasReceiveAddrSuccess then return diff --git a/lua/app/module/shop/shop_manager.lua b/lua/app/module/shop/shop_manager.lua index 8ea48b6c..6a8bf62e 100644 --- a/lua/app/module/shop/shop_manager.lua +++ b/lua/app/module/shop/shop_manager.lua @@ -31,6 +31,9 @@ function ShopManager:triggerGiftPopUI(actType, actId) end function ShopManager:showGiftPopUI(actType, actId, onlySelf) + if GFunc.isShenhe() then + return + end if actType == PayManager.PURCHARSE_TYPE.ACT_GIFT and actId == GConst.ShopConst.FIRST_RECHARGE_ID then UIManager:showUI("app/ui/shop/first_recharge_pop_ui") else diff --git a/lua/app/ui/main_city/cell/side_bar_base_cell.lua b/lua/app/ui/main_city/cell/side_bar_base_cell.lua index 9299da70..3d278180 100644 --- a/lua/app/ui/main_city/cell/side_bar_base_cell.lua +++ b/lua/app/ui/main_city/cell/side_bar_base_cell.lua @@ -11,6 +11,10 @@ function SideBarBaseCellComp:getModuleKey() return nil end +function SideBarBaseCellComp:getHasPurchase() + return true +end + function SideBarBaseCellComp:getIsOpen() return false end @@ -159,6 +163,14 @@ function SideBarBaseCellComp:setVisible(visible) end end +function SideBarBaseCellComp:checkIsOpen() + -- 审核模式下大多数的带内购的侧边栏入口都不显示 + if self:getHasPurchase() and GFunc.isShenhe() then + return false + end + return self:getIsOpen() +end + function SideBarBaseCellComp:getIsVisible() return self.visible end diff --git a/lua/app/ui/main_city/cell/side_bar_idle_cell.lua b/lua/app/ui/main_city/cell/side_bar_idle_cell.lua index ede99e12..6d45cd95 100644 --- a/lua/app/ui/main_city/cell/side_bar_idle_cell.lua +++ b/lua/app/ui/main_city/cell/side_bar_idle_cell.lua @@ -5,6 +5,10 @@ function SideBarIdleCell:getModuleKey() return ModuleManager.MODULE_KEY.IDLE_DROP end +function SideBarIdleCell:getHasPurchase() + return false +end + function SideBarIdleCell:getIsOpen() return DataManager.IdleData:getIsOpen() end diff --git a/lua/app/ui/main_city/cell/side_bar_seven_days_cell.lua b/lua/app/ui/main_city/cell/side_bar_seven_days_cell.lua index ddfbb7fb..28413b52 100644 --- a/lua/app/ui/main_city/cell/side_bar_seven_days_cell.lua +++ b/lua/app/ui/main_city/cell/side_bar_seven_days_cell.lua @@ -5,6 +5,10 @@ function SideBarSevenDaysCell:getModuleKey() return ModuleManager.MODULE_KEY.SEVEN_DAY end +function SideBarSevenDaysCell:getHasPurchase() + return false +end + function SideBarSevenDaysCell:getIsOpen() return DataManager.SevenDayData:getIsOpen() end diff --git a/lua/app/ui/main_city/main_city_ui.lua b/lua/app/ui/main_city/main_city_ui.lua index 170d402e..70d0346d 100644 --- a/lua/app/ui/main_city/main_city_ui.lua +++ b/lua/app/ui/main_city/main_city_ui.lua @@ -430,7 +430,7 @@ function MainCityUI:refreshLeftBtns() CellClass = require(v) self.sideBarClassMap[v] = CellClass end - if CellClass:getIsOpen() then + if CellClass:checkIsOpen() then local cell = self.sideBarCellMap[v] if cell == nil then cell = self:addSideBarCellComp(v) @@ -510,7 +510,7 @@ function MainCityUI:refreshRightBtns() CellClass = require(v) self.sideBarClassMap[v] = CellClass end - if CellClass:getIsOpen() then + if CellClass:checkIsOpen() then local cell = self.sideBarCellMap[v] if cell == nil then cell = self:addSideBarCellComp(v) @@ -641,7 +641,7 @@ end function MainCityUI:refreshBounty() local isOpen = DataManager.BountyData:getIsOpen() - if not isOpen or self.mainComp:getCurModuleType() == GConst.MainCityConst.MAIN_MODULE.DAILY_CHALLENGE then + if not isOpen or self.mainComp:getCurModuleType() == GConst.MainCityConst.MAIN_MODULE.DAILY_CHALLENGE or GFunc.isShenhe() then self.bountyNode:setVisible(false) self.bountyRewardSpine:getSkeletonGraphic().enabled = false return @@ -881,11 +881,11 @@ function MainCityUI:checkSideBarOpenStatus() for k, CellClass in pairs(self.sideBarClassMap) do local cell = self.sideBarCellMap[k] if cell and cell:getIsActive() then - if not CellClass:getIsOpen() then + if not CellClass:checkIsOpen() then return self:refreshAllSideBars() end else - if CellClass:getIsOpen() then + if CellClass:checkIsOpen() then return self:refreshAllSideBars() end end @@ -900,7 +900,7 @@ function MainCityUI:checkMainPop() return end -- 检查功能弹窗 - if DataManager.PlayerData:getIfCanShowModuleUnlock() then + if DataManager.PlayerData:getIfCanShowModuleUnlock() and not GFunc.isShenhe() then ModuleManager.MaincityManager:showModuleUnlockUI() return end @@ -954,6 +954,10 @@ end -- 检查礼包(首充/章节/新手/助力/成长/金币顺序) function MainCityUI:checkGift() + -- 审核模式不弹礼包 + if GFunc.isShenhe() then + return + end -- 引导其间不处理 if DataManager.TutorialData:getIsHaveTutorial() then return diff --git a/lua/app/ui/shop/shop_comp.lua b/lua/app/ui/shop/shop_comp.lua index 51301b1c..29ecabe2 100644 --- a/lua/app/ui/shop/shop_comp.lua +++ b/lua/app/ui/shop/shop_comp.lua @@ -41,7 +41,7 @@ function ShopComp:initTitlePage() self.subTitleSelectText2 = self.uiMap["shop_comp.title_node.btn_cell_2.select_text"] self.subTitleIcon2 = self.uiMap["shop_comp.title_node.btn_cell_2.icon"] self.subTitleBtn2 = self.uiMap["shop_comp.title_node.btn_cell_2"] - + self.subTitleText1:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_16)) -- 特惠商品 self.subTitleSelectText1:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_16)) -- 特惠商品 self.subTitleText2:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_17)) -- 主要商品 @@ -57,6 +57,10 @@ function ShopComp:initTitlePage() local safeHeight = SafeAreaManager:getNotchScreenHeight() self.titleNode:setAnchoredPositionY(TITLE_POS - safeHeight) + if GFunc.isShenhe() then + self.subTitleBtn2:setAnchoredPositionX(0) + self.subTitleBtn1:setVisible(false) + end end function ShopComp:refreshTitle() @@ -80,6 +84,9 @@ function ShopComp:refreshTitle() end function ShopComp:switchPage(page) + if page == PAGE_DISCOUNT and GFunc.isShenhe() then + page = PAGE_MAIN + end if self.page ~= page then self.page = page self.post = false diff --git a/lua/app/ui/task/task_main_ui.lua b/lua/app/ui/task/task_main_ui.lua index f9f93285..dba4998f 100644 --- a/lua/app/ui/task/task_main_ui.lua +++ b/lua/app/ui/task/task_main_ui.lua @@ -72,6 +72,21 @@ function TaskMainUI:initTaskList() end sortTask(self.dailyTaskList) sortTask(self.challengeTaskList) + -- 审核模式不显示战令任务 + if GFunc.isShenhe() then + for i = #self.dailyTaskList, 1, -1 do + local task = self.dailyTaskList[i] + if task.lock then + table.remove(self.dailyTaskList, i) + end + end + for i = #self.challengeTaskList, 1, -1 do + local task = self.challengeTaskList[i] + if task.lock then + table.remove(self.challengeTaskList, i) + end + end + end end function TaskMainUI:onClose() diff --git a/lua/app/userdata/shop/shop_data.lua b/lua/app/userdata/shop/shop_data.lua index 3f600d5f..83b7cba5 100644 --- a/lua/app/userdata/shop/shop_data.lua +++ b/lua/app/userdata/shop/shop_data.lua @@ -827,7 +827,9 @@ function ShopData:getRp() if not ModuleManager:getIsOpen(ModuleManager.MODULE_KEY.MALL, true) then return false end - + if GFunc.isShenhe() then + return false + end local isHotOpen = ModuleManager:getIsOpen(ModuleManager.MODULE_KEY.MALL_DAILY, true) -- 主要商品 每日特惠广告道具 local hotAdGoods = self:getMallDailyGoods() and self:getMallDailyGoods()[1]