index.js 600 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. // component/container/index.js
  2. import {
  3. ele_height
  4. } from "../../utils/util";
  5. const {
  6. globalData: {
  7. systemInfo
  8. }
  9. } = getApp();
  10. Component({
  11. /**
  12. * 组件的属性列表
  13. */
  14. properties: {
  15. },
  16. /**
  17. * 组件的初始数据
  18. */
  19. data: {
  20. top_height: 0,
  21. bottom_height: 0
  22. },
  23. /**
  24. * 组件的方法列表
  25. */
  26. methods: {
  27. top_image(e) {
  28. this.setData({
  29. top_height: ele_height(e, systemInfo.screenWidth)
  30. })
  31. },
  32. bottom_image(e) {
  33. this.setData({
  34. bottom_height: ele_height(e, systemInfo.screenWidth)
  35. })
  36. },
  37. }
  38. })