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

81 lines
1.5 KiB

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