index.vue 27 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354
  1. <template>
  2. <view class="container">
  3. <view class="carousel-section">
  4. <!-- 背景色区域 -->
  5. <!-- <view class="bg"></view> -->
  6. <!-- 标题栏和状态栏占位符 -->
  7. <!-- <view class="titleNview-placing"></view> -->
  8. <!-- 搜素栏 -->
  9. <view class="search flex">
  10. <view class="input-box flex" @click.stop="clickSearch">
  11. <view class=" input-content flex">
  12. <view class="iconfont iconsearch"></view>
  13. <view class="input"><input type="text" disabled value="输入关键字搜索" /></view>
  14. </view>
  15. </view>
  16. </view>
  17. <swiper class="carousel" autoplay="true" duration="400" interval="5000" @change="swiperChange"
  18. :indicator-dots="true" indicator-active-color="#FFFFFF">
  19. <!-- <swiper class="carousel" autoplay="true" duration="400" interval="5000"> -->
  20. <swiper-item v-for="(item, index) in carouselList" :key="index" class="carousel-item">
  21. <image :src="item.pic" mode="aspectFill" @click="bannerNavToUrl(item)"></image>
  22. </swiper-item>
  23. </swiper>
  24. </view>
  25. <view class="shop-list flex" style="padding-top: 40rpx;">
  26. <view class="shop-item flex" v-for="(item,index) in shopList">
  27. <image :src="item.pic" mode="" class="shop-img"></image>
  28. <view class="shop-name">
  29. {{item.cate_name}}
  30. </view>
  31. </view>
  32. </view>
  33. <!-- 商品列表 -->
  34. <view class="" style="background: #fff;margin-top: 20rpx;padding-bottom: 20rpx;">
  35. <view class="title-wrapper flex">
  36. <image src="../../static/icon/shop-logo.png" mode=""></image>
  37. <view class="">礼包商品</view>
  38. <view class="title-b">超值体验</view>
  39. </view>
  40. <view class="gift-info">
  41. <view class="" style="padding-top: 20rpx;font-weight: bold;font-size: 32rpx;">
  42. 最强商家联盟
  43. </view>
  44. <view class="">
  45. 买到就是赚到
  46. </view>
  47. </view>
  48. <view class="gift-good-list p-r">
  49. <view class="gift-list p-a flex f-j-s">
  50. <view class="gift-item flex f-d-c f-j-c" v-for="item in goodList"
  51. @click="navto('/pages/product/product?id=' + item.id)">
  52. <image :src="item.image" mode=""></image>
  53. <view class="gift-name clamp">
  54. {{item.store_name}}
  55. </view>
  56. <view class="gift-price">
  57. ¥{{item.price}}
  58. </view>
  59. </view>
  60. </view>
  61. </view>
  62. </view>
  63. <!-- 门店列表 -->
  64. <view class="" style="height: 20rpx;"></view>
  65. <view class="djq-wrap flex f-ai-s" v-for="storeitem in storeList">
  66. <image :src="storeitem.image" mode="" class="djq-img"></image>
  67. <view class="djq-right pl20">
  68. <view class="djq-tit flex f-j-sb f-ai-s">
  69. <view class="djq-name clamp">
  70. {{storeitem.name}}
  71. </view>
  72. <view class="djq-dis">
  73. <image src="../../static/icon/dw.png" mode=""></image>
  74. 距离{{(storeitem.range*1 > 1000 )?( storeitem.range + 'KM'):(storeitem.range*1 + 'm')}}
  75. </view>
  76. </view>
  77. <view class="flex f-d-c f-j-sb f-ai-s fg1" style="height: 110rpx;">
  78. <view class="djq-dz clamp2">
  79. {{storeitem.detailed_address}}
  80. </view>
  81. <view class="djq-hd flex f-j-sb">
  82. <view class="buy-info">
  83. 1425人已购买
  84. </view>
  85. <view class="hd-btn">
  86. <image src="../../static/icon/call.png" mode="" style="margin-right: 15rpx;"
  87. @click="makeCall(storeitem.phone)"></image>
  88. <image src="../../static/icon/dh.png" mode="" @click="dh(storeitem)"></image>
  89. </view>
  90. </view>
  91. </view>
  92. <!-- <view class="" style="padding: 10rpx 0 0 0;">
  93. <view class="left-btm flex f-j-s" v-for="itemt in 3">
  94. <view class="j-logo">
  95. </view>
  96. <view class="j-price">
  97. <text>¥</text>25
  98. </view>
  99. <view class="j-zk">
  100. 5.8折
  101. </view>
  102. <view class="j-name">
  103. 50元代金券
  104. </view>
  105. </view>
  106. </view> -->
  107. </view>
  108. </view>
  109. </view>
  110. </template>
  111. <script>
  112. import weixinObj from "@/plugin/jweixin-module/index.js";
  113. import {
  114. store_cate,
  115. getStoreList
  116. } from '@/api/shop.js'
  117. import {
  118. lookSubpoints,
  119. lookOneself
  120. } from '../../api/user.js';
  121. import seckill from '../../components/seckill/seckill.vue';
  122. import {
  123. loadIndexs,
  124. getVip
  125. } from '@/api/index.js';
  126. import {
  127. getUserInfo,
  128. spread
  129. } from '@/api/user.js';
  130. import {
  131. setCoupons
  132. } from '@/api/functionalUnit.js';
  133. import {
  134. getBargainList,
  135. getProducts
  136. } from '@/api/product.js';
  137. import {
  138. interceptor
  139. } from '@/utils/loginUtils';
  140. import {
  141. mapState,
  142. mapMutations
  143. } from 'vuex';
  144. import {
  145. tabbar
  146. } from '@/utils/tabbar.js';
  147. // #ifdef H5
  148. import {
  149. weixindata,
  150. shareLoad
  151. } from '@/utils/wxAuthorized';
  152. // #endif
  153. export default {
  154. components: {
  155. seckill
  156. },
  157. data() {
  158. return {
  159. storeList: [],
  160. tabbar: tabbar,
  161. current: 0,
  162. shareShow: false, //分享海报
  163. pageProportion: 0, //保存页面基于750宽度的比例
  164. swiperHeight: 0,
  165. checkid: 0,
  166. titleNViewBackground: '',
  167. swiperCurrent: 0,
  168. swiperLength: 0,
  169. carouselList: [], //轮播列表
  170. bastList: [], //会员礼包
  171. page: 1,
  172. limit: 5,
  173. firstList: [],
  174. goodList: [],
  175. shopList: []
  176. };
  177. },
  178. computed: {
  179. ...mapState(['loginInterceptor', 'baseURL', 'latitude', 'longitude']),
  180. ...mapState('user', ['hasLogin', 'userInfo'])
  181. },
  182. onLoad: function(option) {
  183. this.getaddress();
  184. // #ifdef MP
  185. if (option.scene) {
  186. // 存储小程序邀请人
  187. uni.setStorage({
  188. key: 'spread_code',
  189. data: option.scene
  190. });
  191. }
  192. // #endif
  193. // #ifdef H5
  194. this.IndexShare();
  195. //#endif
  196. },
  197. onShow: function() {
  198. this.getGoodList()
  199. this.loadData();
  200. this.getBargainList();
  201. this.getStoreCate()
  202. },
  203. //下拉刷新
  204. onPullDownRefresh() {
  205. this.loadData();
  206. },
  207. // #ifndef MP
  208. // 监听导航栏输入框点击事件
  209. onNavigationBarSearchInputClicked(e) {
  210. //跳转到搜索页面
  211. this.clickSearch();
  212. },
  213. //点击导航栏 buttons 时触发
  214. onNavigationBarButtonTap(e) {
  215. const index = e.index;
  216. if (index === 0) {
  217. this.$api.msg('点击了扫描');
  218. } else if (index === 1) {
  219. // #ifdef APP-PLUS
  220. const pages = getCurrentPages();
  221. const page = pages[pages.length - 1];
  222. const currentWebview = page.$getAppWebview();
  223. currentWebview.hideTitleNViewButtonRedDot({
  224. index
  225. });
  226. // #endif
  227. uni.navigateTo({
  228. url: '/pages/user/notice'
  229. });
  230. }
  231. },
  232. // #endif
  233. methods: {
  234. ...mapMutations(['setLat', 'setLon']),
  235. // 计算距离
  236. space(lat1, lng1, lat2, lng2) {
  237. console.log(lat1, lng1, lat2, lng2);
  238. var radLat1 = (lat1 * Math.PI) / 180.0;
  239. var radLat2 = (lat2 * Math.PI) / 180.0;
  240. var a = radLat1 - radLat2;
  241. var b = (lng1 * Math.PI) / 180.0 - (lng2 * Math.PI) / 180.0;
  242. var s = 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(a / 2), 2) + Math.cos(radLat1) * Math.cos(radLat2) * Math
  243. .pow(Math.sin(b / 2), 2)));
  244. s = s * 6378.137;
  245. s = Math.round(s * 10000) / 10000;
  246. // return s * 1000; // 单位米
  247. return s //单位km
  248. },
  249. // 拨打电话
  250. makeCall(phone) {
  251. uni.makePhoneCall({
  252. phoneNumber: phone //仅为示例
  253. });
  254. },
  255. // 导航
  256. dh() {
  257. },
  258. // 获取商店列表
  259. getStoreList() {
  260. let obj = this
  261. //getStoreList( cate_id=1
  262. getStoreList({
  263. latitude: obj.latitude,
  264. longitude: obj.longitude
  265. }).then(res => {
  266. console.log(res)
  267. obj.storeList = res.data.list
  268. // obj.storeList = res.data.list.map(item => {
  269. // item.space = obj.space(obj.latitude, obj.longitude, item.latitude, item.longitude)
  270. // return item
  271. // })
  272. })
  273. },
  274. // 获取店铺分类
  275. getStoreCate() {
  276. store_cate().then(res => {
  277. console.log(res)
  278. this.shopList = res.data
  279. })
  280. },
  281. getLocation() {
  282. uni.getLocation({
  283. type: 'gcj02',
  284. success(e) {
  285. console.log(e, 'dingwei')
  286. c
  287. }
  288. })
  289. },
  290. getGoodList() {
  291. let obj = this
  292. getProducts({
  293. page: 1,
  294. limit: 50,
  295. cid: 1
  296. }).then(res => {
  297. console.log(res, 'libao')
  298. obj.goodList = res.data
  299. })
  300. },
  301. navto(url) {
  302. uni.navigateTo({
  303. url,
  304. fail() {
  305. uni.switchTab({
  306. url
  307. })
  308. }
  309. })
  310. },
  311. // #ifdef H5
  312. IndexShare() {
  313. let obj = this;
  314. let pages = getCurrentPages();
  315. // 获取当前页面
  316. let page = pages[pages.length - 1];
  317. let path = '#/' + page.route + '?';
  318. // 保存传值
  319. for (let i in page.options) {
  320. path += i + '=' + page.options[i] + '&';
  321. }
  322. console.log(obj.Path);
  323. // 保存邀请人
  324. path += 'spread=' + this.userInfo.uid;
  325. let data = {
  326. link: this.baseURL + '/index/' + path,
  327. title: this.userInfo.nickname + '邀请您进入想亮',
  328. desc: '欢迎加入想亮',
  329. imgUrl: this.baseURL + '/index/static/img/logo.jpg'
  330. };
  331. console.log(data, '分享数据');
  332. shareLoad(data);
  333. },
  334. // #endif
  335. getaddress() {
  336. console.log('dizhi+++++++++++');
  337. let obj = this;
  338. // #ifdef H5
  339. weixindata().then(wxOjb => {
  340. console.log(wxOjb, '获取微信');
  341. wxOjb.getLocation({
  342. type: 'gcj02',
  343. success: res => {
  344. console.log(res, 123456);
  345. obj.setLat(res.latitude);
  346. obj.setLon(res.longitude);
  347. obj.getStoreList()
  348. },
  349. fail: err => {
  350. console.log(err, 'shi+++++++++++++++');
  351. openMap().then(e => {
  352. this.getaddress();
  353. });
  354. }
  355. });
  356. });
  357. // #endif
  358. },
  359. navTo(url) {
  360. if (url == '') {
  361. this.$api.msg('暂未开通,敬请期待');
  362. } else {
  363. uni.navigateTo({
  364. url
  365. });
  366. }
  367. },
  368. getBargainList() {
  369. let that = this;
  370. getBargainList({
  371. page: that.page,
  372. limit: that.limit
  373. })
  374. .then(function(res) {
  375. // that.$set(that, 'bargainlist', res.data.slice(0, 2));
  376. })
  377. .catch(res => {
  378. console.log(res, 'getBargainList');
  379. });
  380. },
  381. // 點擊搜索框
  382. clickSearch() {
  383. uni.navigateTo({
  384. url: '/pages/product/search'
  385. });
  386. },
  387. // 监听图片加载完成
  388. onImageError(key, index) {
  389. this[key][index].image = '/static/error/errorImage.jpg';
  390. },
  391. // 请求载入数据
  392. async loadData() {
  393. loadIndexs({})
  394. .then(({
  395. data
  396. }) => {
  397. let goods = data.info;
  398. console.log(goods, '商品信息');
  399. this.carouselList = data.banner;
  400. this.swiperLength = this.carouselList.length;
  401. this.bastList = data.giftInfo; //会员礼包
  402. data.info.firstList.forEach(e => {
  403. e.isVip = e.store_type ? "3" : "0"
  404. })
  405. this.firstList = data.info.firstList //首页商品
  406. uni.stopPullDownRefresh();
  407. })
  408. .catch(e => {
  409. uni.stopPullDownRefresh();
  410. });
  411. },
  412. //轮播图切换修改背景色
  413. swiperChange(e) {
  414. const index = e.detail.current;
  415. this.swiperCurrent = index;
  416. this.titleNViewBackground = this.carouselList[index].background;
  417. },
  418. // 轮播图跳转
  419. bannerNavToUrl(item) {
  420. // #ifdef H5
  421. console.log(item.wap_url.indexOf('http'), 'banner');
  422. if (item.wap_url.indexOf('http') >= 0) {
  423. window.location.href = item.wap_url;
  424. }
  425. // #endif
  426. //测试数据没有写id,用title代替
  427. uni.navigateTo({
  428. url: item.wap_url
  429. });
  430. }
  431. }
  432. };
  433. </script>
  434. <style lang="scss">
  435. page {
  436. background: #f8f6f9;
  437. }
  438. .carousel-section {
  439. position: relative;
  440. // padding-top: 10px;
  441. .bg {
  442. position: absolute;
  443. top: 0;
  444. left: 0;
  445. width: 750rpx;
  446. height: 378rpx;
  447. image {
  448. width: 100%;
  449. height: 100%;
  450. }
  451. }
  452. .titleNview-placing {
  453. height: var(--status-bar-height);
  454. box-sizing: content-box;
  455. }
  456. .search {
  457. justify-content: flex-start;
  458. padding: 10rpx 32rpx 20rpx;
  459. align-items: center;
  460. background-color: #fff;
  461. .address {
  462. width: 32rpx;
  463. height: 38rpx;
  464. }
  465. .shop-name {
  466. height: 38rpx;
  467. position: relative;
  468. top: -4rpx;
  469. z-index: 100;
  470. font-size: 30rpx;
  471. font-family: PingFang SC;
  472. font-weight: 500;
  473. padding-left: 10rpx;
  474. }
  475. .shop-jt {
  476. margin-left: 8rpx;
  477. width: 16rpx;
  478. height: 10rpx;
  479. }
  480. .input-box {
  481. margin-left: 10rpx;
  482. position: relative;
  483. z-index: 99;
  484. width: 710rpx;
  485. height: 60rpx;
  486. background: #EEEEEE;
  487. border-radius: 30rpx;
  488. .input-content {
  489. position: relative;
  490. z-index: 11;
  491. border-radius: 99rpx;
  492. flex-grow: 1;
  493. padding: 5rpx 30rpx;
  494. background: #EEEEEE;
  495. .iconsearch {
  496. font-size: 50rpx;
  497. color: #CBCBCB;
  498. }
  499. .input {
  500. margin-left: 19rpx;
  501. flex-grow: 1;
  502. color: #CBCBCB;
  503. input {
  504. font-size: 28rpx;
  505. color: #CBCBCB;
  506. }
  507. }
  508. }
  509. .input-button {
  510. padding-left: 20rpx;
  511. font-size: $font-base;
  512. height: 100%;
  513. }
  514. }
  515. }
  516. }
  517. .carousel {
  518. position: relative;
  519. z-index: 3;
  520. width: 100%;
  521. height: 360rpx;
  522. background-color: #fff;
  523. .carousel-item {
  524. width: 100%;
  525. height: 100%;
  526. padding: 0 28rpx;
  527. overflow: hidden;
  528. }
  529. image {
  530. width: 100%;
  531. height: 100%;
  532. border-radius: $border-radius-sm;
  533. }
  534. }
  535. .navbar {
  536. position: relative;
  537. z-index: 2;
  538. padding: 0 50rpx;
  539. margin-top: -200rpx;
  540. width: 750rpx;
  541. height: 420rpx;
  542. background: #ffffff;
  543. border-radius: 40rpx;
  544. .navbar-box {
  545. padding-top: 250rpx;
  546. .navbar-item {
  547. display: flex;
  548. flex-direction: column;
  549. align-items: center;
  550. width: 20%;
  551. .nitem-image {
  552. width: 90rpx;
  553. height: 90rpx;
  554. }
  555. .nitem-font {
  556. margin-top: 22rpx;
  557. font-size: 26rpx;
  558. font-family: PingFang SC;
  559. font-weight: 500;
  560. color: #000000;
  561. }
  562. }
  563. }
  564. }
  565. .jx {
  566. background: #fff;
  567. width: 750rpx;
  568. }
  569. .jx-box {
  570. background: #fff;
  571. display: flex;
  572. flex-direction: column;
  573. align-items: center;
  574. width: 750rpx;
  575. .jx-box-title {
  576. margin: 50rpx 0;
  577. width: 610rpx;
  578. height: 30rpx;
  579. image {
  580. width: 100%;
  581. height: 100%;
  582. }
  583. }
  584. .jx-box-img {
  585. width: 750rpx;
  586. height: 220rpx;
  587. image {
  588. width: 100%;
  589. height: 100%;
  590. }
  591. }
  592. }
  593. .cai {
  594. display: flex;
  595. justify-content: center;
  596. align-items: center;
  597. padding-bottom: 20rpx;
  598. font-size: 28rpx;
  599. font-weight: 500;
  600. color: #999999;
  601. }
  602. .jx-box-content {
  603. display: flex;
  604. .content-left {
  605. margin: 20rpx 15rpx;
  606. width: 236rpx;
  607. height: 236rpx;
  608. background: #E2E2E2;
  609. border-radius: 10rpx;
  610. image {
  611. width: 100%;
  612. height: 100%;
  613. }
  614. }
  615. .content-right {
  616. display: flex;
  617. flex-direction: column;
  618. justify-content: space-around;
  619. .shop-name {
  620. width: 382rpx;
  621. font-size: 32rpx;
  622. font-weight: bold;
  623. color: #333333;
  624. overflow: hidden;
  625. text-overflow: ellipsis;
  626. display: -webkit-box;
  627. -webkit-box-orient: vertical;
  628. -webkit-line-clamp: 2;
  629. }
  630. .shop-content {
  631. width: 455rpx;
  632. display: flex;
  633. justify-content: space-between;
  634. .shop-content-left {
  635. display: flex;
  636. flex-direction: column;
  637. .price-box {
  638. display: flex;
  639. align-items: center;
  640. .yuan-price {
  641. font-size: 26rpx;
  642. font-weight: 500;
  643. text-decoration: line-through;
  644. color: #999999;
  645. }
  646. image {
  647. margin: 0 10rpx;
  648. width: 16rpx;
  649. height: 18rpx;
  650. }
  651. .j-price {
  652. font-size: 24rpx;
  653. font-weight: bold;
  654. color: #B59467;
  655. }
  656. }
  657. .price-x {
  658. font-size: 36rpx;
  659. font-weight: bold;
  660. color: #FF4C4C;
  661. }
  662. }
  663. .shop-content-right {
  664. margin-top: 20rpx;
  665. align-items: center;
  666. text-align: center;
  667. width: 137rpx;
  668. height: 52rpx;
  669. font-size: 26rpx;
  670. font-weight: 500;
  671. color: #F8DABA;
  672. background: #303030;
  673. border-radius: 26rpx;
  674. line-height: 52rpx;
  675. }
  676. }
  677. }
  678. }
  679. .product-box {
  680. margin-top: 20rpx;
  681. background: #ffffff;
  682. padding: 26rpx 30rpx 20rpx;
  683. .product-title {
  684. display: flex;
  685. align-items: center;
  686. justify-content: center;
  687. .pt-image {
  688. width: 36rpx;
  689. height: 36rpx;
  690. }
  691. .bb {
  692. width: 120rpx;
  693. height: 1rpx;
  694. background: #989898;
  695. }
  696. .pt-title {
  697. margin: 0 28rpx;
  698. font-size: 30rpx;
  699. font-weight: 500;
  700. color: #363636;
  701. }
  702. .pt-tip {
  703. margin-left: 16rpx;
  704. font-size: 20rpx;
  705. font-family: PingFang SC;
  706. font-weight: bold;
  707. color: #95a0b1;
  708. }
  709. }
  710. .hotgoods {
  711. margin-top: 38rpx;
  712. width: 100%;
  713. display: flex;
  714. flex-wrap: wrap;
  715. padding: 0 0 30rpx;
  716. .hotgoods-item {
  717. width: 44%;
  718. background: #FFFFFF;
  719. margin: 20rpx;
  720. box-shadow: 0px 0px 20px 0px rgba(50, 50, 52, 0.06);
  721. border-radius: 10px;
  722. .image-wrapper {
  723. width: 100%;
  724. height: 330rpx;
  725. border-radius: 3px;
  726. overflow: hidden;
  727. position: relative;
  728. .image-bg {
  729. position: absolute;
  730. top: 0;
  731. left: 0;
  732. right: 0;
  733. bottom: 0;
  734. width: 100%;
  735. height: 100%;
  736. opacity: 1;
  737. border-radius: 12rpx 12rpx 0 0;
  738. z-index: 2;
  739. }
  740. .image {
  741. width: 100%;
  742. height: 100%;
  743. opacity: 1;
  744. border-radius: 12rpx 12rpx 0 0;
  745. }
  746. }
  747. .title {
  748. margin-top: 20rpx;
  749. font-size: 28rpx;
  750. font-family: PingFang SC;
  751. font-weight: 500;
  752. color: #333333;
  753. }
  754. .hotgoods-box {
  755. height: 100rpx;
  756. }
  757. .titlee {
  758. margin-left: 15rpx;
  759. font-size: 26rpx;
  760. font-weight: 500;
  761. color: #666666;
  762. white-space: nowrap;
  763. overflow: hidden;
  764. text-overflow: ellipsis;
  765. }
  766. .hot-price {
  767. display: flex;
  768. justify-content: flex-start;
  769. align-items: center;
  770. padding: 14rpx 0 30rpx;
  771. .hotPrice-box {
  772. width: 70rpx;
  773. height: 28rpx;
  774. background: linear-gradient(90deg, #c79a4c, #f9df7f);
  775. border-radius: 5rpx;
  776. text-align: center;
  777. line-height: 28rpx;
  778. font-size: 20rpx;
  779. font-weight: 400;
  780. color: #ffffff;
  781. }
  782. .price {
  783. margin-left: 10rpx;
  784. font-size: 36rpx;
  785. color: #ff0000;
  786. font-weight: 500;
  787. }
  788. .yuanPrice {
  789. margin-left: 10rpx;
  790. font-size: 20rpx;
  791. font-family: PingFang SC;
  792. font-weight: 500;
  793. text-decoration: line-through;
  794. color: #999999;
  795. }
  796. .cart-icon {
  797. image {
  798. width: 44rpx;
  799. height: 44rpx;
  800. }
  801. }
  802. }
  803. }
  804. }
  805. }
  806. .shop {
  807. margin-top: 20rpx;
  808. background: #ffffff;
  809. padding: 0 12rpx;
  810. .shop-title {
  811. padding: 30rpx 0 20rpx;
  812. display: flex;
  813. align-items: center;
  814. border-bottom: 1px solid #e3e6e7;
  815. .shop-item {
  816. width: 25%;
  817. display: flex;
  818. align-items: center;
  819. justify-content: center;
  820. .sitem-font {
  821. font-size: 26rpx;
  822. font-family: PingFang SC;
  823. font-weight: bold;
  824. color: #333333;
  825. }
  826. .jt-down {
  827. width: 10rpx;
  828. height: 8rpx;
  829. margin-left: 12rpx;
  830. }
  831. }
  832. }
  833. }
  834. .shop-main {
  835. padding: 32rpx 18rpx 0 12rpx;
  836. align-items: flex-start;
  837. justify-content: flex-start;
  838. .main-left {
  839. width: 180rpx;
  840. height: 180rpx;
  841. border-radius: 10rpx;
  842. }
  843. .main-right {
  844. width: 500rpx;
  845. justify-content: space-between;
  846. align-items: flex-start;
  847. margin-left: 20rpx;
  848. padding: 13rpx 0 35rpx;
  849. border-bottom: 1px solid #eaeced;
  850. .shopm-info {
  851. max-width: 60%;
  852. line-height: 1;
  853. .shopm-title {
  854. display: flex;
  855. justify-content: flex-start;
  856. .shopmt-font {
  857. font-size: 34rpx;
  858. font-family: PingFang SC;
  859. font-weight: bold;
  860. color: #333333;
  861. }
  862. .shopmt-good {
  863. margin-left: 6rpx;
  864. width: 30rpx;
  865. height: 30rpx;
  866. border: 1px solid #ff4c4c;
  867. border-radius: 5rpx;
  868. font-size: 20rpx;
  869. font-family: PingFang SC;
  870. font-weight: 500;
  871. color: #ff4c4c;
  872. text-align: center;
  873. line-height: 30rpx;
  874. }
  875. }
  876. .address {
  877. margin-top: 16rpx;
  878. font-size: 24rpx;
  879. font-family: PingFang SC;
  880. font-weight: 500;
  881. color: #666666;
  882. }
  883. .shopmt-tip {
  884. position: relative;
  885. display: inline-block;
  886. flex-grow: 0;
  887. margin-top: 52rpx;
  888. padding: 8rpx;
  889. background: #fcf3f0;
  890. border-radius: 16rpx 16rpx 16rpx 0px;
  891. font-size: 20rpx;
  892. font-family: PingFang SC;
  893. font-weight: 500;
  894. color: #ff440d;
  895. }
  896. }
  897. .right {
  898. height: 100%;
  899. margin-top: 5rpx;
  900. display: flex;
  901. flex-direction: column;
  902. .mright-top {
  903. display: flex;
  904. justify-content: flex-end;
  905. align-items: center;
  906. .mrt-image {
  907. width: 20rpx;
  908. height: 28rpx;
  909. }
  910. .mrt-font {
  911. margin-left: 8rpx;
  912. font-size: 22rpx;
  913. font-family: PingFang SC;
  914. font-weight: 500;
  915. color: #666666;
  916. }
  917. }
  918. .mright-bottom {
  919. margin-top: 80rpx;
  920. display: flex;
  921. justify-content: flex-end;
  922. .mrb-item {
  923. width: 46rpx;
  924. height: 46rpx;
  925. margin-left: 14rpx;
  926. }
  927. }
  928. }
  929. }
  930. }
  931. .good-list {
  932. width: 750rpx;
  933. background: linear-gradient(0deg, #FFFFFF, #F8F8F8);
  934. padding: 0 30rpx 30rpx;
  935. .good {
  936. width: 690rpx;
  937. height: 276rpx;
  938. background: #FFFFFF;
  939. box-shadow: 0px 0px 20rpx 0px rgba(50, 50, 52, 0.06);
  940. border-radius: 10rpx;
  941. margin: auto;
  942. padding: 20rpx 15rpx;
  943. margin-bottom: 20rpx;
  944. &:last-of-type {
  945. margin-bottom: 0rpx;
  946. }
  947. .good-img {
  948. flex-shrink: 0;
  949. width: 236rpx;
  950. height: 236rpx;
  951. border-radius: 10rpx;
  952. margin-right: 22rpx;
  953. image {
  954. width: 236rpx;
  955. height: 236rpx;
  956. border-radius: 10rpx;
  957. }
  958. }
  959. .good-info {
  960. flex-grow: 1;
  961. height: 100%;
  962. flex-direction: column;
  963. justify-content: space-between;
  964. align-items: flex-start;
  965. .good-name {
  966. font-size: 32rpx;
  967. font-weight: bold;
  968. padding-top: 10rpx;
  969. color: #333333;
  970. }
  971. .good-price {
  972. width: 100%;
  973. image {
  974. width: 14rpx;
  975. margin: 0 6rpx 0 10rpx;
  976. }
  977. .old-price {
  978. .old-left {
  979. font-size: 26rpx;
  980. font-weight: 500;
  981. text-decoration: line-through;
  982. color: #999999;
  983. }
  984. .old-right {
  985. font-size: 24rpx;
  986. font-weight: bold;
  987. color: #B59467;
  988. }
  989. }
  990. .new-price {
  991. width: 100%;
  992. font-size: 36rpx;
  993. font-weight: bold;
  994. color: #FF4C4C;
  995. justify-content: space-between;
  996. .good-tip {
  997. display: inline-block;
  998. padding: 0 20rpx 0 17rpx;
  999. min-width: 160rpx;
  1000. text-align: center;
  1001. line-height: 40rpx;
  1002. background: #303030;
  1003. font-size: 24rpx;
  1004. font-weight: 500;
  1005. color: #F8DABA;
  1006. border-radius: 10rpx;
  1007. position: relative;
  1008. &::before {
  1009. content: '';
  1010. display: inline-block;
  1011. height: 17rpx;
  1012. width: 17rpx;
  1013. background-color: #fff;
  1014. border-radius: 50%;
  1015. position: absolute;
  1016. top: 0;
  1017. bottom: 0;
  1018. left: -9rpx;
  1019. margin: auto;
  1020. }
  1021. &::after {
  1022. content: '';
  1023. display: inline-block;
  1024. height: 17rpx;
  1025. width: 17rpx;
  1026. background-color: #fff;
  1027. border-radius: 50%;
  1028. position: absolute;
  1029. top: 0;
  1030. bottom: 0;
  1031. right: -9rpx;
  1032. margin: auto;
  1033. }
  1034. }
  1035. }
  1036. }
  1037. }
  1038. }
  1039. }
  1040. .title-wrapper {
  1041. padding-left: 20rpx;
  1042. justify-content: flex-start;
  1043. align-items: center;
  1044. height: 86rpx;
  1045. line-height: 86rpx;
  1046. width: 690rpx;
  1047. margin: auto;
  1048. image {
  1049. width: 36rpx;
  1050. height: 36rpx;
  1051. background: linear-gradient(43deg, #ffc063, #ffa163);
  1052. border-radius: 50%;
  1053. }
  1054. view {
  1055. padding-left: 10rpx;
  1056. font-size: 32rpx;
  1057. font-family: PingFang SC;
  1058. font-weight: bold;
  1059. color: #242424;
  1060. }
  1061. .title-b {
  1062. font-size: 24rpx;
  1063. font-family: PingFang SC;
  1064. font-weight: 500;
  1065. color: #8b8b8b;
  1066. }
  1067. }
  1068. .shop-list {
  1069. padding-top: 20rpx;
  1070. flex-wrap: wrap;
  1071. background-color: #fff;
  1072. .shop-item {
  1073. margin-bottom: 20rpx;
  1074. flex-direction: column;
  1075. width: 20%;
  1076. height: 100rpx;
  1077. image {
  1078. width: 60rpx;
  1079. height: 58rpx;
  1080. }
  1081. }
  1082. }
  1083. .gift-info {
  1084. width: 690rpx;
  1085. height: 155rpx;
  1086. background: linear-gradient(43deg, #FFB242, #FF944D);
  1087. border-radius: 12rpx 12rpx 0px 0px;
  1088. margin: auto;
  1089. color: #fff;
  1090. font-size: 24rpx;
  1091. font-weight: 400;
  1092. color: #FFFFFF;
  1093. view {
  1094. padding-left: 28rpx;
  1095. }
  1096. }
  1097. .gift-good-list {
  1098. width: 690rpx;
  1099. height: 243rpx;
  1100. background: #f4f4f4;
  1101. border-radius: 12rpx;
  1102. margin: auto;
  1103. .gift-list {
  1104. width: 670rpx;
  1105. height: 286rpx;
  1106. background: #fff;
  1107. border-radius: 12px;
  1108. // margin: -54rpx auto 0;
  1109. top: -54rpx;
  1110. left: 0;
  1111. right: 0;
  1112. margin: auto;
  1113. .gift-item {
  1114. background-color: #fff;
  1115. width: 223rpx;
  1116. height: 100%;
  1117. border-right: 1rpx solid #D6D7DC;
  1118. &:first-of-type {
  1119. border-radius: 12rpx 0 0 12rpx;
  1120. }
  1121. &:last-of-type {
  1122. margin-right: 0;
  1123. }
  1124. image {
  1125. width: 160rpx;
  1126. height: 160rpx;
  1127. }
  1128. .gift-name {
  1129. font-size: 22rpx;
  1130. font-weight: bold;
  1131. color: #3F3F3F;
  1132. line-height: 34px;
  1133. }
  1134. .gift-price {
  1135. font-size: 28rpx;
  1136. font-weight: bold;
  1137. color: #FF4C4C;
  1138. }
  1139. }
  1140. }
  1141. }
  1142. .djq-wrap {
  1143. width: 701rpx;
  1144. // height: 255rpx;
  1145. background: #FFFFFF;
  1146. box-shadow: 0px 0px 27rpx 0px rgba(50, 50, 52, 0.06);
  1147. border-radius: 20rpx;
  1148. margin: 0 auto 20rpx;
  1149. padding: 23rpx 22rpx;
  1150. &:last-of-type {
  1151. margin-bottom: 0;
  1152. }
  1153. .djq-img {
  1154. flex-shrink: 0;
  1155. width: 150rpx;
  1156. height: 150rpx;
  1157. border-radius: 10rpx;
  1158. }
  1159. .djq-right {
  1160. flex-grow: 1;
  1161. .djq-tit {
  1162. font-size: 34rpx;
  1163. font-weight: bold;
  1164. color: #333333;
  1165. line-height: 52rpx;
  1166. .djq-name {
  1167. max-width: 300rpx;
  1168. }
  1169. .djq-dis {
  1170. flex-shrink: 0;
  1171. image {
  1172. width: 20rpx;
  1173. height: 28rpx;
  1174. margin-right: 10rpx;
  1175. }
  1176. font-size: 22rpx;
  1177. font-weight: 500;
  1178. color: #666666;
  1179. }
  1180. }
  1181. .djq-dz {
  1182. width: 100%;
  1183. font-size: 24rpx;
  1184. font-weight: 500;
  1185. color: #666666;
  1186. }
  1187. .djq-hd {
  1188. width: 100%;
  1189. // border-bottom: 1rpx solid #EAECED;
  1190. .buy-info {
  1191. display: inline-block;
  1192. height: 32rpx;
  1193. border-radius: 16rpx 16rpx 16rpx 0px;
  1194. line-height: 32rpx;
  1195. font-size: 20rpx;
  1196. font-weight: 500;
  1197. color: #FF440D;
  1198. padding: 0 15rpx;
  1199. background-color: #fcf3f0;
  1200. }
  1201. .hd-btn {
  1202. image {
  1203. width: 46rpx;
  1204. height: 46rpx;
  1205. }
  1206. }
  1207. }
  1208. }
  1209. }
  1210. </style>