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

70 lines
1.2 KiB

7 months ago
7 months ago
7 months ago
6 months ago
7 months ago
7 months ago
7 months ago
6 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
6 months ago
7 months ago
7 months ago
7 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=' + item.id)"
  9. :key="index"
  10. v-for="(item, index) in list">
  11. <workItem :item="keyName ? item[keyName] : 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. api : {
  27. default : 'employeeQueryJobList'
  28. },
  29. keyName : {}
  30. },
  31. data() {
  32. return {
  33. queryParams: {
  34. pageNo: 1,
  35. pageSize: 10,
  36. },
  37. total : 0,
  38. list : [],
  39. }
  40. },
  41. methods: {
  42. getData(){
  43. if(uni.getStorageSync('token')){
  44. this.queryParams.token = uni.getStorageSync('token')
  45. }
  46. this.$api(this.api, this.queryParams, res => {
  47. if(res.code == 200){
  48. this.list = res.result.records
  49. this.total = res.result.total
  50. }
  51. })
  52. },
  53. loadMoreData(){
  54. if(this.queryParams.pageSize <= this.list.length){
  55. this.queryParams.pageSize += 10
  56. this.getData()
  57. }
  58. },
  59. }
  60. }
  61. </script>
  62. <style scoped lang="scss">
  63. .workList {
  64. &>view{
  65. margin: 20rpx;
  66. }
  67. }
  68. </style>