classification.vue 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
  1. <!-- 分类 -->
  2. <template>
  3. <view class="wrap">
  4. <view class="header">
  5. <view class="header-bottom">
  6. <view class="search-bar">
  7. <image src="../../static/search-icon.png" mode="" class="search-icon"></image>
  8. <input type="text" value="" placeholder="西藏冬虫夏草 大红袍" placeholder-class="placeholder"
  9. class="search-input" />
  10. <button type="default" class="search-btn">搜索</button>
  11. </view>
  12. </view>
  13. </view>
  14. <view class="classification-menu-list">
  15. <view class="classification-menu-item">
  16. <image src="../../static/classification-nav1.png" class="classification-menu-item-img" mode="heightFix">
  17. </image>
  18. 节气优品
  19. </view>
  20. <view class="classification-menu-item">
  21. <image src="../../static/classification-nav2.png" class="classification-menu-item-img" mode="heightFix">
  22. </image>
  23. 区域良品
  24. </view>
  25. <view class="classification-menu-item">
  26. <image src="../../static/classification-nav3.png" class="classification-menu-item-img" mode="heightFix">
  27. </image>
  28. 传承佳品
  29. </view>
  30. <view class="classification-menu-item">
  31. <image src="../../static/classification-nav4.png" class="classification-menu-item-img" mode="heightFix">
  32. </image>
  33. 礼品心选
  34. </view>
  35. <view class="classification-menu-item">
  36. <image src="../../static/classification-nav5.png" class="classification-menu-item-img" mode="heightFix">
  37. </image>
  38. 膳食宝典
  39. </view>
  40. </view>
  41. <view class="wrap-container">
  42. <!--左侧栏-->
  43. <scroll-view class="nav_left" scroll-y="true">
  44. <view :class="{ 'active' : isActive === index }" class="child" v-for="(item,index) in navList"
  45. :key="index" @click="checked(index, item)">
  46. <view class="child-column">
  47. <text>{{item.title}}</text>
  48. <text>{{item.num}}</text>
  49. </view>
  50. </view>
  51. </scroll-view>
  52. <!-- <scroll-view class="nav_right" scroll-y="true" @scrolltolower="lower">
  53. <view class="swiper-box">
  54. <swiper class="swiper" :circular="true" autoplay="true" interval="2500" duration="500">
  55. <swiper-item v-for="(item,index) in swiperList" :key="index">
  56. <view class="swiper-item">
  57. <image :src="item" class="banner-img" mode="aspectFill" />
  58. </view>
  59. </swiper-item>
  60. </swiper>
  61. </view>
  62. <view class="list">
  63. <view class="item">
  64. <view class="item-top">
  65. 地产本草 <text>323</text>
  66. </view>
  67. <view class="sub-list">
  68. <view class="sub-item">
  69. <image src="../../static/img-3.png" mode="heightFix"></image>
  70. 当归
  71. </view>
  72. <view class="sub-item">
  73. <image src="../../static/img-3.png" mode="heightFix"></image>
  74. 桂皮
  75. </view>
  76. <view class="sub-item">
  77. <image src="../../static/img-3.png" mode="heightFix"></image>
  78. 桂皮
  79. </view>
  80. <view class="sub-item">
  81. <image src="../../static/img-3.png" mode="heightFix"></image>
  82. 当归
  83. </view>
  84. </view>
  85. </view>
  86. </view>
  87. </scroll-view> -->
  88. <view class="product-list">
  89. <view class="product-item">
  90. <image src="../../static/img-4.png" class="product-item-img" mode="aspectFill"></image>
  91. <view class="product-item-sidebar">
  92. <view class="product-item-name">冻干柠檬片 蜂蜜柠檬茶 保留鲜度96% 美白神器</view>
  93. <view class="product-item-column2-row-between">
  94. <view class="product-item-column2-price">
  95. ¥394.00
  96. <text>¥34.00</text>
  97. </view>
  98. <button type="default" class="product-item-column2-btn">
  99. <image src="../../static/add-icon.png" mode=""></image>
  100. </button>
  101. </view>
  102. </view>
  103. </view>
  104. <view class="product-item">
  105. <image src="../../static/img-4.png" class="product-item-img" mode="aspectFill"></image>
  106. <view class="product-item-sidebar">
  107. <view class="product-item-name">冻干柠檬片 蜂蜜柠檬茶 保留鲜度96% 美白神器</view>
  108. <view class="product-item-column2-row-between">
  109. <view class="product-item-column2-price">
  110. ¥394.00
  111. <text>¥34.00</text>
  112. </view>
  113. <button type="default" class="product-item-column2-btn">
  114. <image src="../../static/add-icon.png" mode=""></image>
  115. </button>
  116. </view>
  117. </view>
  118. </view>
  119. <view class="product-item">
  120. <image src="../../static/img-4.png" class="product-item-img" mode="aspectFill"></image>
  121. <view class="product-item-sidebar">
  122. <view class="product-item-name">冻干柠檬片 蜂蜜柠檬茶 保留鲜度96% 美白神器</view>
  123. <view class="product-item-column2-row-between">
  124. <view class="product-item-column2-price">
  125. ¥394.00
  126. <text>¥34.00</text>
  127. </view>
  128. <button type="default" class="product-item-column2-btn">
  129. <image src="../../static/add-icon.png" mode=""></image>
  130. </button>
  131. </view>
  132. </view>
  133. </view>
  134. </view>
  135. </view>
  136. </view>
  137. </template>
  138. <script>
  139. export default {
  140. data() {
  141. return {
  142. isActive: 0,
  143. navList: [{
  144. index: 0,
  145. title: '全部',
  146. }, {
  147. index: 1,
  148. title: '地产本草',
  149. num: '783'
  150. }, {
  151. index: 2,
  152. title: '地产本草',
  153. num: '33'
  154. }, {
  155. index: 3,
  156. title: '地产本草',
  157. num: '33'
  158. }],
  159. //轮播
  160. swiperList: [
  161. '../../static/banner-2.png',
  162. '../../static/banner-2.png',
  163. '../../static/banner-2.png'
  164. ],
  165. }
  166. },
  167. methods: {
  168. checked(index, item) {
  169. this.isActive = index;
  170. },
  171. }
  172. }
  173. </script>
  174. <style scoped lang="scss">
  175. @import "./classification.css";
  176. </style>