exhibit-item.vue 2.3 KB

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