job-detail.vue 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294
  1. <template>
  2. <view class="job-detail-container">
  3. <!-- 顶部信息区域 -->
  4. <view class="job-header">
  5. <view class="job-title">{{ jobDetail.title }}</view>
  6. <view class="job-salary">{{ jobDetail.salary }}</view>
  7. <view class="job-department">{{ jobDetail.department }}</view>
  8. <view class="job-requirements">
  9. <view class="requirement-item">
  10. <view class="dot"></view>
  11. <text>{{ jobDetail.location }}</text>
  12. </view>
  13. <view class="requirement-item">
  14. <view class="time-icon"></view>
  15. <text>{{ jobDetail.experience }}</text>
  16. </view>
  17. </view>
  18. </view>
  19. <!-- 工作地点区域 -->
  20. <view class="section">
  21. <view class="section-title">工作地点</view>
  22. <view class="map-container">
  23. <image class="map-image" src="/static/images/map.png" mode="aspectFill"></image>
  24. <view class="map-time">预计14:32到达</view>
  25. <view class="refresh-icon">
  26. <text class="iconfont icon-refresh"></text>
  27. </view>
  28. </view>
  29. </view>
  30. <!-- 福利待遇区域 -->
  31. <view class="section">
  32. <view class="section-title">福利待遇</view>
  33. <view class="benefits-list">
  34. <view class="benefit-tag" v-for="(benefit, index) in jobDetail.benefits" :key="index">{{ benefit }}</view>
  35. </view>
  36. </view>
  37. <!-- 岗位介绍区域 -->
  38. <view class="section">
  39. <view class="section-title">岗位介绍</view>
  40. <view class="job-description">
  41. <view class="description-subtitle">{{ jobDetail.description[0].subtitle }}</view>
  42. <view class="description-content">
  43. <view class="description-item" v-for="(item, index) in jobDetail.description[0].items" :key="index">
  44. <view class="blue-dot"></view>
  45. <text>{{ item }}</text>
  46. </view>
  47. </view>
  48. </view>
  49. </view>
  50. <!-- 右侧开始面试按钮 -->
  51. <view class="interview-button" @click="startInterview">
  52. <text>开始面试</text>
  53. </view>
  54. </view>
  55. </template>
  56. <script>
  57. export default {
  58. data() {
  59. return {
  60. jobDetail: {
  61. title: '产品经理',
  62. salary: '20k-30k/月',
  63. department: '产品研发部 全职',
  64. location: '浙江线',
  65. experience: '5-8年',
  66. benefits: ['五险一金', '节日福利', '股权激励'],
  67. description: [
  68. {
  69. subtitle: '战略规划与执行',
  70. items: [
  71. '负责敏锐的行业热点感受性,密切追踪行业动态与趋势,为企业战略决策提供参考。',
  72. '结心制定企业战略规划,将长期愿景转化为可操作的战略目标,并有效分解为各阶段具体任务。'
  73. ]
  74. }
  75. ]
  76. }
  77. }
  78. },
  79. onLoad() {
  80. // 尝试从本地存储获取职位详情
  81. try {
  82. const jobDetailStr = uni.getStorageSync('currentJobDetail');
  83. if (jobDetailStr) {
  84. const jobData = JSON.parse(jobDetailStr);
  85. // 这里可以根据实际数据结构进行处理
  86. // 如果后端返回的数据结构与页面需要的不一致,可以在这里进行转换
  87. this.jobDetail = {
  88. ...this.jobDetail,
  89. title: jobData.title || this.jobDetail.title,
  90. salary: jobData.salary || this.jobDetail.salary,
  91. department: jobData.department || this.jobDetail.department,
  92. location: jobData.location || this.jobDetail.location,
  93. experience: jobData.experience || this.jobDetail.experience,
  94. benefits: jobData.benefits || this.jobDetail.benefits,
  95. description: jobData.description || this.jobDetail.description
  96. };
  97. }
  98. } catch (e) {
  99. console.error('获取职位详情失败:', e);
  100. }
  101. },
  102. methods: {
  103. startInterview() {
  104. // 开始面试的逻辑
  105. uni.navigateTo({
  106. url: '/pages/camera/camera'
  107. });
  108. }
  109. }
  110. }
  111. </script>
  112. <style lang="scss" scoped>
  113. .job-detail-container {
  114. padding: 20rpx;
  115. position: relative;
  116. background-color: #f5f5f5;
  117. min-height: 100vh;
  118. }
  119. .job-header {
  120. padding: 20rpx 0;
  121. }
  122. .job-title {
  123. font-size: 36rpx;
  124. font-weight: bold;
  125. color: #333;
  126. margin-bottom: 10rpx;
  127. }
  128. .job-salary {
  129. font-size: 32rpx;
  130. color: #ff6b00;
  131. margin-bottom: 10rpx;
  132. }
  133. .job-department {
  134. font-size: 28rpx;
  135. color: #666;
  136. margin-bottom: 20rpx;
  137. }
  138. .job-requirements {
  139. display: flex;
  140. align-items: center;
  141. margin-bottom: 20rpx;
  142. }
  143. .requirement-item {
  144. display: flex;
  145. align-items: center;
  146. margin-right: 30rpx;
  147. font-size: 26rpx;
  148. color: #666;
  149. }
  150. .dot {
  151. width: 16rpx;
  152. height: 16rpx;
  153. border-radius: 50%;
  154. background-color: #0052d9;
  155. margin-right: 10rpx;
  156. }
  157. .time-icon {
  158. width: 26rpx;
  159. height: 26rpx;
  160. background-color: #999;
  161. border-radius: 50%;
  162. margin-right: 10rpx;
  163. display: flex;
  164. justify-content: center;
  165. align-items: center;
  166. font-size: 18rpx;
  167. color: #fff;
  168. }
  169. .section {
  170. margin-bottom: 30rpx;
  171. background-color: #fff;
  172. border-radius: 16rpx;
  173. padding: 20rpx;
  174. }
  175. .section-title {
  176. font-size: 32rpx;
  177. font-weight: bold;
  178. color: #333;
  179. margin-bottom: 20rpx;
  180. }
  181. .map-container {
  182. position: relative;
  183. border-radius: 16rpx;
  184. overflow: hidden;
  185. }
  186. .map-image {
  187. width: 100%;
  188. height: 300rpx;
  189. border-radius: 16rpx;
  190. }
  191. .map-time {
  192. position: absolute;
  193. left: 20rpx;
  194. bottom: 20rpx;
  195. background-color: rgba(0, 0, 0, 0.6);
  196. color: #fff;
  197. font-size: 24rpx;
  198. padding: 6rpx 12rpx;
  199. border-radius: 6rpx;
  200. }
  201. .refresh-icon {
  202. position: absolute;
  203. right: 20rpx;
  204. bottom: 20rpx;
  205. width: 60rpx;
  206. height: 60rpx;
  207. background-color: #fff;
  208. border-radius: 50%;
  209. display: flex;
  210. justify-content: center;
  211. align-items: center;
  212. }
  213. .benefits-list {
  214. display: flex;
  215. flex-wrap: wrap;
  216. }
  217. .benefit-tag {
  218. background-color: #f5f5f5;
  219. color: #666;
  220. font-size: 26rpx;
  221. padding: 10rpx 20rpx;
  222. border-radius: 6rpx;
  223. margin-right: 20rpx;
  224. margin-bottom: 20rpx;
  225. }
  226. .description-subtitle {
  227. font-size: 28rpx;
  228. font-weight: bold;
  229. color: #333;
  230. margin-bottom: 20rpx;
  231. }
  232. .description-content {
  233. padding-left: 10rpx;
  234. }
  235. .description-item {
  236. display: flex;
  237. margin-bottom: 20rpx;
  238. }
  239. .blue-dot {
  240. min-width: 16rpx;
  241. height: 16rpx;
  242. border-radius: 50%;
  243. background-color: #0052d9;
  244. margin-right: 10rpx;
  245. margin-top: 12rpx;
  246. }
  247. .description-item text {
  248. font-size: 26rpx;
  249. color: #666;
  250. line-height: 1.6;
  251. }
  252. .interview-button {
  253. position: fixed;
  254. right: 0;
  255. top: 50%;
  256. transform: translateY(-50%);
  257. background-color: #0052d9;
  258. color: #fff;
  259. writing-mode: vertical-lr;
  260. padding: 30rpx 20rpx;
  261. font-size: 32rpx;
  262. border-top-left-radius: 16rpx;
  263. border-bottom-left-radius: 16rpx;
  264. }
  265. </style>