recruitment.vue 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291
  1. <!--
  2. * @title 招聘就业
  3. * @author Rockery(1113269755@qq.com)
  4. -->
  5. <template>
  6. <view class="recruitment">
  7. <u-navbar title-color="#FFFFFF" :customBack="navbarCustomBack" :bpay-bottom="false" back-icon-color="#FFFFFF" :background="{background: '#3D5D4C' }" title="招聘就业" class="recruitment-unavbar" />
  8. <!-- ###################################-- 轮播图 -- ################################### -->
  9. <view class="recruitment-banner">
  10. <u-swiper
  11. :list="bannerList"
  12. name="bannerUrl"
  13. border-radius="0"
  14. mode="round"
  15. height="440"
  16. img-mode="scaleToFill"
  17. @click="swiperClick"
  18. ></u-swiper>
  19. </view>
  20. <!-- ###################################-- 请输入您关键词 -- ################################### -->
  21. <view class="recruitment-usearch">
  22. <u-search placeholder="请输入您关键词" v-model="headerTopKeyword" :show-action="false" bg-color="#FFFFFF"></u-search>
  23. </view>
  24. <!-- ###################################-- 企业推荐 -- ################################### -->
  25. <view class="u-card-wrap recruitment-recommend">
  26. <u-card :show-foot="false" class="recruitment-recommend-card">
  27. <view slot="head">
  28. <view class="recommend-card-head">
  29. <view class="recommend-card-head-title">{{recommendConfigData.title}}</view>
  30. <view class="recommend-card-head-subtitle" @tap="recommendCardMoreClick">
  31. {{recommendConfigData.titlemore}}
  32. <u-icon name="arrow-right" color="#A3A3A3" size="28"></u-icon>
  33. </view>
  34. </view>
  35. </view>
  36. <view slot="body">
  37. <view class="recommend-card-body">
  38. <swiper
  39. v-if="recommendListData&&recommendListData.length>0"
  40. class="recommend-card-content"
  41. :display-multiple-items="5"
  42. >
  43. <swiper-item v-for="(item,index) in recommendListData" :key="index">
  44. <view class="swiper-item" @tap="tapRecommendSwiperItem(item)" :data-id="item.id" :data-index="index">
  45. <image class="img" :src="item.img" mode="aspectFill"></image>
  46. <view class="subject">{{item.subject}}</view>
  47. <view class="post u-text-center">
  48. 岗位
  49. <text class="postlink">{{item.postNumber}}</text>个
  50. </view>
  51. </view>
  52. </swiper-item>
  53. <swiper-item v-if="recommendConfigData.listmore">
  54. <view class="swiper-item lookmore" @tap="recommendCardMoreClick">
  55. <view class="moretext">查看更多</view>
  56. </view>
  57. </swiper-item>
  58. </swiper>
  59. </view>
  60. </view>
  61. </u-card>
  62. </view>
  63. <view class="recruitment-dataarea">
  64. <u-tabs bg-color="transparent" :list="dataAreaTabsList" @change="dataAreaTabsChange" :current="dataAreaTabsCurrent" />
  65. <view class="recruitment-dataarea-card" v-for="(item,index) in recommendListData" :key="index" @tap="tapDataAreaCard(item)">
  66. <view class="dataarea-card-left">
  67. <image :src="item.img" mode="aspectFill" class="image"></image>
  68. </view>
  69. <view class="dataarea-card-content">
  70. <view class="dataarea-content-left">
  71. <view>{{item.postName}}</view>
  72. <view class="content">{{item.postContent}}</view>
  73. <view >{{item.postCompany}}</view>
  74. </view>
  75. <view class="dataarea-content-right">
  76. <view>{{item.postWage}}</view>
  77. <view>&nbsp;</view>
  78. <view>{{item.deadline}}</view>
  79. </view>
  80. </view>
  81. </view>
  82. </view>
  83. </view>
  84. </template>
  85. <script>
  86. export default {
  87. data() {
  88. return {
  89. headerTopKeyword: '',
  90. paginationConfig:{
  91. pageNo: 1,
  92. pageSize: 10
  93. },
  94. bannerList: [],
  95. recommendListData:[
  96. {
  97. id:1,
  98. img:"https://img.xiaopiu.com/userImages/img88517697eccbd8.jpg",
  99. subject:"顺丰快递",
  100. postNumber: 10,
  101. postCompany: '顺丰速运有限公司贵州分公司',
  102. postName: '快递员',
  103. postContent: '云岩区|经验不限|中等专科',
  104. postWage: '4.0k-8.0k',
  105. deadline: this.$u.timeFormat(new Date().getTime(), 'yyyy-mm-dd')
  106. },
  107. {
  108. id:2,
  109. img:"https://img.xiaopiu.com/userImages/img88317697ec8588.jpg",
  110. subject:"中国平安",
  111. postNumber: 14,
  112. postCompany: '中国平安贵州分公司',
  113. postName: '保险员',
  114. postContent: '贵州省|经验不限|中等专科',
  115. postWage: '4.0k-8.0k',
  116. deadline: this.$u.timeFormat(new Date().getTime(), 'yyyy-mm-dd')
  117. },
  118. {
  119. id:3,
  120. img:"https://img.xiaopiu.com/userImages/img205717698ca4710.png",
  121. subject:"保利贵州",
  122. postNumber: 8,
  123. postCompany: '保利贵州酒店管理有限公司',
  124. postName: '保安员',
  125. postContent: '贵州省|经验不限|中等专科',
  126. postWage: '4.0k-8.0k',
  127. deadline: this.$u.timeFormat(new Date().getTime(), 'yyyy-mm-dd')
  128. },
  129. {
  130. id:4,
  131. img:"https://img.xiaopiu.com/userImages/img87917697ec0c70.png",
  132. subject:"海大装饰",
  133. postNumber: 18,
  134. postCompany: '海大装饰有限公司',
  135. postName: '设计师',
  136. postContent: '贵州省 | 设计师经验 | 中等专科',
  137. postWage: '4.0k-8.0k',
  138. deadline: this.$u.timeFormat(new Date().getTime(), 'yyyy-mm-dd')
  139. },
  140. {
  141. id:5,
  142. img:"https://img.xiaopiu.com/userImages/img87717697ebe178.jpg",
  143. subject:"永辉超市",
  144. postNumber: 10,
  145. postCompany: '永辉超市有限公司',
  146. postName: '收银员',
  147. postContent: '贵州省 | 相关经验 | 中等专科',
  148. postWage: '4.0k-8.0k',
  149. deadline: this.$u.timeFormat(new Date().getTime(), 'yyyy-mm-dd')
  150. },
  151. {
  152. id:5,
  153. img:"https://cube.elemecdn.com/6/94/4d3ea53c084bad6931a56d5158a48jpeg.jpeg",
  154. subject:"研发测试岗位",
  155. postNumber: 99,
  156. postCompany: '智能科技有限公司',
  157. postName: '研发员',
  158. postContent: '贵州省|经验不限|中等专科',
  159. postWage: '4.0k-8.0k',
  160. deadline: this.$u.timeFormat(new Date().getTime(), 'yyyy-mm-dd')
  161. }
  162. ],
  163. recommendConfigData:{
  164. title:'企业推荐',
  165. titlemore:'更多',
  166. listmore: false
  167. },
  168. dataAreaTabsCurrent: 0,
  169. dataAreaTabsList: [
  170. {
  171. name: '最新'
  172. },
  173. // {
  174. // name: '附近',
  175. // count: 7
  176. // }, {
  177. // name: '筛选'
  178. // }
  179. ]
  180. }
  181. },
  182. onLoad() {
  183. // console.log(this.$u.config.v);
  184. },
  185. onShow() {
  186. this.getBannerList();
  187. },
  188. methods: {
  189. /**
  190. * 导航栏返回事件
  191. */
  192. navbarCustomBack(){
  193. this.$u.route({
  194. type: 'switchTab',
  195. url: 'pages/index/index'
  196. });
  197. },
  198. getBannerList(){
  199. this.$u.api.getIndexBannerList()
  200. .then(res=>{
  201. this.bannerList = res.data;
  202. this.bannerList = [];
  203. this.bannerList.push(
  204. {
  205. bannerUrl: 'https://img.xiaopiu.com/userImages/img146217698746a98.jpg',
  206. content: '<p>代码固定测试内容999997</p>',
  207. id: "999997",
  208. name: "代码固定测试999997"
  209. }
  210. );
  211. this.bannerList.push(
  212. {
  213. bannerUrl: 'https://img.xiaopiu.com/userImages/img14641769874a530.png',
  214. content: '<p>代码固定测试内容999998</p>',
  215. id: "999998",
  216. name: "代码固定测试999998"
  217. }
  218. );
  219. this.bannerList.push(
  220. {
  221. bannerUrl: 'https://img.xiaopiu.com/userImages/img14661769874c088.jpg',
  222. content: '<p>代码固定测试内容999999</p>',
  223. id: "999999",
  224. name: "代码固定测试999999"
  225. }
  226. );
  227. console.log('bannerList',JSON.parse(JSON.stringify(res)));
  228. })
  229. },
  230. // 轮播图点击
  231. swiperClick (index) {
  232. // console.log('swiperClick',index);
  233. if(this.bannerList[index].jumpUrl){
  234. let url = this.bannerList[index].jumpUrl.split('#')[1];
  235. this.$u.route({
  236. url: url,
  237. });
  238. }else{
  239. this.$u.route({
  240. url: 'pages/bannerDetails/bannerDetails',
  241. params: {
  242. id: this.bannerList[index].id
  243. }
  244. })
  245. }
  246. },
  247. recommendCardMoreClick(index) {
  248. console.log("recommendCardMoreClick: ",index);
  249. this.$u.route({
  250. url: 'pages/cooperativeEnterprise/cooperativeEnterprise',
  251. params: {
  252. flag: 'recruitment'
  253. }
  254. });
  255. },
  256. tapRecommendSwiperItem(param){
  257. console.log("tapRecommendSwiperItem: ",param);
  258. this.$u.route({
  259. url: 'pages/businessDetails/businessDetails',
  260. params: {
  261. flag: 'recruitment'
  262. }
  263. });
  264. },
  265. dataAreaTabsChange(index) {
  266. console.log("dataAreaTabsChange: ",index);
  267. this.dataAreaTabsCurrent = index;
  268. },
  269. tapDataAreaCard(param){
  270. console.log("tapDataAreaCard: ",param);
  271. this.$u.route({
  272. url: 'pages/jobDetails/jobDetails',
  273. params: {
  274. item: JSON.stringify(param)
  275. }
  276. });
  277. }
  278. }
  279. }
  280. </script>
  281. <style lang="scss" scoped>
  282. @import './scss/recruitment.scss';
  283. </style>