LandInfo.js 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. cc.Class({
  2. extends: cc.Component,
  3. properties: {
  4. //土地id
  5. landId:{
  6. default: null,
  7. type: cc.Label,
  8. serializable: true,
  9. },
  10. //单价
  11. price: {
  12. default: null,
  13. type: cc.Label,
  14. serializable: true,
  15. },
  16. //租期
  17. date: {
  18. default: null,
  19. type: cc.Label,
  20. serializable: true,
  21. },
  22. //开始时间
  23. startTime: {
  24. default: null,
  25. type: cc.Label,
  26. serializable: true,
  27. },
  28. //结束
  29. endTime: {
  30. default: null,
  31. type: cc.Label,
  32. serializable: true,
  33. },
  34. multiple: {
  35. default: null,
  36. type: cc.Label,
  37. serializable: true,
  38. },
  39. //介绍
  40. describe: {
  41. default: null,
  42. type: cc.Label,
  43. serializable: true,
  44. },
  45. },
  46. // LIFE-CYCLE CALLBACKS:
  47. // onLoad () {},
  48. // start () {
  49. // },
  50. setInfo(id,price,date,start,end,multiple,describe){
  51. this.landId.string = id + " 号";
  52. this.price.string = price + " CNT";
  53. this.date.string = date;
  54. this.startTime.string = start;
  55. this.endTime.string = end;
  56. this.multiple.string = multiple;
  57. this.describe.string = describe;
  58. },
  59. onclose(){
  60. this.node.destroy();
  61. }
  62. });