index_mall.vue 22 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042
  1. <template>
  2. <view>
  3. <headerSerch :dataConfig="headItem"></headerSerch>
  4. <view class="header-group">
  5. <view class="tabs">
  6. <u-tabs :list="navigationList" @click="clickNav" lineColor="#FFD373" :inactiveStyle="{ color: '#FFF' }"
  7. :activeStyle="{ color: '#FFD373', fontWeight: 'bold' }"></u-tabs>
  8. </view>
  9. </view>
  10. <!-- 内容切换 -->
  11. <view class="tab-content" v-if="current == 0">
  12. <!-- 轮播 -->
  13. <view class="swiper-group">
  14. <u-swiper :list="swiperList" indicator indicatorMode="line" circular></u-swiper>
  15. </view>
  16. <!-- 宫格 -->
  17. <view class="grid-box">
  18. <view class="grid-group">
  19. <view class="grid-item">
  20. <image src="../../../static/menus/秒杀专区.png" mode="aspectFit"></image>
  21. <text>秒杀专区</text>
  22. </view>
  23. <view class="grid-item">
  24. <image src="../../../static/menus/红包商城.png" mode="aspectFit"></image>
  25. <text>红包商城</text>
  26. </view>
  27. <view class="grid-item">
  28. <image src="../../../static/menus/积分专区.png" mode="aspectFit"></image>
  29. <text>积分专区</text>
  30. </view>
  31. <view class="grid-item">
  32. <image src="../../../static/menus/创客专区.png" mode="aspectFit"></image>
  33. <text>创客专区</text>
  34. </view>
  35. <view class="grid-item">
  36. <image src="../../../static/menus/城市合伙人.png" mode="aspectFit"></image>
  37. <text>城市合伙人</text>
  38. </view>
  39. <view class="grid-item">
  40. <image src="../../../static/menus/积分抵扣专区.png" mode="aspectFit"></image>
  41. <text>抵扣专区</text>
  42. </view>
  43. </view>
  44. </view>
  45. <!-- 通知 -->
  46. <view class="notice">
  47. <u-notice-bar :text="notice" direction="column" duration="3000" @click="goNoticeDetail($event)">
  48. </u-notice-bar>
  49. </view>
  50. <!-- 通知弹框 -->
  51. <view>
  52. <u-modal :show="noticeShow" title="通告"
  53. confirmText="我已知晓" confirmColor="#FABA59" @confirm="noticeClose">
  54. <view class="slot-content">
  55. <rich-text :nodes="noticeContent"></rich-text>
  56. </view>
  57. </u-modal>
  58. </view>
  59. <!-- 爆款专区 -->
  60. <view class="sale-group">
  61. <view class="sale-content">
  62. <view class="title">爆款专区 <view class="more">
  63. </view>
  64. </view>
  65. <view class="goods-scroll">
  66. <scroll-view scroll-x="true">
  67. <view class="goods-item" v-for="(item, index) in tempArr" :key="index"
  68. @click="goDetail(item)">
  69. <image :src="item.image" mode="aspectFit"></image>
  70. <view class="goods-name">
  71. <u-text prefixIcon="bookmark" iconStyle="font-size: 16px; color:red" :lines="2" bold
  72. block size="20" :text="item.store_name"></u-text>
  73. <view class="tags">赠送20.54红积分</view>
  74. <view class="price">¥{{ item.ot_price }}</view>
  75. </view>
  76. </view>
  77. </scroll-view>
  78. </view>
  79. </view>
  80. </view>
  81. <!-- 商品列表 -->
  82. <view class="goods-list">
  83. <view class="title">
  84. <view class="line"></view>
  85. 商品推荐
  86. <view class="line"></view>
  87. </view>
  88. <goodListMall @changeTab="changeTab" :tempArr="tempArr" :iSshowH="false" @detail="goDetail"
  89. :isSortType="isSortType"></goodListMall>
  90. </view>
  91. </view>
  92. <view class="tab-content" v-if="current >= 1">
  93. <!-- 轮播 -->
  94. <view class="swiper-group">
  95. <u-swiper :list="swiperList" indicator indicatorMode="line" circular></u-swiper>
  96. </view>
  97. <!-- 商品二级列表 -->
  98. <view class="tabs">
  99. <u-tabs :list="navigationList2" @click="" lineColor="#EB4C63" :inactiveStyle="{ color: '#333' }"
  100. :activeStyle="{ color: '#EB4C63', fontWeight: 'bold' }"></u-tabs>
  101. </view>
  102. <!-- 商品列表 -->
  103. <goodListMall @changeTab="changeTab" :tempArr="tempArr" :iSshowH="true" @detail="goDetail"
  104. :isSortType="isSortType"></goodListMall>
  105. </view>
  106. </view>
  107. </template>
  108. <script>
  109. import headerSerch from './components/headerSerch';
  110. import goodListMall from './components/goodListMall';
  111. import { getAdsList, getNoticeList } from '../../../api/home.js'
  112. import {
  113. goShopDetail
  114. } from '@/libs/order.js';
  115. export default {
  116. components: {
  117. headerSerch,
  118. goodListMall
  119. },
  120. data() {
  121. return {
  122. noticeShow: false,
  123. noticeContent: '',
  124. tempArr: [
  125. {
  126. "id": 72,
  127. "image": "https://demo26.crmeb.net/uploads/attach/2021/11/20211112/mid_1608a6e46f559f11328c544fa05ea10b.png",
  128. "store_name": "COACH/蔻驰女士swinger腋下包单肩包麻将包豌豆包",
  129. "store_info": "COACH/蔻驰女士swinger腋下包单肩包麻将包豌豆包",
  130. "cate_id": "79",
  131. "price": "3000.00",
  132. "ot_price": "2900.00",
  133. "sales": "226",
  134. "unit_name": "件",
  135. "sort": 446,
  136. "activity": [],
  137. "stock": 258,
  138. "vip_price": 0,
  139. "is_vip": 0,
  140. "couponId": [],
  141. "star": [
  142. {
  143. "product_score": 5,
  144. "product_id": 72
  145. }
  146. ],
  147. "checkCoupon": false
  148. },
  149. {
  150. "id": 119,
  151. "image": "https://demo26.crmeb.net/uploads/attach/2021/12/10/mid_738c68638ab29effeff2e98365ec6dd6.jpg",
  152. "store_name": "微星(MSI)GK50Z 机械键盘 红轴 RGB光效 有线 游戏电竞办公键盘 104键 吃鸡键盘 黑色",
  153. "store_info": "ceshi123",
  154. "cate_id": "38",
  155. "price": "0.01",
  156. "ot_price": "199.00",
  157. "sales": "135",
  158. "unit_name": "件",
  159. "sort": 999,
  160. "activity": [],
  161. "stock": 24855,
  162. "vip_price": 0,
  163. "is_vip": 0,
  164. "couponId": [
  165. {
  166. "id": 23,
  167. "product_id": 119,
  168. "issue_coupon_id": 218,
  169. "title": "",
  170. "add_time": 1664522680
  171. }
  172. ],
  173. "star": [
  174. {
  175. "product_score": 5,
  176. "product_id": 119
  177. },
  178. {
  179. "product_score": 5,
  180. "product_id": 119
  181. },
  182. {
  183. "product_score": 5,
  184. "product_id": 119
  185. },
  186. {
  187. "product_score": 4,
  188. "product_id": 119
  189. },
  190. {
  191. "product_score": 4,
  192. "product_id": 119
  193. },
  194. {
  195. "product_score": 5,
  196. "product_id": 119
  197. },
  198. {
  199. "product_score": 5,
  200. "product_id": 119
  201. },
  202. {
  203. "product_score": 5,
  204. "product_id": 119
  205. },
  206. {
  207. "product_score": 5,
  208. "product_id": 119
  209. },
  210. {
  211. "product_score": 4,
  212. "product_id": 119
  213. },
  214. {
  215. "product_score": 5,
  216. "product_id": 119
  217. },
  218. {
  219. "product_score": 2,
  220. "product_id": 119
  221. },
  222. {
  223. "product_score": 5,
  224. "product_id": 119
  225. },
  226. {
  227. "product_score": 5,
  228. "product_id": 119
  229. },
  230. {
  231. "product_score": 5,
  232. "product_id": 119
  233. },
  234. {
  235. "product_score": 5,
  236. "product_id": 119
  237. },
  238. {
  239. "product_score": 5,
  240. "product_id": 119
  241. },
  242. {
  243. "product_score": 3,
  244. "product_id": 119
  245. },
  246. {
  247. "product_score": 5,
  248. "product_id": 119
  249. },
  250. {
  251. "product_score": 5,
  252. "product_id": 119
  253. },
  254. {
  255. "product_score": 5,
  256. "product_id": 119
  257. },
  258. {
  259. "product_score": 5,
  260. "product_id": 119
  261. },
  262. {
  263. "product_score": 5,
  264. "product_id": 119
  265. },
  266. {
  267. "product_score": 5,
  268. "product_id": 119
  269. },
  270. {
  271. "product_score": 5,
  272. "product_id": 119
  273. },
  274. {
  275. "product_score": 5,
  276. "product_id": 119
  277. },
  278. {
  279. "product_score": 5,
  280. "product_id": 119
  281. },
  282. {
  283. "product_score": 4,
  284. "product_id": 119
  285. },
  286. {
  287. "product_score": 4,
  288. "product_id": 119
  289. },
  290. {
  291. "product_score": 3,
  292. "product_id": 119
  293. },
  294. {
  295. "product_score": 4,
  296. "product_id": 119
  297. },
  298. {
  299. "product_score": 5,
  300. "product_id": 119
  301. },
  302. {
  303. "product_score": 4,
  304. "product_id": 119
  305. },
  306. {
  307. "product_score": 5,
  308. "product_id": 119
  309. },
  310. {
  311. "product_score": 5,
  312. "product_id": 119
  313. },
  314. {
  315. "product_score": 4,
  316. "product_id": 119
  317. },
  318. {
  319. "product_score": 5,
  320. "product_id": 119
  321. },
  322. {
  323. "product_score": 5,
  324. "product_id": 119
  325. },
  326. {
  327. "product_score": 5,
  328. "product_id": 119
  329. },
  330. {
  331. "product_score": 4,
  332. "product_id": 119
  333. },
  334. {
  335. "product_score": 5,
  336. "product_id": 119
  337. },
  338. {
  339. "product_score": 5,
  340. "product_id": 119
  341. },
  342. {
  343. "product_score": 5,
  344. "product_id": 119
  345. },
  346. {
  347. "product_score": 4,
  348. "product_id": 119
  349. },
  350. {
  351. "product_score": 5,
  352. "product_id": 119
  353. },
  354. {
  355. "product_score": 4,
  356. "product_id": 119
  357. },
  358. {
  359. "product_score": 5,
  360. "product_id": 119
  361. },
  362. {
  363. "product_score": 5,
  364. "product_id": 119
  365. },
  366. {
  367. "product_score": 5,
  368. "product_id": 119
  369. },
  370. {
  371. "product_score": 5,
  372. "product_id": 119
  373. },
  374. {
  375. "product_score": 5,
  376. "product_id": 119
  377. },
  378. {
  379. "product_score": 5,
  380. "product_id": 119
  381. },
  382. {
  383. "product_score": 2,
  384. "product_id": 119
  385. },
  386. {
  387. "product_score": 5,
  388. "product_id": 119
  389. },
  390. {
  391. "product_score": 5,
  392. "product_id": 119
  393. },
  394. {
  395. "product_score": 5,
  396. "product_id": 119
  397. },
  398. {
  399. "product_score": 5,
  400. "product_id": 119
  401. },
  402. {
  403. "product_score": 5,
  404. "product_id": 119
  405. },
  406. {
  407. "product_score": 5,
  408. "product_id": 119
  409. },
  410. {
  411. "product_score": 5,
  412. "product_id": 119
  413. }
  414. ],
  415. "checkCoupon": false
  416. },
  417. {
  418. "id": 41,
  419. "image": "http://demo26.crmeb.net/uploads/attach/2020/10/13/a23b5bc300cc6a965082368f8c657b3d.jpg",
  420. "store_name": "华为智选摄像头智能家居监控器无线高清网络摄像头家用全景智能摄像机1080P夜间清晰人像AI智能看护",
  421. "store_info": "华为智选摄像头智能家居监控器无线高清网络摄像头家用全景智能摄像机1080P夜间清晰人像AI智能看护",
  422. "cate_id": "11,21",
  423. "price": "500.00",
  424. "ot_price": "1000.00",
  425. "sales": "94",
  426. "unit_name": "件",
  427. "sort": 0,
  428. "activity": [],
  429. "stock": 1981,
  430. "vip_price": 0,
  431. "is_vip": 0,
  432. "couponId": [],
  433. "star": [],
  434. "checkCoupon": false
  435. },
  436. {
  437. "id": 51,
  438. "image": "http://demo26.crmeb.net/uploads/attach/2020/10/20201014/118bccc3d5499881dd7178c43ebb9346.jpg",
  439. "store_name": "极度空间 中秋贺卡 生日卡片 创意3D明信片感恩卡*10",
  440. "store_info": "极度空间 中秋贺卡 生日卡片 创意3D明信片感恩卡*10",
  441. "cate_id": "40,34",
  442. "price": "100.00",
  443. "ot_price": "1000.00",
  444. "sales": "39",
  445. "unit_name": "件",
  446. "sort": 0,
  447. "activity": [],
  448. "stock": 761,
  449. "vip_price": 0,
  450. "is_vip": 0,
  451. "couponId": [],
  452. "star": [
  453. {
  454. "product_score": 5,
  455. "product_id": 51
  456. }
  457. ],
  458. "checkCoupon": true
  459. },
  460. {
  461. "id": 89,
  462. "image": "https://demo26.crmeb.net/uploads/attach/2021/11/20211113/mid_2fbe723632427b0768df24c4f23c6cad.png",
  463. "store_name": "家居梵高系列联名款饭盒袋大容量手拎保温实用方便 星月夜饭盒袋",
  464. "store_info": "",
  465. "cate_id": "35",
  466. "price": "350.00",
  467. "ot_price": "300.00",
  468. "sales": "19",
  469. "unit_name": "件",
  470. "sort": 553,
  471. "activity": [],
  472. "stock": 185,
  473. "vip_price": 0,
  474. "is_vip": 0,
  475. "couponId": [],
  476. "star": [
  477. {
  478. "product_score": 5,
  479. "product_id": 89
  480. }
  481. ],
  482. "checkCoupon": false
  483. },
  484. {
  485. "id": 45,
  486. "image": "http://demo26.crmeb.net/uploads/attach/2020/10/20201014/1bfcaad092adb917739ec681f55fb255.jpg",
  487. "store_name": "Adidas阿迪达斯男装 2020秋季新款运动服户外跑步训练健身透气舒适时尚休闲夹克外套GD5462 GD5462 L",
  488. "store_info": "Adidas阿迪达斯男装 2020秋季新款运动服户外跑步训练健身透气舒适时尚休闲夹克外套GD5462 GD5462 L",
  489. "cate_id": "26,27,50,54",
  490. "price": "200.00",
  491. "ot_price": "500.00",
  492. "sales": "11",
  493. "unit_name": "件",
  494. "sort": 0,
  495. "activity": [],
  496. "stock": 4984,
  497. "vip_price": "120.00",
  498. "is_vip": 1,
  499. "couponId": [],
  500. "star": [
  501. {
  502. "product_score": 5,
  503. "product_id": 45
  504. },
  505. {
  506. "product_score": 5,
  507. "product_id": 45
  508. },
  509. {
  510. "product_score": 2,
  511. "product_id": 45
  512. }
  513. ],
  514. "checkCoupon": false
  515. },
  516. {
  517. "id": 71,
  518. "image": "https://demo26.crmeb.net/uploads/attach/2021/09/03/mid_0b209a475fe7a7118dc964407c98542c.jpg",
  519. "store_name": "Casio卡西欧女表时尚优雅简约指针防水复古石英手表LTP-1094E-1A",
  520. "store_info": "品质保障 全场包邮",
  521. "cate_id": "38",
  522. "price": "265.00",
  523. "ot_price": "265.00",
  524. "sales": "6",
  525. "unit_name": "件",
  526. "sort": 300,
  527. "activity": [],
  528. "stock": 94,
  529. "vip_price": 0,
  530. "is_vip": 0,
  531. "couponId": [],
  532. "star": [
  533. {
  534. "product_score": 5,
  535. "product_id": 71
  536. },
  537. {
  538. "product_score": 5,
  539. "product_id": 71
  540. },
  541. {
  542. "product_score": 5,
  543. "product_id": 71
  544. }
  545. ],
  546. "checkCoupon": false
  547. }
  548. ],
  549. isSortType: 0,
  550. headItem: {
  551. "name": "headerSerch",
  552. "timestamp": "1666235374470000",
  553. "setUp": {
  554. "tabVal": 0
  555. },
  556. "bgColor": {
  557. "title": "背景颜色(渐变)",
  558. "name": "bgColor",
  559. "default": [
  560. {
  561. "item": "#F62C2C"
  562. },
  563. {
  564. "item": "#F96E29"
  565. }
  566. ],
  567. "color": [
  568. {
  569. "item": "rgba(242,16,78,1)"
  570. },
  571. {
  572. "item": "rgba(210,41,87,1)"
  573. }
  574. ]
  575. },
  576. "boxStyle": {
  577. "title": "边框样式",
  578. "name": "boxStyle",
  579. "type": 0,
  580. "list": [
  581. {
  582. "val": "圆角",
  583. "icon": "iconPic_fillet"
  584. },
  585. {
  586. "val": "直角",
  587. "icon": "iconPic_square"
  588. }
  589. ]
  590. },
  591. "txtStyle": {
  592. "title": "文本位置",
  593. "name": "txtStyle",
  594. "type": 1,
  595. "list": [
  596. {
  597. "val": "居左",
  598. "icon": "icondoc_left"
  599. },
  600. {
  601. "val": "居中",
  602. "icon": "icondoc_center"
  603. }
  604. ]
  605. },
  606. "prConfig": {
  607. "title": "背景边距",
  608. "val": 8,
  609. "min": 0
  610. },
  611. "mbConfig": {
  612. "title": "页面间距",
  613. "val": 0,
  614. "min": 0
  615. },
  616. "hotWords": {
  617. "list": [
  618. {
  619. "val": ""
  620. }
  621. ]
  622. },
  623. "logoConfig": {
  624. "type": 1,
  625. "header": "设置logo",
  626. "title": "",
  627. "url": "https://demo26.crmeb.net/uploads/attach/2022/10/20221009/7436ee5680bc5d67c46a6017939475e5.png"
  628. },
  629. "id": "id1665385357481000"
  630. },
  631. current: 0,
  632. noticeList: [],
  633. notice: [
  634. '寒雨连江夜入吴',
  635. '平明送客楚山孤',
  636. '洛阳亲友如相问',
  637. '一片冰心在玉壶'
  638. ],
  639. swiperList: [
  640. 'https://cdn.uviewui.com/uview/swiper/swiper3.png',
  641. 'https://cdn.uviewui.com/uview/swiper/swiper2.png',
  642. 'https://cdn.uviewui.com/uview/swiper/swiper1.png',
  643. ],
  644. navigationList: [{
  645. name: '推荐',
  646. }, {
  647. name: '箱包皮具'
  648. }, {
  649. name: '家具家私'
  650. }, {
  651. name: '美妆护肤'
  652. }, {
  653. name: '日用百货'
  654. }, {
  655. name: '运动户外'
  656. }, {
  657. name: '珠宝首饰'
  658. }, {
  659. name: '家纺家饰'
  660. }]
  661. }
  662. },
  663. mounted() {
  664. this.getAdsList(),
  665. this.getNoticeList()
  666. },
  667. onLoad() {
  668. },
  669. methods: {
  670. noticeClose(){
  671. this.noticeShow = false
  672. },
  673. goNoticeDetail(value) {
  674. this.noticeContent = this.noticeList[value].content
  675. this.noticeShow = true
  676. },
  677. getNoticeList() {
  678. getNoticeList().then(res => {
  679. this.notice = []
  680. this.noticeList = res.data
  681. res.data.forEach(element => {
  682. this.notice.push(element.title)
  683. });
  684. })
  685. },
  686. getAdsList() {
  687. getAdsList({
  688. type: 2
  689. }).then(res => {
  690. if (res.data.length > 0) {
  691. this.swiperList = []
  692. res.data.forEach(element => {
  693. this.swiperList.push(element.imageUrl)
  694. });
  695. }
  696. });
  697. },
  698. // 促销列表的点击事件;
  699. changeTab(type) {
  700. this.goodType = type;
  701. this.tempArr = [];
  702. this.page = 1;
  703. this.loadend = false;
  704. let onloadH = true;
  705. this.getGroomList(onloadH);
  706. },
  707. // 精品推荐
  708. getGroomList(onloadH) {
  709. let that = this;
  710. let type = that.goodType;
  711. if (that.loadend) return false;
  712. if (that.loading) return false;
  713. if (onloadH) {
  714. that.$set(that, 'iSshowH', true);
  715. }
  716. uni.request({
  717. url: 'api/groom/list',
  718. success: res => {
  719. that.$set(that, 'iSshowH', false);
  720. let maxPage = Math.ceil(this.numConfig / this.limit);
  721. let list = res.data.list,
  722. loadend = list.length < that.limit || that.page >= maxPage;
  723. let tempArr = that.$util.SplitArray(list, that.tempArr);
  724. that.$set(that, 'tempArr', tempArr.slice(0, this.numConfig));
  725. that.loadend = loadend;
  726. that.loadTitle = loadend ? that.$t(`没有更多内容啦~`) : that.$t(`加载更多`);
  727. that.page = that.page + 1;
  728. that.loading = false;
  729. }
  730. })
  731. // getGroomList(type, {
  732. // page: that.page,
  733. // limit: this.numConfig
  734. // })
  735. // .then(({
  736. // data
  737. // }) => {
  738. // that.$set(that, 'iSshowH', false);
  739. // let maxPage = Math.ceil(this.numConfig / this.limit);
  740. // let list = data.list,
  741. // loadend = list.length < that.limit || that.page >= maxPage;
  742. // let tempArr = that.$util.SplitArray(list, that.tempArr);
  743. // that.$set(that, 'tempArr', tempArr.slice(0, this.numConfig));
  744. // that.loadend = loadend;
  745. // that.loadTitle = loadend ? that.$t(`没有更多内容啦~`) : that.$t(`加载更多`);
  746. // that.page = that.page + 1;
  747. // that.loading = false;
  748. // })
  749. // .catch(res => {
  750. // that.loading = false;
  751. // that.loadTitle = that.$t(`加载更多`);
  752. // });
  753. },
  754. goDetail(item) {
  755. goShopDetail(item, this.$store.state.app.uid).then(res => {
  756. uni.navigateTo({
  757. url: `/pages/goods_details/index?id=${item.id}`
  758. });
  759. });
  760. },
  761. // 去商品详情
  762. goGoodsDetail(item) {
  763. goShopDetail(item, this.uid).then(res => {
  764. uni.navigateTo({
  765. url: `/pages/goods_details/index?id=${item.id}`
  766. });
  767. });
  768. },
  769. clickNav(e) {
  770. console.log(e)
  771. this.current = e.index
  772. }
  773. }
  774. }
  775. </script>
  776. <style lang="scss" scoped>
  777. page {
  778. background-color: #ee4040;
  779. }
  780. .header-group {
  781. background-color: #EB4C63;
  782. .search-group {
  783. display: flex;
  784. align-items: center;
  785. justify-content: space-between;
  786. padding: 30rpx 30rpx 10rpx 30rpx;
  787. .logo {
  788. width: 138rpx;
  789. height: 46rpx;
  790. }
  791. .message {
  792. line-height: 1;
  793. image {
  794. width: 48rpx;
  795. height: 48rpx;
  796. }
  797. }
  798. .search {
  799. flex: 1;
  800. padding: 0 30rpx;
  801. .searchBox {
  802. padding: 0 30rpx;
  803. display: flex;
  804. align-items: center;
  805. background-color: #FFF;
  806. border-radius: 100rpx;
  807. height: 60rpx;
  808. image {
  809. width: 28rpx;
  810. height: 28rpx;
  811. padding-right: 20rpx;
  812. }
  813. text {
  814. font-size: 24rpx;
  815. color: #999;
  816. }
  817. }
  818. }
  819. }
  820. .tabs {
  821. padding: 0 20rpx;
  822. }
  823. }
  824. .tab-content {
  825. .swiper-group {
  826. padding: 20rpx 30rpx 10rpx 30rpx;
  827. background-image: linear-gradient(to bottom, #EB4C63, #F9F9F9);
  828. }
  829. .grid-box {
  830. padding: 10rpx 30rpx 20rpx 30rpx;
  831. .grid-group {
  832. padding: 20rpx 0;
  833. border-radius: 20rpx;
  834. background-color: #FFF;
  835. display: flex;
  836. align-items: center;
  837. flex-wrap: wrap;
  838. .grid-item {
  839. width: 33.333%;
  840. display: flex;
  841. flex-direction: column;
  842. align-items: center;
  843. margin: 10rpx 0;
  844. image {
  845. width: 98rpx;
  846. height: 98rpx;
  847. }
  848. text {
  849. font-size: 24rpx;
  850. color: #666;
  851. margin-top: 10rpx;
  852. }
  853. }
  854. }
  855. }
  856. .notice {
  857. padding: 0 30rpx;
  858. }
  859. .sale-group {
  860. padding: 20rpx 30rpx;
  861. .sale-content {
  862. border-radius: 20rpx;
  863. background-image: linear-gradient(45deg, #EB4C63, #FFA470);
  864. padding: 20rpx 0;
  865. .title {
  866. display: flex;
  867. align-items: center;
  868. justify-content: space-between;
  869. color: #FFF;
  870. font-weight: bold;
  871. padding: 0 30rpx;
  872. .more {
  873. display: flex;
  874. align-items: center;
  875. font-size: 24rpx;
  876. font-weight: normal;
  877. image {
  878. width: 24rpx;
  879. height: 24rpx;
  880. }
  881. }
  882. }
  883. .goods-scroll {
  884. white-space: nowrap;
  885. padding: 20rpx 15rpx 0 15rpx;
  886. .goods-item {
  887. display: inline-block;
  888. width: 240rpx;
  889. padding: 15rpx;
  890. margin: 0 10rpx;
  891. background-color: #FFF;
  892. border-radius: 10rpx;
  893. image {
  894. width: 210rpx;
  895. height: 210rpx;
  896. }
  897. .goods-name {
  898. font-size: 26rpx;
  899. color: #333;
  900. width: 240rpx;
  901. margin: 6rpx 0;
  902. word-break: break-all;
  903. white-space: pre-wrap;
  904. text-overflow: ellipsis;
  905. display: -webkit-box;
  906. line-height: 1.2;
  907. -webkit-box-orient: vertical;
  908. -webkit-line-clamp: 2;
  909. overflow: hidden;
  910. }
  911. .tags {
  912. display: inline-block;
  913. font-size: 20rpx;
  914. padding: 6rpx;
  915. background-color: #FCE9EC;
  916. color: #EB4C63;
  917. margin: 6rpx 0;
  918. }
  919. .price {
  920. font-size: 32rpx;
  921. font-weight: bold;
  922. color: #EB4C63;
  923. }
  924. }
  925. }
  926. }
  927. }
  928. .goods-list {
  929. .title {
  930. text-align: center;
  931. color: #333;
  932. display: flex;
  933. align-items: center;
  934. justify-content: center;
  935. font-size: 32rpx;
  936. font-weight: bold;
  937. .line {
  938. display: inline-block;
  939. width: 200rpx;
  940. height: 2rpx;
  941. margin: 0 30rpx;
  942. background-color: #FFA470;
  943. }
  944. }
  945. .list-group {
  946. display: flex;
  947. align-items: center;
  948. flex-wrap: wrap;
  949. padding: 15rpx;
  950. box-sizing: border-box;
  951. .list-item-content {
  952. width: 50%;
  953. padding: 15rpx;
  954. box-sizing: border-box;
  955. .list-item {
  956. padding: 15rpx;
  957. background-color: #FFF;
  958. border-radius: 10rpx;
  959. image {
  960. width: 100%;
  961. }
  962. .goods-name {
  963. font-size: 28rpx;
  964. color: #333;
  965. margin: 6rpx 0;
  966. word-break: break-all;
  967. white-space: pre-wrap;
  968. text-overflow: ellipsis;
  969. display: -webkit-box;
  970. line-height: 1.4;
  971. -webkit-box-orient: vertical;
  972. -webkit-line-clamp: 2;
  973. overflow: hidden;
  974. }
  975. .tags {
  976. display: inline-block;
  977. font-size: 20rpx;
  978. padding: 6rpx;
  979. background-color: #FCE9EC;
  980. color: #EB4C63;
  981. margin: 6rpx 0;
  982. }
  983. .price {
  984. font-size: 32rpx;
  985. font-weight: bold;
  986. color: #EB4C63;
  987. }
  988. }
  989. }
  990. }
  991. }
  992. }
  993. </style>