index.vue 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317
  1. <template>
  2. <scroll-view class="scrollBox" scroll-y="true" style="position:relative;">
  3. <view class="box">
  4. <view v-if="loading" class="vertical80-center">{{ loadingText }}</view>
  5. <view v-else>
  6. <!-- 职位名称 + 薪资 -->
  7. <view class="d-flex justify-space-between">
  8. <uni-icons class="icon-a-1_zhaopin" custom-prefix="iconfont" color="#e03506" size="30"/>
  9. <h2 class="JobName ellipsis">
  10. {{ info.name }}
  11. </h2>
  12. <span class="salary w-600">{{ info.payFrom }}-{{ info.payTo }}/{{ positionInfo.payName }}</span>
  13. </view>
  14. <!-- 职位地区 收藏职位 -->
  15. <view class="d-flex justify-space-between mt-5">
  16. <view class="bold" style="font-size: 14px;">
  17. <span>
  18. <span>{{positionInfo?.areaName }}</span>
  19. <span class="viewider-mx">|</span>
  20. <span>{{positionInfo?.eduName }}</span>
  21. <span class="viewider-mx">|</span>
  22. <span>{{positionInfo?.expName }}</span>
  23. </span>
  24. </view>
  25. <!-- 收藏职位 -->
  26. <view @click="handleCollection">
  27. <uni-icons
  28. :type="isCollection ? 'heart-filled' : 'heart'"
  29. color="#fc6d5e"
  30. class="mr"
  31. size="25"
  32. ></uni-icons>
  33. <!-- <span style="color: #fc6d5e">{{ isCollection ? '取消收藏' : '收藏职位' }}</span> -->
  34. </view>
  35. </view>
  36. <!-- 标签 -->
  37. <view class="tagList mt">
  38. <!-- <view class="tagListItem" v-for="(tag,i) in info?.tagList || []" :key="'tagList' + i">
  39. <uni-tag
  40. :text="tag"
  41. inverted="false"
  42. size="small"
  43. custom-style="background-color: #e2f0ef; color:#00897B; border-color:#e2f0ef;"
  44. />
  45. </view> -->
  46. <view class="tag" v-for="(tag,i) in info?.tagList || []" :key="'tagList' + i">
  47. {{ tag }}
  48. </view>
  49. </view>
  50. <!-- 赏金 -->
  51. <view class="topLine mt-5" style="display: flex; align-items: center;">
  52. <view class="hirePrice">{{ `赏金:${commissionCalculation(2000, 1)}元` }}</view>
  53. </view>
  54. <!-- 岗位职责 + -->
  55. <view class="topLine fs14 mt-5">
  56. <view class="fs15 w-600 my5">岗位职责</view>
  57. <view v-if="info.content" class="requirement fs14" v-html="info.content?.replace(/\n/g, '</br>')"></view>
  58. <view v-else>暂无</view>
  59. </view>
  60. <view class="topLine mt-5">
  61. <view class="fs15 w-600 my5">岗位要求</view>
  62. <view v-if="info.requirement" class="requirement fs14" v-html="info.requirement?.replace(/\n/g, '</br>')"></view>
  63. <view v-else>暂无</view>
  64. </view>
  65. <view class="topLine mt-5 d-flex">
  66. <view class="avatarBox">
  67. <image class="avatar" :src="info.contact?.avatar || 'https://minio.citupro.com/dev/menduner/7.png'"></image>
  68. </view>
  69. <view >
  70. <view class="contact-name">{{ info.contact?.name }}</view>
  71. <view class="contact-info">{{ info.enterprise?.name }} · {{ info.contact?.postNameCn }}</view>
  72. </view>
  73. </view>
  74. <view class="topLine mt-5">
  75. <view class="fs15 w-600 my5">工作地址</view>
  76. <view class="my10">
  77. <uni-icons
  78. type="map-pin-ellipse"
  79. color="#00897B"
  80. class="mr"
  81. size="25"
  82. ></uni-icons>
  83. <span style="color: var(--color-666);font-size: 15px;line-height: 26px;">{{ info.address }}</span>
  84. </view>
  85. </view>
  86. </view>
  87. </view>
  88. </scroll-view>
  89. <view class="bottom-sticky">
  90. <view style="display: flex;justify-content: space-evenly;align-items: center;width: 100%;margin: 20rpx 0;">
  91. <view @click="null" style="display: flex;justify-content: center;flex-direction: column;align-items: center;">
  92. <uni-icons type="redo-filled" size="24" color="#00897B"/>
  93. <span style="color:#00897B;font-weight:bold;">分享</span>
  94. </view>
  95. <button v-if="alreadySendBtn" type="primary" size="default" class="buttons" style="background-color:grey;">已投简历</button>
  96. <button v-else type="primary" size="default" class="buttons" @click="null">投个简历</button>
  97. </view>
  98. </view>
  99. </template>
  100. <script setup>
  101. import { commissionCalculation } from '@/utils/position'
  102. // import loginPage from '@/views/common/loginDialog.vue'
  103. // import simplePage from './sendResume/simple.vue'
  104. // import selectPage from './sendResume/select.vue'
  105. import { reactive, ref } from 'vue';
  106. import {
  107. getPositionDetails,
  108. // jobCvRelCheckSend,
  109. // getPersonJobUnfavorite,
  110. // getPersonJobFavorite,
  111. // getJobFavoriteCheck
  112. } from '@/api/position'
  113. import { dealDictObjData } from '@/utils/position'
  114. // import { getToken } from '@/utils/auth'
  115. // import Snackbar from '@/plugins/snackbar'
  116. import { onLoad } from '@dcloudio/uni-app';
  117. const loading = ref(false)
  118. const loadingText = ref('加载中 . . . ')
  119. // 职位详情
  120. const info = ref({})
  121. const positionInfo = ref({})
  122. const getPositionDetail = async () => {
  123. const { data } = await getPositionDetails({ id: jobId })
  124. info.value = data
  125. positionInfo.value = { ...dealDictObjData({}, info.value), ...info.value }
  126. loading.value = false
  127. console.log('positionInfo', positionInfo.value)
  128. }
  129. let jobId = ''
  130. onLoad((options) => {
  131. jobId = options?.id || ''
  132. if (jobId) {
  133. loading.value = true
  134. loadingText.value = '加载中 . . . '
  135. getPositionDetail()
  136. } else {
  137. loadingText.value = '加载失败 . . . '
  138. }
  139. })
  140. const desc = [
  141. { mdi: 'mdi-map-marker-outline', value: 'areaName' },
  142. { mdi: 'mdi-school-outline', value: 'eduName' },
  143. { mdi: 'mdi-clock-time-ten-outline', value: 'expName' }
  144. ]
  145. </script>
  146. <style scoped lang="scss">
  147. .mb5 { margin-bottom: 5px; }
  148. .my5 { margin: 5px 0; }
  149. .my10 { margin: 10px 0; }
  150. .mt10 { margin-top: 10px; }
  151. .fs14 { font-size: 14px; }
  152. .fs15 { font-size: 15px; }
  153. .box {
  154. padding: 10px 30rpx 100px;
  155. }
  156. .JobName {
  157. color: #37576c;
  158. font-size: 24px;
  159. margin-right: 30px;
  160. margin-top: 1px;
  161. vertical-align: middle;
  162. flex: 1;
  163. }
  164. .tagList {
  165. width: 100%;
  166. display: flex;
  167. flex-wrap: wrap;
  168. .tagListItem {
  169. margin: 10rpx 10rpx 10rpx 0;
  170. }
  171. }
  172. .topLine {
  173. border-top: 1px solid #EDEDED;
  174. // border-bottom: 1px solid #EDEDED;
  175. padding-top: 10px;
  176. }
  177. .tag {
  178. padding: 5px 10px;
  179. background-color: #e2f0ef;
  180. color: #00897B;
  181. border-radius: 5px;
  182. font-size: 14px;
  183. margin-right: 8px;
  184. margin-top: 4px;
  185. }
  186. .hirePrice {
  187. padding: 5px 10px;
  188. background-color: #fc6d5e63;
  189. color: #ff250e;
  190. border-radius: 5px;
  191. font-size: 14px;
  192. margin-top: 4px;
  193. }
  194. .requirement {
  195. white-space: pre-wrap;
  196. word-break: break-all;
  197. line-height: 28px;
  198. color: var(--color-333);
  199. font-size: 15px;
  200. text-align: justify;
  201. letter-spacing: 0;
  202. }
  203. //底部按钮公用定位
  204. .bottom-sticky{
  205. display: flex;
  206. width:100vw;
  207. position: fixed;
  208. bottom:0;
  209. left: 0;
  210. background-image:linear-gradient(rgba(255,255,255,1),white);
  211. }
  212. .buttons{
  213. width: 60vw;
  214. height: 44px;
  215. border-radius: 25px;
  216. background-color: var(--v-primary-base);
  217. margin: 0;
  218. }
  219. .noMore{
  220. margin: 20px 0;
  221. }
  222. .date-time{
  223. color:#d9d0d2;
  224. float: right;
  225. }
  226. .viewided-line {
  227. width: 100%;
  228. height: 1px;
  229. background-color: #f0f2f7;
  230. margin: 20px 0;
  231. }
  232. .avatarBox{
  233. max-width: 40px;
  234. max-height: 40px;
  235. margin: 0 10px;
  236. }
  237. .avatar{
  238. width: 40px;
  239. height: 40px;
  240. }
  241. .sub-li-bottom {
  242. display: flex;
  243. justify-content:space-between;
  244. align-items: center;
  245. background: linear-gradient(90deg, #f5fcfc 0, #fcfbfa 100%);
  246. font-size: 13px;
  247. padding: 5px 30rpx;
  248. }
  249. .salary {
  250. // color: #ff770d;
  251. float: right;
  252. }
  253. .list-shape {
  254. padding: 10px 30rpx 10px;
  255. margin-top: 10px;
  256. background-color: #fff;
  257. .titleBox {
  258. display: flex;
  259. align-items: center;
  260. justify-content: space-between;
  261. }
  262. }
  263. .viewider-mx{
  264. margin: 0 10rpx;
  265. }
  266. .viewider {
  267. color:#e4d4d2;
  268. }
  269. //公司名称
  270. .cer-end{
  271. position: absolute;
  272. top: 85%;
  273. right: 16%;
  274. }
  275. .cer-text{
  276. text-decoration: underline;
  277. margin: 0 5rpx;
  278. }
  279. //一行展示不全...
  280. .dis{
  281. display: flex;
  282. align-items: center;
  283. }
  284. .show-more{
  285. width: 26vw;
  286. white-space: nowrap;
  287. overflow: hidden;
  288. text-overflow: ellipsis;
  289. }
  290. /* 列表触底暂无更多 */
  291. .noMore{ text-align:center; color:grey; }
  292. .mt { margin-top: 10rpx; }
  293. .mb { margin-bottom: 10rpx; }
  294. .ml { margin-left: 20rpx; }
  295. .mr { margin-right: 20rpx; }
  296. .mr-10{ margin-right: 10rpx; }
  297. .my-5{ margin: 5px 0; }
  298. </style>