ClubScoreBankRecord.js 731 B

1234567891011121314151617181920
  1. cc.Class({
  2. extends: cc.BaseClass,
  3. properties: {
  4. },
  5. InitPre:function(){
  6. },
  7. SetPreInfo:function(ID){
  8. var webUrl = window.PHP_HOME+'/League.php?GetMark=56&ID='+ID[1];
  9. WebCenter.GetData(webUrl, null, function (data) {
  10. var Info = JSON.parse(data);
  11. this.$('Cnt1@Label').string = Score2Str(parseInt(Info[0]));
  12. this.$('Cnt3@Label').string = Info[2].replace(/ /,'\n');
  13. this.$('Cnt2@Label').string = (Info[1]==0?'存入':'取出');
  14. this.$('Cnt2').color = (Info[1]==0?cc.color(55, 153, 23):cc.color(223, 35, 10));
  15. this.$('Cnt0@Label').string = Score2Str(parseInt(Info[3]));
  16. }.bind(this));
  17. },
  18. });