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

84 lines
1.6 KiB

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
9 months ago
9 months ago
9 months ago
7 months ago
9 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
9 months ago
7 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="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. <uv-empty mode="list" v-if="list.length == 0"></uv-empty>
  14. </view>
  15. </scroll-view>
  16. </template>
  17. <script>
  18. import workItem from './workItem.vue'
  19. export default {
  20. components : {
  21. workItem,
  22. },
  23. props : {
  24. height : {
  25. default : 'auto'
  26. },
  27. api : {
  28. default : 'employeeQueryJobList'
  29. },
  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(params){
  44. if(uni.getStorageSync('token')){
  45. this.queryParams.token = uni.getStorageSync('token')
  46. }
  47. let queryParams = {
  48. pageNo: this.queryParams.pageNo,
  49. pageSize: this.queryParams.pageSize,
  50. }
  51. if(params && params.length > 0){
  52. params.forEach(n => {
  53. queryParams[n.name] = n.value
  54. })
  55. }
  56. this.$api(this.api, queryParams, res => {
  57. uni.stopPullDownRefresh()
  58. if(res.code == 200){
  59. this.list = res.result.records
  60. this.total = res.result.total
  61. }
  62. })
  63. },
  64. loadMoreData(){
  65. if(this.queryParams.pageSize <= this.list.length){
  66. this.queryParams.pageSize += 10
  67. this.getData()
  68. }
  69. },
  70. }
  71. }
  72. </script>
  73. <style scoped lang="scss">
  74. .workList {
  75. &>view{
  76. margin: 20rpx;
  77. }
  78. }
  79. </style>