recruitDetail.vue 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642
  1. <template>
  2. <view class="content">
  3. <view class="box">
  4. <view class="hflex acenter jbetween">
  5. <view class="top">{{pageData.title}}</view>
  6. <view class="text_blue">{{pageData.salary_start}}
  7. {{(pageData.salary_start + '').indexOf('k') != -1 || (pageData.salary_start + '').indexOf('K') != -1 ? '' : 'k'}}-{{pageData.salary_end}}
  8. {{(pageData.salary_end + '').indexOf('k') != -1 || (pageData.salary_end + '').indexOf('K') != -1 ? '' : 'k'}}</view>
  9. </view>
  10. <view class="hflex acenter fwrap">
  11. <view class="box_item" v-if="pageData.number_person">招{{pageData.number_person}}人</view>
  12. <!-- <view class="box_item" v-if="pageData.experience">{{pageData.experience}}</view> -->
  13. <view class="box_item" v-if="pageData.schooling">{{pageData.schooling}}</view>
  14. <view class="box_item" v-if="pageData.age">{{pageData.age}}</view>
  15. <view class="box_item" v-if="pageData.sex">{{pageData.sex}}性</view>
  16. </view>
  17. </view>
  18. <view class="box">
  19. <view class="hflex acenter">
  20. <image :src="pageData.contact_headimg" class="headimg"></image>
  21. <view class="text1">{{pageData.contact_person}}</view>
  22. </view>
  23. <view class="hflex acenter padT-26">
  24. <u-icon name="phone-fill" color="#666666" size="14" class="padR-24"></u-icon>
  25. <view class="text_style1">{{pageData.contact_phone}}<span style="color: #506dff;" @click="tall(pageData.contact_phone)"><span style="padding: 0 5rpx;">|</span>拨打</span></view>
  26. </view>
  27. <view class="hflex acenter padT-26">
  28. <image src="/static/images/index/demand/email.png" class="icon"></image>
  29. <view class="text_style1">{{pageData.contact_email}}<span style="color: #506dff;" @click="copy(pageData.contact_email)"><span style="padding: 0 5rpx;">|</span>复制</span></view>
  30. </view>
  31. </view>
  32. <view class="box">
  33. <view class="box_title">职位描述</view>
  34. <view class="desc">
  35. <view class="hflex pad_tb10">
  36. <view class="label">地区范围</view>
  37. <view class="text_style1">{{pageData.province}}{{pageData.city}}{{pageData.area}}{{pageData.address}}</view>
  38. </view>
  39. <view class="hflex acenter pad_tb10">
  40. <view class="label">用工时间</view>
  41. <view class="text_style1">{{pageData.working_time}}</view>
  42. </view>
  43. <view class="hflex acenter pad_tb10">
  44. <view class="label">用工性质</view>
  45. <view class="text_style1">{{pageData.work_nature}}</view>
  46. </view>
  47. </view>
  48. </view>
  49. <view class="box" v-if="pageData.necessary_skills">
  50. <view class="box_title">必备技能</view>
  51. <view class="">
  52. <view class="text2">{{pageData.necessary_skills}}</view>
  53. <!-- <block v-for="(item,index) in pageData.necessary_skills" :key="index">
  54. <view class="text2">{{index+1}}.{{item.name}}</view>
  55. </block> -->
  56. </view>
  57. </view>
  58. <view class="box" v-if="pageData.experience">
  59. <view class="box_title">经验</view>
  60. <view class="">
  61. <view class="text2">{{pageData.experience}}</view>
  62. <!-- <block v-for="(item,index) in pageData.necessary_skills" :key="index">
  63. <view class="text2">{{index+1}}.{{item.name}}</view>
  64. </block> -->
  65. </view>
  66. </view>
  67. <view class="box" v-if="pageData.certificate">
  68. <view class="box_title" style="padding-top: 20rpx;">证书</view>
  69. <view class="hflex acenter">
  70. <view class="text2">{{pageData.certificate}}</view>
  71. <!-- <block v-for="(item,index) in pageData.certificate" :key="index">
  72. <view class="text2">{{item.name}}</view>
  73. </block> -->
  74. </view>
  75. </view>
  76. <view class="box" v-if="pageData.welfare_benefits">
  77. <view class="box_title">福利待遇</view>
  78. <view class="text2">{{pageData.welfare_benefits}}</view>
  79. </view>
  80. <view class="box" v-if="pageData.remark" style="margin-bottom: 186rpx;">
  81. <view class="box_title">备注</view>
  82. <view class="text2">{{pageData.remark}}</view>
  83. </view>
  84. <view class="bottom hflex acenter jbetween">
  85. <view class="hflex acenter">
  86. <view class="vflex acenter" style="margin-right: 20rpx;" @click="collect">
  87. <u-icon name="star" color="#444444" size="20" v-if="pageData.is_collection == 0"></u-icon>
  88. <u-icon name="star-fill" color="#506DFF" size="20" v-else></u-icon>
  89. <view class="text_style1">收藏</view>
  90. </view>
  91. <view class="vflex acenter" @click="share('Poster1')">
  92. <image src="https://ship.shipcc.cn/common/share.png" mode="" class="bottom_img"></image>
  93. <view class="text_style1">分享</view>
  94. </view>
  95. </view>
  96. <view class="hflex acenter">
  97. <view class="left_btn hflex acenter jcenter" :class="pageData.huanxinID ? '' : 'left_btn1'" @click="like">
  98. <u-icon name="heart" color="#506DFF" size="20" v-if="pageData.is_like == 0"></u-icon>
  99. <u-icon name="heart-fill" color="#506DFF" size="20" v-else></u-icon>
  100. <view class="btn_text">感兴趣</view>
  101. </view>
  102. <view class="right_btn hflex acenter jcenter" @click="into_chatroom" v-if="pageData.huanxinID">
  103. <image src="https://ship.shipcc.cn/common/chat.png" class="btn_icon"></image>
  104. <view class="btn_text2">立即沟通</view>
  105. </view>
  106. </view>
  107. </view>
  108. <view class="share_content" :class="share_show?'':'share_content1'">
  109. <!-- <view style="width: 100%;height: 168rpx;"></view> -->
  110. <view class="share_box vflex">
  111. <view class="hflex acenter">
  112. <image class="Poster1 pos_img" data-etype="image" :data-enode="posImg" :src="posImg"></image>
  113. <view class="vflex">
  114. <view class="Poster1 pos_title" :data-enode="pageData.title">{{pageData.title}}</view>
  115. <view class="Poster1 pos_subtitle" :data-enode="pageData.salary_start + (pageData.salary_start + '').indexOf('k') && (pageData.salary_start + '').indexOf('K') != -1 ? '' : 'k'+'-'+pageData.salary_end + (pageData.salary_end + '').indexOf('k') && (pageData.salary_end + '').indexOf('K') != -1 ? '' : 'k'">{{pageData.salary_start}}
  116. {{(pageData.salary_start + '').indexOf('k') && (pageData.salary_start + '').indexOf('K') != -1 ? '' : 'k'}}-{{pageData.salary_end}}
  117. {{(pageData.salary_end + '').indexOf('k') && (pageData.salary_end + '').indexOf('K') != -1 ? '' : 'k'}}</view>
  118. </view>
  119. </view>
  120. <view class="Poster1 pos_title2" data-enode="职位描述">职位描述</view>
  121. <view class="hflex acenter">
  122. <view class="label Poster1" data-enode="地区范围">地区范围</view>
  123. <view class="Poster1 text" :data-enode="pageData.province + pageData.city + pageData.area + pageData.address">{{pageData.province}}{{pageData.city}}{{pageData.area}}{{pageData.address}}</view>
  124. </view>
  125. <view class="hflex acenter">
  126. <view class="label Poster1" data-enode="用工时间">用工时间</view>
  127. <view class="Poster1 text" :data-enode="pageData.working_time">{{pageData.working_time}}</view>
  128. </view>
  129. <view class="hflex acenter">
  130. <view class="label Poster1" data-enode="用工性质">用工性质</view>
  131. <view class="Poster1 text" :data-enode="pageData.work_nature">{{pageData.work_nature}}</view>
  132. </view>
  133. <view class="hflex acenter share_text jcenter Poster1" style=" margin: 0 190rpx 12rpx;" data-enode="长按或扫码查看">扫码查看职位详情</view>
  134. <view style="width: 100%;" class="vflex acenter jcenter">
  135. <image class="Poster1" style="width: 25rpx;height: 20rpx;" :data-enode="style.img1" data-etype="image" :src="style.img1"></image>
  136. <image class="Poster1" style="width: 100%;height: 2rpx;margin: 30rpx 0;" :data-enode="style.img2" data-etype="image" :src="style.img2"></image>
  137. </view>
  138. <view class="hflex acenter jbetween">
  139. <view class="vflex">
  140. <view class="share_name Poster1" style="margin: 54rpx 0 20rpx;" data-enode="船百知">船百知</view>
  141. <view class="share_text Poster1" style="margin: 0 0 36rpx;" data-enode="船百知伴你一起杨帆启航,驶向成功彼岸">船百知伴你一起杨帆启航,驶向成功彼岸</view>
  142. </view>
  143. <image class="Poster1" data-etype="image" :data-enode="style.code" :src="style.code" style="width: 136rpx;height: 136rpx;"></image>
  144. <!-- <image class="Poster1" data-etype="image" :data-enode="pageData.contact_headimg" :src="pageData.contact_headimg" style="width: 136rpx;height: 136rpx;"></image> -->
  145. </view>
  146. </view>
  147. <evils-el-poster width="325" height="467" @on-error="onError" :list="list" backgroundColor="rgb(255, 255, 255)" @on-success="onSuccess" ref="Eposter"></evils-el-poster>
  148. <view class="share_bottom">
  149. <view class="hflex acenter jcenter">
  150. <button class="vflex acenter jcenter bottom_item" open-type="share">
  151. <image src="https://ship.shipcc.cn/common/wx.png" class="item_icon"></image>
  152. <view class="item_text">微信好友</view>
  153. </button>
  154. <!-- <button class="vflex acenter jcenter bottom_item" open-type="share">
  155. <image src="https://ship.shipcc.cn/common/moments.png" class="item_icon"></image>
  156. <view class="item_text">朋友圈</view>
  157. </button> -->
  158. <view class="vflex acenter jcenter bottom_item" @click="saveImg">
  159. <image src="https://ship.shipcc.cn/common/download.png" class="item_icon"></image>
  160. <view class="item_text">保存图片</view>
  161. </view>
  162. </view>
  163. <view class="share_cancel" @click="close">取消</view>
  164. </view>
  165. </view>
  166. </view>
  167. </template>
  168. <script>
  169. import $api from '@/static/js/api.js'
  170. var that = ''
  171. export default {
  172. data() {
  173. return {
  174. pageData: {},
  175. id: '',
  176. share_show: false,
  177. posImg: 'https://ship.shipcc.cn/common/company2.png',
  178. list: {},
  179. style: {
  180. img1: 'https://ship.shipcc.cn/common/down2.png',
  181. img2: 'https://ship.shipcc.cn/common/line.png',
  182. code: 'https://ship.shipcc.cn/common/code.jpg'
  183. },
  184. }
  185. },
  186. onLoad(options) {
  187. that = this
  188. that.id = options.id
  189. that.getData()
  190. let view = uni.createSelectorQuery().in(this).select(".Poster1");
  191. view.fields({
  192. size: true,
  193. rect: true,
  194. scrollOffset: true
  195. }, data => {
  196. }).exec();
  197. },
  198. onShareAppMessage(res) {
  199. console.log(res);
  200. if (res.from === 'button') {// 来自页面内分享按钮
  201. console.log(res.target)
  202. }
  203. return {
  204. title: '船百知', //分享的名称
  205. }
  206. },
  207. onShareTimeline(res) {
  208. console.log(res);
  209. return {
  210. title: '船百知',
  211. type: 0,
  212. summary: "",
  213. }
  214. },
  215. methods: {
  216. getData() {
  217. $api.req({
  218. url: '/data/api.auth.DemandLabor/demanddetail',
  219. method: 'POST',
  220. data: {
  221. type: 1,
  222. id: that.id
  223. }
  224. }, function(res) {
  225. if(res.code == 1) {
  226. console.log(res);
  227. that.pageData = res.data
  228. }
  229. })
  230. },
  231. // 复制
  232. copy(value) {
  233. uni.setClipboardData({
  234. data: value,
  235. success: function () {
  236. $api.info('复制成功')
  237. }
  238. });
  239. },
  240. tall(value) {
  241. uni.makePhoneCall({
  242. phoneNumber: value
  243. });
  244. },
  245. collect() {
  246. $api.req({
  247. url: '/data/api.auth.DemandLabor/cocanclecollection',
  248. method: 'POST',
  249. data: {
  250. type: 1,
  251. id: that.id,
  252. category: that.pageData.is_collection + 1
  253. }
  254. }, function(res) {
  255. if(res.code == 1) {
  256. $api.info(res.info)
  257. if(that.pageData.is_collection) {
  258. that.pageData.is_collection = 0
  259. } else {
  260. that.pageData.is_collection = 1
  261. }
  262. }
  263. })
  264. },
  265. like() {
  266. $api.req({
  267. url: '/data/api.auth.DemandLabor/cocanclelike',
  268. method: 'POST',
  269. data: {
  270. type: 1,
  271. id: that.id,
  272. category: that.pageData.is_like + 1
  273. }
  274. }, function(res) {
  275. if(res.code == 1) {
  276. $api.info(res.info)
  277. if(that.pageData.is_like) {
  278. that.pageData.is_like = 0
  279. } else {
  280. that.pageData.is_like = 1
  281. }
  282. }
  283. })
  284. },
  285. into_chatroom() {
  286. var my = uni.getStorageSync("myUsername");
  287. var nameList = {
  288. myName: my,
  289. your: that.pageData.huanxinID,
  290. };
  291. uni.navigateTo({
  292. url: "/pages/chatroom/chatroom?username=" + JSON.stringify(nameList),
  293. });
  294. },
  295. share(elClass) {
  296. that.share_show = true
  297. that.$refs.Eposter.createForElRect(elClass,false)
  298. },
  299. close() {
  300. that.share_show = false
  301. },
  302. onSuccess(e) {
  303. console.log('返回的地址',e);
  304. that.tempImage = e
  305. },
  306. onError(err) {
  307. console.log('发生错误');
  308. console.log(err);
  309. },
  310. saveImg() {
  311. console.log('准备保存的图片',that.tempImage);
  312. uni.authorize({
  313. scope: 'scope.writePhotosAlbum',
  314. success() {
  315. uni.saveImageToPhotosAlbum({
  316. filePath: that.tempImage,
  317. success: function () {
  318. console.log('save success');
  319. $api.info('保存成功')
  320. that.close()
  321. }
  322. });
  323. }
  324. })
  325. },
  326. },
  327. }
  328. </script>
  329. <style lang="scss" scoped>
  330. .content {
  331. .box {
  332. width: 690rpx;
  333. margin: 0 30rpx;
  334. box-sizing: border-box;
  335. padding: 20rpx 0;
  336. border-bottom: 1rpx solid #F4F4F4;
  337. .top {
  338. font-size: 40rpx;
  339. font-weight: 500;
  340. color: #222222;
  341. line-height: 56rpx;
  342. padding: 24rpx 0 20rpx;
  343. }
  344. .text_blue {
  345. font-size: 32rpx;
  346. font-weight: 400;
  347. color: #506DFF;
  348. line-height: 40rpx;
  349. }
  350. .box_item {
  351. width: auto;
  352. height: 40rpx;
  353. background: #F0F2F6;
  354. border-radius: 4rpx;
  355. margin: 0 20rpx 20rpx 0;
  356. padding: 0 16rpx;
  357. font-size: 22rpx;
  358. font-weight: 400;
  359. color: #444444;
  360. line-height: 40rpx;
  361. }
  362. .headimg {
  363. width: 72rpx;
  364. height: 72rpx;
  365. border-radius: 50%;
  366. margin-right: 20rpx;
  367. }
  368. .text1 {
  369. font-size: 30rpx;
  370. font-weight: 500;
  371. color: #222222;
  372. line-height: 42rpx;
  373. }
  374. .padT-26 {
  375. padding-top: 26rpx;
  376. }
  377. .padR-24 {
  378. padding-right: 24rpx;
  379. }
  380. .label {
  381. width: 20%;
  382. font-size: 24rpx;
  383. font-weight: 400;
  384. color: #444444;
  385. }
  386. .icon {
  387. width: 28rpx;
  388. height: 28rpx;
  389. }
  390. .text_style1 {
  391. width: 80%;
  392. font-size: 24rpx;
  393. padding-left: 5rpx;
  394. font-weight: 400;
  395. color: #666666;
  396. }
  397. .box_title {
  398. font-size: 32rpx;
  399. font-weight: 500;
  400. color: #222222;
  401. }
  402. .desc {
  403. margin: 16rpx 0 0;
  404. background: #F7F7F7;
  405. border-radius: 8px;
  406. box-sizing: border-box;
  407. padding: 24rpx 20rpx;
  408. .pad_tb10 {
  409. padding: 10rpx 0;
  410. }
  411. }
  412. .text2 {
  413. font-size: 24rpx;
  414. font-weight: 400;
  415. color: #333333;
  416. line-height: 34rpx;
  417. padding: 16rpx 0 0;
  418. }
  419. }
  420. .bottom {
  421. width: 100%;
  422. z-index: 9;
  423. position: fixed;
  424. bottom: 0;
  425. height: 166rpx;
  426. background: #FFFFFF;
  427. box-sizing: border-box;
  428. box-shadow: 0px -1px 0px 0px #F4F4F4;
  429. padding: 8rpx 30rpx 74rpx;
  430. .text_style1 {
  431. font-size: 20rpx;
  432. font-weight: 400;
  433. color: #444444;
  434. }
  435. .left_btn {
  436. width: 230rpx;
  437. height: 80rpx;
  438. background: #F1F6FF;
  439. border-radius: 42rpx;
  440. }
  441. .left_btn1 {
  442. width: 500rpx;
  443. }
  444. .btn_text {
  445. font-size: 32rpx;
  446. font-weight: 500;
  447. color: #506DFF;
  448. line-height: 44rpx;
  449. padding-left: 10rpx;
  450. }
  451. .right_btn {
  452. width: 230rpx;
  453. height: 80rpx;
  454. background: #506DFF;
  455. border-radius: 42rpx;
  456. margin-left: 20rpx;
  457. .btn_icon {
  458. width: 40rpx;
  459. height: 40rpx;
  460. }
  461. .btn_text2 {
  462. font-size: 32rpx;
  463. font-weight: 500;
  464. color: #FFFFFF;
  465. line-height: 44rpx;
  466. padding-left: 10rpx;
  467. }
  468. }
  469. .bottom_img {
  470. width: 40rpx;
  471. height: 40rpx;
  472. }
  473. }
  474. .share_content {
  475. position: fixed;
  476. top: 0;
  477. left: 0;
  478. z-index: 99;
  479. width: 100vw;
  480. height: 100vh;
  481. background: rgba(0,0,0,0.5);
  482. backdrop-filter: blur(5px);
  483. padding: 0 0 0;
  484. .pos_img {
  485. width: 112rpx;
  486. height: 112rpx;
  487. margin: 0 12rpx 0 0;
  488. }
  489. .pos_title {
  490. font-size: 32rpx;
  491. font-weight: 500;
  492. color: #222222;
  493. line-height: 44rpx;
  494. margin: 0 0 0 0;
  495. }
  496. .pos_subtitle {
  497. font-size: 32rpx;
  498. font-weight: 400;
  499. color: #506DFF;
  500. line-height: 40rpx;
  501. margin: 24rpx 0 0;
  502. }
  503. .pos_title2 {
  504. font-size: 28rpx;
  505. font-weight: 500;
  506. color: #222222;
  507. line-height: 40rpx;
  508. margin: 36rpx 0 28rpx;
  509. }
  510. .label {
  511. width: 120rpx;
  512. font-size: 24rpx;
  513. font-weight: 400;
  514. color: #444444;
  515. line-height: 34rpx;
  516. margin: 0 0 20rpx;
  517. }
  518. .text {
  519. font-size: 24rpx;
  520. font-weight: 400;
  521. color: #444444;
  522. line-height: 34rpx;
  523. margin: 0 0 20rpx;
  524. }
  525. .share_box {
  526. margin: 130rpx auto 0;
  527. width: 650rpx;
  528. background: #FFFFFF;
  529. border-radius: 20rpx;
  530. box-sizing: border-box;
  531. padding: 48rpx 40rpx 0;
  532. .share_name {
  533. width: 100%;
  534. font-size: 32rpx;
  535. font-weight: 500;
  536. color: #222222;
  537. line-height: 44rpx;
  538. }
  539. .share_label {
  540. width: 100%;
  541. font-size: 28rpx;
  542. font-weight: 400;
  543. color: #222222;
  544. line-height: 40rpx;
  545. }
  546. .share_text {
  547. width: 100%;
  548. font-size: 24rpx;
  549. font-weight: 400;
  550. color: #999999;
  551. line-height: 34rpx;
  552. text-overflow: ellipsis;
  553. overflow: hidden;
  554. display: -webkit-box;
  555. -webkit-box-orient: vertical;
  556. box-orient: vertical;
  557. line-clamp: 5;
  558. -webkit-line-clamp: 5;
  559. }
  560. .box_bottom {
  561. width: 100%;
  562. padding: 34rpx 0 16rpx;
  563. border-top: 1rpx dashed #C3C3C3;
  564. .bottom_left1 {
  565. font-size: 32rpx;
  566. font-weight: 500;
  567. color: #222222;
  568. line-height: 44rpx;
  569. padding-bottom: 20rpx;
  570. }
  571. .bottom_left2 {
  572. font-size: 22rpx;
  573. font-weight: 400;
  574. color: #999999;
  575. line-height: 32rpx;
  576. }
  577. .bottom_right {
  578. width: 136rpx;
  579. height: 136rpx;
  580. }
  581. }
  582. }
  583. .canvas {
  584. position: absolute;
  585. top: 188rpx;
  586. left: 50rpx;
  587. width: 650rpx;
  588. min-height: 494rpx;
  589. background: #FFFFFF;
  590. border-radius: 20rpx;
  591. }
  592. .share_bottom {
  593. position: fixed;
  594. bottom: 0;
  595. width: 100%;
  596. height: 388rpx;
  597. background: #F5F7FF;
  598. border-radius: 40rpx 40rpx 0px 0px;
  599. .bottom_item {
  600. width: 33%;
  601. margin: 50rpx 0 90rpx;
  602. border: none !important;
  603. background-color: #F5F7FF !important;
  604. .item_icon {
  605. width: 76rpx;
  606. height: 76rpx;
  607. }
  608. .item_text {
  609. font-size: 26rpx;
  610. font-weight: 400;
  611. color: #333333;
  612. line-height: 36rpx;
  613. margin-top: 12rpx;
  614. }
  615. }
  616. button::after {
  617. border: none !important;
  618. }
  619. .share_cancel {
  620. width: 100%;
  621. text-align: center;
  622. font-size: 32rpx;
  623. font-weight: 400;
  624. color: #333333;
  625. line-height: 44rpx;
  626. }
  627. }
  628. }
  629. .share_content1 {
  630. z-index: -99 !important;
  631. }
  632. }
  633. </style>