zhiwei-list.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. <template>
  2. <view class="content">
  3. <view class="list-item" v-for="(item,index) in list" :key="index" @click="toinfo(item)" v-if="list.length > 0">
  4. <view class="top hflex acenter jbetween">
  5. <text class="text_hide">{{item.title}}</text>
  6. <text>{{item.salary_min}}-{{item.salary_max}}K·{{item.salary_month}}薪</text>
  7. </view>
  8. <view class="hflex acetner">
  9. <view class="text-box" v-if="item.education">{{item.education}}</view>
  10. <view class="text-box" v-if="item.experience_min">{{item.experience_min}}-{{item.experience_max}}年</view>
  11. </view>
  12. <view class="bottom hflex acenter jbetween">
  13. <text>{{item.name}} {{item.mobile}}</text>
  14. <text>{{item.city}}</text>
  15. </view>
  16. </view>
  17. <view class="hflex acenter jcenter " style="height: 100vh;" v-else >
  18. <u-empty mode="data"></u-empty>
  19. </view>
  20. </view>
  21. </template>
  22. <script>
  23. import $api from '@/static/js/api.js'
  24. export default {
  25. data() {
  26. return{
  27. list: [],
  28. page: 1,
  29. last_page: 1,
  30. }
  31. },
  32. onLoad() {
  33. this.getlist()
  34. },
  35. onReachBottom() {
  36. if(this.page < this.last_page) {
  37. this.page++
  38. this.getlist()
  39. } else {
  40. uni.$u.toast('已经到底了')
  41. return
  42. }
  43. },
  44. methods: {
  45. toinfo(item) {
  46. uni.navigateTo({
  47. url: '/pageC/zhiwei-detail?id=' + item.id
  48. })
  49. },
  50. getlist() {
  51. var _this = this
  52. $api.req({
  53. url: 'job',
  54. method: 'GET',
  55. data: {
  56. is_page: 1,
  57. page: _this.page,
  58. limit: 10,
  59. }
  60. }, function(res) {
  61. if(res.code == 10000) {
  62. _this.list = _this.list.concat(res.data.list)
  63. _this.last_page = res.data.last_page
  64. }
  65. })
  66. }
  67. }
  68. }
  69. </script>
  70. <style lang="scss">
  71. .content {
  72. padding: 20rpx 24rpx;
  73. background: #F4F4F4;
  74. .list-item {
  75. background: #FFFFFF;
  76. border-radius: 16rpx;
  77. margin: 0 0 20rpx;
  78. box-sizing: border-box;
  79. padding: 26rpx 20rpx;
  80. .top {
  81. padding-bottom: 20rpx;
  82. text:first-child {
  83. font-size: 32rpx;
  84. font-family: PingFangSC, PingFang SC;
  85. font-weight: 600;
  86. color: #222222;
  87. max-width: 432rpx;
  88. }
  89. text:last-child {
  90. font-size: 28rpx;
  91. font-family: JDZhengHT, JDZhengHT;
  92. font-weight: 400;
  93. color: #00B0B0;
  94. }
  95. }
  96. .company {
  97. padding: 16rpx 0;
  98. text {
  99. font-size: 24rpx;
  100. font-family: PingFangSC, PingFang SC;
  101. font-weight: 400;
  102. color: #666666;
  103. }
  104. }
  105. .text-box {
  106. background: #F4F4F4;
  107. border-radius: 4rpx;
  108. padding: 4rpx 10rpx;
  109. font-size: 20rpx;
  110. font-family: PingFangSC, PingFang SC;
  111. font-weight: 400;
  112. color: #555555;
  113. margin: 0 16rpx 0 0;
  114. }
  115. .bottom {
  116. padding: 26rpx 0 0;
  117. text:first-child {
  118. font-size: 20rpx;
  119. font-family: SFPro, SFPro;
  120. font-weight: 400;
  121. color: #444444;
  122. }
  123. text:last-child {
  124. font-size: 20rpx;
  125. font-family: PingFangSC, PingFang SC;
  126. font-weight: 400;
  127. color: #999999;
  128. }
  129. }
  130. }
  131. }
  132. </style>