parking-info.js 605 B

123456789101112131415161718192021222324252627282930
  1. // components/parking-info/index.js
  2. Component({
  3. properties: {
  4. // 可根据需要定义组件的属性
  5. occupyFee:{
  6. type: Object,
  7. value:{
  8. cost_cycle:0,
  9. max_fee_time:0,
  10. cost_time_period:'',
  11. free_time:0
  12. }
  13. }
  14. },
  15. lifetimes:{
  16. attached: function () {
  17. this.initData()
  18. }
  19. },
  20. data: {
  21. // 组件内部数据
  22. },
  23. methods: {
  24. // 组件的方法
  25. initData() {
  26. const { cost_cycle, max_fee_time, cost_time_period, free_time } = this.data.occupyFee;
  27. console.log("this.occupyFee",this.data);
  28. }
  29. }
  30. })