jobDetails.vue 13 KB

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