index.vue 20 KB

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