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

90 lines
1.7 KiB

8 months ago
7 months ago
8 months ago
6 months ago
8 months ago
5 months ago
8 months ago
7 months ago
7 months ago
6 months ago
8 months ago
7 months ago
8 months ago
5 months ago
8 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
8 months ago
6 months ago
8 months ago
7 months ago
8 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, query){
  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. if(query){
  57. for(let key in query){
  58. queryParams[key] = query[key]
  59. }
  60. }
  61. this.$api(this.api, queryParams, res => {
  62. uni.stopPullDownRefresh()
  63. if(res.code == 200){
  64. this.list = res.result.records
  65. this.total = res.result.total
  66. }
  67. })
  68. },
  69. loadMoreData(){
  70. if(this.queryParams.pageSize <= this.list.length){
  71. this.queryParams.pageSize += 10
  72. this.getData()
  73. }
  74. },
  75. }
  76. }
  77. </script>
  78. <style scoped lang="scss">
  79. .workList {
  80. &>view{
  81. margin: 20rpx;
  82. }
  83. }
  84. </style>