index.vue 676 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <template>
  2. <view>
  3. <sell-container ref="sellContainer"></sell-container>
  4. </view>
  5. </template>
  6. <script>
  7. export default {
  8. data() {
  9. return {
  10. }
  11. },
  12. onLoad() {
  13. },
  14. onShow() {
  15. this.$updateCartBadge();
  16. },
  17. onPullDownRefresh() {
  18. if (this.$refs.sellContainer) {
  19. this.$refs.sellContainer.hasShareList();
  20. this.$refs.sellContainer.getIndexCateInfo();
  21. }
  22. setTimeout(() => {
  23. uni.stopPullDownRefresh();
  24. }, 1000);
  25. },
  26. onPageScroll(e) {
  27. const comp = this.$refs.sellContainer;
  28. if (!comp || !comp.onPageScroll) return;
  29. comp.onPageScroll(e.scrollTop);
  30. },
  31. methods: {
  32. }
  33. }
  34. </script>
  35. <style>
  36. /* Empty style as content is in the component */
  37. </style>