You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
915 B

  1. -- 上传日志界面
  2. local UplogView = class("UplogView", cc.UIView)
  3. function UplogView:ctor()
  4. UplogView.super.ctor(self);
  5. local ui = loadUI("res/ui/ui_fangjian/ui_fangjian_technical.ui");
  6. self.ui = ui;
  7. self:addChild(ui);
  8. end
  9. function UplogView:onEnter()
  10. UplogView.super.onEnter(self)
  11. -- 继续游戏
  12. self.ui.Items.Button_Agree:registerClick(handler(self , self.onClickOk))
  13. -- 解散游戏
  14. self.ui.Items.Button_Cancel:registerClick(handler(self , self.onClickCancel))
  15. end
  16. -- 关闭
  17. function UplogView:onClickOk()
  18. playBtnEffect()
  19. uploadLogs(GAME_ERROR_TYPE.UPLOAD)
  20. local day = os.date("%Y-%m-%d")
  21. local key = string.format("dingdinglog-%s",day)
  22. cc.UserDefault:getInstance():setBoolForKey(key,true)
  23. cc.UserDefault:getInstance():flush()
  24. self:removeFromParent()
  25. end
  26. -- 关闭
  27. function UplogView:onClickCancel()
  28. playBtnEffect()
  29. self:removeFromParent()
  30. end
  31. return UplogView;