comments.vue 747 B

123456789101112131415161718192021222324252627282930
  1. <template>
  2. <app-layout>
  3. <view v-if="goodsId">
  4. <app-comments show-type="all" :goods-id="goodsId" :reach-bottom="onReachBottom"></app-comments>
  5. </view>
  6. </app-layout>
  7. </template>
  8. <script>
  9. import appComments from '../../components/page-component/app-comments/app-comments.vue';
  10. export default {
  11. name: "comments",
  12. components: {
  13. 'app-comments': appComments,
  14. },
  15. data() {
  16. return {
  17. goodsId: null,
  18. onReachBottom: 0
  19. };
  20. },
  21. onLoad(options) {
  22. this.goodsId = options.goods_id;
  23. },
  24. onReachBottom() {
  25. this.onReachBottom = Math.random();
  26. }
  27. }
  28. </script>