index.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933
  1. <template>
  2. <view class="container">
  3. <!-- <image src="" mode=""></image> -->
  4. <!-- 顶部logo and 搜索 start-->
  5. <view class="index-top-wrap">
  6. <image src="../../static/index/index-top.png" mode="widthFix" class="index-top"></image>
  7. <view class="status_bar fud"></view>
  8. <view class="top-search flex fud">
  9. <view class="search-box flex" @click="clickSearch()">
  10. <image class="search" src="../../static/icon/search-h.png" mode=""></image>
  11. <view class="search-font">输入关键词搜索</view>
  12. </view>
  13. </view>
  14. <!-- 顶部logo and 搜索 end-->
  15. <!-- <view class="jg fud" style="background-color: #fff;"></view> -->
  16. <!-- 轮播图 start -->
  17. <swiper class="top-swiper fud" autoplay="true" duration="400" interval="5000" @change="swiperChange">
  18. <swiper-item v-for="(item, index) in carouselList" :key="index" class="carousel-item"
  19. @click="bannerNavToUrl(item)">
  20. <image :src="item.pic" />
  21. </swiper-item>
  22. </swiper>
  23. <!-- 轮播图 end -->
  24. </view>
  25. <!-- 分类 start -->
  26. <view class="cate-section flex">
  27. <view class="cate-item flex" @click="navto('/pages/category/category')">
  28. <view class="img-wrapper flex">
  29. <image src="../../static/index/in1.png" mode=""></image>
  30. </view>
  31. <view class="item-title">全部商品</view>
  32. </view>
  33. <view class="cate-item flex" @click="navto('/pages/index/artDetail?id=1')">
  34. <view class="img-wrapper flex">
  35. <image src="../../static/index/in2.png" mode=""></image>
  36. </view>
  37. <view class="item-title">公司介绍</view>
  38. </view>
  39. <view class="cate-item flex" @click="openKf">
  40. <view class="img-wrapper flex">
  41. <image src="../../static/index/in3.png" mode=""></image>
  42. </view>
  43. <view class="item-title">联系客服</view>
  44. </view>
  45. <view class="cate-item flex" @click="navto('/pages/index/storeList')">
  46. <view class="img-wrapper flex">
  47. <image src="../../static/index/in6.png" mode=""></image>
  48. </view>
  49. <view class="item-title">本地门店</view>
  50. </view>
  51. <view class="cate-item flex" @click="navto('/pages/user/shareQrCode',1)">
  52. <view class="img-wrapper flex">
  53. <image src="../../static/index/in4.png" mode=""></image>
  54. </view>
  55. <view class="item-title">邀请好友</view>
  56. </view>
  57. <view class="cate-item flex" @click="navto('/pages/index/artDetail?id=2')">
  58. <view class="img-wrapper flex">
  59. <image src="../../static/index/in7.png" mode=""></image>
  60. </view>
  61. <view class="item-title">加入我们</view>
  62. </view>
  63. </view>
  64. <!-- 分类 ed -->
  65. <view class="jg">
  66. </view>
  67. <view class="hdlist" >
  68. <image src="../../static/index/ryc.png" @click="navTo('/pages/index/actionDetail?id=1')" mode="widthFix"></image>
  69. <image src="../../static/index/xny.png" @click="navTo('/pages/index/actionDetail?id=2')" mode="widthFix"></image>
  70. </view>
  71. <!-- 商品列表 start -->
  72. <view class="product-box">
  73. <view class="product-tit flex">
  74. <view class="hx">
  75. </view>
  76. <view class="tit">
  77. 热销推荐
  78. </view>
  79. <view class="hx">
  80. </view>
  81. </view>
  82. </view>
  83. <view class="good-list">
  84. <view class="good" v-for="item in goodList" @click="navTo('/pages/product/product?id=' + item.id)">
  85. <image :src="item.image" mode="" class="good-image"></image>
  86. <view class="good-name ">
  87. <view class="clamp">
  88. {{item.store_name}}
  89. </view>
  90. </view>
  91. <view class="good-key">
  92. 鸿运开来 为成功喝彩
  93. </view>
  94. <view class="good-price">
  95. <view class="price">
  96. ¥{{item.price}}
  97. </view>
  98. <view class="xl">
  99. 销量:{{item.sales}}
  100. </view>
  101. </view>
  102. </view>
  103. </view>
  104. <!-- 商品列表 ed-->
  105. <uni-popup ref="popupkf" type="center">
  106. <view class="popup-box">
  107. <view class="img">
  108. <image src="../../static/img/img009.png" mode=""></image>
  109. </view>
  110. <view class="mian">
  111. <view class="delivery">
  112. <view class="title">已经为您定制专属客服</view>
  113. <image src="../../static/img/img010.png" mode=""></image>
  114. </view>
  115. <view class="nocancel">客服VX:{{ text }}</view>
  116. <view class="comfirm-box">
  117. <view class="cancel" @click="cancel">取消</view>
  118. <view class="comfirm" @click="comfirm(text)">复制微信</view>
  119. </view>
  120. </view>
  121. </view>
  122. </uni-popup>
  123. </view>
  124. </template>
  125. <script>
  126. import {
  127. loadIndexs
  128. } from '@/api/index.js';
  129. import {
  130. getUserInfo,
  131. spread
  132. } from '@/api/user.js';
  133. import {
  134. getBargainList,
  135. getProducts,
  136. goodsDetail,
  137. poster
  138. } from '@/api/product.js';
  139. import {
  140. saveUrl,
  141. interceptor
  142. } from '@/utils/loginUtils';
  143. import {
  144. mapState,
  145. mapMutations
  146. } from 'vuex';
  147. // #ifdef H5
  148. import {
  149. weixindata,
  150. shareLoad
  151. } from '@/utils/wxAuthorized';
  152. // #endif
  153. export default {
  154. data() {
  155. return {
  156. text: 'shxsophina', //客服微信
  157. page: 1,
  158. limitt: 20,
  159. loadingType: 'more',
  160. current: 0,
  161. shareShow: false, //分享海报
  162. pageProportion: 0, //保存页面基于750宽度的比例
  163. swiperHeight: 0,
  164. checkid: 0,
  165. titleNViewBackground: '',
  166. swiperCurrent: 0,
  167. swiperLength: 0,
  168. carouselList: [], //轮播列表
  169. page: 1,
  170. limit: 5,
  171. firstList: [],
  172. goodList: [], //商品列表
  173. shopList: [],
  174. period: 1,
  175. shareImage: '',
  176. };
  177. },
  178. computed: {
  179. ...mapState('user', ['hasLogin', 'userInfo'])
  180. },
  181. onShareAppMessage(options) {
  182. // 设置菜单中的转发按钮触发转发事件时的转发内容
  183. let pages = getCurrentPages(); //获取加载的页面
  184. let currentPage = pages[pages.length - 1]; //获取当前页面的对象
  185. let url = currentPage.route; //当前页面url
  186. let item = currentPage.options; //如果要获取url中所带的参数可以查看options
  187. let shareObj = {}
  188. if (this.userInfo.uid) {
  189. shareObj = {
  190. title: this.userInfo.nickname + '邀请您加入顺肠清', // 默认是小程序的名称(可以写slogan等)
  191. path: url + '?scene=' + this.userInfo.uid, // 默认是当前页面,必须是以‘/’开头的完整路径
  192. imageUrl: '',
  193. success: function(res) {
  194. // 转发成功之后的回调
  195. if (res.errMsg == 'shareAppMessage:ok') {}
  196. },
  197. fail: function() {
  198. // 转发失败之后的回调
  199. if (res.errMsg == 'shareAppMessage:fail cancel') {
  200. // 用户取消转发
  201. } else if (res.errMsg == 'shareAppMessage:fail') {
  202. // 转发失败,其中 detail message 为详细失败信息
  203. }
  204. }
  205. };
  206. } else {
  207. shareObj = {
  208. title: '顺肠清', // 默认是小程序的名称(可以写slogan等)
  209. path: url, // 默认是当前页面,必须是以‘/’开头的完整路径
  210. imageUrl: '',
  211. success: function(res) {
  212. // 转发成功之后的回调
  213. if (res.errMsg == 'shareAppMessage:ok') {}
  214. },
  215. fail: function() {
  216. // 转发失败之后的回调
  217. if (res.errMsg == 'shareAppMessage:fail cancel') {
  218. // 用户取消转发
  219. } else if (res.errMsg == 'shareAppMessage:fail') {
  220. // 转发失败,其中 detail message 为详细失败信息
  221. }
  222. }
  223. };
  224. }
  225. return shareObj;
  226. },
  227. onReachBottom() {
  228. console.log('到底')
  229. this.getGoodList()
  230. },
  231. onLoad: function(option) {
  232. // #ifdef MP
  233. if (option.scene) {
  234. // 存储小程序邀请人
  235. uni.setStorage({
  236. key: 'spread_code',
  237. data: option.scene
  238. });
  239. }
  240. // #endif
  241. },
  242. onShow: function() {
  243. this.getGoodList()
  244. this.loadData();
  245. },
  246. methods: {
  247. getGoodList() {
  248. let obj = this
  249. if (obj.loadingType == 'loading' || obj.loadingType == 'noMore') {
  250. return
  251. }
  252. obj.loadingType = 'loading'
  253. getProducts({
  254. page: 1,
  255. limit: 50,
  256. }).then(res => {
  257. obj.goodList = obj.goodList.concat(res.data)
  258. if (obj.limit == res.data.length) {
  259. obj.loadingType = 'more'
  260. } else {
  261. obj.loadingType = 'noMore'
  262. }
  263. })
  264. },
  265. navto(url, type = 0) {
  266. if (type == 1) {
  267. if (!this.hasLogin) {
  268. // 保存地址
  269. saveUrl();
  270. // 登录拦截
  271. interceptor();
  272. } else {
  273. uni.navigateTo({
  274. url,
  275. fail() {
  276. uni.switchTab({
  277. url
  278. })
  279. }
  280. })
  281. }
  282. } else {
  283. uni.navigateTo({
  284. url,
  285. fail() {
  286. uni.switchTab({
  287. url
  288. })
  289. }
  290. })
  291. }
  292. },
  293. navTo(url) {
  294. if (url == '') {
  295. this.$api.msg('暂未开通,敬请期待');
  296. } else {
  297. this.navto(url)
  298. }
  299. },
  300. // 點擊搜索框
  301. clickSearch() {
  302. uni.navigateTo({
  303. url: '/pages/product/search'
  304. });
  305. },
  306. // 监听图片加载完成
  307. onImageError(key, index) {
  308. this[key][index].image = '/static/error/errorImage.jpg';
  309. },
  310. // 请求载入数据
  311. async loadData() {
  312. loadIndexs({})
  313. .then(({
  314. data
  315. }) => {
  316. let goods = data.info;
  317. console.log(goods, '商品信息');
  318. this.carouselList = data.banner;
  319. this.swiperLength = this.carouselList.length;
  320. this.bastList = data.giftInfo; //会员礼包
  321. data.info.firstList.forEach(e => {
  322. e.isVip = e.store_type ? "3" : "0"
  323. })
  324. this.firstList = data.info.firstList //首页商品
  325. uni.stopPullDownRefresh();
  326. })
  327. .catch(e => {
  328. uni.stopPullDownRefresh();
  329. });
  330. },
  331. //轮播图切换修改背景色
  332. swiperChange(e) {
  333. const index = e.detail.current;
  334. this.swiperCurrent = index;
  335. this.titleNViewBackground = this.carouselList[index].background;
  336. },
  337. // 轮播图跳转
  338. bannerNavToUrl(item) {
  339. // #ifdef H5
  340. console.log(item.wap_url.indexOf('http'), 'banner');
  341. if (item.wap_url.indexOf('http') >= 0) {
  342. window.location.href = item.wap_url;
  343. }
  344. // #endif
  345. //测试数据没有写id,用title代替
  346. uni.navigateTo({
  347. url: item.wap_url
  348. });
  349. },
  350. comfirm(text) {
  351. console.log(text);
  352. const result = this.uniCopy(text);
  353. if (result === false) {
  354. uni.showToast({
  355. title: '不支持'
  356. });
  357. } else {
  358. uni.showToast({
  359. title: '复制成功',
  360. icon: 'none'
  361. });
  362. }
  363. this.$refs.popupkf.close();
  364. },
  365. uniCopy(content) {
  366. /**
  367. * 小程序端 和 app端的复制逻辑
  368. */
  369. //#ifndef H5
  370. uni.setClipboardData({
  371. data: content,
  372. success: function() {
  373. console.log('success');
  374. return true;
  375. }
  376. });
  377. //#endif
  378. /**
  379. * H5端的复制逻辑
  380. */
  381. // #ifdef H5
  382. if (!document.queryCommandSupported('copy')) {
  383. //为了兼容有些浏览器 queryCommandSupported 的判断
  384. // 不支持
  385. return false;
  386. }
  387. let textarea = document.createElement('textarea');
  388. textarea.value = content;
  389. textarea.readOnly = 'readOnly';
  390. document.body.appendChild(textarea);
  391. textarea.select(); // 选择对象
  392. textarea.setSelectionRange(0, content.length); //核心
  393. let result = document.execCommand('copy'); // 执行浏览器复制命令
  394. textarea.remove();
  395. return result;
  396. // #endif
  397. },
  398. // 打开客服
  399. openKf() {
  400. this.$refs.popupkf.open();
  401. },
  402. // 关闭客服
  403. cancel() {
  404. this.$refs.popupkf.close();
  405. },
  406. }
  407. };
  408. </script>
  409. <style lang="scss">
  410. page {
  411. background: #ffff;
  412. min-height: 100%;
  413. height: auto;
  414. }
  415. // 顶部搜索
  416. .top-search {
  417. height: 80rpx;
  418. padding: 0 20rpx;
  419. margin-bottom: 20rpx;
  420. // background-color: #fff;
  421. .top-logo {
  422. width: 50rpx;
  423. // height: 50rpx;
  424. margin-right: 10rpx;
  425. image {
  426. width: 48rpx;
  427. }
  428. }
  429. .search-box {
  430. justify-content: center;
  431. width: 698rpx;
  432. height: 60rpx;
  433. background: #EEEEEE;
  434. // box-shadow: 0px 10rpx 20rpx 0px rgba(4, 114, 69, 0.22);
  435. border-radius: 30rpx;
  436. .search {
  437. width: 34rpx;
  438. height: 34rpx;
  439. }
  440. .search-font {
  441. margin-left: 14rpx;
  442. font-size: 28rpx;
  443. font-family: PingFang SC;
  444. font-weight: 500;
  445. color: #CBCBCB;
  446. }
  447. }
  448. }
  449. // 顶部轮播图
  450. .top-swiper {
  451. width: 690rpx;
  452. height: 365rpx;
  453. // margin: 20rpx 0 0;
  454. border-radius: 20rpx;
  455. margin: auto;
  456. image {
  457. width: 690rpx;
  458. height: 365rpx;
  459. border-radius: 20rpx;
  460. }
  461. }
  462. .swiper-btm {
  463. height: 60rpx;
  464. width: 750rpx;
  465. background-color: #fff;
  466. margin-bottom: 20rpx;
  467. font-size: 21rpx;
  468. font-weight: 500;
  469. color: #333333;
  470. .btm-item {
  471. flex-grow: 1;
  472. justify-content: center;
  473. image {
  474. width: 25rpx;
  475. height: 25rpx;
  476. margin-right: 14rpx;
  477. }
  478. }
  479. }
  480. .jg {
  481. height: 20rpx;
  482. background: #fff;
  483. }
  484. // 分类
  485. .cate-section {
  486. justify-content: space-around;
  487. background-color: #fff;
  488. padding: 0rpx 0 10rpx;
  489. margin-top: 20rpx;
  490. flex-wrap: wrap;
  491. .cate-item {
  492. flex-grow: 0;
  493. width: 33.3%;
  494. flex-direction: column;
  495. text-align: center;
  496. align-items: center;
  497. justify-content: center;
  498. padding-bottom: 20rpx;
  499. .img-wrapper {
  500. width: 90rpx;
  501. height: 90rpx;
  502. border-radius: 20rpx;
  503. position: relative;
  504. image {
  505. width: 90rpx;
  506. height: 90rpx;
  507. position: absolute;
  508. left: 50%;
  509. top: 50%;
  510. transform: translate(-50%, -50%);
  511. }
  512. }
  513. .item-title {
  514. margin-top: 15rpx;
  515. font-size: 26rpx;
  516. font-weight: 500;
  517. color: #6B4216;
  518. }
  519. }
  520. }
  521. .product-box {
  522. margin-top: 20rpx;
  523. background: #ffffff;
  524. padding: 26rpx 0 20rpx;
  525. .product-tit {
  526. justify-content: center;
  527. .hx {
  528. width: 120rpx;
  529. height: 1rpx;
  530. background: #4A2723;
  531. }
  532. .tit {
  533. margin: 0 70rpx;
  534. font-size: 30rpx;
  535. font-weight: 500;
  536. color: #4A2723;
  537. }
  538. }
  539. }
  540. .hotgoods {
  541. margin-top: 38rpx;
  542. width: 100%;
  543. display: flex;
  544. flex-wrap: wrap;
  545. padding: 0 20rpx 30rpx;
  546. justify-content: space-between;
  547. .hotgoods-item {
  548. width: 345rpx;
  549. background-color: #ffffff;
  550. border-radius: 12rpx;
  551. box-shadow: 0 0 15rpx rgba(0, 0, 0, 0.2);
  552. margin-bottom: 15rpx;
  553. .image-wrapper {
  554. width: 345rpx;
  555. height: 345rpx;
  556. border-radius: 3px;
  557. overflow: hidden;
  558. position: relative;
  559. .image-bg {
  560. position: absolute;
  561. top: 0;
  562. left: 0;
  563. right: 0;
  564. bottom: 0;
  565. width: 100%;
  566. height: 100%;
  567. opacity: 1;
  568. border-radius: 12rpx 12rpx 0 0;
  569. z-index: 2;
  570. }
  571. .image {
  572. width: 100%;
  573. height: 100%;
  574. opacity: 1;
  575. border-radius: 12rpx 12rpx 0 0;
  576. }
  577. }
  578. .title {
  579. margin-top: 24rpx;
  580. padding: 0 20rpx;
  581. font-size: 28rpx;
  582. font-family: PingFang SC;
  583. font-weight: 500;
  584. color: #333333;
  585. }
  586. .hot-price {
  587. display: flex;
  588. justify-content: flex-start;
  589. align-items: center;
  590. // padding: 14rpx 0 30rpx;
  591. .hotPrice-box {
  592. padding: 2rpx 6rpx;
  593. background: linear-gradient(90deg, #c79a4c, #f9df7f);
  594. border-radius: 5rpx;
  595. text-align: center;
  596. line-height: 28rpx;
  597. font-size: 20rpx;
  598. font-family: Source Han Sans CN;
  599. font-weight: 400;
  600. color: #ffffff;
  601. }
  602. .price {
  603. margin-left: 10rpx;
  604. font-size: 40rpx;
  605. color: #ff0000;
  606. font-weight: 500;
  607. .jf {
  608. font-size: 20rpx;
  609. }
  610. }
  611. .yuanPrice {
  612. margin-left: 10rpx;
  613. font-size: 20rpx;
  614. font-family: PingFang SC;
  615. font-weight: 500;
  616. text-decoration: line-through;
  617. color: #999999;
  618. }
  619. .cart-icon {
  620. image {
  621. width: 44rpx;
  622. height: 44rpx;
  623. }
  624. }
  625. }
  626. }
  627. }
  628. .popup-box {
  629. width: 522rpx;
  630. height: 605rpx;
  631. background-color: #ffffff;
  632. border-radius: 20rpx;
  633. position: relative;
  634. .product-tit {
  635. justify-content: center;
  636. .hx {
  637. width: 120rpx;
  638. height: 1rpx;
  639. background: #989898;
  640. }
  641. .tit {
  642. margin: 0 70rpx;
  643. font-size: 30rpx;
  644. font-weight: 500;
  645. color: #4A2723;
  646. }
  647. }
  648. .img {
  649. position: relative;
  650. top: -56rpx;
  651. left: 0;
  652. width: 522rpx;
  653. height: 132rpx;
  654. display: flex;
  655. justify-content: center;
  656. image {
  657. border-radius: 20rpx 20rpx 0 0;
  658. width: 450rpx;
  659. height: 132rpx;
  660. }
  661. }
  662. .mian {
  663. margin-top: -44rpx;
  664. display: flex;
  665. flex-direction: column;
  666. align-items: center;
  667. // padding: 32rpx 32rpx;
  668. background-color: #ffffff;
  669. border-radius: 0 0 20rpx 20rpx;
  670. text-align: center;
  671. .delivery {
  672. font-size: 40rpx;
  673. color: #333333;
  674. display: flex;
  675. align-items: center;
  676. flex-direction: column;
  677. image {
  678. margin-top: 48rpx;
  679. width: 172rpx;
  680. height: 160rpx;
  681. }
  682. }
  683. .nocancel {
  684. font-size: 32rpx;
  685. color: #333333;
  686. margin-top: 14rpx;
  687. }
  688. .comfirm-box {
  689. margin-top: 52rpx;
  690. display: flex;
  691. // margin-bottom: 32rpx;
  692. // justify-content: space-around;
  693. .cancel {
  694. display: flex;
  695. align-items: center;
  696. justify-content: center;
  697. width: 197rpx;
  698. height: 74rpx;
  699. border: 1px solid #dcc786;
  700. border-radius: 38rpx;
  701. font-size: 32rpx;
  702. color: #605128;
  703. }
  704. .comfirm {
  705. margin-left: 32rpx;
  706. display: flex;
  707. align-items: center;
  708. justify-content: center;
  709. width: 197rpx;
  710. height: 74rpx;
  711. background: linear-gradient(-90deg, #d1ba77 0%, #f7e8ad 100%);
  712. border-radius: 38px;
  713. font-size: 32rpx;
  714. color: #605128;
  715. }
  716. }
  717. }
  718. }
  719. .good-list {
  720. display: flex;
  721. justify-content: space-between;
  722. flex-wrap: wrap;
  723. padding: 20rpx 28rpx;
  724. .good {
  725. width: 336rpx;
  726. height: 482rpx;
  727. background: #FFFFFF;
  728. box-shadow: 0px 0px 6rpx 0px rgba(0, 0, 0, 0.1);
  729. border-radius: 14rpx;
  730. margin-bottom: 20rpx;
  731. position: relative;
  732. .good-image {
  733. width: 336rpx;
  734. height: 336rpx;
  735. background-color: #eee;
  736. border-radius: 14rpx 14rpx 0 0;
  737. }
  738. .good-name {
  739. font-size: 28rpx;
  740. font-weight: bold;
  741. color: #333333;
  742. padding: 0 20rpx;
  743. }
  744. .good-key {
  745. font-size: 22rpx;
  746. font-weight: 500;
  747. color: #999999;
  748. padding-left: 20rpx
  749. }
  750. .good-price {
  751. display: flex;
  752. width: 336rpx;
  753. justify-content: space-between;
  754. font-size: 28rpx;
  755. font-weight: bold;
  756. color: #FF1A1A;
  757. position: absolute;
  758. bottom: 20rpx;
  759. padding: 0 20rpx;
  760. .xl{
  761. font-size: 20rpx;
  762. font-weight: bold;
  763. color: #999999;
  764. }
  765. }
  766. }
  767. }
  768. // .good-list {
  769. // width: 750rpx;
  770. // background:#fff;
  771. // padding: 30rpx 0;
  772. // .good {
  773. // width: 690rpx;
  774. // height: 276rpx;
  775. // background: #FFFFFF;
  776. // box-shadow: 0px 0px 20rpx 0px rgba(50, 50, 52, 0.06);
  777. // border-radius: 10rpx;
  778. // margin: auto;
  779. // padding: 20rpx 15rpx;
  780. // margin-bottom: 20rpx;
  781. // &:last-of-type {
  782. // margin-bottom: 0rpx;
  783. // }
  784. // .good-img {
  785. // flex-shrink: 0;
  786. // width: 236rpx;
  787. // height: 236rpx;
  788. // border-radius: 10rpx;
  789. // margin-right: 22rpx;
  790. // image {
  791. // width: 236rpx;
  792. // height: 236rpx;
  793. // border-radius: 10rpx;
  794. // }
  795. // }
  796. // .good-info {
  797. // flex-grow: 1;
  798. // height: 100%;
  799. // flex-direction: column;
  800. // justify-content: space-between;
  801. // align-items: flex-start;
  802. // .good-name {
  803. // font-size: 32rpx;
  804. // font-weight: bold;
  805. // padding-top: 10rpx;
  806. // color: #333333;
  807. // }
  808. // .good-price {
  809. // width: 100%;
  810. // image {
  811. // width: 14rpx;
  812. // margin: 0 6rpx 0 10rpx;
  813. // }
  814. // .old-price {
  815. // .old-left {
  816. // font-size: 26rpx;
  817. // font-weight: 500;
  818. // text-decoration: line-through;
  819. // color: #999999;
  820. // }
  821. // .old-right {
  822. // font-size: 24rpx;
  823. // font-weight: bold;
  824. // color: #B59467;
  825. // }
  826. // }
  827. // .new-price {
  828. // width: 100%;
  829. // font-size: 36rpx;
  830. // font-weight: bold;
  831. // color: #FF4C4C;
  832. // justify-content: space-between;
  833. // .good-tip {
  834. // width: 137rpx;
  835. // height: 52rpx;
  836. // background: #ff4a48;
  837. // border-radius: 26rpx;
  838. // position: relative;
  839. // font-size: 26rpx;
  840. // font-weight: 500;
  841. // color: #FFFFFF;
  842. // line-height: 52rpx;
  843. // text-align: center;
  844. // }
  845. // }
  846. // }
  847. // }
  848. // }
  849. // }
  850. .index-top-wrap {
  851. position: relative;
  852. .index-top {
  853. width: 750rpx;
  854. position: absolute;
  855. }
  856. .fud {
  857. position: relative;
  858. }
  859. }
  860. .hdlist {
  861. width: 100%;
  862. image {
  863. display: block;
  864. width: 705rpx;
  865. margin: 25rpx auto;
  866. }
  867. }
  868. </style>