exhibitor-item.vue 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. <template>
  2. <view class="exhibitor-item" hover-class="active" @click="onClickExhibitor(item.id)">
  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 v-if="pollShow">
  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. pollShow: Number
  56. },
  57. data() {
  58. return {
  59. }
  60. },
  61. created() {
  62. },
  63. methods: {
  64. onShare(item) {
  65. const shareInfo = {
  66. title: item.name,
  67. path: `/pages/exhibitor/exhibit-detail?id=` + item.id,
  68. imageUrl: item.logo
  69. }
  70. this.$emit('share', {
  71. detail: shareInfo
  72. })
  73. },
  74. onClickExhibitor(id) {
  75. this.navigateTo('/pages/exhibitor/detail?id=' + id)
  76. }
  77. }
  78. }
  79. </script>
  80. <style lang="scss">
  81. </style>