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.

68 lines
1.7 KiB

  1. -- 加入亲友圈界面
  2. -- local ClubDefine = require("luaScript.Protocol.Club.ClubDefine")
  3. local ClubMatchReportRank = class("ClubMatchReportRank", require("core.luaScript.Views.Club.Match.ClubMatchReportRank"))
  4. function ClubMatchReportRank:ctor(gid,muidList,player,viewType)
  5. ClubMatchReportRank.super.ctor(self)
  6. local ui = loadUI("res/ui/ui_club/match/ui_club_match_report_rank.ui");
  7. self.ui = ui;
  8. self:addChild(ui);
  9. self.viewType = viewType
  10. self.player = player
  11. self.uidList = ""
  12. if muidList then
  13. for k,v in ipairs(muidList) do
  14. if k == table.nums(muidList) then
  15. self.uidList = self.uidList..v
  16. else
  17. self.uidList = self.uidList..v..","
  18. end
  19. end
  20. end
  21. self.clubInfo = app.club_php.clubList[tonumber(gid)]
  22. --绑定回调
  23. self:bindEvent(app.club_php , GAME_EVENT.CLUB_SET_MATCH , handler(self , self.onSetSuccess));
  24. end
  25. function ClubMatchReportRank:onEnter()
  26. ClubMatchReportRank.super.onEnter(self)
  27. self.ui.Items.ImageView_4:setVisible(false)
  28. self.ui.Items.Button_match_info:setVisible(false)
  29. end
  30. function ClubMatchReportRank:onConfirm()
  31. playBtnEffect()
  32. local score = self.player.warnum
  33. local function onSureCallBack()
  34. local parm = {
  35. clubId = self.clubInfo.clubId,
  36. muid = self.uidList,
  37. type = 2,
  38. warnum = math.abs(score) * -1 ,
  39. viewType = self.viewType,
  40. sgid = self.player.sgid,
  41. }
  42. app.club_php:requestSetMatchWarNum(parm,handler(self,self.onReportSuccess))
  43. end
  44. local function onCancel()
  45. end
  46. local notice = "若将成员排名分全部上报,可能影响玩家正常游戏,确定上报"..score.."排名分?"
  47. showConfirmDialog(notice,onSureCallBack,onCancel)
  48. end
  49. return ClubMatchReportRank;