太初秘卷红点提交

(cherry picked from commit 8d99139640ed01e9ed692d0f74f2923dac24f839)
dev_chengFeng
jiaoyangna 2021-08-23 14:26:53 +08:00
parent 16ca4f84d6
commit 6a36e5ffd3
2 changed files with 7 additions and 2 deletions

View File

@ -88,6 +88,7 @@ function this.GetATaiChuMiJuanData(data)
end
function this.CheckRedPointTaiChu()
LogGreen("PlayerPrefs.GetS"..PlayerPrefs.GetString("TaiChu"..PlayerManager.uid))
if not PlayerPrefs.HasKey("TaiChu"..PlayerManager.uid) then
return true
elseif PlayerPrefs.GetString("TaiChu"..PlayerManager.uid) ~= TimeStampToDateStr2(GetTimeStamp()) then

View File

@ -268,6 +268,7 @@ function this:InitComponent()
this.jiantouObj=Util.GetGameObject(self.gameObject, "jiantouObj")
this.taiChuMiJuanBtn = Util.GetGameObject(self.gameObject, "taichumijuan")
this.taichumijuanRed=Util.GetGameObject(this.taiChuMiJuanBtn, "redPoint")
end
function this:SetPosFunc(v2)
@ -296,6 +297,8 @@ end
--绑定事件(用于子类重写)
function this:BindEvent()
Util.AddOnceClick(this.taiChuMiJuanBtn,function()
PlayerPrefs.SetString("TaiChu"..PlayerManager.uid,TimeStampToDateStr2(GetTimeStamp()))
CheckRedPointStatus(RedPointType.TaiChuMiJuan)
NetManager.TaiChuSecretvolumeRequest(function(msg)
local data = {}
if not msg or not msg.secretvolume or #msg.secretvolume < 1 then
@ -314,8 +317,7 @@ function this:BindEvent()
table.sort(data,function(a,b)
return a.id < b.id
end)
PlayerPrefs.SetString("TaiChu"..PlayerManager.uid,TimeStampToDateStr2(GetTimeStamp()))
CheckRedPointStatus(RedPointType.TaiChuMiJuan)
UIManager.OpenPanel(UIName.taiChuMiJuan,data)
end)
end)
@ -713,6 +715,7 @@ function this.BindRedPoint()
BindRedPointObject(RedPointType.Huaxutan,this.rpCompoundHero)
BindRedPointObject(RedPointType.RightUp2,this.rpRightUp2)
BindRedPointObject(RedPointType.JumpServer_MainCity, this.rpJumpServer)
BindRedPointObject(RedPointType.TaiChuMiJuan, this.taichumijuanRed)
end
-- 绑定红点
function this.ClearRedPoint()
@ -736,6 +739,7 @@ function this.ClearRedPoint()
ClearRedPointObject(RedPointType.Huaxutan,this.rpCompoundHero)
ClearRedPointObject(RedPointType.RightUp2,this.rpRightUp2)
ClearRedPointObject(RedPointType.JumpServer_MainCity, this.rpJumpServer)
ClearRedPointObject(RedPointType.TaiChuMiJuan, this.taichumijuanRed)
end
--添加事件监听(用于子类重写)