jobDetails.vue 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439
  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: '/?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. isJoinBtn() {
  182. if (this.isJoin) {
  183. return
  184. }
  185. var user=this.carhelp.getPersonInfo();
  186. if (!user) {
  187. uni.showModal({
  188. title: '提示',
  189. content: '登录并实名认证后可以报名',
  190. confirmText:"前往登录",
  191. showCancel: true,
  192. success: function(res) {
  193. if (res.confirm) {
  194. uni.navigateTo({
  195. url:'/pages/tab/mine/mine'
  196. })
  197. } else if (res.cancel) {
  198. console.log('用户点击取消');
  199. }
  200. }
  201. });
  202. return
  203. }
  204. if (user.status!=1) {
  205. uni.showModal({
  206. title: '提示',
  207. content: '实名认证后可以报名',
  208. confirmText:"实名认证",
  209. showCancel: true,
  210. success: function(res) {
  211. if (res.confirm) {
  212. uni.navigateTo({
  213. url:'/pages/packages/mine/otherServices/authentication'
  214. })
  215. } else if (res.cancel) {
  216. console.log('用户点击取消');
  217. }
  218. }
  219. });
  220. return
  221. }
  222. uni.showLoading({
  223. title: "加载中",
  224. mask: true,
  225. })
  226. API.joinRecruit({
  227. recruitId: this.id,
  228. }).then((res) => {
  229. this.isJoin = true;
  230. //this.info=res.data.recruitInformationInfo;
  231. uni.showModal({
  232. title: '提示',
  233. content: '报名成功',
  234. showCancel: false,
  235. success: function(res) {
  236. if (res.confirm) {
  237. //uni.navigateBack()
  238. } else if (res.cancel) {
  239. console.log('用户点击取消');
  240. }
  241. }
  242. });
  243. uni.hideLoading();
  244. }).catch(error => {
  245. uni.showToast({
  246. title: error,
  247. icon: "none"
  248. })
  249. })
  250. },
  251. getInfo() {
  252. uni.showLoading({
  253. title: "加载中",
  254. mask: true,
  255. })
  256. API.recruitDetail({
  257. recruitId: this.id,
  258. }).then((res) => {
  259. this.isJoin = res.data.isJoin;
  260. this.info = res.data.recruitInformationInfo;
  261. uni.hideLoading();
  262. }).catch(error => {
  263. uni.showToast({
  264. title: error,
  265. icon: "none"
  266. })
  267. })
  268. }
  269. }
  270. }
  271. </script>
  272. <style>
  273. page {
  274. background: #F0F0F2;
  275. padding-bottom: 150px;
  276. }
  277. </style>
  278. <style lang="scss" scoped>
  279. // 岗位详情
  280. .content {
  281. padding: 32rpx;
  282. background-color: #fff;
  283. margin-bottom: 24rpx;
  284. .title {
  285. color: rgba(16, 16, 16, 1);
  286. font-size: 48rpx;
  287. font-family: 'PingFangSC-medium';
  288. }
  289. .saraly {
  290. color: rgba(255, 61, 0, 1);
  291. font-size: 24px;
  292. margin-top: 16rpx;
  293. font-weight: bold;
  294. text {
  295. font-size: 28rpx
  296. }
  297. }
  298. .address {
  299. color: rgba(16, 16, 16, 1);
  300. margin-top: 40rpx;
  301. }
  302. .date-views {
  303. margin-top: 24rpx;
  304. display: flex;
  305. justify-content: space-between;
  306. .date {
  307. color: rgba(119, 119, 119, 1);
  308. font-size: 24rpx;
  309. }
  310. .views {
  311. color: rgba(119, 119, 119, 1);
  312. font-size: 24rpx;
  313. }
  314. }
  315. .headline {
  316. color: rgba(16, 16, 16, 1);
  317. font-size: 36rpx;
  318. }
  319. .group {
  320. margin-top: 24rpx;
  321. margin-bottom: 64rpx;
  322. .item {
  323. line-height: 40rpx;
  324. display: flex;
  325. margin-bottom: 8rpx;
  326. .item-title {
  327. color: rgba(119, 119, 119, 1);
  328. line-height: 40rpx;
  329. width: 140rpx;
  330. }
  331. .item-value {
  332. flex: 1;
  333. margin-left: 8rpx;
  334. color: #101010;
  335. }
  336. }
  337. }
  338. }
  339. // 底部按钮
  340. .bottom {
  341. background-color: #fff;
  342. padding: 24rpx 44rpx;
  343. display: flex;
  344. align-items: center;
  345. position: fixed;
  346. bottom: 0;
  347. left: 0;
  348. right: 0;
  349. .share {
  350. background-color: #fff;
  351. }
  352. // 分享
  353. .icon {
  354. width: 48rpx;
  355. height: 48rpx;
  356. img {
  357. width: 100%;
  358. height: 100%;
  359. }
  360. }
  361. .text {
  362. color: rgba(39, 149, 253, 1);
  363. font-size: 24rpx;
  364. line-height: 48rpx;
  365. }
  366. .btn {
  367. display: flex;
  368. margin-left: auto;
  369. .dialing {
  370. width: 240rpx;
  371. height: 88rpx;
  372. line-height: 88rpx;
  373. border-radius: 50px;
  374. background-color: #fff;
  375. color: rgba(39, 149, 253, 1);
  376. font-size: 36rpx;
  377. text-align: center;
  378. border: 1px solid rgba(39, 149, 253, 1);
  379. margin-right: 24rpx;
  380. }
  381. .invite {
  382. width: 280rpx;
  383. height: 88rpx;
  384. line-height: 88rpx;
  385. border-radius: 50px;
  386. background-color: rgba(34, 149, 255, 1);
  387. color: rgba(255, 255, 255, 1);
  388. font-size: 36rpx;
  389. text-align: center;
  390. }
  391. .isJoin{
  392. background-color: #19be6d;
  393. }
  394. }
  395. }
  396. </style>