index.vue 23 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162
  1. <template>
  2. <view class="container">
  3. <view class="carousel-section">
  4. <!-- 背景色区域 -->
  5. <view class="bg"></view>
  6. <!-- 标题栏和状态栏占位符 -->
  7. <!-- #ifdef H5 -->
  8. <view class="titleNview-placing"></view>
  9. <!-- #endif -->
  10. <!-- 搜素栏 -->
  11. <view class="search flex">
  12. <view class="input-box flex" @click.stop="clickSearch">
  13. <view class=" input-content flex">
  14. <view class="iconfont iconsearch"></view>
  15. <view class="input"><input type="text" disabled value="好物从搜索开始" /></view>
  16. </view>
  17. </view>
  18. </view>
  19. <u-notice-bar :volume-icon="false" :list="['售后电话:18088138806']" speed="50" @click="tocall"></u-notice-bar>
  20. <swiper class="carousel" autoplay="true" duration="400" interval="5000" @change="swiperChange"
  21. :indicator-dots="true" indicator-active-color="#FFFFFF">
  22. <swiper-item v-for="(item, index) in carouselList" :key="index" class="carousel-item">
  23. <image :src="item.pic" mode="aspectFill" @click="bannerNavToUrl(item)"></image>
  24. </swiper-item>
  25. </swiper>
  26. </view>
  27. <seckill></seckill>
  28. <sx :list="firstList"></sx>
  29. <!-- #ifdef MP-WEIXIN -->
  30. <image src="https://hy.liuniu946.com/static/image/living.png" mode="widthFix" style="display: block;width: 690rpx;margin: 20rpx auto;" @click="navTo('/pages/index/living')"></image>
  31. <!-- #endif -->
  32. <store></store>
  33. <template v-for="item in flist">
  34. <view class="cate-item" v-if="item.pic" @click="navTo('/pages/product/list?fid='+item.id)">
  35. <image :src="item.pic" mode="widthFix"></image>
  36. </view>
  37. </template>
  38. </view>
  39. </template>
  40. <script>
  41. // #ifdef H5
  42. import jWeixin from "@/plugin/jweixin-module/index.js";
  43. // #endif
  44. import {
  45. shareFun
  46. } from '@/utils/wxAuthorized.js'
  47. import {
  48. lookSubpoints,
  49. lookOneself
  50. } from '../../api/user.js';
  51. import seckill from '../../components/seckill/seckill.vue';
  52. import sx from '../../components/sx/index.vue';
  53. import store from '../../components/store/store.vue';
  54. import {
  55. loadIndexs,
  56. getVip,
  57. mer,
  58. getZbList
  59. } from '@/api/index.js';
  60. import {
  61. getUserInfo,
  62. spread
  63. } from '@/api/user.js';
  64. import {
  65. setCoupons
  66. } from '@/api/functionalUnit.js';
  67. import {
  68. getBargainList,
  69. getCategoryList
  70. } from '@/api/product.js';
  71. import {
  72. interceptor
  73. } from '@/utils/loginUtils';
  74. import {
  75. mapState,
  76. mapMutations
  77. } from 'vuex';
  78. import {
  79. tabbar
  80. } from '@/utils/tabbar.js';
  81. // #ifdef H5
  82. import {
  83. weixindata,
  84. shareLoad
  85. } from '@/utils/wxAuthorized';
  86. // #endif
  87. export default {
  88. components: {
  89. seckill,
  90. sx,
  91. store
  92. },
  93. data() {
  94. return {
  95. flist: [],
  96. // isDa:true,
  97. tabbar: tabbar,
  98. current: 0,
  99. shareShow: false, //分享海报
  100. pageProportion: 0, //保存页面基于750宽度的比例
  101. swiperHeight: 0,
  102. checkid: 0,
  103. titleNViewBackground: '',
  104. longitude: 0, //经度
  105. latitude: 0, //纬度
  106. swiperCurrent: 0,
  107. swiperLength: 0,
  108. carouselList: [], //轮播列表
  109. bastList: [], //会员礼包
  110. shoplist: [], //商店列表
  111. page: 1,
  112. limit: 5,
  113. vipList: [], //vip商品
  114. firstList: [],
  115. };
  116. },
  117. computed: {
  118. ...mapState(['loginInterceptor', 'baseURL']),
  119. ...mapState('user', ['hasLogin', 'userInfo'])
  120. },
  121. onLoad: function(option) {
  122. this.getZhiboList()
  123. // #ifdef MP-WEIXIN
  124. wx.showShareMenu({
  125. withShareTicket: true,
  126. menus: ["shareAppMessage", "shareTimeline"]
  127. })
  128. //#endif
  129. // #ifdef MP
  130. if (option.scene) {
  131. // 存储小程序邀请人
  132. uni.setStorageSync('puid', option.scene)
  133. }
  134. // #endif
  135. // #ifdef H5
  136. if (option.spread) {
  137. console.log(option.spread, "邀请人2")
  138. uni.setStorageSync('spread', option.spread)
  139. if (this.hasLogin) {
  140. spread({
  141. puid: option.spread
  142. }).then(res => {
  143. console.log(res);
  144. })
  145. }
  146. }
  147. // #endif
  148. // #ifdef MP-WEIXIN
  149. if (option.spread) {
  150. console.log(option.spread, "邀请人2")
  151. uni.setStorageSync('spread', option.spread)
  152. if (this.hasLogin) {
  153. spread({
  154. puid: option.spread
  155. }).then(res => {
  156. console.log(res);
  157. })
  158. }
  159. }
  160. // #endif
  161. if (option.mer_id) {
  162. console.log(option.mer_id, "商户id")
  163. uni.setStorageSync('mid', option.mer_id)
  164. }
  165. },
  166. // #ifdef MP-WEIXIN
  167. onShareAppMessage(res) {
  168. console.log(888888)
  169. let path = 'spread=' + this.userInfo.uid;
  170. return {
  171. title: this.userInfo.nickname + '邀请您进入玲卿加', //分享的名称
  172. path: 'pages/index/index?' + path,
  173. imageUrl: "https://hy.liuniu946.com/index/logo.jpg",
  174. }
  175. console.log('pages/index/index?' + path, '分享数据');
  176. },
  177. //分享到朋友圈
  178. onShareTimeline(res) {
  179. let path = 'spread=' + this.userInfo.uid;
  180. return {
  181. title: this.userInfo.nickname + '邀请您进入玲卿加', //分享的名称
  182. path: 'pages/index/index?' + path,
  183. imageUrl: "https://hy.liuniu946.com/index/logo.jpg"
  184. }
  185. },
  186. //#endif
  187. onShow: function() {
  188. let uid = uni.getStorageSync('spread');
  189. if (uid && (typeof(uid) != 'undefined') && this.hasLogin) {
  190. spread({
  191. puid: uid
  192. }).then(res => {
  193. console.log(res);
  194. })
  195. }
  196. let mid = uni.getStorageSync('mid')
  197. console.log(mid, '9090')
  198. if (mid) {
  199. mer({
  200. mid: mid
  201. }).then(e => {});
  202. }
  203. getVip({
  204. page: 1,
  205. limit: 3,
  206. is_vip: 3
  207. }).then(res => {
  208. this.vipList = res.data
  209. res.data.forEach(e => {
  210. e.isVip = e.store_type ? "3" : "0"
  211. })
  212. console.log(res.data, 'vip商品');
  213. })
  214. this.loadData();
  215. this.loadDatas();
  216. this.getBargainList();
  217. // #ifdef H5
  218. this.IndexShare();
  219. //#endif
  220. },
  221. //下拉刷新
  222. onPullDownRefresh() {
  223. this.loadData();
  224. },
  225. // #ifndef MP
  226. // 监听导航栏输入框点击事件
  227. onNavigationBarSearchInputClicked(e) {
  228. //跳转到搜索页面
  229. this.clickSearch();
  230. },
  231. //点击导航栏 buttons 时触发
  232. onNavigationBarButtonTap(e) {
  233. const index = e.index;
  234. if (index === 0) {
  235. this.$api.msg('点击了扫描');
  236. } else if (index === 1) {
  237. // #ifdef APP-PLUS
  238. const pages = getCurrentPages();
  239. const page = pages[pages.length - 1];
  240. const currentWebview = page.$getAppWebview();
  241. currentWebview.hideTitleNViewButtonRedDot({
  242. index
  243. });
  244. // #endif
  245. uni.navigateTo({
  246. url: '/user/page/notice'
  247. });
  248. }
  249. },
  250. // #endif
  251. methods: {
  252. ...mapMutations(['setLat', 'setLon']),
  253. tocall() {
  254. uni.makePhoneCall({
  255. phoneNumber: '18088138806'
  256. })
  257. },
  258. getZhiboList() {
  259. getZbList().then(res => {
  260. console.log(res,'zblist')
  261. })
  262. },
  263. async loadDatas() {
  264. let obj = this;
  265. getCategoryList({})
  266. .then(({
  267. data
  268. }) => {
  269. obj.flist = data.map(function(s) {
  270. return s;
  271. });
  272. // obj.getProducts()
  273. })
  274. .catch(err => {
  275. console.log(err);
  276. });
  277. },
  278. cl() {
  279. uni.setClipboardData({
  280. data: 'Bearer ' + uni.getStorageSync('token'),
  281. success: function() {
  282. console.log('复制成功');
  283. }
  284. });
  285. },
  286. // #ifdef H5
  287. IndexShare() {
  288. let obj = this;
  289. let pages = getCurrentPages();
  290. if (this.userInfo && this.userInfo.uid) {
  291. let path = 'https://hy.liuniu946.com/index/#/pages/index/index?spread=' + this.userInfo.uid
  292. let data = {
  293. link: path,
  294. title: this.userInfo.nickname + '邀请您进入玲卿加',
  295. desc: '欢迎加入玲卿加',
  296. imgUrl: 'https://hy.liuniu946.com/static/image/hylogo.jpg'
  297. };
  298. console.log(data, '分享数据');
  299. shareLoad(data);
  300. } else {
  301. let path = 'https://hy.liuniu946.com/index/#/pages/index/index'
  302. let data = {
  303. link: path,
  304. title: '玲卿加',
  305. desc: '欢迎加入玲卿加',
  306. imgUrl: 'https://hy.liuniu946.com/static/image/hylogo.jpg'
  307. };
  308. console.log(data, '分享数据');
  309. shareLoad(data);
  310. }
  311. },
  312. // #endif
  313. getaddress() {
  314. console.log('dizhi+++++++++++');
  315. let obj = this;
  316. weixindata().then(wxOjb => {
  317. console.log(wxOjb, '获取微信');
  318. wxOjb.getLocation({
  319. type: 'gcj02',
  320. success: res => {
  321. console.log(res, 123456);
  322. obj.setLat(res.latitude);
  323. obj.setLon(res.longitude);
  324. },
  325. fail: err => {
  326. console.log(err, 'shi+++++++++++++++');
  327. openMap().then(e => {
  328. this.getaddress();
  329. });
  330. }
  331. });
  332. });
  333. },
  334. //砍价商品推荐详情页
  335. navToDetailPages(item) {
  336. let id = item.product_id;
  337. //let type = 2;
  338. uni.navigateTo({
  339. url: '/pages/product/product?id=' + id
  340. });
  341. },
  342. navTo(url) {
  343. if (url == '') {
  344. this.$api.msg('暂未开通,敬请期待');
  345. } else {
  346. uni.navigateTo({
  347. url
  348. });
  349. }
  350. },
  351. openSubscribe: function(e) {
  352. let page = e;
  353. // #ifndef MP
  354. uni.navigateTo({
  355. url: page
  356. });
  357. // #endif
  358. // #ifdef MP
  359. uni.showLoading({
  360. title: '正在加载'
  361. });
  362. openBargainSubscribe()
  363. .then(res => {
  364. uni.hideLoading();
  365. uni.navigateTo({
  366. url: page
  367. });
  368. })
  369. .catch(err => {
  370. uni.hideLoading();
  371. });
  372. // #endif
  373. },
  374. getBargainList() {
  375. let that = this;
  376. getBargainList({
  377. page: that.page,
  378. limit: that.limit
  379. })
  380. .then(function(res) {
  381. // that.$set(that, 'bargainlist', res.data.slice(0, 2));
  382. })
  383. .catch(res => {
  384. console.log(res, 'getBargainList');
  385. });
  386. },
  387. Mask() {
  388. this.MaskShow = false;
  389. this.shareShow = true;
  390. uni.setStorage({
  391. key: 'FirstEntry',
  392. data: true,
  393. success: function() {
  394. console.log(uni.getStorageSync('FirstEntry'), 'Mask');
  395. }
  396. });
  397. },
  398. Toshare() {
  399. if (this.userInfo == '') {
  400. getUserInfo({})
  401. .then(({
  402. data
  403. }) => {
  404. this.setUserInfo(data);
  405. this.userInfo = data;
  406. })
  407. .catch(e => {});
  408. } else {
  409. this.shareShow = false;
  410. uni.navigateTo({
  411. url: '/user/page/shareQrCode?spread=' + this.userInfo.uid
  412. });
  413. }
  414. },
  415. Tocancel() {
  416. this.shareShow = false;
  417. },
  418. // 监听切换事件
  419. listChange(e) {
  420. this.checkid = e.detail.current;
  421. },
  422. // 點擊搜索框
  423. clickSearch() {
  424. uni.navigateTo({
  425. url: '/pages/product/search'
  426. });
  427. },
  428. // 点击触发领取优惠券
  429. setCoupons(item) {
  430. // 判断是否已经领取了优惠券
  431. let obj = this;
  432. uni.showModal({
  433. title: '领取提示',
  434. content: '是否领取优惠券',
  435. success(e) {
  436. if (e.confirm) {
  437. setCoupons({
  438. couponId: item.id
  439. }).then(e => {
  440. item.is_use = true;
  441. uni.showToast({
  442. title: '领取成功',
  443. type: 'top',
  444. duration: 2000
  445. });
  446. });
  447. }
  448. }
  449. });
  450. },
  451. //商品种类切换
  452. change(item) {
  453. let id = item;
  454. this.checkid = id;
  455. if (this.checkid == 1) {
  456. // console.log(1);
  457. this.detail = this.selected_detail;
  458. } else if (this.checkid == 2) {
  459. // console.log(2);
  460. this.detail = this.new_product;
  461. } else {
  462. this.detail = this.cheap_good;
  463. }
  464. },
  465. // 监听图片加载完成
  466. onImageError(key, index) {
  467. this[key][index].image = '/static/error/errorImage.jpg';
  468. },
  469. // 请求载入数据
  470. async loadData() {
  471. loadIndexs({})
  472. .then(({
  473. data
  474. }) => {
  475. let goods = data.info;
  476. console.log(goods, '商品信息');
  477. this.carouselList = data.banner;
  478. this.swiperLength = this.carouselList.length;
  479. this.bastList = data.giftInfo; //会员礼包
  480. data.info.firstList.forEach(e => {
  481. e.isVip = e.store_type ? "3" : "0"
  482. })
  483. this.firstList = data.info.firstList //首页商品
  484. uni.stopPullDownRefresh();
  485. console.log(data, '0000000000000')
  486. })
  487. .catch(e => {
  488. uni.stopPullDownRefresh();
  489. });
  490. },
  491. //轮播图切换修改背景色
  492. swiperChange(e) {
  493. const index = e.detail.current;
  494. this.swiperCurrent = index;
  495. this.titleNViewBackground = this.carouselList[index].background;
  496. },
  497. //详情页
  498. navToDetailPage(item) {
  499. let id = item.id;
  500. uni.navigateTo({
  501. url: '/pages/product/product?id=' + id + '&isVip=' + 0
  502. });
  503. },
  504. // 轮播图跳转
  505. bannerNavToUrl(item) {
  506. // #ifdef H5
  507. console.log(item.wap_url.indexOf('http'), 'banner');
  508. if (item.wap_url.indexOf('http') >= 0) {
  509. window.location.href = item.wap_url;
  510. }
  511. // #endif
  512. //测试数据没有写id,用title代替
  513. uni.navigateTo({
  514. url: item.wap_url
  515. });
  516. }
  517. }
  518. };
  519. </script>
  520. <style lang="scss">
  521. page {
  522. // background: #EEEFEE;
  523. background-color: #fff;
  524. }
  525. .yuezhuan {
  526. text-align: center;
  527. z-index: 99;
  528. position: absolute;
  529. text-align: center;
  530. width: 40%;
  531. }
  532. .yuezhuan image {
  533. margin-top: -12rpx;
  534. float: right;
  535. width: 120rpx;
  536. height: 120rpx;
  537. }
  538. .yuezhuan>view {
  539. width: 60rpx;
  540. top: 5rpx;
  541. height: 40rpx;
  542. text-align: center !important;
  543. font-size: 22rpx;
  544. color: #AD0B04;
  545. margin-left: 206rpx;
  546. position: absolute;
  547. }
  548. .carousel-section {
  549. position: relative;
  550. /* #ifdef H5 */
  551. padding-top: 10px;
  552. /* #endif */
  553. .bg {
  554. position: absolute;
  555. top: 0;
  556. left: 0;
  557. width: 750rpx;
  558. height: 378rpx;
  559. image {
  560. width: 100%;
  561. height: 100%;
  562. }
  563. }
  564. .titleNview-placing {
  565. height: var(--status-bar-height);
  566. box-sizing: content-box;
  567. }
  568. .search {
  569. // margin-bottom: 12rpx;
  570. background-color: #F75022;
  571. justify-content: flex-start;
  572. padding: 10rpx 32rpx 20rpx;
  573. align-items: center;
  574. .address {
  575. width: 32rpx;
  576. height: 38rpx;
  577. }
  578. .shop-name {
  579. height: 38rpx;
  580. position: relative;
  581. top: -4rpx;
  582. z-index: 100;
  583. font-size: 30rpx;
  584. font-family: PingFang SC;
  585. font-weight: 500;
  586. padding-left: 10rpx;
  587. }
  588. .shop-jt {
  589. margin-left: 8rpx;
  590. width: 16rpx;
  591. height: 10rpx;
  592. }
  593. .input-box {
  594. margin-left: 10rpx;
  595. position: relative;
  596. z-index: 99;
  597. width: 710rpx;
  598. height: 60rpx;
  599. background: #EEEEEE;
  600. border-radius: 30rpx;
  601. .input-content {
  602. position: relative;
  603. z-index: 11;
  604. border-radius: 99rpx;
  605. flex-grow: 1;
  606. padding: 5rpx 30rpx;
  607. background: #EEEEEE;
  608. .iconsearch {
  609. font-size: 50rpx;
  610. color: #CBCBCB;
  611. }
  612. .input {
  613. margin-left: 19rpx;
  614. flex-grow: 1;
  615. color: #CBCBCB;
  616. input {
  617. font-size: 28rpx;
  618. color: #CBCBCB;
  619. }
  620. }
  621. }
  622. .input-button {
  623. padding-left: 20rpx;
  624. font-size: $font-base;
  625. height: 100%;
  626. }
  627. }
  628. }
  629. }
  630. .carousel {
  631. position: relative;
  632. z-index: 3;
  633. width: 100%;
  634. height: 360rpx;
  635. .carousel-item {
  636. width: 100%;
  637. height: 100%;
  638. padding: 0 28rpx;
  639. overflow: hidden;
  640. }
  641. image {
  642. width: 100%;
  643. height: 100%;
  644. border-radius: $border-radius-sm;
  645. }
  646. }
  647. .navbar {
  648. position: relative;
  649. z-index: 2;
  650. padding: 0 50rpx;
  651. margin-top: -200rpx;
  652. width: 750rpx;
  653. height: 420rpx;
  654. background: #ffffff;
  655. border-radius: 40rpx;
  656. .navbar-box {
  657. padding-top: 250rpx;
  658. .navbar-item {
  659. display: flex;
  660. flex-direction: column;
  661. align-items: center;
  662. width: 20%;
  663. .nitem-image {
  664. width: 90rpx;
  665. height: 90rpx;
  666. }
  667. .nitem-font {
  668. margin-top: 22rpx;
  669. font-size: 26rpx;
  670. font-family: PingFang SC;
  671. font-weight: 500;
  672. color: #000000;
  673. }
  674. }
  675. }
  676. }
  677. .jx {
  678. background: #fff;
  679. width: 750rpx;
  680. }
  681. .jx-box {
  682. background: #fff;
  683. display: flex;
  684. flex-direction: column;
  685. align-items: center;
  686. width: 750rpx;
  687. .jx-box-title {
  688. margin: 50rpx 0;
  689. width: 610rpx;
  690. height: 30rpx;
  691. image {
  692. width: 100%;
  693. height: 100%;
  694. }
  695. }
  696. .jx-box-img {
  697. width: 750rpx;
  698. height: 220rpx;
  699. image {
  700. width: 100%;
  701. height: 100%;
  702. }
  703. }
  704. }
  705. .cai {
  706. display: flex;
  707. justify-content: center;
  708. align-items: center;
  709. padding-bottom: 20rpx;
  710. font-size: 28rpx;
  711. font-weight: 500;
  712. color: #999999;
  713. }
  714. .jx-box-content {
  715. display: flex;
  716. .content-left {
  717. margin: 20rpx 15rpx;
  718. width: 236rpx;
  719. height: 236rpx;
  720. background: #E2E2E2;
  721. border-radius: 10rpx;
  722. image {
  723. width: 100%;
  724. height: 100%;
  725. }
  726. }
  727. .content-right {
  728. display: flex;
  729. flex-direction: column;
  730. justify-content: space-around;
  731. .shop-name {
  732. width: 382rpx;
  733. font-size: 32rpx;
  734. font-weight: bold;
  735. color: #333333;
  736. overflow: hidden;
  737. text-overflow: ellipsis;
  738. display: -webkit-box;
  739. -webkit-box-orient: vertical;
  740. -webkit-line-clamp: 2;
  741. }
  742. .shop-content {
  743. width: 455rpx;
  744. display: flex;
  745. justify-content: space-between;
  746. .shop-content-left {
  747. display: flex;
  748. flex-direction: column;
  749. .price-box {
  750. display: flex;
  751. align-items: center;
  752. .yuan-price {
  753. font-size: 26rpx;
  754. font-weight: 500;
  755. text-decoration: line-through;
  756. color: #999999;
  757. }
  758. image {
  759. margin: 0 10rpx;
  760. width: 16rpx;
  761. height: 18rpx;
  762. }
  763. .j-price {
  764. font-size: 24rpx;
  765. font-weight: bold;
  766. color: #B59467;
  767. }
  768. }
  769. .price-x {
  770. font-size: 36rpx;
  771. font-weight: bold;
  772. color: #FF4C4C;
  773. }
  774. }
  775. .shop-content-right {
  776. margin-top: 20rpx;
  777. align-items: center;
  778. text-align: center;
  779. width: 137rpx;
  780. height: 52rpx;
  781. font-size: 26rpx;
  782. font-weight: 500;
  783. color: #fff;
  784. background: #f75022;
  785. border-radius: 26rpx;
  786. line-height: 52rpx;
  787. }
  788. }
  789. }
  790. }
  791. .product-box {
  792. margin-top: 20rpx;
  793. background: #ffffff;
  794. padding: 26rpx 30rpx 20rpx;
  795. .product-title {
  796. display: flex;
  797. align-items: center;
  798. justify-content: center;
  799. .pt-image {
  800. width: 36rpx;
  801. height: 36rpx;
  802. }
  803. .bb {
  804. width: 120rpx;
  805. height: 1rpx;
  806. background: #989898;
  807. }
  808. .pt-title {
  809. margin: 0 28rpx;
  810. font-size: 30rpx;
  811. font-weight: 500;
  812. color: #363636;
  813. }
  814. .pt-tip {
  815. margin-left: 16rpx;
  816. font-size: 20rpx;
  817. font-family: PingFang SC;
  818. font-weight: bold;
  819. color: #95a0b1;
  820. }
  821. }
  822. .hotgoods {
  823. margin-top: 38rpx;
  824. width: 100%;
  825. display: flex;
  826. flex-wrap: wrap;
  827. padding: 0 0 30rpx;
  828. .hotgoods-item {
  829. width: 44%;
  830. background: #FFFFFF;
  831. margin: 20rpx;
  832. box-shadow: 0px 0px 20px 0px rgba(50, 50, 52, 0.06);
  833. border-radius: 10px;
  834. .image-wrapper {
  835. width: 100%;
  836. height: 330rpx;
  837. border-radius: 3px;
  838. overflow: hidden;
  839. position: relative;
  840. .image-bg {
  841. position: absolute;
  842. top: 0;
  843. left: 0;
  844. right: 0;
  845. bottom: 0;
  846. width: 100%;
  847. height: 100%;
  848. opacity: 1;
  849. border-radius: 12rpx 12rpx 0 0;
  850. z-index: 2;
  851. }
  852. .image {
  853. width: 100%;
  854. height: 100%;
  855. opacity: 1;
  856. border-radius: 12rpx 12rpx 0 0;
  857. }
  858. }
  859. .title {
  860. margin-top: 20rpx;
  861. font-size: 28rpx;
  862. font-family: PingFang SC;
  863. font-weight: 500;
  864. color: #333333;
  865. }
  866. .hotgoods-box {
  867. height: 100rpx;
  868. }
  869. .titlee {
  870. margin-left: 15rpx;
  871. font-size: 26rpx;
  872. font-weight: 500;
  873. color: #666666;
  874. white-space: nowrap;
  875. overflow: hidden;
  876. text-overflow: ellipsis;
  877. }
  878. .hot-price {
  879. display: flex;
  880. justify-content: flex-start;
  881. align-items: center;
  882. padding: 14rpx 0 30rpx;
  883. .hotPrice-box {
  884. width: 70rpx;
  885. height: 28rpx;
  886. background: linear-gradient(90deg, #c79a4c, #f9df7f);
  887. border-radius: 5rpx;
  888. text-align: center;
  889. line-height: 28rpx;
  890. font-size: 20rpx;
  891. font-weight: 400;
  892. color: #ffffff;
  893. }
  894. .price {
  895. margin-left: 10rpx;
  896. font-size: 36rpx;
  897. color: #ff0000;
  898. font-weight: 500;
  899. }
  900. .yuanPrice {
  901. margin-left: 10rpx;
  902. font-size: 20rpx;
  903. font-family: PingFang SC;
  904. font-weight: 500;
  905. text-decoration: line-through;
  906. color: #999999;
  907. }
  908. .cart-icon {
  909. image {
  910. width: 44rpx;
  911. height: 44rpx;
  912. }
  913. }
  914. }
  915. }
  916. }
  917. }
  918. .shop {
  919. margin-top: 20rpx;
  920. background: #ffffff;
  921. padding: 0 12rpx;
  922. .shop-title {
  923. padding: 30rpx 0 20rpx;
  924. display: flex;
  925. align-items: center;
  926. border-bottom: 1px solid #e3e6e7;
  927. .shop-item {
  928. width: 25%;
  929. display: flex;
  930. align-items: center;
  931. justify-content: center;
  932. .sitem-font {
  933. font-size: 26rpx;
  934. font-family: PingFang SC;
  935. font-weight: bold;
  936. color: #333333;
  937. }
  938. .jt-down {
  939. width: 10rpx;
  940. height: 8rpx;
  941. margin-left: 12rpx;
  942. }
  943. }
  944. }
  945. }
  946. .shop-main {
  947. padding: 32rpx 18rpx 0 12rpx;
  948. align-items: flex-start;
  949. justify-content: flex-start;
  950. .main-left {
  951. width: 180rpx;
  952. height: 180rpx;
  953. border-radius: 10rpx;
  954. }
  955. .main-right {
  956. width: 500rpx;
  957. justify-content: space-between;
  958. align-items: flex-start;
  959. margin-left: 20rpx;
  960. padding: 13rpx 0 35rpx;
  961. border-bottom: 1px solid #eaeced;
  962. .shopm-info {
  963. max-width: 60%;
  964. line-height: 1;
  965. .shopm-title {
  966. display: flex;
  967. justify-content: flex-start;
  968. .shopmt-font {
  969. font-size: 34rpx;
  970. font-family: PingFang SC;
  971. font-weight: bold;
  972. color: #333333;
  973. }
  974. .shopmt-good {
  975. margin-left: 6rpx;
  976. width: 30rpx;
  977. height: 30rpx;
  978. border: 1px solid #ff4c4c;
  979. border-radius: 5rpx;
  980. font-size: 20rpx;
  981. font-family: PingFang SC;
  982. font-weight: 500;
  983. color: #ff4c4c;
  984. text-align: center;
  985. line-height: 30rpx;
  986. }
  987. }
  988. .address {
  989. margin-top: 16rpx;
  990. font-size: 24rpx;
  991. font-family: PingFang SC;
  992. font-weight: 500;
  993. color: #666666;
  994. }
  995. .shopmt-tip {
  996. position: relative;
  997. display: inline-block;
  998. flex-grow: 0;
  999. margin-top: 52rpx;
  1000. padding: 8rpx;
  1001. background: #fcf3f0;
  1002. border-radius: 16rpx 16rpx 16rpx 0px;
  1003. font-size: 20rpx;
  1004. font-family: PingFang SC;
  1005. font-weight: 500;
  1006. color: #ff440d;
  1007. }
  1008. }
  1009. .right {
  1010. height: 100%;
  1011. margin-top: 5rpx;
  1012. display: flex;
  1013. flex-direction: column;
  1014. .mright-top {
  1015. display: flex;
  1016. justify-content: flex-end;
  1017. align-items: center;
  1018. .mrt-image {
  1019. width: 20rpx;
  1020. height: 28rpx;
  1021. }
  1022. .mrt-font {
  1023. margin-left: 8rpx;
  1024. font-size: 22rpx;
  1025. font-family: PingFang SC;
  1026. font-weight: 500;
  1027. color: #666666;
  1028. }
  1029. }
  1030. .mright-bottom {
  1031. margin-top: 80rpx;
  1032. display: flex;
  1033. justify-content: flex-end;
  1034. .mrb-item {
  1035. width: 46rpx;
  1036. height: 46rpx;
  1037. margin-left: 14rpx;
  1038. }
  1039. }
  1040. }
  1041. }
  1042. }
  1043. .cate-item {
  1044. width: 717rpx;
  1045. margin: 0 auto 30rpx;
  1046. image {
  1047. width: 100%;
  1048. border-radius: 15rpx;
  1049. }
  1050. }
  1051. </style>