特易招,招聘小程序
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.

66 lines
1.2 KiB

8 months ago
  1. <template>
  2. <scroll-view
  3. scroll-y="true"
  4. :style="{height: height}"
  5. @scrolltolower="loadMoreData">
  6. <view class="workList">
  7. <view
  8. @click="$utils.navigateTo('/pages_order/work/workDetail?id=' + 123)"
  9. :key="index"
  10. v-for="(item, index) in list">
  11. <workItem class="work-item"/>
  12. </view>
  13. </view>
  14. </scroll-view>
  15. </template>
  16. <script>
  17. import workItem from './workItem.vue'
  18. export default {
  19. components : {
  20. workItem,
  21. },
  22. props : {
  23. height : {
  24. default : 'auto'
  25. },
  26. },
  27. data() {
  28. return {
  29. queryParams: {
  30. pageNo: 1,
  31. pageSize: 10,
  32. },
  33. total : 0,
  34. list : 10,
  35. }
  36. },
  37. methods: {
  38. queryVideoList(){
  39. if(uni.getStorageSync('token')){
  40. this.queryParams.token = uni.getStorageSync('token')
  41. }
  42. this.$api('queryVedioById', this.queryParams, res => {
  43. if(res.code == 200){
  44. this.list = res.result
  45. // this.total = res.result.total
  46. }
  47. })
  48. },
  49. loadMoreData(){
  50. if(this.queryParams.pageSize <= this.list.length){
  51. this.queryParams.pageSize += 10
  52. this.queryVideoList()
  53. }
  54. },
  55. }
  56. }
  57. </script>
  58. <style scoped lang="scss">
  59. .workList {
  60. &>view{
  61. margin: 20rpx;
  62. }
  63. }
  64. </style>