index.vue 32 KB

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