jobDetails.vue 10.0 KB

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