You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

51 lines
870 B

10 months ago
  1. <template>
  2. <view class="productList">
  3. <u-navbar :title="$route.query.title" placeholder>
  4. <view slot="left" class="back">
  5. <u-icon @click="toHome()" name="arrow-left"></u-icon>
  6. </view>
  7. </u-navbar>
  8. <productList :list="list.records || []"/>
  9. </view>
  10. </template>
  11. <script>
  12. import productList from '@/components/product/productList.vue'
  13. export default {
  14. components : {
  15. productList,
  16. },
  17. data() {
  18. return {
  19. list : {
  20. records : []
  21. }
  22. };
  23. },
  24. onShow(){
  25. this.getData()
  26. },
  27. methods : {
  28. getData(){
  29. this.request('getShopPage', {}, {
  30. "class_id": this.$route.query.id,
  31. "pageSize":999, 
  32. "currentPage": 0
  33. }).then(res => {
  34. this.list = res.data
  35. })
  36. },
  37. toHome() {
  38. uni.switchTab({
  39. url: '/pages/home/home'
  40. })
  41. },
  42. }
  43. }
  44. </script>
  45. <style lang="scss" scoped>
  46. .productList{
  47. }
  48. </style>