jobDetails.vue 9.0 KB

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