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

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
2 months ago
4 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
4 months ago
2 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="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. let queryParams = {
  47. pageNo: this.queryParams.pageNo,
  48. pageSize: this.queryParams.pageSize,
  49. }
  50. if(params && params.length > 0){
  51. params.forEach(n => {
  52. queryParams[n.name] = n.value
  53. })
  54. }
  55. this.$api(this.api, queryParams, res => {
  56. if(res.code == 200){
  57. this.list = res.result.records
  58. this.total = res.result.total
  59. }
  60. })
  61. },
  62. loadMoreData(){
  63. if(this.queryParams.pageSize <= this.list.length){
  64. this.queryParams.pageSize += 10
  65. this.getData()
  66. }
  67. },
  68. }
  69. }
  70. </script>
  71. <style scoped lang="scss">
  72. .workList {
  73. &>view{
  74. margin: 20rpx;
  75. }
  76. }
  77. </style>