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.

46 lines
1.0 KiB

  1. -- 下载界面
  2. local LoadAppView = class("LoadAppView", cc.UIView)
  3. function LoadAppView:ctor()
  4. LoadAppView.super.ctor(self);
  5. end
  6. function LoadAppView:onEnter()
  7. LoadAppView.super.onEnter(self)
  8. local ui = loadUI("res/ui/ui_dating/ui_xiazai.ui")
  9. self.ui = ui
  10. self:addChild(ui)
  11. -- 分享
  12. self.ui.Items.Button:registerClick(handler(self , self.onClickShare))
  13. --关闭
  14. self.ui.Items.Button_1:registerClick(handler(self , self.onClickClose))
  15. end
  16. -- 分享响应函数
  17. function LoadAppView:onClickShare()
  18. local info = {}
  19. info.scene = "talk"
  20. info.contentType = "url"
  21. info.url = app.config.Setting.appDownloadUrl
  22. info.title = "欢乐拼五张"
  23. info.description = "一款传统牌类游戏,节奏紧凑且刺激,约上好友,一起畅玩!"
  24. info.image = cc.FileUtils:getInstance():getWritablePath().."icon.png"
  25. info.thumbSize = 2
  26. info.imageWidth = 100
  27. app.plugin:shareGame(info)
  28. end
  29. -- 关闭响应函数
  30. function LoadAppView:onClickClose()
  31. self:playBtnCloseEffect()
  32. self:removeFromParent()
  33. end
  34. return LoadAppView;