DisUserPre.js 852 B

12345678910111213141516171819202122232425262728
  1. cc.Class({
  2. extends: cc.BaseClass,
  3. properties: {
  4. },
  5. InitPre:function () {
  6. this.$('@UserCtrl').SetUserByID();
  7. this.m_LabRes = this.$('LabDis@Label');
  8. this.node.active = false;
  9. },
  10. SetPreInfo:function(ParaArr){//UserID wChairID StatusArr
  11. this.$('@UserCtrl').SetUserByID(ParaArr[0]);
  12. this.node.active = true;
  13. if(ParaArr[1] != null){
  14. this.m_LabRes.string = '';
  15. var byRes = ParaArr[2][ParaArr[1]];
  16. if(byRes == 1){
  17. this.m_LabRes.string = '同意';
  18. this.m_LabRes.node.color = cc.color(76, 187, 40);
  19. }
  20. if(byRes == 2){
  21. this.m_LabRes.string = '拒絕';
  22. this.m_LabRes.node.color = cc.color(223, 96, 10);
  23. }
  24. }
  25. },
  26. });