details.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. <template>
  2. <view>
  3. <template v-if="type === 'service' || type === 'industry'">
  4. <uni-title type="h1" :title="data.title" align="center"></uni-title>
  5. <view class="subTitle break">{{ data.startDesc }}</view>
  6. <view v-if="data.children" class="pa-3">
  7. <view v-for="item in data.children" :key="item" class="pa-2 subTitle">{{ item }}</view>
  8. </view>
  9. <view class="subTitle">{{ data.endDesc }}</view>
  10. </template>
  11. <template v-else-if="type === 'consultant'">
  12. <view class="pa-3">
  13. <view class="center mb-3">
  14. <image
  15. :src="data.avatar"
  16. mode="heightFix"
  17. />
  18. <view class="title-job">{{ data.job }}</view>
  19. </view>
  20. <view class="name mb-3">{{ data.title }}</view>
  21. <view class="tips mb-3">Consultant</view>
  22. <view v-if="data?.edu" class="mb-3">
  23. <view v-for="(edu, index) in data.edu" :key="index" class="mb-1 sub">{{ edu }}</view>
  24. </view>
  25. <view v-for="(k, i) in data.desc" :key="i" class="desc mb-3">{{ k }}</view>
  26. </view>
  27. </template>
  28. <template v-else></template>
  29. <Footer></Footer>
  30. </view>
  31. </template>
  32. <script setup>
  33. import Footer from '../components/contact.vue'
  34. import { ref } from 'vue'
  35. import { onLoad } from '@dcloudio/uni-app'
  36. import { serviceData, consultantData } from '@/utils/headhuntingData'
  37. const data = ref({})
  38. const type = ref('service')
  39. onLoad((options) => {
  40. type.value = options.type
  41. const _data = {
  42. service: serviceData,
  43. consultant: consultantData,
  44. industry: serviceData
  45. }
  46. data.value = _data[options.type].find(e => e.id === options.key)
  47. })
  48. </script>
  49. <style lang="scss" scoped>
  50. .title-job {
  51. font-family: FFScalaWebItalic, Georgia, Utopia, Charter, sans-serif;
  52. font-style: italic;
  53. font-weight: 400;
  54. }
  55. .name {
  56. font-family: FFScalaWebBold, Georgia, Utopia, Charter, sans-serif;
  57. font-style: normal;
  58. font-weight: 700;
  59. font-size: 36rpx;
  60. color: #00695C;
  61. }
  62. .tips {
  63. font-family: FFScalaWebItalic, Georgia, Utopia, Charter, serif;
  64. font-style: italic;
  65. font-weight: 400;
  66. }
  67. .center {
  68. display: flex;
  69. justify-content: center;
  70. align-items: center;
  71. flex-direction: column;
  72. }
  73. .pa-3 {
  74. padding: 30rpx;
  75. }
  76. .pa-2 {
  77. padding: 20rpx;
  78. }
  79. .mb-3 {
  80. margin-bottom: 30rpx;
  81. }
  82. .mb-1 {
  83. margin-bottom: 10rpx;
  84. }
  85. .break {
  86. color: #333 !important;
  87. }
  88. .sub {
  89. font-size: 28rpx;
  90. color: #666;
  91. }
  92. .subTitle {
  93. padding: 0 20rpx;
  94. font-size: 24rpx;
  95. margin-bottom: 20rpx;
  96. line-height: 40rpx;
  97. color: #666;
  98. }
  99. </style>