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

80 lines
1.5 KiB

9 months ago
9 months ago
9 months ago
9 months ago
7 months ago
9 months ago
7 months ago
9 months ago
9 months ago
9 months ago
7 months ago
7 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
7 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
  1. <template>
  2. <scroll-view
  3. scroll-y="true"
  4. :style="{height: height}"
  5. @scrolltolower="loadMoreData">
  6. <view class="bossList">
  7. <view
  8. @click="$utils.navigateTo('/pages_order/work/userDetail?id=' + item.id)"
  9. :key="index"
  10. v-for="(item, index) in list">
  11. <userItem :item="keyName ? item[keyName] : item"
  12. :headImage="item.headImage"
  13. :sex="item.sex"
  14. />
  15. </view>
  16. <uv-empty mode="list" v-if="list.length == 0"></uv-empty>
  17. </view>
  18. </scroll-view>
  19. </template>
  20. <script>
  21. import userItem from './userItem.vue'
  22. export default {
  23. components : {
  24. userItem,
  25. },
  26. props : {
  27. height : {
  28. default : 'auto'
  29. },
  30. api : {
  31. default : 'bossQueryJobList'
  32. },
  33. handleData : {},
  34. keyName : {
  35. default : ''
  36. }
  37. },
  38. data() {
  39. return {
  40. queryParams: {
  41. pageNo: 1,
  42. pageSize: 10,
  43. },
  44. total : 0,
  45. list : [],
  46. }
  47. },
  48. methods: {
  49. getData(){
  50. if(uni.getStorageSync('token')){
  51. this.queryParams.token = uni.getStorageSync('token')
  52. }
  53. this.$api(this.api, this.queryParams, res => {
  54. uni.stopPullDownRefresh()
  55. if(res.code == 200){
  56. this.list = res.result.records || res.result
  57. this.total = res.result.total || res.result.length
  58. this.handleData && this.handleData(this)
  59. }
  60. })
  61. },
  62. loadMoreData(){
  63. if(this.queryParams.pageSize <= this.list.length){
  64. this.queryParams.pageSize += 10
  65. this.getData()
  66. }
  67. },
  68. }
  69. }
  70. </script>
  71. <style scoped lang="scss">
  72. .bossList {
  73. &>view{
  74. margin: 20rpx;
  75. }
  76. }
  77. </style>