collect.vue 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262
  1. <template>
  2. <view class="content">
  3. <view class="top hflex acenter jcenter">
  4. <block v-for="(item,index) in top" :key="index">
  5. <view class="top_item" :class="active == index ? 'active' :''" @click="changeTop(index)">{{item.name}}</view>
  6. </block>
  7. </view>
  8. <view class="list" v-if="active == 0 && pageList.length > 0">
  9. <block v-for="(item,index) in pageList" :key="index">
  10. <view class="list_item" @click="toDetail(item.recruitment.id)">
  11. <view class="hflex acenter jbetween">
  12. <view class="item_title">{{item.recruitment.title}}</view>
  13. <view class="item_blue">{{item.recruitment.salary_start}}
  14. {{(item.recruitment.salary_start + '').indexOf('k') != -1 && (item.recruitment.salary_start + '').indexOf('K') != -1 ? '' : 'k'}}-{{item.recruitment.salary_end}}
  15. {{(item.recruitment.salary_end + '').indexOf('k') != -1 && (item.recruitment.salary_end + '').indexOf('K') != -1 ? '' : 'k'}}</view>
  16. </view>
  17. <view class="item_name">{{item.recruitment.shipyard.name}}</view>
  18. <view class="hflex acenter" style="padding: 0 0 28rpx;">
  19. <view class="item_box">{{item.recruitment.city}}</view>
  20. <view class="item_box">{{item.recruitment.schooling}}</view>
  21. <view class="item_box">{{item.recruitment.experience}}</view>
  22. </view>
  23. <view class="hflex acenter jbetween" style="padding-top: 16rpx;">
  24. <view class="hflex acenter">
  25. <image class="item_avatar" mode="aspectFill" :src="item.recruitment.contact_headimg"></image>
  26. <view class="user_name">{{item.recruitment.contact_person}}·{{item.recruitment.contact_position}}</view>
  27. </view>
  28. <view class="user_right">{{item.date}}</view>
  29. </view>
  30. </view>
  31. </block>
  32. </view>
  33. <view class="list" v-if="active == 1 && pageList.length > 0">
  34. <block v-for="(item,index) in pageList" :key="index">
  35. <view class="list_item hflex jbetween" @click="toDetail2(item.joblist.id)">
  36. <view class="hflex">
  37. <image class="item_avatar1" :src="item.joblist.head_img"></image>
  38. <view class="item_right1 vflex">
  39. <view class="item_title">{{item.joblist.real_name}}</view>
  40. <view class="hflex acenter">
  41. <view class="text_style1">{{item.joblist.city}}</view>
  42. <view style="padding: 0 8rpx;">|</view>
  43. <view class="text_style1">{{item.joblist.age}}岁</view>
  44. <view style="padding: 0 8rpx;">|</view>
  45. <view class="text_style1">{{item.joblist.work_year}}年</view>
  46. <view style="padding: 0 8rpx;">|</view>
  47. <view class="text_style1">{{item.joblist.schooling}}</view>
  48. </view>
  49. <view class="item_box1 hflex acenter">应聘岗位<view style="padding: 0 8rpx;">|</view>{{item.joblist.job_application}}</view>
  50. </view>
  51. </view>
  52. <view class="item_btn1">打招呼</view>
  53. </view>
  54. </block>
  55. </view>
  56. </view>
  57. </template>
  58. <script>
  59. import $api from '@/static/js/api.js'
  60. var that = ''
  61. export default {
  62. data() {
  63. return {
  64. top: [
  65. {
  66. name: '招聘信息',
  67. },
  68. {
  69. name: '求职信息'
  70. }
  71. ],
  72. active: 0,
  73. pageList: [
  74. ],
  75. page: 1,
  76. limit: 10,
  77. total: 1
  78. }
  79. },
  80. onLoad() {
  81. that = this
  82. that.getList()
  83. },
  84. methods: {
  85. getList() {
  86. $api.req({
  87. url: '/data/api.auth.DemandLabor/mycollection',
  88. method: 'POST',
  89. data: {
  90. type: that.active + 1,
  91. page: that.page
  92. }
  93. }, function(res) {
  94. if(res.code == 1) {
  95. if(that.page == 1) {
  96. that.pageList = res.data.data
  97. } else {
  98. that.pageList = that.pageList.concat(res.data.data)
  99. }
  100. if(that.pageList.length > 0) {
  101. for(var i=0;i<that.pageList.length;i++) {
  102. that.pageList[i].date = that.pageList[i].create_at.substr(0,10).split("-")[1]+"月"+that.pageList[i].create_at.substr(0,10).split("-")[2]+"日";
  103. }
  104. }
  105. if(that.active == 1) {
  106. for(var i=0;i<that.pageList.length;i++) {
  107. that.pageList[i].joblist.real_name = '*' + that.pageList[i].joblist.real_name.slice(1)
  108. }
  109. }
  110. that.total = res.data.total
  111. that.limit = res.data.limit
  112. }
  113. })
  114. },
  115. changeTop(index) {
  116. that.active = index
  117. that.page = 1
  118. that.pageList = []
  119. that.getList()
  120. },
  121. toDetail(id) {
  122. $api.jump('/page_index/pages/demand/recruitDetail?id='+id)
  123. },
  124. toDetail2(id) {
  125. $api.jump('/page_index/pages/demand/wantedDetail?id='+id)
  126. },
  127. onReachBottom() {
  128. if (that.page * that.limit >= that.total) {
  129. $api.info("没有更多了")
  130. } else {
  131. this.page++
  132. this.getList()
  133. }
  134. }
  135. },
  136. }
  137. </script>
  138. <style lang="scss" scoped>
  139. .content {
  140. padding: 0 30rpx;
  141. background: #F4F4F4;
  142. .top {
  143. width: 100%;
  144. height: 80rpx;
  145. background: #FFFFFF;
  146. border-radius: 40rpx;
  147. font-size: 30rpx;
  148. font-weight: 500;
  149. color: #222222;
  150. margin-top: 20rpx;
  151. .top_item {
  152. width: 50%;
  153. text-align: center;
  154. }
  155. .active {
  156. width: 340rpx;
  157. height: 68rpx;
  158. background: #506DFF;
  159. border-radius: 36px;
  160. color: #FFFFFF;
  161. line-height: 68rpx;
  162. }
  163. }
  164. .list {
  165. width: 100%;
  166. .list_item {
  167. background-color: #fff;
  168. width: 100%;
  169. padding: 28rpx 0 20rpx;
  170. box-sizing: border-box;
  171. padding: 20rpx;
  172. border-radius: 20rpx;
  173. // border-top: 1rpx solid #F4F4F4;
  174. margin-top: 20rpx;
  175. .item_title {
  176. font-size: 32rpx;
  177. font-weight: 600;
  178. color: #222222;
  179. }
  180. .item_blue {
  181. font-size: 32rpx;
  182. font-weight: bold;
  183. color: #506DFF;
  184. }
  185. .item_box {
  186. height: 40rpx;
  187. background: #F0F2F6;
  188. border-radius: 2px;
  189. box-sizing: border-box;
  190. padding: 4rpx 18rpx;
  191. font-size: 22rpx;
  192. font-weight: 400;
  193. color: #444444;
  194. margin-right: 20rpx;
  195. }
  196. .item_name {
  197. font-size: 24rpx;
  198. font-weight: 400;
  199. color: #666666;
  200. padding: 16rpx 0 20rpx;
  201. }
  202. .item_avatar {
  203. width: 40rpx;
  204. height: 40rpx;
  205. border-radius: 50%;
  206. margin-right: 12rpx;
  207. }
  208. .item_avatar1 {
  209. width: 88rpx;
  210. height: 88rpx;
  211. border-radius: 50%;
  212. margin-right: 20rpx;
  213. }
  214. .item_right1 {
  215. }
  216. .text_style1 {
  217. font-size: 22rpx;
  218. font-weight: 400;
  219. color: #666666;
  220. padding: 12rpx 0;
  221. }
  222. .item_box1 {
  223. margin-top: 8rpx;
  224. background: #EDF0FF;
  225. border-radius: 8rpx;
  226. box-sizing: border-box;
  227. padding: 4rpx 16rpx;
  228. font-size: 24rpx;
  229. font-weight: 400;
  230. color: #506DFF;
  231. }
  232. .item_btn1 {
  233. width: 140rpx;
  234. height: 52rpx;
  235. background: #F1F3FF;
  236. border-radius: 28rpx;
  237. font-size: 26rpx;
  238. font-weight: 500;
  239. color: #506DFF;
  240. line-height: 52rpx;
  241. text-align: center;
  242. }
  243. .user_name {
  244. font-size: 20rpx;
  245. font-weight: 400;
  246. color: #333333;
  247. }
  248. .user_right {
  249. font-size: 20rpx;
  250. font-weight: 400;
  251. color: #A1A1A1;
  252. }
  253. }
  254. }
  255. }
  256. </style>