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

69 lines
1.2 KiB

4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 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="bossList">
  7. <view
  8. @click="$utils.navigateTo('/pages_order/boss/bossDetail?id=' + 123)"
  9. :key="index"
  10. v-for="(item, index) in list">
  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. },
  30. data() {
  31. return {
  32. queryParams: {
  33. pageNo: 1,
  34. pageSize: 10,
  35. },
  36. total : 0,
  37. list : [],
  38. }
  39. },
  40. methods: {
  41. getData(){
  42. if(uni.getStorageSync('token')){
  43. this.queryParams.token = uni.getStorageSync('token')
  44. }
  45. this.$api(this.api, this.queryParams, res => {
  46. if(res.code == 200){
  47. this.list = res.result.records || res.result
  48. this.total = res.result.total || res.result.length
  49. }
  50. })
  51. },
  52. loadMoreData(){
  53. if(this.queryParams.pageSize <= this.list.length){
  54. this.queryParams.pageSize += 10
  55. this.getData()
  56. }
  57. },
  58. }
  59. }
  60. </script>
  61. <style scoped lang="scss">
  62. .bossList {
  63. &>view{
  64. margin: 20rpx;
  65. }
  66. }
  67. </style>