index.vue 20 KB

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