index.js 426 B

1234567891011121314151617181920212223242526272829
  1. import {
  2. getBannerList
  3. } from '~/api/global'
  4. Component({
  5. properties: {
  6. },
  7. data: {
  8. bannerList: []
  9. },
  10. lifetimes: {
  11. attached() {
  12. console.log('111');
  13. },
  14. },
  15. /**
  16. * 组件的方法列表
  17. */
  18. methods: {
  19. async getBannerList() {
  20. let bannerList = await getBannerList(1)
  21. console.log(bannerList);
  22. this.setData({
  23. bannerList
  24. })
  25. },
  26. bannelEvent() {},
  27. }
  28. })