|
- -- 上传日志界面
-
- local UplogView = class("UplogView", cc.UIView)
-
- function UplogView:ctor()
- UplogView.super.ctor(self);
-
- local ui = loadUI("res/ui/ui_fangjian/ui_fangjian_technical.ui");
- self.ui = ui;
- self:addChild(ui);
- end
-
- function UplogView:onEnter()
- UplogView.super.onEnter(self)
-
- -- 继续游戏
- self.ui.Items.Button_Agree:registerClick(handler(self , self.onClickOk))
-
- -- 解散游戏
- self.ui.Items.Button_Cancel:registerClick(handler(self , self.onClickCancel))
- end
-
- -- 关闭
- function UplogView:onClickOk()
- playBtnEffect()
- uploadLogs(GAME_ERROR_TYPE.UPLOAD)
- local day = os.date("%Y-%m-%d")
- local key = string.format("dingdinglog-%s",day)
- cc.UserDefault:getInstance():setBoolForKey(key,true)
- cc.UserDefault:getInstance():flush()
-
- self:removeFromParent()
- end
-
- -- 关闭
- function UplogView:onClickCancel()
- playBtnEffect()
- self:removeFromParent()
- end
-
- return UplogView;
|