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

91 lines
1.7 KiB

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