jobDetails.vue 14 KB

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