index.vue 25 KB

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