index.vue 747 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <template>
  2. <view>
  3. <goods-list :goods-list="goodsList"></goods-list>
  4. <home></home>
  5. </view>
  6. </template>
  7. <script>
  8. import goodsList from '@/components/groupGoodsList/index.vue';
  9. import home from '@/components/home';
  10. import {
  11. getCollagePartake
  12. } from '@/api/store.js';
  13. export default {
  14. components: {
  15. goodsList,
  16. home
  17. },
  18. data() {
  19. return {
  20. goodsList: []
  21. }
  22. },
  23. onLoad(option) {
  24. this.collage_id = option.collage_id;
  25. this.getCollagePartake();
  26. },
  27. methods: {
  28. getCollagePartake() {
  29. getCollagePartake({
  30. collage_id: this.collage_id
  31. }).then(res => {
  32. this.goodsList = res.data;
  33. });
  34. }
  35. },
  36. };
  37. </script>
  38. <style lang="scss" scoped>
  39. /deep/.goods-list {
  40. margin: 20rpx 30rpx;
  41. }
  42. </style>