学员端小程序
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.

38 lines
719 B

1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
  1. <template>
  2. <view class="main">
  3. <comments :list="list"></comments>
  4. </view>
  5. </template>
  6. <script>
  7. import comments from '../comments/comments.vue'
  8. import { getSchoolListComment } from '@/config/api.js'
  9. export default {
  10. components: { comments },
  11. data() {
  12. return {
  13. params: {
  14. pageNo: 1,
  15. pageSize: 20,
  16. schoolId: '',
  17. },
  18. total: 20,
  19. list: []
  20. }
  21. },
  22. onLoad(options) {
  23. this.params.schoolId = options.id
  24. this.getSchoolListCommentFn()
  25. },
  26. methods: {
  27. async getSchoolListCommentFn() {
  28. const {data: res} = await getSchoolListComment(this.params)
  29. this.params.pageNo ++
  30. this.list.push(...res.list)
  31. this.total = res.total
  32. }
  33. }
  34. }
  35. </script>
  36. <style>
  37. </style>