index.vue 29 KB

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