index.vue 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628
  1. <!-- 首页 -->
  2. <template>
  3. <view class="wrap">
  4. <view class="header">
  5. <view class="header-top">
  6. <view class="header-left">
  7. <image src="../../static/logo.jpeg" mode="widthFix"></image>
  8. <view class="header-left-column">
  9. <text>药食同源</text>
  10. <text>康养食品</text>
  11. </view>
  12. </view>
  13. <view class="headr-title">
  14. <image src="../../static/index-title.png" mode="widthFix"></image>
  15. </view>
  16. <view class="header-right">
  17. <button type="default">
  18. <image src="../../static/head-icon1.png" mode="widthFix"></image>
  19. </button>
  20. <button type="default" @tap="show">
  21. <image src="../../static/head-icon2.png" mode="widthFix"></image>
  22. </button>
  23. </view>
  24. </view>
  25. <view class="header-bottom">
  26. <view class="location-row">
  27. <image src="../../static/location-1.png" class="location-icon" mode="widthFix"></image>
  28. 嘉兴
  29. </view>
  30. <view class="search-bar">
  31. <image src="../../static/search-icon.png" mode="" class="search-icon"></image>
  32. <input type="text" value="" placeholder="西藏冬虫夏草 大红袍" placeholder-class="placeholder"
  33. class="search-input" />
  34. <button type="default" class="search-btn">搜索</button>
  35. </view>
  36. </view>
  37. </view>
  38. <view class="padding-box">
  39. <view class="swiper-box">
  40. <swiper class="swiper" indicator-dots="true" indicator-color="#F2F2F2" indicator-active-color="#F2501A"
  41. :circular="true" autoplay="true" interval="3000" duration="500">
  42. <swiper-item v-for="(item,index) in swiperList" :key="index">
  43. <view class="swiper-item">
  44. <image :src="item" class="banner-img" mode="aspectFill" />
  45. </view>
  46. </swiper-item>
  47. </swiper>
  48. </view>
  49. <view class="notice-box">
  50. <uni-notice-bar class="my-notice-bar" :scrollable="true" :speed="50" :single="true" :text="message">
  51. </uni-notice-bar>
  52. <image src="../../static/message.png" class="notice-icon" mode=""></image>
  53. </view>
  54. <view class="menu-list">
  55. <view class="menu-item">
  56. <image src="../../static/index-menu1.png" mode="heightFix"></image>
  57. 养五脏
  58. </view>
  59. <view class="menu-item">
  60. <image src="../../static/index-menu2.png" mode="heightFix"></image>
  61. 调六腑
  62. </view>
  63. <view class="menu-item">
  64. <image src="../../static/index-menu3.png" mode="heightFix"></image>
  65. 健五官
  66. </view>
  67. <view class="menu-item">
  68. <image src="../../static/index-menu4.png" mode="heightFix"></image>
  69. 通经络
  70. </view>
  71. <view class="menu-item">
  72. <image src="../../static/index-menu5.png" mode="heightFix"></image>
  73. 强筋骨
  74. </view>
  75. <view class="menu-item">
  76. <image src="../../static/index-menu6.png" mode="heightFix"></image>
  77. 提免疫
  78. </view>
  79. <view class="menu-item">
  80. <image src="../../static/index-menu7.png" mode="heightFix"></image>
  81. 均营养
  82. </view>
  83. <view class="menu-item">
  84. <image src="../../static/index-menu8.png" mode="heightFix"></image>
  85. 促健康
  86. </view>
  87. <view class="menu-item">
  88. <image src="../../static/index-menu9.png" mode="heightFix"></image>
  89. 舒压力
  90. </view>
  91. <view class="menu-item">
  92. <image src="../../static/index-menu10.png" mode="heightFix"></image>
  93. 增颜值
  94. </view>
  95. </view>
  96. <scroll-view scroll-x="true" class="recommend-box">
  97. <view class="recommend-item">
  98. <view class="recommend-item-column">
  99. <text>品质良作</text>
  100. <text>区域环境</text>
  101. </view>
  102. <image src="../../static/img-1.png" class="recommend-item-img" mode="widthFix"></image>
  103. </view>
  104. <view class="recommend-item">
  105. <view class="recommend-item-column">
  106. <text>时令良作</text>
  107. <text>优质品种</text>
  108. </view>
  109. <image src="../../static/img-2.png" class="recommend-item-img" mode="widthFix"></image>
  110. </view>
  111. <view class="recommend-item">
  112. <view class="recommend-item-column">
  113. <text>膳食良作</text>
  114. <text>千年传承</text>
  115. </view>
  116. <image src="../../static/img-3.png" class="recommend-item-img" mode="widthFix"></image>
  117. </view>
  118. </scroll-view>
  119. <view class="swiper-box">
  120. <swiper class="swiper" indicator-dots="true" indicator-color="#F2F2F2" indicator-active-color="#F2501A"
  121. :circular="true" autoplay="true" interval="2500" duration="500">
  122. <swiper-item v-for="(item,index) in swiperList2" :key="index">
  123. <view class="swiper-item">
  124. <image :src="item" class="banner-img" mode="aspectFill" />
  125. </view>
  126. </swiper-item>
  127. </swiper>
  128. </view>
  129. <view class="tag-box">
  130. <view class="tag-list">
  131. <view class="tag-item">
  132. # 经常熬夜该吃的食物
  133. </view>
  134. <view class="tag-item">
  135. # 经常熬夜该吃的食物
  136. </view>
  137. <view class="tag-item">
  138. # 经常熬夜该吃的食物
  139. </view>
  140. <view class="tag-item">
  141. # 经常熬夜该吃的食物
  142. </view>
  143. </view>
  144. <view class="refresh-row">
  145. <image src="../../static/refresh-icon.png" mode=""></image>
  146. 换一批
  147. </view>
  148. </view>
  149. <view class="classification-module-box">
  150. <view class="classification-module">
  151. <view class="classification-module-top">
  152. <view class="classification-module-name">亚健康汇</view>
  153. </view>
  154. <view class="classification-module-msg">今日狂补·口碑爆款</view>
  155. <view class="classification-list">
  156. <view class="classification-item">
  157. <image src="../../static/index-menu1.png" class="classification-item-img" mode="heightFix">
  158. </image>
  159. 新鲜奶莓
  160. </view>
  161. <view class="classification-item">
  162. <image src="../../static/index-menu8.png" class="classification-item-img" mode="heightFix">
  163. </image>
  164. 烟台苹果
  165. </view>
  166. </view>
  167. </view>
  168. <view class="classification-module">
  169. <view class="classification-module-top">
  170. <view class="classification-module-name">礼品心选</view>
  171. <view class="classification-module-tag">
  172. <image src="../../static/tag-icon1.png" mode="widthFix"></image>
  173. 用心挑选
  174. </view>
  175. </view>
  176. <view class="classification-module-msg">送家人·送爸妈</view>
  177. <view class="classification-list">
  178. <view class="classification-item">
  179. <image src="../../static/index-menu10.png" class="classification-item-img" mode="heightFix">
  180. </image>
  181. 新鲜奶莓
  182. </view>
  183. <view class="classification-item">
  184. <image src="../../static/index-menu2.png" class="classification-item-img" mode="heightFix">
  185. </image>
  186. 烟台苹果
  187. </view>
  188. </view>
  189. </view>
  190. <view class="classification-module">
  191. <view class="classification-module-top">
  192. <view class="classification-module-name">促销精选</view>
  193. <view class="classification-module-tag">
  194. <image src="../../static/tag-icon2.png" mode="widthFix"></image>
  195. 限时折扣
  196. </view>
  197. </view>
  198. <view class="classification-module-msg">精品促销·优惠不断</view>
  199. <view class="classification-list">
  200. <view class="classification-item">
  201. <image src="../../static/index-menu6.png" class="classification-item-img" mode="heightFix">
  202. </image>
  203. <view class="classification-item-bottom">
  204. <text class="classification-item-price">¥34.00</text>
  205. <button type="default" class="add-btn">
  206. <image src="../../static/add-icon.png" mode=""></image>
  207. </button>
  208. </view>
  209. </view>
  210. <view class="classification-item">
  211. <image src="../../static/index-menu5.png" class="classification-item-img" mode="heightFix">
  212. </image>
  213. <view class="classification-item-bottom">
  214. <text class="classification-item-price">¥34.00</text>
  215. <button type="default" class="add-btn">
  216. <image src="../../static/add-icon.png" mode=""></image>
  217. </button>
  218. </view>
  219. </view>
  220. </view>
  221. </view>
  222. <view class="classification-module">
  223. <view class="classification-module-top">
  224. <view class="classification-module-name">限源预售</view>
  225. </view>
  226. <view class="classification-module-msg">精彩预售·抢不停</view>
  227. <view class="classification-list">
  228. <view class="classification-item">
  229. <image src="../../static/index-menu4.png" class="classification-item-img" mode="heightFix">
  230. </image>
  231. <view class="classification-item-bottom">
  232. <text class="classification-item-price">¥34.00</text>
  233. <button type="default" class="add-btn">
  234. <image src="../../static/add-icon.png" mode=""></image>
  235. </button>
  236. </view>
  237. </view>
  238. <view class="classification-item">
  239. <image src="../../static/index-menu3.png" class="classification-item-img" mode="heightFix">
  240. </image>
  241. <view class="classification-item-bottom">
  242. <text class="classification-item-price">¥34.00</text>
  243. <button type="default" class="add-btn">
  244. <image src="../../static/add-icon.png" mode=""></image>
  245. </button>
  246. </view>
  247. </view>
  248. </view>
  249. </view>
  250. </view>
  251. <view class="seasonal-nutrition-box">
  252. <view class="seasonal-nutrition-top">
  253. <view class="seasonal-nutrition-top-left">
  254. <view class="seasonal-nutrition-top-name">
  255. 时令营养
  256. </view>
  257. <view class="seasonal-nutrition-top-msg">
  258. 滋补免疫推荐
  259. </view>
  260. </view>
  261. <button type="default" class="all-btn">全部</button>
  262. </view>
  263. <view class="swiper-box-product">
  264. <swiper class="swiper-product" indicator-dots="true" indicator-color="#F2F2F2"
  265. indicator-active-color="#F2501A" :circular="true" interval="3000" duration="500">
  266. <swiper-item>
  267. <view class="swiper-item-product">
  268. <view class="swiper-item-product-item">
  269. <image src="../../static/img-4.png" class="swiper-item-product-item-img"
  270. mode="aspectFill"></image>
  271. <view class="swiper-item-product-item-name">
  272. 补气养阴
  273. </view>
  274. <view class="swiper-item-product-item-msg">
  275. 杞里香枸杞子宁夏特级500g
  276. </view>
  277. <view class="swiper-item-product-item-bottom">
  278. <view class="swiper-item-product-item-price">
  279. ¥394.00
  280. </view>
  281. <view class="swiper-item-product-item-delprice">
  282. ¥34.00
  283. </view>
  284. </view>
  285. </view>
  286. <view class="swiper-item-product-item">
  287. <image src="../../static/img-4.png" class="swiper-item-product-item-img"
  288. mode="aspectFill"></image>
  289. <view class="swiper-item-product-item-name">
  290. 补气养阴
  291. </view>
  292. <view class="swiper-item-product-item-msg">
  293. 杞里香枸杞子宁夏特级500g
  294. </view>
  295. <view class="swiper-item-product-item-bottom">
  296. <view class="swiper-item-product-item-price">
  297. ¥394.00
  298. </view>
  299. <view class="swiper-item-product-item-delprice">
  300. ¥34.00
  301. </view>
  302. </view>
  303. </view>
  304. <view class="swiper-item-product-item">
  305. <image src="../../static/img-4.png" class="swiper-item-product-item-img"
  306. mode="aspectFill"></image>
  307. <view class="swiper-item-product-item-name">
  308. 补气养阴
  309. </view>
  310. <view class="swiper-item-product-item-msg">
  311. 杞里香枸杞子宁夏特级500g
  312. </view>
  313. <view class="swiper-item-product-item-bottom">
  314. <view class="swiper-item-product-item-price">
  315. ¥394.00
  316. </view>
  317. <view class="swiper-item-product-item-delprice">
  318. ¥34.00
  319. </view>
  320. </view>
  321. </view>
  322. </view>
  323. </swiper-item>
  324. <swiper-item>
  325. <view class="swiper-item-product">
  326. <view class="swiper-item-product-item">
  327. <image src="../../static/img-4.png" class="swiper-item-product-item-img"
  328. mode="aspectFill"></image>
  329. <view class="swiper-item-product-item-name">
  330. 补气养阴
  331. </view>
  332. <view class="swiper-item-product-item-msg">
  333. 杞里香枸杞子宁夏特级500g
  334. </view>
  335. <view class="swiper-item-product-item-bottom">
  336. <view class="swiper-item-product-item-price">
  337. ¥394.00
  338. </view>
  339. <view class="swiper-item-product-item-delprice">
  340. ¥34.00
  341. </view>
  342. </view>
  343. </view>
  344. <view class="swiper-item-product-item">
  345. <image src="../../static/img-4.png" class="swiper-item-product-item-img"
  346. mode="aspectFill"></image>
  347. <view class="swiper-item-product-item-name">
  348. 补气养阴
  349. </view>
  350. <view class="swiper-item-product-item-msg">
  351. 杞里香枸杞子宁夏特级500g
  352. </view>
  353. <view class="swiper-item-product-item-bottom">
  354. <view class="swiper-item-product-item-price">
  355. ¥394.00
  356. </view>
  357. <view class="swiper-item-product-item-delprice">
  358. ¥34.00
  359. </view>
  360. </view>
  361. </view>
  362. <view class="swiper-item-product-item">
  363. <image src="../../static/img-4.png" class="swiper-item-product-item-img"
  364. mode="aspectFill"></image>
  365. <view class="swiper-item-product-item-name">
  366. 补气养阴
  367. </view>
  368. <view class="swiper-item-product-item-msg">
  369. 杞里香枸杞子宁夏特级500g
  370. </view>
  371. <view class="swiper-item-product-item-bottom">
  372. <view class="swiper-item-product-item-price">
  373. ¥394.00
  374. </view>
  375. <view class="swiper-item-product-item-delprice">
  376. ¥34.00
  377. </view>
  378. </view>
  379. </view>
  380. </view>
  381. </swiper-item>
  382. </swiper>
  383. </view>
  384. </view>
  385. <view class="seasonal-health-box">
  386. <view class="seasonal-health-top">
  387. <view class="seasonal-health-top-left">
  388. <view class="seasonal-health-top-name">
  389. 时令健康
  390. </view>
  391. <view class="seasonal-health-top-msg">
  392. 养生食品推荐
  393. </view>
  394. </view>
  395. <image src="../../static/bg-4.png" class="seasonal-health-top-bg" mode="heightFix"></image>
  396. <button type="default" class="seasonal-health-all-btn">全部</button>
  397. </view>
  398. <view class="seasonal-health-list">
  399. <view class="seasonal-health-item">
  400. <image src="../../static/img-4.png" class="seasonal-health-item-img" mode="aspectFill"></image>
  401. <view class="seasonal-health-item-name">
  402. 健脾除湿
  403. </view>
  404. </view>
  405. <view class="seasonal-health-item">
  406. <image src="../../static/img-4.png" class="seasonal-health-item-img" mode="aspectFill"></image>
  407. <view class="seasonal-health-item-name">
  408. 排寒利尿
  409. </view>
  410. </view>
  411. <view class="seasonal-health-item">
  412. <image src="../../static/img-4.png" class="seasonal-health-item-img" mode="aspectFill"></image>
  413. <view class="seasonal-health-item-name">
  414. 平肝和胃
  415. </view>
  416. </view>
  417. </view>
  418. </view>
  419. <view class="logo-box">
  420. <image src="../../static/banner-4.png" mode="widthFix"></image>
  421. </view>
  422. <view class="product-bottom">
  423. <scroll-view scroll-x="true" class="tab-list">
  424. <view :class="{ 'active' : isActive === index }" class="child" v-for="(item,index) in navList"
  425. :key="index" @click="checked(index)">
  426. <view class="child-column">
  427. <view class="child-column-name">{{item.title}}</view>
  428. <view class="child-column-msg">
  429. <text>{{item.msg}}</text>
  430. <image src="../../static/border.png" class="border-img" mode="widthFix"></image>
  431. </view>
  432. </view>
  433. </view>
  434. </scroll-view>
  435. <view class="product-list">
  436. <view class="product-item">
  437. <view class="product-item-column">
  438. <image src="../../static/img-4.png" class="product-item-column-img" mode="aspectFill"></image>
  439. <view class="product-item-column-bottom">
  440. <view class="product-item-column-name">产地直销</view>
  441. <view class="product-item-column-tag">
  442. <text>当日热卖榜</text>
  443. <text>好货闭眼抢</text>
  444. </view>
  445. <button type="default" class="product-item-column-btn">立即抢购<image src="../../static/back-icon.png" mode="widthFix"></image></button>
  446. </view>
  447. </view>
  448. </view>
  449. <view class="product-item">
  450. <view class="product-item-column2">
  451. <image src="../../static/img-4.png" class="product-item-column2-img" mode="aspectFill"></image>
  452. <view class="product-item-column2-bottom">
  453. <view class="product-item-column-name2">冻干柠檬片 蜂蜜柠檬茶 保留鲜度96% 美白神器</view>
  454. <view class="product-item-column2-row-between">
  455. <view class="product-item-column2-price">
  456. ¥394.00
  457. <text>¥34.00</text>
  458. </view>
  459. <button type="default" class="product-item-column2-btn">
  460. <image src="../../static/add-icon.png" mode=""></image>
  461. </button>
  462. </view>
  463. </view>
  464. </view>
  465. </view>
  466. <view class="product-item">
  467. <view class="product-item-column">
  468. <image src="../../static/img-4.png" class="product-item-column-img" mode="aspectFill"></image>
  469. <view class="product-item-column-bottom">
  470. <view class="product-item-column-name">产地直销</view>
  471. <view class="product-item-column-tag">
  472. <text>当日热卖榜</text>
  473. <text>好货闭眼抢</text>
  474. </view>
  475. <button type="default" class="product-item-column-btn">立即抢购<image src="../../static/back-icon.png" mode="widthFix"></image></button>
  476. </view>
  477. </view>
  478. </view>
  479. <view class="product-item">
  480. <view class="product-item-column">
  481. <image src="../../static/img-4.png" class="product-item-column-img" mode="aspectFill"></image>
  482. <view class="product-item-column-bottom">
  483. <view class="product-item-column-name">产地直销</view>
  484. <view class="product-item-column-tag">
  485. <text>当日热卖榜</text>
  486. <text>好货闭眼抢</text>
  487. </view>
  488. <button type="default" class="product-item-column-btn">立即抢购<image src="../../static/back-icon.png" mode="widthFix"></image></button>
  489. </view>
  490. </view>
  491. </view>
  492. <view class="product-item">
  493. <view class="product-item-column2">
  494. <image src="../../static/img-4.png" class="product-item-column2-img" mode="aspectFill"></image>
  495. <view class="product-item-column2-bottom">
  496. <view class="product-item-column-name2">冻干柠檬片 蜂蜜柠檬茶 保留鲜度96% 美白神器</view>
  497. <view class="product-item-column2-row-between">
  498. <view class="product-item-column2-price">
  499. ¥394.00
  500. <text>¥34.00</text>
  501. </view>
  502. <button type="default" class="product-item-column2-btn">
  503. <image src="../../static/add-icon.png" mode=""></image>
  504. </button>
  505. </view>
  506. </view>
  507. </view>
  508. </view>
  509. </view>
  510. </view>
  511. </view>
  512. <!-- 顶部-弹窗 -->
  513. <view v-show="isShow">
  514. <view class="mask" @tap="close"></view>
  515. <view class="window">
  516. <view class="window-item">
  517. <image src="../../static/icon-20.png" mode="widthFix"></image>
  518. 扫一扫
  519. </view>
  520. <view class="window-item">
  521. <image src="../../static/icon-18.png" mode="widthFix"></image>
  522. 分享
  523. </view>
  524. <view class="window-item">
  525. <image src="../../static/icon-19.png" mode="widthFix"></image>
  526. 消息
  527. </view>
  528. </view>
  529. </view>
  530. <!-- 顶部-弹窗 -->
  531. </view>
  532. </template>
  533. <script>
  534. import UniNoticeBar from '../../components/uni-notice-bar/uni-notice-bar.vue';
  535. export default {
  536. components: {
  537. UniNoticeBar,
  538. },
  539. data() {
  540. return {
  541. //轮播
  542. swiperList: [
  543. '../../static/banner-2.png',
  544. '../../static/banner-2.png',
  545. '../../static/banner-2.png'
  546. ],
  547. //轮播2
  548. swiperList2: [
  549. '../../static/banner-3.png',
  550. '../../static/banner-3.png',
  551. '../../static/banner-3.png'
  552. ],
  553. //公告
  554. message: '最先上市:西藏冬虫夏草 云南白药 青海牦牛肉',
  555. //选项卡
  556. isActive: 3,
  557. navList: [{
  558. index: 0,
  559. title: '精选',
  560. msg: '为您推荐'
  561. }, {
  562. index: 1,
  563. title: "养生",
  564. msg: '推荐养生'
  565. }, {
  566. index: 2,
  567. title: "滋补",
  568. msg: '滋补清肝'
  569. }, {
  570. index: 3,
  571. title: "养颜",
  572. msg: '补气养颜'
  573. }],
  574. //顶部弹窗
  575. isShow:true
  576. }
  577. },
  578. onLoad() {
  579. },
  580. onReady() {
  581. let animation = uni.createAnimation({
  582. transformOrigin: "50% 50%",
  583. duration: 900,
  584. timingFunction: "linear",
  585. delay: 0
  586. })
  587. this.animation = animation;
  588. },
  589. methods: {
  590. checked(index) {
  591. this.isActive = index
  592. },
  593. //顶部-弹窗
  594. show() {
  595. this.isShow = true;
  596. },
  597. close() {
  598. this.isShow = false;
  599. },
  600. }
  601. }
  602. </script>
  603. <style scoped lang="scss">
  604. @import "./index.css";
  605. </style>