index.vue 20 KB

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