ClubAndroidGroupList.js 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. cc.Class({
  2. extends: cc.BaseClass,
  3. properties: {
  4. },
  5. ctor:function(){
  6. this._AndroidGroupArr = [];
  7. },
  8. // onLoad:function(){
  9. // },
  10. OnShowView:function(){
  11. if(this.m_ListCtrl == null) this.m_ListCtrl = this.$('@CustomListCtrl');
  12. this.m_ListCtrl.InitList(0, 'AndroidGroupItem',this);
  13. window.gClubClientKernel.onSendGetAndroidList(this,g_ShowClubInfo.dwClubID);
  14. this._AndroidGroupArr = [];
  15. },
  16. onAndroidGroupList:function(androidGroup){
  17. this._AndroidGroupArr.push(androidGroup);
  18. },
  19. onAndroidGroupListEnd:function(){
  20. this.m_ListCtrl.InsertListInfoArr(0,this._AndroidGroupArr);
  21. // for (const i in this._AndroidGroupArr) {
  22. // this.m_ListCtrl.InsertListInfo(0,[i,this._AndroidGroupArr[i]]);
  23. // }
  24. },
  25. onDelAndroidGroupRes:function(code){
  26. if(code == 1){
  27. g_CurScene.ShowTips('權限不足!');
  28. }else if(code == 2){
  29. g_CurScene.ShowTips('不存在此組機器人!');
  30. }else{
  31. this.node.runAction(cc.sequence(cc.delayTime(0.001), cc.callFunc(function(){
  32. this.OnShowView();
  33. }.bind(this))));
  34. // this.m_ListCtrl.InitList(0, 'AndroidGroupItem',this);
  35. // window.gClubClientKernel.onSendGetAndroidList(this,g_ShowClubInfo.dwClubID);
  36. // this._AndroidGroupArr = [];
  37. }
  38. },
  39. });