jobDetails.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607
  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 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. ageRequirement:"",
  191. },
  192. }
  193. },
  194. onShareTimeline(){
  195. return {
  196. title: "荆州经开区共享用工平台",
  197. }
  198. },
  199. onShareAppMessage(res) {
  200. if (res.from === 'button') { // 来自页面内分享按钮
  201. //.log(res.target)
  202. }
  203. return {
  204. title: this.showTitle,
  205. path: '/pages/packages/jobInformation/jobDetails?shareMP=1&id=' + this.id
  206. }
  207. },
  208. computed: {
  209. showTitle() {
  210. if (this.info.id) {
  211. return (this.info.isOnline?'':'已下架-')+this.info.positionName + '-' + this.info.salary + this.getUnit(this.info)
  212. }
  213. return ''
  214. }
  215. },
  216. onLoad(op) {
  217. //uni.showShareMenu()
  218. this.id = op.id
  219. if (op.shareMP) {
  220. this.share = op.shareMP
  221. }
  222. if(op.isread){
  223. this.isRead=op.isread
  224. this.readId=op.readid
  225. }
  226. this.getInfo()
  227. },
  228. methods: {
  229. customBack(){
  230. uni.redirectTo({
  231. url:"/pages/main/index/index"
  232. })
  233. },
  234. showPhoneBtn(){
  235. if(this.ck()){
  236. this.showPhone=true
  237. }else{
  238. uni.showToast({
  239. title:"实名认证后可以拨打电话",
  240. icon:"none"
  241. })
  242. }
  243. },
  244. ck(){
  245. var user = this.carhelp.getPersonInfo();
  246. if(user&&user.status ==1){
  247. return true
  248. }else{
  249. return false
  250. }
  251. },
  252. confirmPhone() {
  253. this.showPhone = false;
  254. uni.makePhoneCall({
  255. phoneNumber: this.info.contactsPhone
  256. });
  257. },
  258. isJoinBtn() {
  259. if (this.isJoin) {
  260. return
  261. }
  262. var user = this.carhelp.getPersonInfo();
  263. if (!user) {
  264. uni.showModal({
  265. title: '提示',
  266. content: '登录并实名认证创建简历后可以报名',
  267. confirmText: "前往登录",
  268. showCancel: true,
  269. success: function(res) {
  270. if (res.confirm) {
  271. uni.navigateTo({
  272. url: '/pages/tab/mine/mine'
  273. })
  274. } else if (res.cancel) {
  275. //.log('用户点击取消');
  276. }
  277. }
  278. });
  279. return
  280. }
  281. if (user.status != 1) {
  282. uni.showModal({
  283. title: '提示',
  284. content: '实名认证并创建简历后可以报名',
  285. confirmText: "实名认证",
  286. showCancel: true,
  287. success: function(res) {
  288. if (res.confirm) {
  289. uni.navigateTo({
  290. url: '/pages/packages/mine/otherServices/authentication'
  291. })
  292. } else if (res.cancel) {
  293. //.log('用户点击取消');
  294. }
  295. }
  296. });
  297. return
  298. }
  299. var jobInformationInfo = this.carhelp.getPersonInfoPlus().jobInformationInfo;
  300. if (!jobInformationInfo) {
  301. uni.showModal({
  302. title: '提示',
  303. content: '创建简历后可以报名',
  304. confirmText: "创建简历",
  305. showCancel: true,
  306. success: function(res) {
  307. if (res.confirm) {
  308. uni.navigateTo({
  309. url: '/pages/packages/mine/myJobInformation/myJobInformation'
  310. })
  311. } else if (res.cancel) {
  312. //.log('用户点击取消');
  313. }
  314. }
  315. });
  316. return
  317. }
  318. if (jobInformationInfo&&jobInformationInfo.status!=1) {
  319. uni.showToast({
  320. title:"简历审核中,请耐心等待",
  321. icon:"none"
  322. })
  323. return
  324. }
  325. if(user.intention=="2"){
  326. var _this= this
  327. uni.showModal({
  328. title: '提示',
  329. content: '您当前求职意向为[已入职/勿扰],是否帮您修改为[求职中],并为您报名此岗位?',
  330. confirmText: "报名",
  331. showCancel: true,
  332. success: function(res) {
  333. if (res.confirm) {
  334. _this.updateintentionBtn()
  335. } else if (res.cancel) {
  336. //.log('用户点击取消');
  337. }
  338. }
  339. });
  340. return
  341. }
  342. this.joinRecruitApi()
  343. },
  344. joinRecruitApi(){
  345. uni.showLoading({
  346. title: "加载中",
  347. mask: true,
  348. })
  349. API.joinRecruit({
  350. recruitId: this.id,
  351. }).then((res) => {
  352. this.isJoin = true;
  353. //this.info=res.data.recruitInformationInfo;
  354. uni.showModal({
  355. title: '提示',
  356. content: '报名成功',
  357. showCancel: false,
  358. success: function(res) {
  359. if (res.confirm) {
  360. //uni.navigateBack()
  361. } else if (res.cancel) {
  362. //.log('用户点击取消');
  363. }
  364. }
  365. });
  366. uni.hideLoading();
  367. }).catch(error => {
  368. uni.showToast({icon: 'none',
  369. title: error,
  370. icon: "none"
  371. })
  372. })
  373. },
  374. updateintentionBtn(){
  375. var intention=1
  376. uni.showLoading({
  377. title: "加载中",
  378. mask: true,
  379. })
  380. API.updateIntention({
  381. intention: intention
  382. }).then((res) => {
  383. uni.hideLoading();
  384. this.joinRecruitApi();
  385. }).catch(error => {
  386. this.showPhone = false;
  387. uni.hideLoading();
  388. })
  389. },
  390. getInfo() {
  391. uni.showLoading({
  392. title: "加载中",
  393. mask: true,
  394. })
  395. var obj={
  396. recruitId: this.id,
  397. }
  398. if(this.isRead==1){
  399. obj.isRead=1
  400. obj.jerId=this.readId
  401. }
  402. API.recruitDetail(obj).then((res) => {
  403. this.isJoin = res.data.isJoin;
  404. this.info = res.data.recruitInformationInfo;
  405. this.enterpriseInfo=res.data.enterpriseInfo
  406. uni.hideLoading();
  407. }).catch(error => {
  408. uni.showToast({icon: 'none',
  409. title: error,
  410. icon: "none"
  411. })
  412. })
  413. }
  414. }
  415. }
  416. </script>
  417. <style>
  418. page {
  419. background: #F0F0F2;
  420. padding-bottom: 150px;
  421. }
  422. </style>
  423. <style lang="scss" scoped>
  424. // 岗位详情
  425. .content {
  426. padding: 32rpx;
  427. background-color: #fff;
  428. margin-bottom: 24rpx;
  429. .title {
  430. color: rgba(16, 16, 16, 1);
  431. font-size: 52rpx;
  432. font-family: 'PingFangSC-medium';
  433. .titleSpan{
  434. padding:0 12rpx;
  435. font-size: 42rpx;
  436. text-align: center;
  437. border-radius: 4px;
  438. color: rgba(255, 255, 255, 1);
  439. background-color: rgba(178, 184, 190, 1);
  440. }
  441. }
  442. .saraly {
  443. color: rgba(255, 61, 0, 1);
  444. font-size: 24px;
  445. margin-top: 16rpx;
  446. font-weight: bold;
  447. text {
  448. font-size: 28rpx
  449. }
  450. }
  451. .address {
  452. color: rgba(16, 16, 16, 1);
  453. margin-top: 40rpx;
  454. }
  455. .date-views {
  456. margin-top: 24rpx;
  457. display: flex;
  458. justify-content: space-between;
  459. .date {
  460. color: rgba(119, 119, 119, 1);
  461. font-size: 24rpx;
  462. }
  463. .views {
  464. color: rgba(119, 119, 119, 1);
  465. font-size: 24rpx;
  466. }
  467. }
  468. .headline {
  469. color: rgba(16, 16, 16, 1);
  470. font-size: 36rpx;
  471. }
  472. .group {
  473. margin-top: 24rpx;
  474. margin-bottom: 64rpx;
  475. .item {
  476. line-height: 40rpx;
  477. display: flex;
  478. margin-bottom: 8rpx;
  479. .item-title {
  480. color: rgba(119, 119, 119, 1);
  481. line-height: 40rpx;
  482. width: 150rpx;
  483. }
  484. .item-value {
  485. flex: 1;
  486. margin-left: 8rpx;
  487. color: #101010;
  488. }
  489. }
  490. }
  491. }
  492. // 底部按钮
  493. .bottom {
  494. background-color: #fff;
  495. padding: 24rpx 44rpx;
  496. display: flex;
  497. align-items: center;
  498. position: fixed;
  499. bottom: 0;
  500. left: 0;
  501. right: 0;
  502. .share {
  503. background-color: #fff;
  504. }
  505. // 分享
  506. .icon {
  507. width: 48rpx;
  508. height: 48rpx;
  509. img {
  510. width: 100%;
  511. height: 100%;
  512. }
  513. }
  514. .text {
  515. color: rgba(39, 149, 253, 1);
  516. font-size: 24rpx;
  517. line-height: 48rpx;
  518. }
  519. .btn {
  520. display: flex;
  521. margin-left: auto;
  522. .dialing {
  523. width: 240rpx;
  524. height: 88rpx;
  525. line-height: 88rpx;
  526. border-radius: 50px;
  527. background-color: #fff;
  528. color: rgba(39, 149, 253, 1);
  529. font-size: 36rpx;
  530. text-align: center;
  531. border: 1px solid rgba(39, 149, 253, 1);
  532. margin-right: 24rpx;
  533. }
  534. .invite {
  535. width: 280rpx;
  536. height: 88rpx;
  537. line-height: 88rpx;
  538. border-radius: 50px;
  539. background-color: rgba(34, 149, 255, 1);
  540. color: rgba(255, 255, 255, 1);
  541. font-size: 36rpx;
  542. text-align: center;
  543. }
  544. .isJoin {
  545. background-color: #19be6d;
  546. }
  547. }
  548. }
  549. </style>