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

72 lines
1.2 KiB

7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
  1. <template>
  2. <scroll-view
  3. scroll-y="true"
  4. :style="{height: height}"
  5. @scrolltolower="loadMoreData">
  6. <view class="bossList">
  7. <view
  8. @click="$utils.navigateTo('/pages_order/boss/bossDetail?id=' + 123)"
  9. :key="index"
  10. v-for="(item, index) in 10">
  11. <bossItem :item="item"/>
  12. </view>
  13. </view>
  14. </scroll-view>
  15. </template>
  16. <script>
  17. import bossItem from './bossItem.vue'
  18. export default {
  19. components : {
  20. bossItem,
  21. },
  22. props : {
  23. height : {
  24. default : 'auto'
  25. },
  26. api : {
  27. default : ''
  28. },
  29. list : {
  30. default : []
  31. }
  32. },
  33. data() {
  34. return {
  35. queryParams: {
  36. pageNo: 1,
  37. pageSize: 10,
  38. },
  39. total : 0,
  40. list2 : 10,
  41. }
  42. },
  43. methods: {
  44. getData(){
  45. if(uni.getStorageSync('token')){
  46. this.queryParams.token = uni.getStorageSync('token')
  47. }
  48. this.$api(this.api, this.queryParams, res => {
  49. if(res.code == 200){
  50. this.list2 = res.result.records
  51. this.total = res.result.total
  52. }
  53. })
  54. },
  55. loadMoreData(){
  56. if(this.queryParams.pageSize <= this.list.length){
  57. this.queryParams.pageSize += 10
  58. this.getData()
  59. }
  60. },
  61. }
  62. }
  63. </script>
  64. <style scoped lang="scss">
  65. .bossList {
  66. &>view{
  67. margin: 20rpx;
  68. }
  69. }
  70. </style>