jobDetails.vue 11 KB

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