index.vue 35 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624
  1. <template>
  2. <view class="container">
  3. <!-- 小程序头部兼容 -->
  4. <view class="lalala">
  5. </view>
  6. <view class="input-box flex" @click="clickSearch">
  7. <view class=" input-content flex">
  8. <view class="iconfont iconsearch"></view>
  9. <view class="input"><input type="text" disabled placeholder="请输入搜索内容" /></view>
  10. </view>
  11. </view>
  12. <!-- 头部轮播 -->
  13. <view class="carousel-section">
  14. <!-- 标题栏和状态栏占位符 -->
  15. <view class="titleNview-placing"></view>
  16. <!-- 背景色区域 -->
  17. <view class="titleNview-background" :style="{ backgroundColor: '#fff' }"></view>
  18. <swiper class="carousel" autoplay="true" duration="400" interval="5000" @change="swiperChange">
  19. <swiper-item v-for="(item, index) in carouselList" :key="index" class="carousel-item"
  20. @click="bannerNavToUrl(item)">
  21. <image :src="item.pic" />
  22. </swiper-item>
  23. </swiper>
  24. <!-- 自定义swiper指示器 -->
  25. <!-- <view class="swiper-dots">
  26. <text class="num">{{ swiperCurrent + 1 }}</text>
  27. <text class="sign">/</text>
  28. <text class="num">{{ swiperLength }}</text>
  29. </view> -->
  30. </view>
  31. <!-- 分类 -->
  32. <view class="cate-section" >
  33. <view v-for="menus in menusList" class="cate-item" @click="navToTab(menus.url)">
  34. <image :src="menus.pic"></image>
  35. <text>{{menus.name}}</text>
  36. </view>
  37. <!-- <view class="cate-item" @click="navTo('/pages/product/construction')">
  38. <image src="/static/icon/c7.png"></image>
  39. <text>礼包商品</text>
  40. </view>
  41. <view class="cate-item" @click="navTo('/pages/user/shareQrCode')">
  42. <image src="/static/icon/c8.png"></image>
  43. <text>分享有礼</text>
  44. </view> -->
  45. <!-- <view class="cate-item" @click="navTo('/pages/index/loveitem?id=1')">
  46. <image src="/static/icon/c8.png"></image>
  47. <text>员工找工作</text>
  48. </view> -->
  49. <!-- <view class="cate-item" @click="navTo('/pages/index/loveitem?id=2')">
  50. <image src="/static/icon/c8.png"></image>
  51. <text>企业找员工</text>
  52. </view> -->
  53. <!-- <view class="cate-item" @click="navTo('/pages/index/loveitem?id=3')">
  54. <image src="/static/icon/c8.png"></image>
  55. <text>在线就医</text>
  56. </view> -->
  57. <!-- <view class="cate-item" @click="navTo('/pages/index/loveitem?id=4')">
  58. <image src="/static/icon/c8.png"></image>
  59. <text>红娘牵线</text>
  60. </view> -->
  61. <!-- <view class="cate-item" @click="navTo('/pages/index/loveitem?id=5')">
  62. <image src="/static/icon/c8.png"></image>
  63. <text>公益众筹</text>
  64. </view> -->
  65. <!-- <view class="cate-item" @click="navTo('/pages/index/loveitem?id=6')">
  66. <image src="/static/icon/c8.png"></image>
  67. <text>贫困助学</text>
  68. </view> -->
  69. <!-- <view class="cate-item" @click="navTo('/pages/index/loveitem?id=7')">
  70. <image src="/static/icon/c8.png"></image>
  71. <text>商标专利注册</text>
  72. </view> -->
  73. <!-- <view class="cate-item" @click="navTo('/pages/index/loveitem?id=8')">
  74. <image src="/static/icon/c8.png"></image>
  75. <text>旅游旅居</text>
  76. </view> -->
  77. <!-- <view class="cate-item" @click="navTo('/pages/index/loveitem?id=9')">
  78. <image src="/static/icon/c8.png"></image>
  79. <text>直播互动</text>
  80. </view> -->
  81. <!-- <view class="ewm" @click="openewm()" v-if="wechat_qrcode">
  82. <image :src="wechat_qrcode" mode=""></image>
  83. </view> -->
  84. </view>
  85. <!-- 秒杀楼层 -->
  86. <!-- <seckill></seckill> -->
  87. <!-- 附近门店 -->
  88. <view class="store-wrapper" v-if="storeList.length != 0">
  89. <view class="title-wrapper flex">
  90. <image src="/static/icon/t2.png" mode=""></image>
  91. <view class="">附近门店</view>
  92. <view class="title-b">门店好物随心购</view>
  93. </view>
  94. <view class="store flex" v-for="item in storeList" @click="navTo('/pages/store/storeDetail?id=' + item.id)"
  95. :key="item.id">
  96. <image :src="item.image" mode="" class="store-img"></image>
  97. <view class="store-info">
  98. <view class="store-name">{{ item.name }}</view>
  99. <view class="store-detail">{{ item.detailed_address }}</view>
  100. <view class="store-tip">门店</view>
  101. <view class="store-des">
  102. <image src="../../static/icon/dingwei.png" mode=""></image>
  103. 距离 {{ item.space }}
  104. </view>
  105. </view>
  106. </view>
  107. </view>
  108. <!-- 好货推荐 -->
  109. <view class="store-wrapper">
  110. <view class="title-wrapper flex">
  111. <image src="/static/icon/t3.png" mode=""></image>
  112. <view class="">好货推荐</view>
  113. <view class="title-b">优选商品低价入手</view>
  114. </view>
  115. <view class="goods-wrapper flex">
  116. <view class="good" v-if="userInfo.uid && userInfo.level<=1"
  117. @click="navTo('/pages/store/apply')">
  118. <image src="../../static/img/daili.jpg" class="good-img"></image>
  119. <view class="good-name clamp">加盟代理</view>
  120. <!-- <view class="good-info clamp">纯植物无香精</view> -->
  121. <view class="good-price">
  122. <text class="new-price">568.00</text>
  123. <text class="old-price">755.00</text>
  124. </view>
  125. </view>
  126. <view class="good" v-for="item in bastList"
  127. @click="navTo('/pages/product/product?id='+ item.id + '&spread=' + userInfo.uid )" :key="item.id">
  128. <image :src="item.image" mode="" class="good-img"></image>
  129. <view class="good-name clamp">{{ item.store_name }}</view>
  130. <!-- <view class="good-info clamp">纯植物无香精</view> -->
  131. <view class="good-price">
  132. <text class="new-price">{{ item.price }}</text>
  133. <text class="old-price">{{ item.ot_price }}</text>
  134. </view>
  135. </view>
  136. </view>
  137. </view>
  138. <view class="Mask" v-show="shareShow">
  139. <image @click="share" src="http://shicai.liuniu946.com/static/img/shareimg4.png"></image>
  140. <view class="Toshare" @click="Toshare"></view>
  141. <view class="Tocancel" @click="Tocancel"></view>
  142. </view>
  143. <uni-popup ref="popup" type="center">
  144. <view class="popup-box">
  145. <image :src="wechat_qrcode" mode="" class="gzhqr"></image>
  146. <view>长按关注公众号</view>
  147. </view>
  148. </uni-popup>
  149. </view>
  150. </template>
  151. <script>
  152. import {
  153. timeComputed,
  154. space,
  155. openMap
  156. } from '@/utils/rocessor.js';
  157. import {
  158. loadIndexs,
  159. getStoreList
  160. } from '@/api/index.js';
  161. import {
  162. getUserInfo
  163. } from '@/api/user.js';
  164. import {
  165. setCoupons
  166. } from '@/api/functionalUnit.js';
  167. import {
  168. getBargainList,
  169. getProducts
  170. } from '@/api/product.js';
  171. import {
  172. interceptor
  173. } from '@/utils/loginUtils';
  174. import {
  175. mapState,
  176. mapMutations
  177. } from 'vuex';
  178. // #ifdef H5
  179. import {
  180. weixindata,
  181. weixinlocation
  182. } from '@/utils/wxAuthorized';
  183. // #endif
  184. export default {
  185. components: {
  186. // seckill
  187. },
  188. watch: {
  189. //自适应swiper高度
  190. checkid(newValue, oldValue) {
  191. let obj = this;
  192. if (newValue == 0) {
  193. let bHeight = Math.ceil(obj.bastList.length / 2);
  194. obj.swiperHeight = Math.ceil(obj.pageProportion * 520 * bHeight);
  195. }
  196. if (newValue == 1) {
  197. let bHeight = Math.ceil(obj.goodsList.length / 2);
  198. obj.swiperHeight = Math.ceil(obj.pageProportion * 520 * bHeight);
  199. }
  200. if (newValue == 2) {
  201. let bHeight = Math.ceil(obj.bastBanner.length / 2);
  202. obj.swiperHeight = Math.ceil(obj.pageProportion * 520 * bHeight);
  203. }
  204. }
  205. },
  206. data() {
  207. return {
  208. wechat_qrcode: '', //公众号二维码
  209. storeList: [], //门店列表
  210. shareShow: false, //分享海报
  211. pageProportion: 0, //保存页面基于750宽度的比例
  212. swiperHeight: 0,
  213. checkid: 0,
  214. titleNViewBackground: '',
  215. swiperCurrent: 0,
  216. swiperLength: 0,
  217. bargainlist: [], //砍价商品
  218. carouselList: [], //轮播列表
  219. goodsList: [], //最新商品列表
  220. bastList: [], //精品推荐列表
  221. bastBanner: [], //促销商品列表
  222. menusList: [], //头部菜单
  223. page: 1,
  224. limit: 5,
  225. userServant: [{
  226. image: ''
  227. }], //用户推广服务
  228. couponArray: [], //可领取优惠券
  229. recommend: [{
  230. id: 0,
  231. re_title: '精选',
  232. re_name: '为你推荐'
  233. },
  234. {
  235. id: 1,
  236. re_title: '最新',
  237. re_name: '最新好货优选'
  238. },
  239. {
  240. id: 2,
  241. re_title: '便宜好货',
  242. re_name: '90天便宜好货'
  243. }
  244. ],
  245. actTime: new Date()
  246. };
  247. },
  248. computed: {
  249. ...mapState(['loginInterceptor', 'weichatObj', 'baseURL', 'urlFile']),
  250. ...mapState('user', ['hasLogin', 'userInfo']),
  251. ...mapState('latlon', ['lat', 'lon'])
  252. },
  253. onShareAppMessage() {
  254. // 设置菜单中的转发按钮触发转发事件时的转发内容
  255. let pages = getCurrentPages(); //获取加载的页面
  256. let currentPage = pages[pages.length - 1]; //获取当前页面的对象
  257. let url = currentPage.route; //当前页面url
  258. let item = currentPage.options; //如果要获取url中所带的参数可以查看options
  259. console.log(url + '?id=' + item.id + '&spread=' + this.userInfo.uid)
  260. let shareObj = {
  261. title: this.userInfo.nickname + "邀请您加入永省购", // 默认是小程序的名称(可以写slogan等)
  262. path: url + '?id=' + item.id + '&spread=' + this.userInfo.uid, // 默认是当前页面,必须是以‘/’开头的完整路径
  263. // imageUrl: ,
  264. success: function(res) {
  265. // 转发成功之后的回调
  266. if (res.errMsg == 'shareAppMessage:ok') {}
  267. },
  268. fail: function() {
  269. // 转发失败之后的回调
  270. if (res.errMsg == 'shareAppMessage:fail cancel') {
  271. // 用户取消转发
  272. } else if (res.errMsg == 'shareAppMessage:fail') {
  273. // 转发失败,其中 detail message 为详细失败信息
  274. }
  275. }
  276. };
  277. return shareObj;
  278. },
  279. onLoad: function(option) {
  280. console.log(this.userInfo.uid,'111222');
  281. // #ifndef MP
  282. if (option.spread) {
  283. // 存储其他邀请人
  284. uni.setStorageSync('spread', option.spread);
  285. }
  286. // #endif
  287. // #ifdef MP
  288. if (option.scene) {
  289. // 存储小程序邀请人
  290. uni.setStorage({
  291. key: 'spread_code',
  292. data: option.scene
  293. });
  294. }
  295. // #endif
  296. // weixinObj.showAllNonBaseMenuItem();
  297. // this.getaddress();
  298. },
  299. onShow: function() {
  300. // 判断是否强制登录
  301. // if (this.loginInterceptor && !this.hasLogin) {
  302. // // 登录拦截
  303. // interceptor();
  304. // }
  305. wx.hideShareMenu()
  306. if (this.userInfo.uid) {
  307. wx.showShareMenu()
  308. }
  309. this.loadData();
  310. this.getBargainList();
  311. this.IndexShare()
  312. // this.getProducts()
  313. },
  314. //下拉刷新
  315. onPullDownRefresh() {
  316. this.loadData();
  317. },
  318. // #ifndef MP
  319. // 监听导航栏输入框点击事件
  320. onNavigationBarSearchInputClicked(e) {
  321. //跳转到搜索页面
  322. this.clickSearch();
  323. },
  324. //点击导航栏 buttons 时触发
  325. onNavigationBarButtonTap(e) {
  326. const index = e.index;
  327. if (index === 0) {
  328. this.$api.msg('点击了扫描');
  329. } else if (index === 1) {
  330. // #ifdef APP-PLUS
  331. const pages = getCurrentPages();
  332. const page = pages[pages.length - 1];
  333. const currentWebview = page.$getAppWebview();
  334. currentWebview.hideTitleNViewButtonRedDot({
  335. index
  336. });
  337. // #endif
  338. uni.navigateTo({
  339. url: '/pages/user/notice'
  340. });
  341. }
  342. },
  343. // #endif
  344. methods: {
  345. // #ifdef MP-WEIXIN
  346. IndexShare() {
  347. let obj = this;
  348. let pages = getCurrentPages();
  349. // 获取当前页面
  350. let page = pages[pages.length - 1];
  351. let path = '/#/pages/index/index' + '?';
  352. // 保存传值
  353. for (let i in page.options) {
  354. path += i + '=' + page.options[i] + '&';
  355. }
  356. console.log(obj.Path)
  357. // 保存邀请人
  358. path += 'spread=' + this.userInfo.uid;
  359. let data = {
  360. link: this.baseURL + path,
  361. title: this.userInfo.nickname + '邀请您进入Xingwang鑫旺',
  362. desc: '欢迎加入Xingwang鑫旺',
  363. imgUrl: 'http://xw.liuniu946.com/static/img/logo.png'
  364. };
  365. console.log(data, '分享数据');
  366. // shareLoad(data);
  367. },
  368. // #endif
  369. openewm() {
  370. this.$refs.popup.open()
  371. },
  372. navTo(url) {
  373. uni.navigateTo({
  374. url: url
  375. })
  376. },
  377. ...mapMutations('latlon', ['setLat', 'setLon']),
  378. navToTab(url) {
  379. uni.navigateTo({
  380. url,
  381. fail() {
  382. uni.switchTab({
  383. url
  384. })
  385. }
  386. })
  387. },
  388. //砍价商品推荐详情页
  389. navToDetailPages(item) {
  390. let id = item.product_id;
  391. //let type = 2;
  392. uni.navigateTo({
  393. url: '/pages/product/product?id=' + id
  394. });
  395. },
  396. openSubscribe: function(e) {
  397. let page = e;
  398. // #ifndef MP
  399. uni.navigateTo({
  400. url: page
  401. });
  402. // #endif
  403. // #ifdef MP
  404. uni.showLoading({
  405. title: '正在加载'
  406. });
  407. openBargainSubscribe()
  408. .then(res => {
  409. uni.hideLoading();
  410. uni.navigateTo({
  411. url: page
  412. });
  413. })
  414. .catch(err => {
  415. uni.hideLoading();
  416. });
  417. // #endif
  418. },
  419. getBargainList() {
  420. let that = this;
  421. getBargainList({
  422. page: that.page,
  423. limit: that.limit
  424. })
  425. .then(function(res) {
  426. that.$set(that, 'bargainlist', res.data.slice(0, 2));
  427. })
  428. .catch(res => {
  429. console.log(res, 'getBargainList');
  430. });
  431. },
  432. Mask() {
  433. this.MaskShow = false;
  434. this.shareShow = true;
  435. uni.setStorage({
  436. key: 'FirstEntry',
  437. data: true,
  438. success: function() {
  439. console.log(uni.getStorageSync('FirstEntry'), 'Mask');
  440. }
  441. });
  442. },
  443. Toshare() {
  444. if (this.userInfo == '') {
  445. getUserInfo({})
  446. .then(({
  447. data
  448. }) => {
  449. this.setUserInfo(data);
  450. this.userInfo = data;
  451. })
  452. .catch(e => {});
  453. } else {
  454. this.shareShow = false;
  455. uni.navigateTo({
  456. url: '/pages/user/shareQrCode?spread=' + this.userInfo.uid
  457. });
  458. }
  459. },
  460. Tocancel() {
  461. this.shareShow = false;
  462. },
  463. // 监听切换事件
  464. listChange(e) {
  465. this.checkid = e.detail.current;
  466. },
  467. // 點擊搜索框
  468. clickSearch() {
  469. uni.navigateTo({
  470. url: '/pages/product/search'
  471. });
  472. },
  473. // 点击触发领取优惠券
  474. setCoupons(item) {
  475. // 判断是否已经领取了优惠券
  476. let obj = this;
  477. uni.showModal({
  478. title: '领取提示',
  479. content: '是否领取优惠券',
  480. success(e) {
  481. if (e.confirm) {
  482. setCoupons({
  483. couponId: item.id
  484. }).then(e => {
  485. item.is_use = true;
  486. uni.showToast({
  487. title: '领取成功',
  488. type: 'top',
  489. duration: 2000
  490. });
  491. });
  492. }
  493. }
  494. });
  495. },
  496. //商品种类切换
  497. change(item) {
  498. let id = item;
  499. this.checkid = id;
  500. if (this.checkid == 1) {
  501. // console.log(1);
  502. this.detail = this.selected_detail;
  503. } else if (this.checkid == 2) {
  504. // console.log(2);
  505. this.detail = this.new_product;
  506. } else {
  507. this.detail = this.cheap_good;
  508. }
  509. },
  510. // 监听图片加载完成
  511. onImageError(key, index) {
  512. this[key][index].image = '/static/error/errorImage.jpg';
  513. },
  514. // 请求载入数据
  515. async loadData() {
  516. loadIndexs({})
  517. .then(({
  518. data
  519. }) => {
  520. let goods = data.info;
  521. this.carouselList = data.banner;
  522. this.swiperLength = this.carouselList.length;
  523. this.menusList = data.menus;
  524. this.goodsList = goods.firstList; //最新商品
  525. this.bastList = goods.bastList; //精品推荐
  526. console.log(this.bastList, 'this.bastList6666666666666666666666');
  527. this.wechat_qrcode = data.wechat_qrcode
  528. console.log(data.wechat_qrcode)
  529. this.bastBanner = data.benefit; //促销单品
  530. this.$set(this, 'couponArray', data.couponList); //保存卡包券
  531. uni.stopPullDownRefresh();
  532. })
  533. .catch(e => {
  534. uni.stopPullDownRefresh();
  535. });
  536. },
  537. //轮播图切换修改背景色
  538. swiperChange(e) {
  539. const index = e.detail.current;
  540. this.swiperCurrent = index;
  541. this.titleNViewBackground = this.carouselList[index].background;
  542. },
  543. //详情页
  544. navToDetailPage(item) {
  545. let id = item.id;
  546. uni.navigateTo({
  547. url: '/pages/product/product?id=' + id
  548. });
  549. },
  550. // 轮播图跳转
  551. bannerNavToUrl(item) {
  552. console.log(item)
  553. // #ifdef H5
  554. console.log(item.wap_url.indexOf('http'), '66666666666')
  555. if (item.wap_url.indexOf('http') > -1) {
  556. console.log('hello word')
  557. window.location.href = item.wap_url;
  558. }
  559. // #endif
  560. //测试数据没有写id,用title代替
  561. uni.navigateTo({
  562. url: item.wap_url
  563. });
  564. },
  565. //获取定位信息
  566. // getaddress() {
  567. // console.log('dizhi+++++++++++')
  568. // let obj = this;
  569. // uni.getLocation({
  570. // type:'gcj02',
  571. // success: res => {
  572. // console.log('66666666666666666666')
  573. // let latitude = Math.abs(+res.latitude);
  574. // let longitude = Math.abs(+res.longitude);
  575. // obj.setLat(latitude);
  576. // obj.setLon(longitude);
  577. // console.log(obj.lat, obj.lon, '经纬度数据');
  578. // obj.getStoreList(latitude, longitude);
  579. // },
  580. // fail: err => {
  581. // console.log(err,'shi+++++++++++++++')
  582. // openMap().then(e => {
  583. // this.getaddress();
  584. // });
  585. // }
  586. // });
  587. // },
  588. //获取门店列表
  589. getStoreList(latitude, longitude) {
  590. let obj = this;
  591. getStoreList({
  592. page: 1,
  593. limit: 3,
  594. latitude: latitude,
  595. longitude: longitude
  596. }).then(({
  597. data
  598. }) => {
  599. data.list = data.list.map(item => {
  600. item.space = obj.space(obj.lat, obj.lon, item.latitude * 1, item.longitude * 1);
  601. console.log(item.space, 'item.space++++++++++');
  602. return item;
  603. });
  604. obj.storeList = data.list;
  605. });
  606. },
  607. space(lat1, lng1, lat2, lng2) {
  608. console.log(lat1, lng1, lat2, lng2, '位置信息');
  609. var radLat1 = (lat1 * Math.PI) / 180.0;
  610. var radLat2 = (lat2 * Math.PI) / 180.0;
  611. var a = radLat1 - radLat2;
  612. var b = (lng1 * Math.PI) / 180.0 - (lng2 * Math.PI) / 180.0;
  613. var s = 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(a / 2), 2) + Math.cos(radLat1) * Math.cos(radLat2) * Math
  614. .pow(Math.sin(b / 2), 2)));
  615. s = s * 6378.137;
  616. s = Math.round(s * 10000) / 10000;
  617. // return s * 1000;
  618. if (s > 1) {
  619. return s.toFixed(2) + 'km';
  620. } else {
  621. return (s * 1000).toFixed(2) + 'm'; // 单位米
  622. }
  623. }
  624. }
  625. };
  626. </script>
  627. <style lang="scss">
  628. .Mask {
  629. width: 100%;
  630. height: 100vh;
  631. position: fixed;
  632. z-index: 99999;
  633. background-color: rgba(0, 0, 0, 0.7);
  634. top: 0;
  635. image {
  636. width: 100%;
  637. height: 100vh;
  638. }
  639. }
  640. // 热销商品
  641. .hot-goods {
  642. margin: 0 25rpx;
  643. padding: 5rpx 25rpx 30rpx 25rpx;
  644. background-color: #fff;
  645. border-radius: 10rpx;
  646. .hot-headers {
  647. margin: 25rpx 0;
  648. width: 100%;
  649. display: flex;
  650. .img {
  651. width: 32rpx;
  652. height: 32rpx;
  653. margin-right: 10rpx;
  654. }
  655. .hot-title {
  656. font-size: 30rpx;
  657. margin-right: 15rpx;
  658. }
  659. .more {
  660. line-height: 1;
  661. padding: 5rpx 10rpx 5rpx 15rpx;
  662. text-align: center;
  663. font-size: 20rpx;
  664. border-radius: 15rpx;
  665. color: #ffffff;
  666. background: linear-gradient(90deg, rgba(250, 52, 38, 1) 0%, rgba(249, 30, 83, 1) 100%);
  667. image {
  668. width: 20rpx;
  669. height: 20rpx;
  670. }
  671. }
  672. }
  673. .hot-lists {
  674. line-height: 1;
  675. display: flex;
  676. .hot-produce {
  677. width: 100%;
  678. height: 260rpx;
  679. border-top: 1px solid #f0f0f0;
  680. display: flex;
  681. padding-top: 28rpx;
  682. .produce-image {
  683. width: 200rpx;
  684. height: 200rpx;
  685. image {
  686. width: 200rpx;
  687. height: 200rpx;
  688. border: 1px solid #f0f0f0;
  689. }
  690. }
  691. .produce-content {
  692. // flex-direction: column;
  693. margin-left: 30rpx;
  694. height: 200rpx;
  695. position: relative;
  696. width: calc(100% - 200rpx - 30rpx);
  697. .produce-name {
  698. font-size: 28rpx;
  699. font-weight: bold;
  700. line-height: 35rpx;
  701. color: #343434;
  702. }
  703. .produce-info {
  704. font-size: 20rpx;
  705. margin-top: 25rpx;
  706. }
  707. .produce-price {
  708. display: flex;
  709. align-items: flex-end;
  710. color: #ff383e;
  711. font-size: 24rpx;
  712. margin-top: 70rpx;
  713. font-weight: bold;
  714. text {
  715. font-size: 36rpx;
  716. }
  717. .produce-price-1 {
  718. font-size: 22rpx;
  719. font-weight: 500;
  720. text-decoration: line-through;
  721. color: rgba(170, 170, 170, 1);
  722. margin-left: 20rpx;
  723. }
  724. }
  725. .produce-price1 {
  726. height: 100%;
  727. letter-spacing: 3rpx;
  728. color: #ff383e;
  729. font-size: 24rpx;
  730. font-weight: bold;
  731. .produce-center {
  732. width: 100%;
  733. position: absolute;
  734. bottom: 0;
  735. display: flex;
  736. justify-content: space-between;
  737. align-items: center;
  738. .kanjia_word {
  739. .word-1 {
  740. font-size: 22rpx;
  741. color: #666666;
  742. }
  743. .word-2 {
  744. font-size: 28rpx;
  745. color: #ff383e;
  746. margin-top: 10rpx;
  747. }
  748. }
  749. .kanjia_button {
  750. height: 50rpx;
  751. width: 150rpx;
  752. border-radius: 25rpx;
  753. font-size: 26rpx;
  754. font-weight: 500;
  755. color: #ff383e;
  756. border: 1px solid rgba(255, 56, 62, 1);
  757. }
  758. }
  759. }
  760. }
  761. }
  762. }
  763. }
  764. .lalala {
  765. height: var(--status-bar-height);
  766. width: 100%;
  767. height: 100rpx;
  768. }
  769. .input-box {
  770. width: 100%;
  771. padding: 25rpx;
  772. background-color: rgba(0, 0, 0, 0);
  773. height: 44px;
  774. .iconsearch {
  775. font-size: 50rpx;
  776. }
  777. .input-content {
  778. border-radius: 99rpx;
  779. flex-grow: 1;
  780. padding: 10rpx 200rpx;
  781. background-color: #fff;
  782. // justify-content: center;
  783. .input {
  784. flex-grow: 1;
  785. input {
  786. font-size: $font-lg;
  787. }
  788. }
  789. }
  790. .input-button {
  791. padding-left: 20rpx;
  792. font-size: $font-lg;
  793. height: 100%;
  794. }
  795. }
  796. /* #ifdef MP */
  797. .mp-height {
  798. height: 44px;
  799. }
  800. .input-box {
  801. width: 100%;
  802. padding: 25rpx;
  803. background-color: #ffffff;
  804. height: 44px;
  805. .iconsearch {
  806. font-size: 50rpx;
  807. }
  808. .input-content {
  809. border-radius: 99rpx;
  810. flex-grow: 1;
  811. padding: 10rpx 30rpx;
  812. background-color: rgba(231, 231, 231, 0.7);
  813. .input {
  814. flex-grow: 1;
  815. input {
  816. font-size: $font-lg;
  817. }
  818. }
  819. }
  820. .input-button {
  821. padding-left: 20rpx;
  822. font-size: $font-lg;
  823. height: 100%;
  824. }
  825. }
  826. page {
  827. .cate-section {
  828. position: relative;
  829. z-index: 5;
  830. border-radius: 16rpx 16rpx 0 0;
  831. margin-top: -20rpx;
  832. }
  833. .carousel-section {
  834. padding: 0;
  835. .titleNview-placing {
  836. padding-top: 0;
  837. height: 0;
  838. }
  839. .carousel {
  840. .carousel-item {
  841. padding: 0;
  842. }
  843. }
  844. .swiper-dots {
  845. left: 45rpx;
  846. bottom: 40rpx;
  847. }
  848. }
  849. }
  850. /* #endif */
  851. page {
  852. background: #f7f8f7;
  853. }
  854. .m-t {
  855. margin-top: 16rpx;
  856. }
  857. /* 头部 轮播图 */
  858. .carousel-section {
  859. position: relative;
  860. // padding-top: 10px;
  861. overflow: hidden;
  862. .titleNview-placing {
  863. height: var(--status-bar-height);
  864. // padding-top: 44px;
  865. box-sizing: content-box;
  866. }
  867. .titleNview-background {
  868. position: absolute;
  869. top: 0;
  870. left: 0;
  871. width: 100%;
  872. height: 426rpx;
  873. transition: 0.4s;
  874. }
  875. .carousel {
  876. width: 100%;
  877. height: 426rpx;
  878. .carousel-item {
  879. width: 100%;
  880. height: 100%;
  881. // padding: 0 28rpx;
  882. overflow: hidden;
  883. }
  884. image {
  885. width: 100%;
  886. height: 100%;
  887. // border-radius: $border-radius-sm;
  888. }
  889. }
  890. }
  891. .swiper-dots {
  892. display: flex;
  893. position: absolute;
  894. left: 60rpx;
  895. bottom: 15rpx;
  896. width: 72rpx;
  897. height: 36rpx;
  898. background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAABkCAYAAADDhn8LAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTMyIDc5LjE1OTI4NCwgMjAxNi8wNC8xOS0xMzoxMzo0MCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OTk4MzlBNjE0NjU1MTFFOUExNjRFQ0I3RTQ0NEExQjMiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OTk4MzlBNjA0NjU1MTFFOUExNjRFQ0I3RTQ0NEExQjMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTcgKFdpbmRvd3MpIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6Q0E3RUNERkE0NjExMTFFOTg5NzI4MTM2Rjg0OUQwOEUiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6Q0E3RUNERkI0NjExMTFFOTg5NzI4MTM2Rjg0OUQwOEUiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz4Gh5BPAAACTUlEQVR42uzcQW7jQAwFUdN306l1uWwNww5kqdsmm6/2MwtVCp8CosQtP9vg/2+/gY+DRAMBgqnjIp2PaCxCLLldpPARRIiFj1yBbMV+cHZh9PURRLQNhY8kgWyL/WDtwujjI8hoE8rKLqb5CDJaRMJHokC6yKgSCR9JAukmokIknCQJpLOIrJFwMsBJELFcKHwM9BFkLBMKFxNcBCHlQ+FhoocgpVwwnv0Xn30QBJGMC0QcaBVJiAMiec/dcwKuL4j1QMsVCXFAJE4s4NQA3K/8Y6DzO4g40P7UcmIBJxbEesCKWBDg8wWxHrAiFgT4fEGsB/CwIhYE+AeBAAdPLOcV8HRmWRDAiQVcO7GcV8CLM8uCAE4sQCDAlHcQ7x+ABQEEAggEEAggEEAggEAAgQACASAQQCCAQACBAAIBBAIIBBAIIBBAIABe4e9iAe/xd7EAJxYgEGDeO4j3EODp/cOCAE4sYMyJ5cwCHs4rCwI4sYBxJ5YzC84rCwKcXxArAuthQYDzC2JF0H49LAhwYUGsCFqvx5EF2T07dMaJBetx4cRyaqFtHJ8EIhK0i8OJBQxcECuCVutxJhCRoE0cZwMRyRcFefa/ffZBVPogePihhyCnbBhcfMFFEFM+DD4m+ghSlgmDkwlOgpAl4+BkkJMgZdk4+EgaSCcpVX7bmY9kgXQQU+1TgE0c+QJZUUz1b2T4SBbIKmJW+3iMj2SBVBWz+leVfCQLpIqYbp8b85EskIxyfIOfK5Sf+wiCRJEsllQ+oqEkQfBxmD8BBgA5hVjXyrBNUQAAAABJRU5ErkJggg==);
  899. background-size: 100% 100%;
  900. .num {
  901. width: 36rpx;
  902. height: 36rpx;
  903. border-radius: 50px;
  904. font-size: 24rpx;
  905. color: #fff;
  906. text-align: center;
  907. line-height: 36rpx;
  908. }
  909. .sign {
  910. position: absolute;
  911. top: 0;
  912. left: 50%;
  913. line-height: 36rpx;
  914. font-size: 12rpx;
  915. color: #fff;
  916. transform: translateX(-50%);
  917. }
  918. }
  919. /* 分类 */
  920. .cate-section {
  921. display: flex;
  922. justify-content: space-around;
  923. align-items: center;
  924. flex-wrap: wrap;
  925. padding: 30rpx 22rpx;
  926. background-color: #fff;
  927. margin-bottom: 20rpx;
  928. position: relative;
  929. .cate-item {
  930. padding: 10rpx 0;
  931. display: flex;
  932. flex-direction: column;
  933. align-items: center;
  934. font-size: $font-sm + 2rpx;
  935. color: $font-color-dark;
  936. width: 25%;
  937. }
  938. /* 原图标颜色太深,不想改图了,所以加了透明度 */
  939. image {
  940. width: 88rpx;
  941. height: 88rpx;
  942. margin-bottom: 14rpx;
  943. border-radius: 50%;
  944. opacity: 0.7;
  945. }
  946. }
  947. // 中间广告图片
  948. .ad-1 {
  949. width: 100%;
  950. height: 210rpx;
  951. padding: 10rpx 0;
  952. background: #fff;
  953. image {
  954. width: 100%;
  955. height: 100%;
  956. }
  957. }
  958. /*公用边框样式*/
  959. %icon {
  960. margin-right: 10rpx;
  961. display: inline-block;
  962. padding: 2rpx 10rpx;
  963. border: 1rpx solid $color-yellow;
  964. color: $color-yellow;
  965. line-height: 1;
  966. font-size: $font-base;
  967. border-radius: 10rpx;
  968. }
  969. .f-header {
  970. display: flex;
  971. align-items: center;
  972. height: 92rpx;
  973. padding: 6rpx 30rpx 8rpx;
  974. image {
  975. flex-shrink: 0;
  976. width: 80rpx;
  977. height: 80rpx;
  978. margin-right: 20rpx;
  979. }
  980. .tit-box {
  981. @extend %font-title-box;
  982. }
  983. .tit {
  984. @extend %font-title;
  985. }
  986. .iconenter {
  987. font-size: $font-lg + 2rpx;
  988. color: $font-color-light;
  989. }
  990. .f-left-icon {
  991. @extend %f-left-icon;
  992. }
  993. .iconfont {
  994. font-size: $font-sm - 2rpx;
  995. }
  996. }
  997. // 会员升级礼包
  998. .uservip {
  999. border-radius: $border-radius-sm;
  1000. background-color: white;
  1001. box-shadow: $box-shadow;
  1002. height: 300rpx;
  1003. margin: 0 30rpx;
  1004. image {
  1005. height: 100%;
  1006. width: 300rpx;
  1007. }
  1008. .detail {
  1009. position: relative;
  1010. padding: 20rpx;
  1011. height: 100%;
  1012. .icon {
  1013. @extend %icon;
  1014. }
  1015. .price-box {
  1016. position: absolute;
  1017. bottom: 20rpx;
  1018. width: calc(100% - 40rpx);
  1019. .price {
  1020. font-size: $font-lg + 2rpx;
  1021. font-weight: bold;
  1022. color: $font-color-base;
  1023. }
  1024. .text {
  1025. color: $color-gray;
  1026. font-size: $font-sm;
  1027. }
  1028. }
  1029. .title {
  1030. font-size: $font-lg;
  1031. font-weight: bold;
  1032. }
  1033. }
  1034. }
  1035. /* 猜你喜欢 */
  1036. .guess-section {
  1037. display: flex;
  1038. flex-wrap: wrap;
  1039. padding: 0 30rpx;
  1040. .guess-item {
  1041. overflow: hidden;
  1042. display: flex;
  1043. flex-direction: column;
  1044. width: 48%;
  1045. margin-bottom: 4%;
  1046. border-radius: $border-radius-sm;
  1047. background-color: white;
  1048. box-shadow: $box-shadow;
  1049. &:nth-child(2n + 1) {
  1050. margin-right: 4%;
  1051. }
  1052. }
  1053. .image-wrapper {
  1054. width: 100%;
  1055. height: 330rpx;
  1056. border-radius: 3px;
  1057. overflow: hidden;
  1058. image {
  1059. width: 100%;
  1060. height: 100%;
  1061. opacity: 1;
  1062. }
  1063. }
  1064. .title {
  1065. font-size: $font-base;
  1066. color: $font-color-dark;
  1067. font-weight: bold;
  1068. line-height: 80rpx;
  1069. }
  1070. .price {
  1071. font-size: $font-lg;
  1072. color: $font-color-base;
  1073. font-weight: bold;
  1074. line-height: 1;
  1075. line-height: 80rpx;
  1076. }
  1077. .icon {
  1078. @extend %icon;
  1079. }
  1080. .detail {
  1081. line-height: 1;
  1082. }
  1083. .tip {
  1084. color: white;
  1085. background-color: $color-yellow;
  1086. line-height: 1.5;
  1087. font-size: $font-sm;
  1088. padding-left: 20rpx;
  1089. }
  1090. }
  1091. // 推荐
  1092. .recommend {
  1093. width: 95%;
  1094. height: 155rpx;
  1095. margin: 0rpx auto;
  1096. padding-top: 30rpx;
  1097. font-size: 26rpx;
  1098. text-align: center;
  1099. color: #333333;
  1100. align-items: flex-start;
  1101. .recommend_list {
  1102. width: 33%;
  1103. }
  1104. .re_title {
  1105. font-size: 32rpx;
  1106. font-weight: bold;
  1107. }
  1108. .re_name {
  1109. color: #999999;
  1110. padding-top: 10rpx;
  1111. }
  1112. .selected_icon {
  1113. width: 25rpx;
  1114. height: 10rpx;
  1115. margin: 0px auto;
  1116. display: none;
  1117. image {
  1118. width: 100%;
  1119. height: 100%;
  1120. }
  1121. }
  1122. .active {
  1123. display: block;
  1124. }
  1125. .active_color {
  1126. color: #dc4d46 !important;
  1127. }
  1128. }
  1129. // 列表
  1130. .list-box-h {
  1131. height: 1550rpx;
  1132. }
  1133. // 优惠券
  1134. .coupon-list {
  1135. display: inline-block;
  1136. }
  1137. .row {
  1138. border-radius: 15rpx;
  1139. margin: 25rpx;
  1140. height: 155rpx;
  1141. // width: 552rpx;
  1142. overflow: hidden;
  1143. background-color: #ffffff;
  1144. padding-right: 25rpx;
  1145. .list-interval {
  1146. border: 1px dashed $border-color-light;
  1147. height: 100%;
  1148. .top,
  1149. .bottom {
  1150. border-radius: 100rpx;
  1151. width: 30rpx;
  1152. height: 30rpx;
  1153. position: absolute;
  1154. background-color: $page-color-base;
  1155. right: -15rpx;
  1156. }
  1157. .top {
  1158. top: -18rpx;
  1159. }
  1160. .bottom {
  1161. bottom: -18rpx;
  1162. }
  1163. }
  1164. .list-money {
  1165. height: 100%;
  1166. min-width: 155rpx;
  1167. text-align: center;
  1168. image {
  1169. height: 100%;
  1170. width: 20rpx;
  1171. }
  1172. .list-money-text {
  1173. flex-grow: 1;
  1174. padding: 0 25rpx;
  1175. .tit {
  1176. text-align: center;
  1177. padding: 15rpx 0rpx;
  1178. font-size: 55rpx;
  1179. color: $color-red;
  1180. font-weight: bold;
  1181. &.noAction {
  1182. color: $font-color-light;
  1183. }
  1184. }
  1185. .price {
  1186. padding-bottom: 25rpx;
  1187. color: $font-color-light;
  1188. }
  1189. }
  1190. }
  1191. .row_list_right {
  1192. // flex-grow: 1;
  1193. min-width: 200rpx;
  1194. padding-left: 25rpx;
  1195. line-height: 1;
  1196. .right_time {
  1197. padding: 10rpx 0rpx;
  1198. color: $font-color-light;
  1199. font-size: $font-sm;
  1200. }
  1201. .right_top {
  1202. margin: 15rpx 0;
  1203. .right_name {
  1204. font-size: $font-base;
  1205. color: #bc253a;
  1206. font-weight: bold;
  1207. }
  1208. .right_title {
  1209. font-size: $font-base;
  1210. color: $font-base;
  1211. font-weight: bold;
  1212. &.noAction {
  1213. color: $font-color-light;
  1214. }
  1215. }
  1216. }
  1217. }
  1218. .right_use {
  1219. margin: 15rpx 0;
  1220. padding: 10rpx;
  1221. width: 160rpx;
  1222. text-align: center;
  1223. color: #fff;
  1224. background-color: #bc253a;
  1225. border-radius: 50rpx;
  1226. font-size: $font-sm;
  1227. &.noAction {
  1228. background-color: $font-color-light;
  1229. }
  1230. }
  1231. .iconlocation {
  1232. font-size: 36rpx;
  1233. color: $font-color-light;
  1234. }
  1235. }
  1236. .store-wrapper {
  1237. margin: 20rpx 0;
  1238. background-color: #fff;
  1239. padding: 0 0rpx 25rpx;
  1240. .title-wrapper {
  1241. padding-left: 20rpx;
  1242. justify-content: flex-start;
  1243. align-items: center;
  1244. height: 86rpx;
  1245. line-height: 86rpx;
  1246. image {
  1247. width: 36rpx;
  1248. height: 36rpx;
  1249. background: linear-gradient(43deg, #ffc063, #ffa163);
  1250. border-radius: 50%;
  1251. }
  1252. view {
  1253. padding-left: 10rpx;
  1254. font-size: 32rpx;
  1255. font-family: PingFang SC;
  1256. font-weight: bold;
  1257. color: #242424;
  1258. }
  1259. .title-b {
  1260. font-size: 24rpx;
  1261. font-family: PingFang SC;
  1262. font-weight: 500;
  1263. color: #8b8b8b;
  1264. }
  1265. }
  1266. .goods-wrapper {
  1267. padding: 0 20rpx;
  1268. justify-content: space-between;
  1269. flex-wrap: wrap;
  1270. .good {
  1271. margin-bottom: 20rpx;
  1272. width: 345rpx;
  1273. height: 480rpx;
  1274. background: #ffffff;
  1275. box-shadow: 0px 0px 10rpx rgba(50, 50, 52, 0.2);
  1276. border-radius: 10rpx;
  1277. .good-img {
  1278. width: 345rpx;
  1279. height: 345rpx;
  1280. border-radius: 10rpx;
  1281. }
  1282. .good-name {
  1283. font-size: 30rpx;
  1284. font-family: PingFang SC;
  1285. font-weight: bold;
  1286. color: #333333;
  1287. line-height: 35rpx;
  1288. padding-left: 21rpx;
  1289. }
  1290. .good-info {
  1291. padding-top: 10rpx;
  1292. padding-left: 21rpx;
  1293. font-size: 26rpx;
  1294. font-family: PingFang SC;
  1295. font-weight: 500;
  1296. color: #666666;
  1297. line-height: 35rpx;
  1298. }
  1299. .good-price {
  1300. padding-left: 21rpx;
  1301. padding-top: 30rpx;
  1302. font-size: 36rpx;
  1303. font-family: PingFang SC;
  1304. font-weight: bold;
  1305. color: #ff4c4c;
  1306. line-height: 35rpx;
  1307. height: 35rpx;
  1308. .old-price {
  1309. display: inline-block;
  1310. padding-left: 8rpx;
  1311. font-size: 26rpx;
  1312. font-family: PingFang SC;
  1313. font-weight: bold;
  1314. text-decoration: line-through;
  1315. color: #999999;
  1316. }
  1317. }
  1318. }
  1319. }
  1320. .store {
  1321. margin: 0 auto 20rpx;
  1322. width: 710rpx;
  1323. height: 210rpx;
  1324. background: #ffffff;
  1325. box-shadow: 0px 0px 10rpx 0px rgba(0, 0, 0, 0.1);
  1326. border-radius: 10rpx;
  1327. padding: 19rpx 25rpx 11rpx 20rpx;
  1328. justify-content: flex-start;
  1329. .store-img {
  1330. flex-shrink: 0;
  1331. width: 180rpx;
  1332. height: 180rpx;
  1333. border-radius: 10rpx;
  1334. // background-color: red;
  1335. }
  1336. .store-info {
  1337. width: 100%;
  1338. height: 100%;
  1339. padding-left: 19rpx;
  1340. position: relative;
  1341. .store-name {
  1342. font-size: 30rpx;
  1343. font-family: PingFang SC;
  1344. font-weight: bold;
  1345. color: #333333;
  1346. }
  1347. .store-detail {
  1348. padding-top: 10rpx;
  1349. font-size: 22rpx;
  1350. font-family: PingFang SC;
  1351. font-weight: 500;
  1352. color: #666666;
  1353. }
  1354. .store-tip {
  1355. width: 66rpx;
  1356. height: 40rpx;
  1357. background: linear-gradient(120deg, #ffc063, #ffa163);
  1358. border-radius: 8rpx;
  1359. position: absolute;
  1360. right: 0;
  1361. top: 0;
  1362. font-size: 24rpx;
  1363. font-family: PingFang SC;
  1364. font-weight: 500;
  1365. color: #ffffff;
  1366. line-height: 40rpx;
  1367. text-align: center;
  1368. }
  1369. .store-des {
  1370. // width: 400rpx;
  1371. position: absolute;
  1372. bottom: 0;
  1373. font-size: 24rpx;
  1374. font-family: PingFang SC;
  1375. font-weight: 500;
  1376. color: #999999;
  1377. height: 35rpx;
  1378. image {
  1379. margin-right: 8rpx;
  1380. width: 17rpx;
  1381. height: 24rpx;
  1382. }
  1383. }
  1384. }
  1385. }
  1386. }
  1387. .ewm {
  1388. width: 75rpx;
  1389. height: 75rpx;
  1390. position: absolute;
  1391. right: 10rpx;
  1392. bottom: -75rpx;
  1393. background-color: #fff;
  1394. border-radius: 50%;
  1395. box-shadow: 0 0 10rpx rgba($color: #000000, $alpha: 0.6);
  1396. image {
  1397. width: 50rpx;
  1398. height: 50rpx;
  1399. position: absolute;
  1400. top: 0;
  1401. left: 0;
  1402. bottom: 0;
  1403. right: 0;
  1404. margin: auto;
  1405. }
  1406. .ewm-tit {
  1407. position: absolute;
  1408. bottom: 10rpx;
  1409. font-size: 10rpx;
  1410. }
  1411. .closeEwm {
  1412. width: 40rpx;
  1413. height: 40rpx;
  1414. position: absolute;
  1415. top: -40rpx;
  1416. right: -20rpx;
  1417. image {
  1418. width: 100%;
  1419. height: 100%;
  1420. }
  1421. }
  1422. }
  1423. .popup-box {
  1424. width: 400rpx;
  1425. height: 450rpx;
  1426. background-color: #fff;
  1427. border-radius: 20rpx;
  1428. padding-top: 20rpx;
  1429. position: relative;
  1430. .gzhqr {
  1431. display: block;
  1432. width: 360rpx;
  1433. height: 360rpx;
  1434. margin: 0 auto 20rpx;
  1435. }
  1436. view {
  1437. text-align: center;
  1438. }
  1439. .close-img {
  1440. position: absolute;
  1441. width: 50rpx;
  1442. height: 50rpx;
  1443. top: -20rpx;
  1444. right: -20rpx;
  1445. }
  1446. }
  1447. </style>