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

72 lines
1.3 KiB

4 months ago
4 months ago
4 months ago
4 months ago
2 months ago
4 months ago
4 months ago
4 months ago
2 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 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. </view>
  13. </view>
  14. </scroll-view>
  15. </template>
  16. <script>
  17. import userItem from './userItem.vue'
  18. export default {
  19. components : {
  20. userItem,
  21. },
  22. props : {
  23. height : {
  24. default : 'auto'
  25. },
  26. api : {
  27. default : 'bossQueryJobList'
  28. },
  29. handleData : {},
  30. keyName : {}
  31. },
  32. data() {
  33. return {
  34. queryParams: {
  35. pageNo: 1,
  36. pageSize: 10,
  37. },
  38. total : 0,
  39. list : [],
  40. }
  41. },
  42. methods: {
  43. getData(){
  44. if(uni.getStorageSync('token')){
  45. this.queryParams.token = uni.getStorageSync('token')
  46. }
  47. this.$api(this.api, this.queryParams, res => {
  48. if(res.code == 200){
  49. this.list = res.result.records || res.result
  50. this.total = res.result.total || res.result.length
  51. this.handleData && this.handleData(this)
  52. }
  53. })
  54. },
  55. loadMoreData(){
  56. if(this.queryParams.pageSize <= this.list.length){
  57. this.queryParams.pageSize += 10
  58. this.getData()
  59. }
  60. },
  61. }
  62. }
  63. </script>
  64. <style scoped lang="scss">
  65. .bossList {
  66. &>view{
  67. margin: 20rpx;
  68. }
  69. }
  70. </style>