paking.js 724 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. import HTTP from "../../../../requestFn/Api";
  2. const app = getApp();
  3. Page({
  4. data: {
  5. paking_list: [],
  6. space_type: {
  7. 1: "普通车位",
  8. 2: "字母车位",
  9. 3: "豪华车位"
  10. }
  11. },
  12. onLoad(options) {
  13. const {
  14. house_id,
  15. garden_id
  16. } = app.globalData;
  17. if (garden_id) {
  18. this.setData({
  19. house_id,
  20. garden_id
  21. });
  22. }
  23. this.getMyPaking();
  24. },
  25. async getMyPaking() {
  26. const {
  27. garden_id,
  28. house_id
  29. } = this.data;
  30. const {
  31. list
  32. } = await HTTP.GetMySpace({
  33. garden_id,
  34. house_id,
  35. user_type: 1
  36. });
  37. this.setData({
  38. paking_list: list
  39. });
  40. console.log(list);
  41. },
  42. onShow() {
  43. },
  44. })