exhibitor-item.vue 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <template>
  2. <view class="exhibitor-item" hover-class="active" @click="onClickExhibitor">
  3. <view class="exhibitor-body">
  4. <view class="exhibitor-logo"><image :src="item.logo" mode="aspectFit" /></view>
  5. <view class="exhibitor-name">
  6. <view class="exhibitor-name-cn">{{ item.name_zh_cn }}</view>
  7. <view class="exhibitor-name-en">{{ item.name_en_us }}</view>
  8. </view>
  9. <view class="exhibitor-number">
  10. <view class="exhibitor-number-label">展位号:</view>
  11. <view class="exhibitor-number-text">{{ item.hall_booth_no }}</view>
  12. </view>
  13. </view>
  14. <view v-if="!footerHidden" class="exhibitor-footer">
  15. <view class="exhibitor-views">浏览:{{ item.pv }}</view>
  16. <view class="exhibitor-action">
  17. <view>
  18. <button :plain="true" @click.stop="onShare(item)">
  19. <view>
  20. <view class="iconfont icon-zhuanfa"></view>
  21. <view>分享</view>
  22. </view>
  23. </button>
  24. </view>
  25. <view>
  26. <view v-if="item.is_collect" class="iconfont icon-favourites-filled-star-symbol active"></view>
  27. <view v-else class="iconfont icon-Favourites-Add-Large"></view>
  28. <view>收藏</view>
  29. </view>
  30. <view>
  31. <view v-if="item.is_like" class="iconfont icon-aixin active"></view>
  32. <view v-else class="iconfont icon-heart1"></view>
  33. <view>点赞</view>
  34. </view>
  35. <view>
  36. <view v-if="item.is_poll" class="iconfont icon-Ticket1 active"></view>
  37. <view v-else class="iconfont icon-xiaochengxu-toupiaoicon"></view>
  38. <view>投票</view>
  39. </view>
  40. </view>
  41. </view>
  42. </view>
  43. </template>
  44. <script>
  45. export default {
  46. options: {
  47. styleIsolation: 'shared'
  48. },
  49. components: {
  50. },
  51. props: {
  52. // 数据
  53. item: Object,
  54. footerHidden: Boolean
  55. },
  56. data() {
  57. return {
  58. }
  59. },
  60. created() {
  61. },
  62. methods: {
  63. onShare(item) {
  64. const shareInfo = {
  65. title: item.name || '科世达(上海)连接器有限公司',
  66. path: `/pages/exhibitor/exhibit-detail`,
  67. imageUrl: item.logo || 'https://oss.starify.cn/prod/starify/up/0001018678/20241108/672da70c02212.png?x-oss-process=image/resize,w_400'
  68. }
  69. this.$emit('share', {
  70. detail: shareInfo
  71. })
  72. },
  73. onClickExhibitor() {
  74. this.navigateTo('/pages/exhibitor/detail')
  75. }
  76. }
  77. }
  78. </script>
  79. <style lang="scss">
  80. </style>