index.vue 4.1 KB

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