ClubJoinRecord.js 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. cc.Class({
  2. extends: cc.BaseClass,
  3. properties: {
  4. m_CreaterNode:cc.Node,
  5. m_LabClubName:cc.Label,
  6. m_LabClubID:cc.Label,
  7. m_LabTime:cc.Label,
  8. m_LabState:cc.Label,
  9. },
  10. ctor:function(){
  11. },
  12. SetRecordInfo:function(InfoArr){
  13. var UserCtrl = this.m_CreaterNode.getComponent("UserCtrl");
  14. UserCtrl.SetUserByID(InfoArr[1]);
  15. this.m_LabClubID.string = InfoArr[0];
  16. this.m_LabClubName.string = InfoArr[2];
  17. var strtime = InfoArr[4].date;
  18. this.m_LabTime.string = strtime.slice(0,strtime.indexOf('.'));
  19. if(InfoArr[3] == 0){
  20. this.m_LabState.string = '已拒絕';
  21. this.m_LabState.node.color = cc.color(146,10,10);
  22. }else if(InfoArr[3] == 2){
  23. this.m_LabState.string = '等待通過';
  24. this.m_LabState.node.color = cc.color(173,71,31);
  25. }else if(InfoArr[3] >= 3){
  26. this.m_LabState.string = '已同意';
  27. this.m_LabState.node.color = cc.color(10,146,61);
  28. }
  29. },
  30. // update (dt) {},
  31. });