代码调整
This commit is contained in:
parent
89eeac3f2d
commit
6eea9de2e5
@ -471,11 +471,7 @@ function LocalData:getTodayFourteenDayExchangeWatched()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function LocalData:recordTodayFourteenDayExchangeWatched()
|
function LocalData:recordTodayFourteenDayExchangeWatched()
|
||||||
if self:getTodayFourteenDayExchangeWatched() then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
self:setInt(LOCAL_DATA_KEY.FOURTEEN_DAY_TODAY_EXCHANGE .. Time:getBeginningOfServerToday(), 1)
|
self:setInt(LOCAL_DATA_KEY.FOURTEEN_DAY_TODAY_EXCHANGE .. Time:getBeginningOfServerToday(), 1)
|
||||||
DataManager.FourteenDayData:setDirty()
|
|
||||||
end
|
end
|
||||||
|
|
||||||
return LocalData
|
return LocalData
|
||||||
@ -58,7 +58,7 @@ function FourteenDayExchangeUI:onLoadRootComplete()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function FourteenDayExchangeUI:onRefresh()
|
function FourteenDayExchangeUI:onRefresh()
|
||||||
LocalData:recordTodayFourteenDayExchangeWatched()
|
DataManager.FourteenDayData:onShowExchangeView()
|
||||||
|
|
||||||
self.txNum:setText(DataManager.FourteenDayData:getExchangeItemNum())
|
self.txNum:setText(DataManager.FourteenDayData:getExchangeItemNum())
|
||||||
self.scrollrectComp:updateAllCell()
|
self.scrollrectComp:updateAllCell()
|
||||||
|
|||||||
@ -504,6 +504,15 @@ function FourteenDayData:getExchangeReward(id)
|
|||||||
return self:getExchangeCfg()[id].reward
|
return self:getExchangeCfg()[id].reward
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- 查看兑换界面
|
||||||
|
function FourteenDayData:onShowExchangeView()
|
||||||
|
if LocalData:getTodayFourteenDayExchangeWatched() then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
LocalData:recordTodayFourteenDayExchangeWatched()
|
||||||
|
self:setDirty()
|
||||||
|
end
|
||||||
|
|
||||||
-- 兑换奖励领取成功
|
-- 兑换奖励领取成功
|
||||||
function FourteenDayData:onReceivedExchangeReward(id)
|
function FourteenDayData:onReceivedExchangeReward(id)
|
||||||
if self.exchangeStatus[id] == nil then
|
if self.exchangeStatus[id] == nil then
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user