洛阳学员端
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.

50 lines
1.1 KiB

10 months ago
  1. <template>
  2. <view class="pageBgImg">
  3. <topNavbar title="信息资讯"></topNavbar>
  4. <view class="ul">
  5. <view class="card" v-for="(item,index) in infoList" :key="index">
  6. <newItem :item="item"></newItem>
  7. </view>
  8. </view>
  9. <view style="padding-bottom: 20rpx;" v-if="infoList.length">
  10. <u-loadmore :status="status" />
  11. </view>
  12. <nodata v-if="!infoList.length"></nodata>
  13. </view>
  14. </template>
  15. <script>
  16. import newItem from '../comp/newItem'
  17. import { getExamSiteInfo } from '@/config/api.js'
  18. export default {
  19. components: { newItem },
  20. data() {
  21. return {
  22. infoList: [],
  23. params: {id: '',pageNo: 1,pageSize: 20, },
  24. status: 'loading'
  25. }
  26. },
  27. onLoad(options) {
  28. this.params.id = options.id
  29. this.getExamSiteInfoFn()
  30. },
  31. methods: {
  32. async getExamSiteInfoFn() {
  33. const {data: res} = await getExamSiteInfo(this.params)
  34. this.params.pageNo ++
  35. this.infoList.push(...res.list)
  36. this.total = res.total
  37. if(this.infoList.length>=this.total) this.status = 'nomore'
  38. }
  39. }
  40. }
  41. </script>
  42. <style lang="scss" scoped>
  43. .ul {
  44. padding: 28rpx;
  45. }
  46. .card {
  47. margin-bottom: 20rpx;
  48. }
  49. </style>