classification.vue 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326
  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. <scroll-view scroll-x="true" class="classification-menu-list">
  14. <view class="classification-menu-item" @tap="goodQualityWork">
  15. <view class="classification-menu-item-box">
  16. <image src="../../static/classification-nav1.png" class="classification-menu-item-img"
  17. mode="heightFix">
  18. </image>
  19. 节气优品
  20. </view>
  21. </view>
  22. <view class="classification-menu-item" @tap="goodQualityWork">
  23. <view class="classification-menu-item-box">
  24. <image src="../../static/classification-nav2.png" class="classification-menu-item-img"
  25. mode="heightFix">
  26. </image>
  27. 区域良品
  28. </view>
  29. </view>
  30. <view class="classification-menu-item" @tap="goodQualityWork">
  31. <view class="classification-menu-item-box">
  32. <image src="../../static/classification-nav3.png" class="classification-menu-item-img"
  33. mode="heightFix">
  34. </image>
  35. 传承佳品
  36. </view>
  37. </view>
  38. <view class="classification-menu-item">
  39. <view class="classification-menu-item-box">
  40. <image src="../../static/classification-nav4.png" class="classification-menu-item-img"
  41. mode="heightFix">
  42. </image>
  43. 礼品心选
  44. </view>
  45. </view>
  46. <view class="classification-menu-item">
  47. <view class="classification-menu-item-box">
  48. <image src="../../static/classification-nav5.png" class="classification-menu-item-img"
  49. mode="heightFix">
  50. </image>
  51. 膳食宝典
  52. </view>
  53. </view>
  54. </scroll-view>
  55. </view>
  56. <view class="wrap-container">
  57. <!--左侧栏-->
  58. <scroll-view class="nav_left" scroll-y="true">
  59. <view :class="{ 'active' : isActive === index }" class="child" v-for="(item,index) in navList"
  60. :key="index" @click="checked(index, item)">
  61. <view class="child-column">
  62. <text>{{item.title}}</text>
  63. <text>{{item.num}}</text>
  64. </view>
  65. </view>
  66. </scroll-view>
  67. <!-- <scroll-view class="nav_right" scroll-y="true" @scrolltolower="lower">
  68. <view class="swiper-box">
  69. <swiper class="swiper" :circular="true" autoplay="true" interval="2500" duration="500">
  70. <swiper-item v-for="(item,index) in swiperList" :key="index">
  71. <view class="swiper-item">
  72. <image :src="item" class="banner-img" mode="aspectFill" />
  73. </view>
  74. </swiper-item>
  75. </swiper>
  76. </view>
  77. <view class="list">
  78. <view class="item">
  79. <view class="item-top">
  80. 地产本草 <text>323</text>
  81. </view>
  82. <view class="sub-list">
  83. <view class="sub-item">
  84. <image src="../../static/img-3.png" mode="heightFix"></image>
  85. 当归
  86. </view>
  87. <view class="sub-item">
  88. <image src="../../static/img-3.png" mode="heightFix"></image>
  89. 桂皮
  90. </view>
  91. <view class="sub-item">
  92. <image src="../../static/img-3.png" mode="heightFix"></image>
  93. 桂皮
  94. </view>
  95. <view class="sub-item">
  96. <image src="../../static/img-3.png" mode="heightFix"></image>
  97. 当归
  98. </view>
  99. </view>
  100. </view>
  101. </view>
  102. </scroll-view> -->
  103. <scroll-view class="product-list" scroll-y="true">
  104. <view class="product-item" @tap="productDetails">
  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" @tap="productDetails">
  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 class="product-item" @tap="productDetails">
  135. <image src="../../static/img-4.png" class="product-item-img" mode="aspectFill"></image>
  136. <view class="product-item-sidebar">
  137. <view class="product-item-name">冻干柠檬片 蜂蜜柠檬茶 保留鲜度96% 美白神器</view>
  138. <view class="product-item-column2-row-between">
  139. <view class="product-item-column2-price">
  140. ¥394.00
  141. <text>¥34.00</text>
  142. </view>
  143. <button type="default" class="product-item-column2-btn">
  144. <image src="../../static/add-icon.png" mode=""></image>
  145. </button>
  146. </view>
  147. </view>
  148. </view>
  149. <view class="product-item" @tap="productDetails">
  150. <image src="../../static/img-4.png" class="product-item-img" mode="aspectFill"></image>
  151. <view class="product-item-sidebar">
  152. <view class="product-item-name">冻干柠檬片 蜂蜜柠檬茶 保留鲜度96% 美白神器</view>
  153. <view class="product-item-column2-row-between">
  154. <view class="product-item-column2-price">
  155. ¥394.00
  156. <text>¥34.00</text>
  157. </view>
  158. <button type="default" class="product-item-column2-btn">
  159. <image src="../../static/add-icon.png" mode=""></image>
  160. </button>
  161. </view>
  162. </view>
  163. </view>
  164. <view class="product-item" @tap="productDetails">
  165. <image src="../../static/img-4.png" class="product-item-img" mode="aspectFill"></image>
  166. <view class="product-item-sidebar">
  167. <view class="product-item-name">冻干柠檬片 蜂蜜柠檬茶 保留鲜度96% 美白神器</view>
  168. <view class="product-item-column2-row-between">
  169. <view class="product-item-column2-price">
  170. ¥394.00
  171. <text>¥34.00</text>
  172. </view>
  173. <button type="default" class="product-item-column2-btn">
  174. <image src="../../static/add-icon.png" mode=""></image>
  175. </button>
  176. </view>
  177. </view>
  178. </view>
  179. <view class="product-item" @tap="productDetails">
  180. <image src="../../static/img-4.png" class="product-item-img" mode="aspectFill"></image>
  181. <view class="product-item-sidebar">
  182. <view class="product-item-name">冻干柠檬片 蜂蜜柠檬茶 保留鲜度96% 美白神器</view>
  183. <view class="product-item-column2-row-between">
  184. <view class="product-item-column2-price">
  185. ¥394.00
  186. <text>¥34.00</text>
  187. </view>
  188. <button type="default" class="product-item-column2-btn">
  189. <image src="../../static/add-icon.png" mode=""></image>
  190. </button>
  191. </view>
  192. </view>
  193. </view>
  194. <view class="product-item" @tap="productDetails">
  195. <image src="../../static/img-4.png" class="product-item-img" mode="aspectFill"></image>
  196. <view class="product-item-sidebar">
  197. <view class="product-item-name">冻干柠檬片 蜂蜜柠檬茶 保留鲜度96% 美白神器</view>
  198. <view class="product-item-column2-row-between">
  199. <view class="product-item-column2-price">
  200. ¥394.00
  201. <text>¥34.00</text>
  202. </view>
  203. <button type="default" class="product-item-column2-btn">
  204. <image src="../../static/add-icon.png" mode=""></image>
  205. </button>
  206. </view>
  207. </view>
  208. </view>
  209. </scroll-view>
  210. </view>
  211. <!-- 底部tabbar组件 -->
  212. <tab-bar :current="1"></tab-bar>
  213. </view>
  214. </template>
  215. <script>
  216. export default {
  217. data() {
  218. return {
  219. isActive: 0,
  220. navList: [{
  221. index: 0,
  222. title: '全部',
  223. }, {
  224. index: 1,
  225. title: '地产本草',
  226. num: '783'
  227. }, {
  228. index: 2,
  229. title: '地产本草',
  230. num: '33'
  231. }, {
  232. index: 3,
  233. title: '地产本草',
  234. num: '33'
  235. }, {
  236. index: 3,
  237. title: '地产本草',
  238. num: '33'
  239. }, {
  240. index: 3,
  241. title: '地产本草',
  242. num: '33'
  243. }, {
  244. index: 3,
  245. title: '地产本草',
  246. num: '33'
  247. }, {
  248. index: 3,
  249. title: '地产本草',
  250. num: '33'
  251. }, {
  252. index: 3,
  253. title: '地产本草',
  254. num: '33'
  255. }, {
  256. index: 3,
  257. title: '地产本草',
  258. num: '33'
  259. }, {
  260. index: 3,
  261. title: '地产本草',
  262. num: '33'
  263. }, {
  264. index: 3,
  265. title: '地产本草',
  266. num: '33'
  267. }, {
  268. index: 3,
  269. title: '地产本草',
  270. num: '33'
  271. }, {
  272. index: 3,
  273. title: '地产本草',
  274. num: '33'
  275. }, {
  276. index: 3,
  277. title: '地产本草',
  278. num: '33'
  279. }, {
  280. index: 3,
  281. title: '地产本草',
  282. num: '33'
  283. }, {
  284. index: 3,
  285. title: '地产本草',
  286. num: '33'
  287. }],
  288. //轮播
  289. swiperList: [
  290. '../../static/banner-2.png',
  291. '../../static/banner-2.png',
  292. '../../static/banner-2.png'
  293. ],
  294. }
  295. },
  296. methods: {
  297. checked(index, item) {
  298. this.isActive = index;
  299. },
  300. //跳转商品详情
  301. productDetails(){
  302. uni.navigateTo({
  303. url: '../index/product-details/product-details'
  304. })
  305. },
  306. //跳转品质良作
  307. goodQualityWork(){
  308. uni.navigateTo({
  309. url: '../index/good-quality-work/good-quality-work'
  310. })
  311. }
  312. }
  313. }
  314. </script>
  315. <style scoped lang="scss">
  316. @import "./classification.css";
  317. </style>