jobDetails.vue 12 KB

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