index.vue 35 KB

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