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="通告" confirmText="我已知晓" confirmColor="#FABA59" @confirm="noticeClose">
  53. <view class="slot-content">
  54. <rich-text :nodes="noticeContent"></rich-text>
  55. </view>
  56. </u-modal>
  57. </view>
  58. <!-- 爆款专区 -->
  59. <view class="sale-group">
  60. <view class="sale-content">
  61. <view class="title">爆款专区 <view class="more">
  62. </view>
  63. </view>
  64. <view class="goods-scroll">
  65. <scroll-view scroll-x="true">
  66. <view class="goods-item" v-for="(item, index) in tempArr" :key="index"
  67. @click="goDetail(item)">
  68. <image :src="item.image" mode="aspectFit"></image>
  69. <view class="goods-name">
  70. <u-text prefixIcon="bookmark" iconStyle="font-size: 16px; color:red" :lines="2" bold
  71. block size="12" :text="item.store_name"></u-text>
  72. <view class="tags">赠送20.54红积分</view>
  73. <view class="price">¥{{ item.ot_price }}</view>
  74. </view>
  75. </view>
  76. </scroll-view>
  77. </view>
  78. </view>
  79. </view>
  80. <!-- 商品列表 -->
  81. <view class="goods-list">
  82. <view class="title">
  83. <view class="line"></view>
  84. 商品推荐
  85. <view class="line"></view>
  86. </view>
  87. <goodListMall @changeTab="changeTab" :tempArr="tempArr" :iSshowH="false" @detail="goDetail"
  88. :isSortType="isSortType"></goodListMall>
  89. </view>
  90. </view>
  91. <view class="tab-content" v-if="current >= 1">
  92. <!-- 轮播 -->
  93. <view class="swiper-group">
  94. <u-swiper :list="swiperList" indicator indicatorMode="line" circular></u-swiper>
  95. </view>
  96. <!-- 商品二级列表 -->
  97. <view class="tabs">
  98. <u-tabs :list="navigationList2" @click="" lineColor="#EB4C63" :inactiveStyle="{ color: '#333' }"
  99. :activeStyle="{ color: '#EB4C63', fontWeight: 'bold' }"></u-tabs>
  100. </view>
  101. <!-- 商品列表 -->
  102. <goodListMall @changeTab="changeTab" :tempArr="tempArr" :iSshowH="true" @detail="goDetail"
  103. :isSortType="isSortType"></goodListMall>
  104. </view>
  105. </view>
  106. </template>
  107. <script>
  108. import headerSerch from './components/headerSerch';
  109. import goodListMall from './components/goodListMall';
  110. import { getAdsList, getNoticeList } from '../../../api/home.js'
  111. import {
  112. goShopDetail
  113. } from '@/libs/order.js';
  114. export default {
  115. components: {
  116. headerSerch,
  117. goodListMall
  118. },
  119. data() {
  120. return {
  121. noticeShow: false,
  122. noticeContent: '',
  123. tempArr: [
  124. {
  125. "id": 72,
  126. "image": "https://demo26.crmeb.net/uploads/attach/2021/11/20211112/mid_1608a6e46f559f11328c544fa05ea10b.png",
  127. "store_name": "COACH/蔻驰女士swinger腋下包单肩包麻将包豌豆包",
  128. "store_info": "COACH/蔻驰女士swinger腋下包单肩包麻将包豌豆包",
  129. "cate_id": "79",
  130. "price": "3000.00",
  131. "ot_price": "2900.00",
  132. "sales": "226",
  133. "unit_name": "件",
  134. "sort": 446,
  135. "activity": [],
  136. "stock": 258,
  137. "vip_price": 0,
  138. "is_vip": 0,
  139. "couponId": [],
  140. "star": [
  141. {
  142. "product_score": 5,
  143. "product_id": 72
  144. }
  145. ],
  146. "checkCoupon": false
  147. },
  148. {
  149. "id": 119,
  150. "image": "https://demo26.crmeb.net/uploads/attach/2021/12/10/mid_738c68638ab29effeff2e98365ec6dd6.jpg",
  151. "store_name": "微星(MSI)GK50Z 机械键盘 红轴 RGB光效 有线 游戏电竞办公键盘 104键 吃鸡键盘 黑色",
  152. "store_info": "ceshi123",
  153. "cate_id": "38",
  154. "price": "0.01",
  155. "ot_price": "199.00",
  156. "sales": "135",
  157. "unit_name": "件",
  158. "sort": 999,
  159. "activity": [],
  160. "stock": 24855,
  161. "vip_price": 0,
  162. "is_vip": 0,
  163. "couponId": [
  164. {
  165. "id": 23,
  166. "product_id": 119,
  167. "issue_coupon_id": 218,
  168. "title": "",
  169. "add_time": 1664522680
  170. }
  171. ],
  172. "star": [
  173. {
  174. "product_score": 5,
  175. "product_id": 119
  176. },
  177. {
  178. "product_score": 5,
  179. "product_id": 119
  180. },
  181. {
  182. "product_score": 5,
  183. "product_id": 119
  184. },
  185. {
  186. "product_score": 4,
  187. "product_id": 119
  188. },
  189. {
  190. "product_score": 4,
  191. "product_id": 119
  192. },
  193. {
  194. "product_score": 5,
  195. "product_id": 119
  196. },
  197. {
  198. "product_score": 5,
  199. "product_id": 119
  200. },
  201. {
  202. "product_score": 5,
  203. "product_id": 119
  204. },
  205. {
  206. "product_score": 5,
  207. "product_id": 119
  208. },
  209. {
  210. "product_score": 4,
  211. "product_id": 119
  212. },
  213. {
  214. "product_score": 5,
  215. "product_id": 119
  216. },
  217. {
  218. "product_score": 2,
  219. "product_id": 119
  220. },
  221. {
  222. "product_score": 5,
  223. "product_id": 119
  224. },
  225. {
  226. "product_score": 5,
  227. "product_id": 119
  228. },
  229. {
  230. "product_score": 5,
  231. "product_id": 119
  232. },
  233. {
  234. "product_score": 5,
  235. "product_id": 119
  236. },
  237. {
  238. "product_score": 5,
  239. "product_id": 119
  240. },
  241. {
  242. "product_score": 3,
  243. "product_id": 119
  244. },
  245. {
  246. "product_score": 5,
  247. "product_id": 119
  248. },
  249. {
  250. "product_score": 5,
  251. "product_id": 119
  252. },
  253. {
  254. "product_score": 5,
  255. "product_id": 119
  256. },
  257. {
  258. "product_score": 5,
  259. "product_id": 119
  260. },
  261. {
  262. "product_score": 5,
  263. "product_id": 119
  264. },
  265. {
  266. "product_score": 5,
  267. "product_id": 119
  268. },
  269. {
  270. "product_score": 5,
  271. "product_id": 119
  272. },
  273. {
  274. "product_score": 5,
  275. "product_id": 119
  276. },
  277. {
  278. "product_score": 5,
  279. "product_id": 119
  280. },
  281. {
  282. "product_score": 4,
  283. "product_id": 119
  284. },
  285. {
  286. "product_score": 4,
  287. "product_id": 119
  288. },
  289. {
  290. "product_score": 3,
  291. "product_id": 119
  292. },
  293. {
  294. "product_score": 4,
  295. "product_id": 119
  296. },
  297. {
  298. "product_score": 5,
  299. "product_id": 119
  300. },
  301. {
  302. "product_score": 4,
  303. "product_id": 119
  304. },
  305. {
  306. "product_score": 5,
  307. "product_id": 119
  308. },
  309. {
  310. "product_score": 5,
  311. "product_id": 119
  312. },
  313. {
  314. "product_score": 4,
  315. "product_id": 119
  316. },
  317. {
  318. "product_score": 5,
  319. "product_id": 119
  320. },
  321. {
  322. "product_score": 5,
  323. "product_id": 119
  324. },
  325. {
  326. "product_score": 5,
  327. "product_id": 119
  328. },
  329. {
  330. "product_score": 4,
  331. "product_id": 119
  332. },
  333. {
  334. "product_score": 5,
  335. "product_id": 119
  336. },
  337. {
  338. "product_score": 5,
  339. "product_id": 119
  340. },
  341. {
  342. "product_score": 5,
  343. "product_id": 119
  344. },
  345. {
  346. "product_score": 4,
  347. "product_id": 119
  348. },
  349. {
  350. "product_score": 5,
  351. "product_id": 119
  352. },
  353. {
  354. "product_score": 4,
  355. "product_id": 119
  356. },
  357. {
  358. "product_score": 5,
  359. "product_id": 119
  360. },
  361. {
  362. "product_score": 5,
  363. "product_id": 119
  364. },
  365. {
  366. "product_score": 5,
  367. "product_id": 119
  368. },
  369. {
  370. "product_score": 5,
  371. "product_id": 119
  372. },
  373. {
  374. "product_score": 5,
  375. "product_id": 119
  376. },
  377. {
  378. "product_score": 5,
  379. "product_id": 119
  380. },
  381. {
  382. "product_score": 2,
  383. "product_id": 119
  384. },
  385. {
  386. "product_score": 5,
  387. "product_id": 119
  388. },
  389. {
  390. "product_score": 5,
  391. "product_id": 119
  392. },
  393. {
  394. "product_score": 5,
  395. "product_id": 119
  396. },
  397. {
  398. "product_score": 5,
  399. "product_id": 119
  400. },
  401. {
  402. "product_score": 5,
  403. "product_id": 119
  404. },
  405. {
  406. "product_score": 5,
  407. "product_id": 119
  408. },
  409. {
  410. "product_score": 5,
  411. "product_id": 119
  412. }
  413. ],
  414. "checkCoupon": false
  415. },
  416. {
  417. "id": 41,
  418. "image": "http://demo26.crmeb.net/uploads/attach/2020/10/13/a23b5bc300cc6a965082368f8c657b3d.jpg",
  419. "store_name": "华为智选摄像头智能家居监控器无线高清网络摄像头家用全景智能摄像机1080P夜间清晰人像AI智能看护",
  420. "store_info": "华为智选摄像头智能家居监控器无线高清网络摄像头家用全景智能摄像机1080P夜间清晰人像AI智能看护",
  421. "cate_id": "11,21",
  422. "price": "500.00",
  423. "ot_price": "1000.00",
  424. "sales": "94",
  425. "unit_name": "件",
  426. "sort": 0,
  427. "activity": [],
  428. "stock": 1981,
  429. "vip_price": 0,
  430. "is_vip": 0,
  431. "couponId": [],
  432. "star": [],
  433. "checkCoupon": false
  434. },
  435. {
  436. "id": 51,
  437. "image": "http://demo26.crmeb.net/uploads/attach/2020/10/20201014/118bccc3d5499881dd7178c43ebb9346.jpg",
  438. "store_name": "极度空间 中秋贺卡 生日卡片 创意3D明信片感恩卡*10",
  439. "store_info": "极度空间 中秋贺卡 生日卡片 创意3D明信片感恩卡*10",
  440. "cate_id": "40,34",
  441. "price": "100.00",
  442. "ot_price": "1000.00",
  443. "sales": "39",
  444. "unit_name": "件",
  445. "sort": 0,
  446. "activity": [],
  447. "stock": 761,
  448. "vip_price": 0,
  449. "is_vip": 0,
  450. "couponId": [],
  451. "star": [
  452. {
  453. "product_score": 5,
  454. "product_id": 51
  455. }
  456. ],
  457. "checkCoupon": true
  458. },
  459. {
  460. "id": 89,
  461. "image": "https://demo26.crmeb.net/uploads/attach/2021/11/20211113/mid_2fbe723632427b0768df24c4f23c6cad.png",
  462. "store_name": "家居梵高系列联名款饭盒袋大容量手拎保温实用方便 星月夜饭盒袋",
  463. "store_info": "",
  464. "cate_id": "35",
  465. "price": "350.00",
  466. "ot_price": "300.00",
  467. "sales": "19",
  468. "unit_name": "件",
  469. "sort": 553,
  470. "activity": [],
  471. "stock": 185,
  472. "vip_price": 0,
  473. "is_vip": 0,
  474. "couponId": [],
  475. "star": [
  476. {
  477. "product_score": 5,
  478. "product_id": 89
  479. }
  480. ],
  481. "checkCoupon": false
  482. },
  483. {
  484. "id": 45,
  485. "image": "http://demo26.crmeb.net/uploads/attach/2020/10/20201014/1bfcaad092adb917739ec681f55fb255.jpg",
  486. "store_name": "Adidas阿迪达斯男装 2020秋季新款运动服户外跑步训练健身透气舒适时尚休闲夹克外套GD5462 GD5462 L",
  487. "store_info": "Adidas阿迪达斯男装 2020秋季新款运动服户外跑步训练健身透气舒适时尚休闲夹克外套GD5462 GD5462 L",
  488. "cate_id": "26,27,50,54",
  489. "price": "200.00",
  490. "ot_price": "500.00",
  491. "sales": "11",
  492. "unit_name": "件",
  493. "sort": 0,
  494. "activity": [],
  495. "stock": 4984,
  496. "vip_price": "120.00",
  497. "is_vip": 1,
  498. "couponId": [],
  499. "star": [
  500. {
  501. "product_score": 5,
  502. "product_id": 45
  503. },
  504. {
  505. "product_score": 5,
  506. "product_id": 45
  507. },
  508. {
  509. "product_score": 2,
  510. "product_id": 45
  511. }
  512. ],
  513. "checkCoupon": false
  514. },
  515. {
  516. "id": 71,
  517. "image": "https://demo26.crmeb.net/uploads/attach/2021/09/03/mid_0b209a475fe7a7118dc964407c98542c.jpg",
  518. "store_name": "Casio卡西欧女表时尚优雅简约指针防水复古石英手表LTP-1094E-1A",
  519. "store_info": "品质保障 全场包邮",
  520. "cate_id": "38",
  521. "price": "265.00",
  522. "ot_price": "265.00",
  523. "sales": "6",
  524. "unit_name": "件",
  525. "sort": 300,
  526. "activity": [],
  527. "stock": 94,
  528. "vip_price": 0,
  529. "is_vip": 0,
  530. "couponId": [],
  531. "star": [
  532. {
  533. "product_score": 5,
  534. "product_id": 71
  535. },
  536. {
  537. "product_score": 5,
  538. "product_id": 71
  539. },
  540. {
  541. "product_score": 5,
  542. "product_id": 71
  543. }
  544. ],
  545. "checkCoupon": false
  546. }
  547. ],
  548. isSortType: 0,
  549. headItem: {
  550. "name": "headerSerch",
  551. "timestamp": "1666235374470000",
  552. "setUp": {
  553. "tabVal": 0
  554. },
  555. "bgColor": {
  556. "title": "背景颜色(渐变)",
  557. "name": "bgColor",
  558. "default": [
  559. {
  560. "item": "#F62C2C"
  561. },
  562. {
  563. "item": "#F96E29"
  564. }
  565. ],
  566. "color": [
  567. {
  568. "item": "rgba(242,16,78,1)"
  569. },
  570. {
  571. "item": "rgba(210,41,87,1)"
  572. }
  573. ]
  574. },
  575. "boxStyle": {
  576. "title": "边框样式",
  577. "name": "boxStyle",
  578. "type": 0,
  579. "list": [
  580. {
  581. "val": "圆角",
  582. "icon": "iconPic_fillet"
  583. },
  584. {
  585. "val": "直角",
  586. "icon": "iconPic_square"
  587. }
  588. ]
  589. },
  590. "txtStyle": {
  591. "title": "文本位置",
  592. "name": "txtStyle",
  593. "type": 1,
  594. "list": [
  595. {
  596. "val": "居左",
  597. "icon": "icondoc_left"
  598. },
  599. {
  600. "val": "居中",
  601. "icon": "icondoc_center"
  602. }
  603. ]
  604. },
  605. "prConfig": {
  606. "title": "背景边距",
  607. "val": 8,
  608. "min": 0
  609. },
  610. "mbConfig": {
  611. "title": "页面间距",
  612. "val": 0,
  613. "min": 0
  614. },
  615. "hotWords": {
  616. "list": [
  617. {
  618. "val": ""
  619. }
  620. ]
  621. },
  622. "logoConfig": {
  623. "type": 1,
  624. "header": "设置logo",
  625. "title": "",
  626. "url": "https://demo26.crmeb.net/uploads/attach/2022/10/20221009/7436ee5680bc5d67c46a6017939475e5.png"
  627. },
  628. "id": "id1665385357481000"
  629. },
  630. current: 0,
  631. noticeList: [],
  632. notice: [
  633. '寒雨连江夜入吴',
  634. '平明送客楚山孤',
  635. '洛阳亲友如相问',
  636. '一片冰心在玉壶'
  637. ],
  638. swiperList: [
  639. 'https://cdn.uviewui.com/uview/swiper/swiper3.png',
  640. 'https://cdn.uviewui.com/uview/swiper/swiper2.png',
  641. 'https://cdn.uviewui.com/uview/swiper/swiper1.png',
  642. ],
  643. navigationList: [{
  644. name: '推荐',
  645. }, {
  646. name: '箱包皮具'
  647. }, {
  648. name: '家具家私'
  649. }, {
  650. name: '美妆护肤'
  651. }, {
  652. name: '日用百货'
  653. }, {
  654. name: '运动户外'
  655. }, {
  656. name: '珠宝首饰'
  657. }, {
  658. name: '家纺家饰'
  659. }]
  660. }
  661. },
  662. mounted() {
  663. uni.showTabBar()
  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>