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

102 lines
1.9 KiB

7 months ago
7 months ago
7 months ago
7 months ago
5 months ago
5 months ago
7 months ago
5 months ago
7 months ago
5 months ago
7 months ago
7 months ago
7 months ago
6 months ago
5 months ago
7 months ago
7 months ago
7 months ago
5 months ago
7 months ago
5 months ago
5 months ago
5 months ago
5 months ago
7 months ago
7 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="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[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. let objKey = {
  22. areaId : 'expectAddress',
  23. }
  24. import userItem from './userItem.vue'
  25. export default {
  26. components : {
  27. userItem,
  28. },
  29. props : {
  30. height : {
  31. default : 'auto'
  32. },
  33. api : {
  34. default : 'bossQueryJobList'
  35. },
  36. handleData : {},
  37. keyName : {
  38. default : ''
  39. }
  40. },
  41. data() {
  42. return {
  43. queryParams: {
  44. pageNo: 1,
  45. pageSize: 10,
  46. },
  47. total : 0,
  48. list : [],
  49. }
  50. },
  51. methods: {
  52. getData(params, query){
  53. if(uni.getStorageSync('token')){
  54. this.queryParams.token = uni.getStorageSync('token')
  55. }
  56. let queryParams = {
  57. pageNo: this.queryParams.pageNo,
  58. pageSize: this.queryParams.pageSize,
  59. }
  60. if(params && params.length > 0){
  61. params.forEach(n => {
  62. queryParams[objKey[n.name] || n.name] = n.value
  63. })
  64. }
  65. if(query){
  66. for(let key in query){
  67. queryParams[key] = query[key]
  68. }
  69. }
  70. this.$api(this.api, queryParams, res => {
  71. uni.stopPullDownRefresh()
  72. if(res.code == 200){
  73. this.list = res.result.records || res.result
  74. this.total = res.result.total || res.result.length
  75. this.handleData && this.handleData(this)
  76. }
  77. })
  78. },
  79. loadMoreData(){
  80. if(this.queryParams.pageSize <= this.list.length){
  81. this.queryParams.pageSize += 10
  82. this.getData()
  83. }
  84. },
  85. }
  86. }
  87. </script>
  88. <style scoped lang="scss">
  89. .bossList {
  90. &>view{
  91. margin: 20rpx;
  92. }
  93. }
  94. </style>