index.vue 751 B

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