index.vue 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. <template>
  2. <view class="company-section">
  3. <view class="company-title">
  4. <image class="img" src="/static/image/public/qyjj-icon.png" mode=""></image>
  5. <text class="name">{{cardInfo.companyDTO?.name || cardInfo.companyName}}</text>
  6. </view>
  7. <rich-text class="company-text" :nodes="companyIntroduce" v-if="companyIntroduce"></rich-text>
  8. <EmptyState
  9. v-else
  10. text=""
  11. sub-text="暂时没有企业信息"
  12. image="/static/image/public/no-data.png"
  13. />
  14. </view>
  15. </template>
  16. <script setup>
  17. import EmptyState from '@/components/empty-state/index.vue'
  18. import {
  19. formatRichText
  20. } from '@/utils/index.js'
  21. import {
  22. computed
  23. } from 'vue'
  24. import {
  25. useUserStore
  26. } from '@/store/modules/user.js'
  27. import {
  28. storeToRefs
  29. } from 'pinia'
  30. const userStore = useUserStore()
  31. const {
  32. cardInfo
  33. } = storeToRefs(userStore)
  34. const companyIntroduce = computed(() => {
  35. const intro = cardInfo.value.companyDTO?.introduce || ''
  36. return intro ? formatRichText(intro) : ''
  37. })
  38. </script>
  39. <style lang="scss" scoped>
  40. // 企业简介
  41. .company-section {
  42. background: #ffffff;
  43. .company-title {
  44. display: flex;
  45. align-items: center;
  46. gap: 16rpx;
  47. margin: 12rpx 0 12rpx;
  48. .img{
  49. width: 124rpx;
  50. height: 40rpx;
  51. }
  52. .name{
  53. font-size: 32rpx;
  54. font-weight: 500;
  55. color: #202020;
  56. position: relative;
  57. bottom: 4rpx;
  58. }
  59. }
  60. .company-text {
  61. display: block;
  62. font-size: 28rpx;
  63. color: #666666;
  64. line-height: 1.8;
  65. margin-bottom: 24rpx;
  66. ::v-deep img {
  67. max-width: 100% !important;
  68. height: auto !important;
  69. }
  70. &:last-child {
  71. margin-bottom: 0;
  72. }
  73. }
  74. }
  75. </style>