ClubUserManagerPre.js 861 B

12345678910111213141516171819202122232425262728
  1. cc.Class({
  2. extends: cc.BaseClass,
  3. properties: {
  4. },
  5. InitPre:function(){
  6. if(this.m_UserCtrl == null) this.m_UserCtrl = this.node.getComponent('UserCtrl');
  7. this.m_UserCtrl.SetUserByID(0);
  8. },
  9. SetPreInfo:function(UserID){
  10. this.m_UserCtrl.SetUserByID(UserID);
  11. },
  12. //检查信息
  13. CheckUser:function(){
  14. if (this.m_UserCtrl == null || this.m_UserCtrl.GetUserID() == 0 ) {
  15. this.ShowTips("用戶資訊异常!");
  16. return false;
  17. }
  18. return true;
  19. },
  20. OnBtDelManager:function(){
  21. if(!this.CheckUser()) return
  22. this.m_Hook.ShowAlert('是否解除管理許可權?',Alert_YesNo, function(Res){
  23. if(Res) this.m_Hook.OnOpClubUserLv(this.m_UserCtrl.GetUserID(),CLUB_LEVEL_MEMBER);
  24. }.bind(this))
  25. },
  26. });