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

106 lines
2.0 KiB

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