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

46 lines
876 B

12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
  1. <template>
  2. <view class="pageBgImg ">
  3. <topNavbar title="我的评价"></topNavbar>
  4. <view class="pad">
  5. <view class="card" v-for="(item,index) in list" :key="index">
  6. <commentItem :item="item"/>
  7. </view>
  8. </view>
  9. </view>
  10. </template>
  11. <script>
  12. import { getUsersCommentById } from '@/config/api.js'
  13. export default {
  14. data() {
  15. return {
  16. params: {
  17. userId: '', pageNo: 1,pageSize: 20
  18. },
  19. total: 20,
  20. list: []
  21. }
  22. },
  23. onLoad() {
  24. this.getUsersCommentByIdFn()
  25. this.params.userId = this.userId
  26. },
  27. methods: {
  28. async getUsersCommentByIdFn() {
  29. const {data: res} = await getUsersCommentById(this.params)
  30. this.params.pageNo ++
  31. this.list.push(...res.list)
  32. this.total = res.total
  33. }
  34. }
  35. }
  36. </script>
  37. <style lang="scss" scoped>
  38. .card {
  39. width: 100%;
  40. padding: 24rpx 28rpx;
  41. margin-bottom: 20rpx;
  42. }
  43. </style>