index.vue 35 KB

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