index.vue 745 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <template>
  2. <view class="container cart clearfix" v-if="hasLogin">
  3. <cart :pathType='pathType' v-if="isShowComponents"></cart>
  4. </view>
  5. </template>
  6. <script>
  7. import { mapState,mapMutations } from 'vuex';
  8. import cart from '@/components/cm-module/cart-components/index.vue'
  9. export default{
  10. components:{
  11. cart
  12. },
  13. data(){
  14. return{
  15. isShowComponents:false,
  16. pathType:0
  17. }
  18. },
  19. onLoad(){
  20. this.isShowComponents = true;
  21. },
  22. computed: {
  23. ...mapState(['hasLogin','userInfo','isWxAuthorize'])
  24. },
  25. methods:{
  26. },
  27. onPullDownRefresh() {//下拉刷新
  28. this.isShowComponents = false;
  29. uni.stopPullDownRefresh()
  30. this.isShowComponents = true;
  31. },
  32. onShow(){
  33. },
  34. }
  35. </script>
  36. <style lang="scss">
  37. </style>