detail.vue 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. <template>
  2. <view>
  3. <!-- 头部 -->
  4. <view class="bg-white header flex row-center">
  5. <u-icon name="file-text-fill" color="#DD4250" size="32"></u-icon>
  6. <view class="cate-title m-l-10">{{ item.title }}<u-tag :text="item.module" type="error" size="mini" shape="circleRight" /></view>
  7. </view>
  8. <!-- 基本信息 -->
  9. <view class="talents-item m-t-16">
  10. <view class="flex">
  11. <u-icon name="info-circle-fill" color="#DD4250" size="28"></u-icon>
  12. <view class="m-l-20">基本信息</view>
  13. </view>
  14. <view class="m-t-16 item-info">
  15. <!-- 人才 -->
  16. <block v-if="item.module == 'talent' || item.module == 'pedigree'">
  17. <view class="m-t-16">姓名:{{ item.title }}</view>
  18. </block>
  19. <block v-else>
  20. <view class="m-t-16">名称:{{ item.title }}</view>
  21. </block>
  22. <view class="m-t-16" v-if="item.company">单位:{{ item.company }}</view>
  23. <view class="m-t-16" v-if="item.position">职位:{{ item.position }}</view>
  24. <view class="m-t-16" v-if="item.module == 'base'">负责人:{{ item.principal }}</view>
  25. <view class="m-t-16" v-if="item.module == 'pedigreeCompany'">法人:{{ item.principal }}</view>
  26. <view class="m-t-16" v-if="item.module == 'firm'">秘书长:{{ item.principal }}</view>
  27. <view class="flex m-t-16" @tap.stop="makePhoneCall(item.tel)">
  28. <u-icon name="phone-fill" color="#DD4250" size="28"></u-icon>
  29. <view class="m-l-20">{{ item.tel }}</view>
  30. </view>
  31. <view class="flex m-t-16">
  32. <u-icon name="map-fill" color="#DD4250" size="28"></u-icon>
  33. <view class="m-l-20">{{ item.city }}{{ item.address }}</view>
  34. </view>
  35. </view>
  36. </view>
  37. <!-- 简介信息 -->
  38. <view class="talents-item m-t-16">
  39. <view class="flex">
  40. <u-icon name="file-text-fill" color="#DD4250" size="28"></u-icon>
  41. <text class="m-l-20"></text>
  42. <text v-if="item.module == 'talent'">研究领域:</text>
  43. <text v-else-if="item.module == 'base'">基地特色:</text>
  44. <text v-else-if="item.module == 'university' || item.module == 'association'">研究方向:</text>
  45. <text v-else-if="item.module == 'fund'">投资产业领域:</text>
  46. <text v-else-if="item.module == 'pedigreeCompany'">主要产品:</text>
  47. <text v-else-if="item.module == 'pedigree'">个人简介:</text>
  48. <text v-else>简介:</text>
  49. </view>
  50. <view class="m-t-16 item-info">
  51. <rich-text :nodes="item.intro"></rich-text>
  52. </view>
  53. </view>
  54. </view>
  55. </template>
  56. <script>
  57. import {
  58. mapActions,
  59. mapGetters
  60. } from 'vuex'
  61. import {
  62. getTalentsDetail
  63. } from '@/api/app';
  64. export default {
  65. data() {
  66. return {
  67. statusBarHeight: 0,
  68. id: 0, //分类id
  69. item: {
  70. title: ''
  71. }
  72. };
  73. },
  74. created() {
  75. uni.getSystemInfo({
  76. success: (res) => {
  77. this.statusBarHeight = res.statusBarHeight;
  78. }
  79. });
  80. },
  81. onLoad() {
  82. this.id = this.$Route.query.id;
  83. this.getCategoryFun()
  84. },
  85. onShow() {
  86. this.getUser();
  87. },
  88. methods: {
  89. ...mapActions(['getUser']),
  90. makePhoneCall(tel) {
  91. if (tel) {
  92. uni.makePhoneCall({
  93. phoneNumber: tel
  94. });
  95. }
  96. },
  97. async getCategoryFun() {
  98. const {
  99. status,
  100. data
  101. } = await getTalentsDetail({
  102. id: this.id
  103. });
  104. if (status == 1) {
  105. this.item = data
  106. }
  107. },
  108. },
  109. computed: {
  110. ...mapGetters(['appConfig']),
  111. }
  112. };
  113. </script>
  114. <style lang="scss">
  115. .header {
  116. padding: 30rpx;
  117. .cate-title {
  118. font-size: 32rpx;
  119. font-weight: 400;
  120. }
  121. }
  122. .talents-item {
  123. background: #FFFFFF;
  124. box-shadow: 0rpx 8rpx 16rpx 2rpx rgba(0, 0, 0, 0.03);
  125. border-radius: 12rpx 12rpx 12rpx 12rpx;
  126. padding: 30rpx;
  127. font-size: 28rpx;
  128. .item-info {
  129. padding: 20rpx;
  130. background: #F7F8FA;
  131. border-radius: 8rpx 8rpx 8rpx 8rpx;
  132. }
  133. }
  134. </style>