jobDetails.vue 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759
  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: "荆州经开区共享用工平台",
  214. }
  215. },
  216. onShareAppMessage(res) {
  217. if (res.from === 'button') { // 来自页面内分享按钮
  218. //.log(res.target)
  219. }
  220. return {
  221. title: this.showTitle,
  222. path: '/pages/packages/jobInformation/jobDetails?shareMP=1&id=' + this.id
  223. }
  224. },
  225. computed: {
  226. imagesList(){
  227. if(this.info&&this.info.images){
  228. var images=this.info.images;
  229. return JSON.parse(images)
  230. }
  231. return []
  232. },
  233. showTitle() {
  234. if (this.info.id) {
  235. return (this.info.isOnline?'':'已下架-')+this.info.positionName + '-' + this.info.salary + this.getUnit(this.info)
  236. }
  237. return ''
  238. }
  239. },
  240. onLoad(op) {
  241. //uni.showShareMenu()
  242. this.id = op.id
  243. if (op.shareMP) {
  244. this.share = op.shareMP
  245. }
  246. if(op.isread){
  247. this.isRead=op.isread
  248. this.readId=op.readid
  249. }
  250. this.getInfo()
  251. this.getNewsInfo()
  252. },
  253. methods: {
  254. previewImage(index) {
  255. var list=this.imagesList.map(item=>{
  256. return item.url
  257. })
  258. uni.previewImage({
  259. urls:list ,
  260. current: index,
  261. indicator:"number",
  262. loop: true
  263. })
  264. },
  265. getNewsInfo(){
  266. API_weixin.bannerList({
  267. classify:2,
  268. }).then((res) => {
  269. uni.hideLoading();
  270. //this.newsList = res.data.data;
  271. this.bannerlist =res.data.data.map(item=>{
  272. item.image=item.picUrl
  273. return item
  274. })
  275. }).catch(error => {
  276. uni.showToast({icon: 'none',
  277. title: error,
  278. icon: "none"
  279. })
  280. })
  281. },
  282. customBack(){
  283. uni.redirectTo({
  284. url:"/pages/main/index/index"
  285. })
  286. },
  287. showPhoneBtn(){
  288. if(this.ck()){
  289. this.showPhone=true
  290. }else{
  291. uni.showToast({
  292. title:"实名认证后可以拨打电话",
  293. icon:"none"
  294. })
  295. }
  296. },
  297. ck(){
  298. var user = this.carhelp.getPersonInfo();
  299. if(user&&user.status ==1){
  300. return true
  301. }else{
  302. return false
  303. }
  304. },
  305. confirmPhone() {
  306. this.showPhone = false;
  307. uni.makePhoneCall({
  308. phoneNumber: this.info.contactsPhone
  309. });
  310. },
  311. isJoinBtn() {
  312. if (this.isJoin) {
  313. return
  314. }
  315. var user = this.carhelp.getPersonInfo();
  316. if (!user) {
  317. uni.showModal({
  318. title: '提示',
  319. content: '登录并实名认证创建简历后可以报名',
  320. confirmText: "前往登录",
  321. showCancel: true,
  322. success: function(res) {
  323. if (res.confirm) {
  324. uni.navigateTo({
  325. url: '/pages/tab/mine/mine'
  326. })
  327. } else if (res.cancel) {
  328. //.log('用户点击取消');
  329. }
  330. }
  331. });
  332. return
  333. }
  334. if (user.status != 1) {
  335. uni.showModal({
  336. title: '提示',
  337. content: '实名认证并创建简历后可以报名',
  338. confirmText: "实名认证",
  339. showCancel: true,
  340. success: function(res) {
  341. if (res.confirm) {
  342. uni.navigateTo({
  343. url: '/pages/packages/mine/otherServices/authentication'
  344. })
  345. } else if (res.cancel) {
  346. //.log('用户点击取消');
  347. }
  348. }
  349. });
  350. return
  351. }
  352. var jobInformationInfo = this.carhelp.getPersonInfoPlus().jobInformationInfo;
  353. if (!jobInformationInfo) {
  354. uni.showModal({
  355. title: '提示',
  356. content: '创建简历后可以报名',
  357. confirmText: "创建简历",
  358. showCancel: true,
  359. success: function(res) {
  360. if (res.confirm) {
  361. uni.navigateTo({
  362. url: '/pages/packages/mine/myJobInformation/myJobInformation'
  363. })
  364. } else if (res.cancel) {
  365. //.log('用户点击取消');
  366. }
  367. }
  368. });
  369. return
  370. }
  371. if (jobInformationInfo&&jobInformationInfo.status!=1) {
  372. uni.showToast({
  373. title:"简历审核中,请耐心等待",
  374. icon:"none"
  375. })
  376. return
  377. }
  378. if(user.intention=="2"){
  379. var _this= this
  380. uni.showModal({
  381. title: '提示',
  382. content: '您当前求职意向为[已入职/勿扰],是否帮您修改为[求职中],并为您报名此岗位?',
  383. confirmText: "报名",
  384. showCancel: true,
  385. success: function(res) {
  386. if (res.confirm) {
  387. _this.updateintentionBtn()
  388. } else if (res.cancel) {
  389. //.log('用户点击取消');
  390. }
  391. }
  392. });
  393. return
  394. }
  395. this.joinRecruitApi()
  396. },
  397. joinRecruitApi(){
  398. uni.showLoading({
  399. title: "加载中",
  400. mask: true,
  401. })
  402. API.joinRecruit({
  403. recruitId: this.id,
  404. }).then((res) => {
  405. this.isJoin = true;
  406. //this.info=res.data.recruitInformationInfo;
  407. uni.showModal({
  408. title: '提示',
  409. content: '报名成功',
  410. showCancel: false,
  411. success: function(res) {
  412. if (res.confirm) {
  413. //uni.navigateBack()
  414. } else if (res.cancel) {
  415. //.log('用户点击取消');
  416. }
  417. }
  418. });
  419. uni.hideLoading();
  420. }).catch(error => {
  421. uni.showToast({icon: 'none',
  422. title: error,
  423. icon: "none"
  424. })
  425. })
  426. },
  427. updateintentionBtn(){
  428. var intention=1
  429. uni.showLoading({
  430. title: "加载中",
  431. mask: true,
  432. })
  433. API.updateIntention({
  434. intention: intention
  435. }).then((res) => {
  436. uni.hideLoading();
  437. this.joinRecruitApi();
  438. }).catch(error => {
  439. this.showPhone = false;
  440. uni.hideLoading();
  441. })
  442. },
  443. getInfo() {
  444. uni.showLoading({
  445. title: "加载中",
  446. mask: true,
  447. })
  448. var obj={
  449. recruitId: this.id,
  450. }
  451. if(this.isRead==1){
  452. obj.isRead=1
  453. obj.jerId=this.readId
  454. }
  455. API.recruitDetail(obj).then((res) => {
  456. this.isJoin = res.data.isJoin;
  457. this.info = res.data.recruitInformationInfo;
  458. this.enterpriseInfo=res.data.enterpriseInfo
  459. uni.hideLoading();
  460. }).catch(error => {
  461. uni.showToast({icon: 'none',
  462. title: error,
  463. icon: "none"
  464. })
  465. })
  466. }
  467. }
  468. }
  469. </script>
  470. <style>
  471. page {
  472. background: #F0F0F2;
  473. padding-bottom: 100px;
  474. }
  475. </style>
  476. <style lang="scss" scoped>
  477. .codeImage{
  478. // height:160rpx;
  479. background-color: #fff;
  480. // text-align: center;
  481. // border: 1px dashed;
  482. // width: 700rpx;
  483. //position: relative;
  484. // padding-bottom: 20px;
  485. .codeImageView{
  486. //padding: 20rpx 0px 40rpx;
  487. color: #777777;
  488. //font-size: 24rpx;
  489. }
  490. .class{
  491. // position: absolute;
  492. img{
  493. margin: 3px;
  494. //border-bottom: 1px solid #777777;
  495. // position: absolute;
  496. width :180rpx;
  497. height: 160rpx;
  498. }
  499. }
  500. // .class0{
  501. // top:0 ;left:0;
  502. // }
  503. // .class1{
  504. // top:10px ;left:20px;
  505. // }
  506. // .class2{
  507. // top:20px ;left:40px;
  508. // }
  509. // .class3{
  510. // top:60px ;left:60px;
  511. // }
  512. // .class0{
  513. // top:0;left:0;
  514. // }
  515. // .class1{
  516. // top:3px;left:20px;
  517. // }
  518. // .class2{
  519. // top:6px;left:40px;
  520. // }
  521. // .class3{
  522. // left:60px;
  523. // }
  524. // .class{
  525. // position: absolute;
  526. // }
  527. }
  528. .swiper{
  529. margin: 20rpx;
  530. }
  531. // 岗位详情
  532. .content {
  533. padding: 32rpx;
  534. background-color: #fff;
  535. margin-bottom: 24rpx;
  536. .title {
  537. color: rgba(16, 16, 16, 1);
  538. font-size: 52rpx;
  539. font-family: 'PingFangSC-medium';
  540. .titleSpan{
  541. padding:0 12rpx;
  542. font-size: 42rpx;
  543. text-align: center;
  544. border-radius: 4px;
  545. color: rgba(255, 255, 255, 1);
  546. background-color: rgba(178, 184, 190, 1);
  547. }
  548. }
  549. .saraly {
  550. color: rgba(255, 61, 0, 1);
  551. font-size: 24px;
  552. margin-top: 16rpx;
  553. font-weight: bold;
  554. text {
  555. font-size: 28rpx
  556. }
  557. }
  558. .address {
  559. color: rgba(16, 16, 16, 1);
  560. margin-top: 40rpx;
  561. }
  562. .date-views {
  563. margin-top: 24rpx;
  564. display: flex;
  565. justify-content: space-between;
  566. .date {
  567. color: rgba(119, 119, 119, 1);
  568. font-size: 24rpx;
  569. }
  570. .views {
  571. color: rgba(119, 119, 119, 1);
  572. font-size: 24rpx;
  573. }
  574. }
  575. .headline {
  576. color: rgba(16, 16, 16, 1);
  577. font-size: 36rpx;
  578. }
  579. .group {
  580. margin-top: 24rpx;
  581. margin-bottom: 64rpx;
  582. .item {
  583. line-height: 40rpx;
  584. display: flex;
  585. margin-bottom: 8rpx;
  586. .item-title {
  587. color: rgba(119, 119, 119, 1);
  588. line-height: 40rpx;
  589. width: 150rpx;
  590. }
  591. .item-value {
  592. flex: 1;
  593. margin-left: 8rpx;
  594. color: #101010;
  595. }
  596. }
  597. }
  598. }
  599. // 底部按钮
  600. .bottom {
  601. background-color: #fff;
  602. padding: 24rpx 44rpx;
  603. display: flex;
  604. align-items: center;
  605. position: fixed;
  606. bottom: 0;
  607. left: 0;
  608. right: 0;
  609. .share {
  610. background-color: #fff;
  611. }
  612. // 分享
  613. .icon {
  614. width: 48rpx;
  615. height: 48rpx;
  616. img {
  617. width: 100%;
  618. height: 100%;
  619. }
  620. }
  621. .text {
  622. color: rgba(39, 149, 253, 1);
  623. font-size: 24rpx;
  624. line-height: 48rpx;
  625. }
  626. .btn {
  627. display: flex;
  628. margin-left: auto;
  629. .dialing {
  630. width: 240rpx;
  631. height: 88rpx;
  632. line-height: 88rpx;
  633. border-radius: 50px;
  634. background-color: #fff;
  635. color: rgba(39, 149, 253, 1);
  636. font-size: 36rpx;
  637. text-align: center;
  638. border: 1px solid rgba(39, 149, 253, 1);
  639. margin-right: 24rpx;
  640. }
  641. .invite {
  642. width: 280rpx;
  643. height: 88rpx;
  644. line-height: 88rpx;
  645. border-radius: 50px;
  646. background-color: rgba(34, 149, 255, 1);
  647. color: rgba(255, 255, 255, 1);
  648. font-size: 36rpx;
  649. text-align: center;
  650. }
  651. .isJoin {
  652. background-color: #19be6d;
  653. }
  654. }
  655. }
  656. .swiper2{
  657. display: flex;
  658. background-color: #2295ff;
  659. align-items: center;
  660. margin: 10px 10px;
  661. border-radius: 10px;
  662. .view{
  663. margin-left: 5px;
  664. color: #fff;
  665. font-size: 18px;
  666. }
  667. .span{
  668. margin-left: 5px;
  669. font-size: 12px;
  670. background: #fff;
  671. color: #2295ff;
  672. padding: 3px;
  673. border-radius: 4px;
  674. font-weight: 400;
  675. }
  676. }
  677. </style>