jobDetails.vue 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760
  1. <template>
  2. <view>
  3. <u-navbar :back-text="showTitle" :share="share" back-icon-size="28" back-icon-color="#ffffff"
  4. :background="{backgroundColor: '#2795FD',}" :back-text-style="{color: '#ffffff'}"></u-navbar>
  5. <view class="content">
  6. <view class="title">
  7. <span class="titleSpan" v-if="!info.isOnline">
  8. 已下架
  9. </span>
  10. {{info.positionName}}
  11. </view>
  12. <view class="saraly">
  13. {{info.salary}}<text>{{getUnit(info)}}</text>
  14. </view>
  15. <view class="date-views">
  16. <view class="date">
  17. 更新时间:{{info.updateTime?info.updateTime:info.createTime}}
  18. </view>
  19. <view class="views">
  20. 浏览量:{{info.browseNumber}}
  21. </view>
  22. </view>
  23. </view>
  24. <!-- 岗位详情 -->
  25. <view class="content">
  26. <view class="headline">
  27. 招工要求
  28. </view>
  29. <view class="group">
  30. <view class="item">
  31. <view class="item-title">
  32. 招聘人数:
  33. </view>
  34. <view class="item-value">
  35. {{info.recruitingNumbers}}人
  36. </view>
  37. </view>
  38. <view class="item">
  39. <view class="item-title">
  40. 结算方式:
  41. </view>
  42. <view class="item-value">
  43. {{info.settlementMethodN}}
  44. </view>
  45. </view>
  46. <view class="item" v-if="info.ageRequirement" >
  47. <view class="item-title">
  48. 年龄要求:
  49. </view>
  50. <view class="item-value">
  51. {{info.ageRequirement?info.ageRequirement:'未填写'}}
  52. </view>
  53. </view>
  54. </view>
  55. <view class="headline">
  56. 工作详情
  57. </view>
  58. <view class="group">
  59. <view class="item">
  60. <view class="item-title">
  61. 工作内容:
  62. </view>
  63. <view class="item-value">
  64. {{info.desc}}
  65. </view>
  66. </view>
  67. </view>
  68. <view class="headline">
  69. 联系方式
  70. </view>
  71. <view class="group">
  72. <view class="item">
  73. <view class="item-title">
  74. 联系人:
  75. </view>
  76. <view class="item-value">
  77. {{info.contacts}}
  78. </view>
  79. </view>
  80. <view class="item">
  81. <view class="item-title">
  82. 手机号:
  83. </view>
  84. <view class="item-value" v-if="ck()" >
  85. {{info.contactsPhone}}
  86. </view>
  87. <view class="item-value" style="font-size: 24rpx; color: #777777;" v-else >
  88. (实名认证后可查看)
  89. </view>
  90. </view>
  91. <view class="item" v-if="info.images" >
  92. <view class="codeImage">
  93. <view class="codeImageView">预览图片 点击查看</view>
  94. <view class="class">
  95. <img v-for="(item,i) in imagesList " @click="previewImage(i)"
  96. v-if="item" :key="i" :class="'class'+i"
  97. :src="item.url" :show-menu-by-longpress="false" ></image>
  98. </view>
  99. </view>
  100. </view>
  101. </view>
  102. </view>
  103. <!-- 幻灯片 -->
  104. <view class="swiper" v-if="bannerlist.length">
  105. <u-swiper img-mode="scaleToFill" mode="none" height="100" :list="bannerlist" @click="clickBanner" ></u-swiper>
  106. </view>
  107. <view class="content">
  108. <view class="headline">
  109. 公司信息
  110. </view>
  111. <view class="group">
  112. <view class="item">
  113. <view class="item-title">
  114. 公司名称:
  115. </view>
  116. <view class="item-value">
  117. {{enterpriseInfo.name}}
  118. </view>
  119. </view>
  120. <view class="item">
  121. <view class="item-title">
  122. 工作地区:
  123. </view>
  124. <view class="item-value" >
  125. {{info.workArea}}
  126. </view>
  127. </view>
  128. <view class="item">
  129. <view class="item-title">
  130. 详细地址:
  131. </view>
  132. <view class="item-value" >
  133. {{info.address}}
  134. </view>
  135. </view>
  136. </view>
  137. </view>
  138. <!-- 底部按钮 -->
  139. <view class="bottom">
  140. <!-- 分享 -->
  141. <view>
  142. <button class="share" open-type="share">
  143. <view class="icon">
  144. <img src="@/assets/img/riFill-share-circle-fill@1x.png" alt="">
  145. </view>
  146. <view class="text">
  147. 分享
  148. </view>
  149. </button>
  150. </view>
  151. <view class="btn">
  152. <button class="dialing" @click="showPhoneBtn">拨打电话</button>
  153. <button class="invite" :class="{
  154. isJoin:isJoin
  155. }" @click="isJoinBtn">{{isJoin?'已报名':'我要报名'}}</button>
  156. </view>
  157. <u-modal v-model="showPhone" @confirm="confirmPhone" :confirm-text="confirmText" confirm-color="#606266"
  158. :show-cancel-button="true" ref="uModal" :asyncClose="true" title="联系电话" :content="info.contactsPhone"
  159. :content-style="{fontSize: '24px',color: '#101010'}"></u-modal>
  160. </view>
  161. </view>
  162. </template>
  163. <script>
  164. import * as API from '@/apis/pagejs/packages.js'
  165. import * as API_weixin from '@/apis/weixin.js'
  166. export default {
  167. data() {
  168. return {
  169. id: "",
  170. showPhone: false,
  171. confirmText: '拨打电话',
  172. content: "",
  173. tabList: ['', '日', '周', '月'],
  174. isJoin: false,
  175. share: 0,
  176. isRead:0,
  177. readId:"",
  178. enterpriseInfo:{},
  179. bannerlist: [
  180. ],
  181. info: {
  182. "isOnline":true,
  183. "id": "",
  184. "enterpriseId": "",
  185. "positionName": "",
  186. "salary": "",
  187. "settlementMethod": "",
  188. "industry": "",
  189. "recruitingNumbers": "",
  190. "desc": "",
  191. "contacts": "",
  192. "contactsPhone": "",
  193. "workArea": "",
  194. "address": "",
  195. "browseNumber": "",
  196. "status": "0",
  197. "createBy": "",
  198. "createTime": "",
  199. "updateBy": "",
  200. "updateTime": "",
  201. "delFlag": false,
  202. "salaryForm": "",
  203. "salaryFormN": "",
  204. "enterpriseName": "",
  205. "industryN": "",
  206. "settlementMethodN": "",
  207. ageRequirement:"",
  208. },
  209. }
  210. },
  211. onShareTimeline(){
  212. return {
  213. title: this.enterpriseInfo.name+'-'+this.showTitle,
  214. path: '/pages/packages/jobInformation/jobDetails?shareMP=1&id=' + this.id
  215. }
  216. },
  217. onShareAppMessage(res) {
  218. if (res.from === 'button') { // 来自页面内分享按钮
  219. //.log(res.target)
  220. }
  221. return {
  222. title: this.showTitle,
  223. path: '/pages/packages/jobInformation/jobDetails?shareMP=1&id=' + this.id
  224. }
  225. },
  226. computed: {
  227. imagesList(){
  228. if(this.info&&this.info.images){
  229. var images=this.info.images;
  230. return JSON.parse(images)
  231. }
  232. return []
  233. },
  234. showTitle() {
  235. if (this.info.id) {
  236. return (this.info.isOnline?'':'已下架-')+this.info.positionName + '-' + this.info.salary + this.getUnit(this.info)
  237. }
  238. return ''
  239. }
  240. },
  241. onLoad(op) {
  242. //uni.showShareMenu()
  243. this.id = op.id
  244. if (op.shareMP) {
  245. this.share = op.shareMP
  246. }
  247. if(op.isread){
  248. this.isRead=op.isread
  249. this.readId=op.readid
  250. }
  251. this.getInfo()
  252. this.getNewsInfo()
  253. },
  254. methods: {
  255. previewImage(index) {
  256. var list=this.imagesList.map(item=>{
  257. return item.url
  258. })
  259. uni.previewImage({
  260. urls:list ,
  261. current: index,
  262. indicator:"number",
  263. loop: true
  264. })
  265. },
  266. getNewsInfo(){
  267. API_weixin.bannerList({
  268. classify:2,
  269. }).then((res) => {
  270. uni.hideLoading();
  271. //this.newsList = res.data.data;
  272. this.bannerlist =res.data.data.map(item=>{
  273. item.image=item.picUrl
  274. return item
  275. })
  276. }).catch(error => {
  277. uni.showToast({icon: 'none',
  278. title: error,
  279. icon: "none"
  280. })
  281. })
  282. },
  283. customBack(){
  284. uni.redirectTo({
  285. url:"/pages/main/index/index"
  286. })
  287. },
  288. showPhoneBtn(){
  289. if(this.ck()){
  290. this.showPhone=true
  291. }else{
  292. uni.showToast({
  293. title:"实名认证后可以拨打电话",
  294. icon:"none"
  295. })
  296. }
  297. },
  298. ck(){
  299. var user = this.carhelp.getPersonInfo();
  300. if(user&&user.status ==1){
  301. return true
  302. }else{
  303. return false
  304. }
  305. },
  306. confirmPhone() {
  307. this.showPhone = false;
  308. uni.makePhoneCall({
  309. phoneNumber: this.info.contactsPhone
  310. });
  311. },
  312. isJoinBtn() {
  313. if (this.isJoin) {
  314. return
  315. }
  316. var user = this.carhelp.getPersonInfo();
  317. if (!user) {
  318. uni.showModal({
  319. title: '提示',
  320. content: '登录并实名认证创建简历后可以报名',
  321. confirmText: "前往登录",
  322. showCancel: true,
  323. success: function(res) {
  324. if (res.confirm) {
  325. uni.navigateTo({
  326. url: '/pages/tab/mine/mine'
  327. })
  328. } else if (res.cancel) {
  329. //.log('用户点击取消');
  330. }
  331. }
  332. });
  333. return
  334. }
  335. if (user.status != 1) {
  336. uni.showModal({
  337. title: '提示',
  338. content: '实名认证并创建简历后可以报名',
  339. confirmText: "实名认证",
  340. showCancel: true,
  341. success: function(res) {
  342. if (res.confirm) {
  343. uni.navigateTo({
  344. url: '/pages/packages/mine/otherServices/authentication'
  345. })
  346. } else if (res.cancel) {
  347. //.log('用户点击取消');
  348. }
  349. }
  350. });
  351. return
  352. }
  353. var jobInformationInfo = this.carhelp.getPersonInfoPlus().jobInformationInfo;
  354. if (!jobInformationInfo) {
  355. uni.showModal({
  356. title: '提示',
  357. content: '创建简历后可以报名',
  358. confirmText: "创建简历",
  359. showCancel: true,
  360. success: function(res) {
  361. if (res.confirm) {
  362. uni.navigateTo({
  363. url: '/pages/packages/mine/myJobInformation/myJobInformation'
  364. })
  365. } else if (res.cancel) {
  366. //.log('用户点击取消');
  367. }
  368. }
  369. });
  370. return
  371. }
  372. if (jobInformationInfo&&jobInformationInfo.status!=1) {
  373. uni.showToast({
  374. title:"简历审核中,请耐心等待",
  375. icon:"none"
  376. })
  377. return
  378. }
  379. if(user.intention=="2"){
  380. var _this= this
  381. uni.showModal({
  382. title: '提示',
  383. content: '您当前求职意向为[已入职/勿扰],是否帮您修改为[求职中],并为您报名此岗位?',
  384. confirmText: "报名",
  385. showCancel: true,
  386. success: function(res) {
  387. if (res.confirm) {
  388. _this.updateintentionBtn()
  389. } else if (res.cancel) {
  390. //.log('用户点击取消');
  391. }
  392. }
  393. });
  394. return
  395. }
  396. this.joinRecruitApi()
  397. },
  398. joinRecruitApi(){
  399. uni.showLoading({
  400. title: "加载中",
  401. mask: true,
  402. })
  403. API.joinRecruit({
  404. recruitId: this.id,
  405. }).then((res) => {
  406. this.isJoin = true;
  407. //this.info=res.data.recruitInformationInfo;
  408. uni.showModal({
  409. title: '提示',
  410. content: '报名成功',
  411. showCancel: false,
  412. success: function(res) {
  413. if (res.confirm) {
  414. //uni.navigateBack()
  415. } else if (res.cancel) {
  416. //.log('用户点击取消');
  417. }
  418. }
  419. });
  420. uni.hideLoading();
  421. }).catch(error => {
  422. uni.showToast({icon: 'none',
  423. title: error,
  424. icon: "none"
  425. })
  426. })
  427. },
  428. updateintentionBtn(){
  429. var intention=1
  430. uni.showLoading({
  431. title: "加载中",
  432. mask: true,
  433. })
  434. API.updateIntention({
  435. intention: intention
  436. }).then((res) => {
  437. uni.hideLoading();
  438. this.joinRecruitApi();
  439. }).catch(error => {
  440. this.showPhone = false;
  441. uni.hideLoading();
  442. })
  443. },
  444. getInfo() {
  445. uni.showLoading({
  446. title: "加载中",
  447. mask: true,
  448. })
  449. var obj={
  450. recruitId: this.id,
  451. }
  452. if(this.isRead==1){
  453. obj.isRead=1
  454. obj.jerId=this.readId
  455. }
  456. API.recruitDetail(obj).then((res) => {
  457. this.isJoin = res.data.isJoin;
  458. this.info = res.data.recruitInformationInfo;
  459. this.enterpriseInfo=res.data.enterpriseInfo
  460. uni.hideLoading();
  461. }).catch(error => {
  462. uni.showToast({icon: 'none',
  463. title: error,
  464. icon: "none"
  465. })
  466. })
  467. }
  468. }
  469. }
  470. </script>
  471. <style>
  472. page {
  473. background: #F0F0F2;
  474. padding-bottom: 100px;
  475. }
  476. </style>
  477. <style lang="scss" scoped>
  478. .codeImage{
  479. // height:160rpx;
  480. background-color: #fff;
  481. // text-align: center;
  482. // border: 1px dashed;
  483. // width: 700rpx;
  484. //position: relative;
  485. // padding-bottom: 20px;
  486. .codeImageView{
  487. //padding: 20rpx 0px 40rpx;
  488. color: #777777;
  489. //font-size: 24rpx;
  490. }
  491. .class{
  492. // position: absolute;
  493. img{
  494. margin: 3px;
  495. //border-bottom: 1px solid #777777;
  496. // position: absolute;
  497. width :180rpx;
  498. height: 160rpx;
  499. }
  500. }
  501. // .class0{
  502. // top:0 ;left:0;
  503. // }
  504. // .class1{
  505. // top:10px ;left:20px;
  506. // }
  507. // .class2{
  508. // top:20px ;left:40px;
  509. // }
  510. // .class3{
  511. // top:60px ;left:60px;
  512. // }
  513. // .class0{
  514. // top:0;left:0;
  515. // }
  516. // .class1{
  517. // top:3px;left:20px;
  518. // }
  519. // .class2{
  520. // top:6px;left:40px;
  521. // }
  522. // .class3{
  523. // left:60px;
  524. // }
  525. // .class{
  526. // position: absolute;
  527. // }
  528. }
  529. .swiper{
  530. margin: 20rpx;
  531. }
  532. // 岗位详情
  533. .content {
  534. padding: 32rpx;
  535. background-color: #fff;
  536. margin-bottom: 24rpx;
  537. .title {
  538. color: rgba(16, 16, 16, 1);
  539. font-size: 52rpx;
  540. font-family: 'PingFangSC-medium';
  541. .titleSpan{
  542. padding:0 12rpx;
  543. font-size: 42rpx;
  544. text-align: center;
  545. border-radius: 4px;
  546. color: rgba(255, 255, 255, 1);
  547. background-color: rgba(178, 184, 190, 1);
  548. }
  549. }
  550. .saraly {
  551. color: rgba(255, 61, 0, 1);
  552. font-size: 24px;
  553. margin-top: 16rpx;
  554. font-weight: bold;
  555. text {
  556. font-size: 28rpx
  557. }
  558. }
  559. .address {
  560. color: rgba(16, 16, 16, 1);
  561. margin-top: 40rpx;
  562. }
  563. .date-views {
  564. margin-top: 24rpx;
  565. display: flex;
  566. justify-content: space-between;
  567. .date {
  568. color: rgba(119, 119, 119, 1);
  569. font-size: 24rpx;
  570. }
  571. .views {
  572. color: rgba(119, 119, 119, 1);
  573. font-size: 24rpx;
  574. }
  575. }
  576. .headline {
  577. color: rgba(16, 16, 16, 1);
  578. font-size: 36rpx;
  579. }
  580. .group {
  581. margin-top: 24rpx;
  582. margin-bottom: 64rpx;
  583. .item {
  584. line-height: 40rpx;
  585. display: flex;
  586. margin-bottom: 8rpx;
  587. .item-title {
  588. color: rgba(119, 119, 119, 1);
  589. line-height: 40rpx;
  590. width: 150rpx;
  591. }
  592. .item-value {
  593. flex: 1;
  594. margin-left: 8rpx;
  595. color: #101010;
  596. }
  597. }
  598. }
  599. }
  600. // 底部按钮
  601. .bottom {
  602. background-color: #fff;
  603. padding: 24rpx 44rpx;
  604. display: flex;
  605. align-items: center;
  606. position: fixed;
  607. bottom: 0;
  608. left: 0;
  609. right: 0;
  610. .share {
  611. background-color: #fff;
  612. }
  613. // 分享
  614. .icon {
  615. width: 48rpx;
  616. height: 48rpx;
  617. img {
  618. width: 100%;
  619. height: 100%;
  620. }
  621. }
  622. .text {
  623. color: rgba(39, 149, 253, 1);
  624. font-size: 24rpx;
  625. line-height: 48rpx;
  626. }
  627. .btn {
  628. display: flex;
  629. margin-left: auto;
  630. .dialing {
  631. width: 240rpx;
  632. height: 88rpx;
  633. line-height: 88rpx;
  634. border-radius: 50px;
  635. background-color: #fff;
  636. color: rgba(39, 149, 253, 1);
  637. font-size: 36rpx;
  638. text-align: center;
  639. border: 1px solid rgba(39, 149, 253, 1);
  640. margin-right: 24rpx;
  641. }
  642. .invite {
  643. width: 280rpx;
  644. height: 88rpx;
  645. line-height: 88rpx;
  646. border-radius: 50px;
  647. background-color: rgba(34, 149, 255, 1);
  648. color: rgba(255, 255, 255, 1);
  649. font-size: 36rpx;
  650. text-align: center;
  651. }
  652. .isJoin {
  653. background-color: #19be6d;
  654. }
  655. }
  656. }
  657. .swiper2{
  658. display: flex;
  659. background-color: #2295ff;
  660. align-items: center;
  661. margin: 10px 10px;
  662. border-radius: 10px;
  663. .view{
  664. margin-left: 5px;
  665. color: #fff;
  666. font-size: 18px;
  667. }
  668. .span{
  669. margin-left: 5px;
  670. font-size: 12px;
  671. background: #fff;
  672. color: #2295ff;
  673. padding: 3px;
  674. border-radius: 4px;
  675. font-weight: 400;
  676. }
  677. }
  678. </style>