exhibit.vue 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. <template>
  2. <view class="exhibit-index exhibitor-index">
  3. <nav-bar title="展品信息" @init="onInitNavbar"></nav-bar>
  4. <u-scroll-view>
  5. <view class="main-container">
  6. <view class="exhibitor-filter">
  7. <view>
  8. <view class="exhibitor-filter-label">展馆号</view>
  9. <u-dropdown-select ref="select1" v-model="categoryId" placeholder="选择展馆号" :options="categories" @dropdown="onSelectDropdown(1)" />
  10. </view>
  11. <view>
  12. <view class="exhibitor-filter-label">产品类别</view>
  13. <u-dropdown-select ref="select2" v-model="categoryId" placeholder="选择产品类别" :options="categories" @dropdown="onSelectDropdown(2)" />
  14. </view>
  15. <view>
  16. <view class="exhibitor-filter-label">应用领域</view>
  17. <u-dropdown-select ref="select3" v-model="categoryId" placeholder="选择应用领域" :options="categories" @dropdown="onSelectDropdown(3)" />
  18. </view>
  19. </view>
  20. <u-search v-model="searchKeyword" placeholder="搜索展商 / 展品名称 / 会议" @search="onSearch" />
  21. <view class="ad-space">
  22. <image src="https://oss.starify.cn/prod/starify/up/0001018678/20241108/672da70a6c76a.png?x-oss-process=image/resize,w_200" mode="aspectFill"/>
  23. </view>
  24. <van-empty v-if="exhibitList.length === 0" description="暂无数据" />
  25. <view v-else class="exhibit-list exhibitor-list">
  26. <template v-for="(item, index) in exhibitList">
  27. <exhibit-item :item="item" :key="index" @share="onShare" />
  28. </template>
  29. </view>
  30. <disclaimer-text></disclaimer-text>
  31. </view>
  32. </u-scroll-view>
  33. <u-share-action-sheet :show.sync="showShare" :show-info="shareInfo" />
  34. </view>
  35. </template>
  36. <script>
  37. import NavBar from '@/components/layout/nav-bar'
  38. import UScrollView from '@/components/common/u-scroll-view'
  39. import UShareActionSheet from '@/components/common/u-share-action-sheet'
  40. import USearch from '@/components/common/u-search'
  41. import UDropdownSelect from '@/components/common/u-dropdown-select'
  42. import ExhibitItem from '@/pages/exhibitor/components/exhibit-item.vue'
  43. import DisclaimerText from '@/components/disclaimer-text/index.vue'
  44. export default {
  45. options: {
  46. // styleIsolation: 'shared'
  47. },
  48. components: {
  49. NavBar,
  50. UScrollView,
  51. USearch,
  52. UDropdownSelect,
  53. UShareActionSheet,
  54. ExhibitItem,
  55. DisclaimerText
  56. },
  57. computed: {
  58. },
  59. data() {
  60. return {
  61. categoryId: undefined,
  62. scrollviewHeight: 0,
  63. searchKeyword: '',
  64. exhibitList: [{ favourited: true }, { liked: true }, { voted: true }, {} ],
  65. shareInfo: null,
  66. showShare: false,
  67. categories: [{
  68. label: '表面贴装',
  69. value: 1,
  70. children: [{
  71. label: '表面贴装技术',
  72. value: 11
  73. }, {
  74. label: 'PCB焊接和连接技术',
  75. value: 12
  76. }, {
  77. label: '测试测量和质量保证',
  78. value: 13
  79. }, {
  80. label: '电子组装自动化',
  81. value: 14
  82. }, {
  83. label: '生产物流和物流技术',
  84. value: 15
  85. }, {
  86. label: '清洗技术',
  87. value: 16
  88. }]
  89. }, {
  90. label: '线束加工',
  91. value: 2
  92. }, {
  93. label: '工厂自动化',
  94. value: 3
  95. }, {
  96. label: '点胶注胶',
  97. value: 4
  98. }, {
  99. label: '电子制造服务',
  100. value: 5
  101. }, {
  102. label: '未来服务',
  103. value: 6
  104. }]
  105. }
  106. },
  107. created() {
  108. this.loadFontFace('Poppins')
  109. },
  110. methods: {
  111. onShare(e) {
  112. this.shareInfo = e.detail
  113. this.showShare = true
  114. },
  115. onShareAppMessage: function (res) {
  116. if (res.from === 'button') {
  117. if (this.shareInfo) {
  118. return this.shareInfo
  119. }
  120. }
  121. this.shareInfo = null
  122. this.showShare = false
  123. return {
  124. title: '慕尼黑上海电子生产设备展',
  125. path: '/pages/index/index',
  126. imageUrl: 'https://oss.starify.cn/prod/starify/up/0001018678/20241108/672da5a7dd374.png?x-oss-process=image/resize,w_600,h_600,limit_0,m_pad'
  127. }
  128. },
  129. onSelectDropdown(index) {
  130. ['select1', 'select2', 'select3'].forEach(v => {
  131. if (v !== 'select' + index) {
  132. this.$refs[v].hideDropdown()
  133. }
  134. })
  135. },
  136. onClickExhibit(item) {
  137. this.navigateTo('/pages/exhibitor/exhibit-detail')
  138. },
  139. onSearch() {
  140. this.navigateTo('/pages/index/search?query=' + this.searchKeyword)
  141. }
  142. }
  143. }
  144. </script>
  145. <style lang="scss">
  146. </style>