index.vue 19 KB

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