cart.vue 891 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <template>
  2. <view>
  3. <!-- 购物车 -->
  4. <component-cart ref="cart"></component-cart>
  5. <!-- 快捷导航 -->
  6. <component-quick-nav :propIsBar="true"></component-quick-nav>
  7. </view>
  8. </template>
  9. <script>
  10. const app = getApp();
  11. import componentQuickNav from "../../components/quick-nav/quick-nav";
  12. import componentCart from "../../components/cart/cart";
  13. export default {
  14. data() {
  15. return {};
  16. },
  17. components: {
  18. componentQuickNav,
  19. componentCart
  20. },
  21. onShow() {
  22. // 数据加载
  23. if((this.$refs.cart || null) != null) {
  24. this.$refs.cart.init('cart');
  25. }
  26. },
  27. // 下拉刷新
  28. onPullDownRefresh() {
  29. this.$refs.cart.init('cart');
  30. },
  31. methods: {}
  32. };
  33. </script>
  34. <style>
  35. </style>