1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342 |
- <template>
- <view class="container">
- <!-- 小程序头部兼容 -->
- <view class="input-box flex" @click="clickSearch">
- <view class=" input-content flex">
- <view class="iconfont iconsearch"></view>
- <view class="input"><input type="text" disabled placeholder="请输入搜索内容" /></view>
- </view>
- </view>
- <view class="mp-height"></view>
- <!-- 头部轮播 -->
- <view class="carousel-section">
- <!-- 标题栏和状态栏占位符 -->
- <view class="titleNview-placing"></view>
- <!-- 背景色区域 -->
- <view class="titleNview-background" :style="{ backgroundColor: '#fff' }"></view>
- <swiper class="carousel" autoplay="true" duration="400" interval="5000" @change="swiperChange">
- <swiper-item v-for="(item, index) in carouselList" :key="index" class="carousel-item" @click="bannerNavToUrl(item)"><image :src="item.pic" /></swiper-item>
- </swiper>
- <!-- 自定义swiper指示器 -->
- <!-- <view class="swiper-dots">
- <text class="num">{{ swiperCurrent + 1 }}</text>
- <text class="sign">/</text>
- <text class="num">{{ swiperLength }}</text>
- </view> -->
- </view>
- <!-- 分类 -->
- <view class="cate-section">
- <view class="cate-item" @click="navToTab('/pages/category/category')">
- <image src="/static/icon/c3.png"></image>
- <text>全部分类</text>
- </view>
- <navigator url="/pages/store/storeList">
- <view class="cate-item">
- <image src="/static/icon/c5.png"></image>
- <text>线下门店</text>
- </view>
- </navigator>
- <navigator url="/pages/product/construction">
- <view class="cate-item">
- <image src="/static/icon/c7.png"></image>
- <text>施工产品</text>
- </view>
- </navigator>
- <navigator url="/pages/user/shareQrCode">
- <view class="cate-item">
- <image src="/static/icon/c8.png"></image>
- <text>分享有礼</text>
- </view>
- </navigator>
- <view class="ewm" @click="openewm()" v-if="wechat_qrcode">
- <image :src="wechat_qrcode" mode=""></image>
- </view>
- </view>
- <!-- 秒杀楼层 -->
- <!-- <seckill></seckill> -->
- <!-- 附近门店 -->
- <view class="store-wrapper" v-if="storeList.length != 0">
- <view class="title-wrapper flex">
- <image src="/static/icon/t2.png" mode=""></image>
- <view class="">附近门店</view>
- <view class="title-b">门店好物随心购</view>
- </view>
- <view class="store flex" v-for="item in storeList" @click="navTo('/pages/store/storeDetail?id=' + item.id)" :key="item.id">
- <image :src="item.image" mode="" class="store-img"></image>
- <view class="store-info">
- <view class="store-name">{{ item.name }}</view>
- <view class="store-detail">{{ item.detailed_address }}</view>
- <view class="store-tip">门店</view>
- <view class="store-des">
- <image src="../../static/icon/dingwei.png" mode=""></image>
- 距离 {{ item.space }}
- </view>
- </view>
- </view>
- </view>
- <!-- 好货推荐 -->
- <view class="store-wrapper">
- <view class="title-wrapper flex">
- <image src="/static/icon/t3.png" mode=""></image>
- <view class="">好货推荐</view>
- <view class="title-b">优选商品低价入手</view>
- </view>
- <view class="goods-wrapper flex">
- <view class="good" v-for="item in bastList" @click="navTo('/pages/product/product?id='+ item.id + '&spread=' + userInfo.uid )" :key="item.id">
- <image :src="item.image" mode="" class="good-img"></image>
- <view class="good-name clamp">{{ item.store_name }}</view>
- <!-- <view class="good-info clamp">纯植物无香精</view> -->
- <view class="good-price">
- <text class="new-price">{{ item.price }}</text>
- <text class="old-price">{{ item.ot_price }}</text>
- </view>
- </view>
- </view>
- </view>
- <view class="Mask" v-show="shareShow">
- <image @click="share" src="http://shicai.liuniu946.com/static/img/shareimg4.png"></image>
- <view class="Toshare" @click="Toshare"></view>
- <view class="Tocancel" @click="Tocancel"></view>
- </view>
-
- <uni-popup ref="popup" type="center">
- <view class="popup-box">
- <image :src="wechat_qrcode" mode="" class="gzhqr"></image>
- <view>长按关注公众号</view>
- </view>
- </uni-popup>
- </view>
- </template>
- <script>
- import { timeComputed, space, openMap } from '@/utils/rocessor.js';
- import { loadIndexs, getStoreList } from '@/api/index.js';
- import { getUserInfo } from '@/api/user.js';
- import { setCoupons } from '@/api/functionalUnit.js';
- import { getBargainList, getProducts } from '@/api/product.js';
- import { interceptor } from '@/utils/loginUtils';
- import { mapState, mapMutations } from 'vuex';
- export default {
- components: {
- // seckill
- },
- watch: {
- //自适应swiper高度
- checkid(newValue, oldValue) {
- let obj = this;
- if (newValue == 0) {
- let bHeight = Math.ceil(obj.bastList.length / 2);
- obj.swiperHeight = Math.ceil(obj.pageProportion * 520 * bHeight);
- }
- if (newValue == 1) {
- let bHeight = Math.ceil(obj.goodsList.length / 2);
- obj.swiperHeight = Math.ceil(obj.pageProportion * 520 * bHeight);
- }
- if (newValue == 2) {
- let bHeight = Math.ceil(obj.bastBanner.length / 2);
- obj.swiperHeight = Math.ceil(obj.pageProportion * 520 * bHeight);
- }
- }
- },
- data() {
- return {
- wechat_qrcode: '',//公众号二维码
- storeList: [], //门店列表
- shareShow: false, //分享海报
- pageProportion: 0, //保存页面基于750宽度的比例
- swiperHeight: 0,
- checkid: 0,
- titleNViewBackground: '',
- swiperCurrent: 0,
- swiperLength: 0,
- bargainlist: [], //砍价商品
- carouselList: [], //轮播列表
- goodsList: [], //最新商品列表
- bastList: [], //精品推荐列表
- bastBanner: [], //促销商品列表
- menusList: [], //头部菜单
- page: 1,
- limit: 5,
- userServant: [
- {
- image: ''
- }
- ], //用户推广服务
- couponArray: [], //可领取优惠券
- recommend: [
- {
- id: 0,
- re_title: '精选',
- re_name: '为你推荐'
- },
- {
- id: 1,
- re_title: '最新',
- re_name: '最新好货优选'
- },
- {
- id: 2,
- re_title: '便宜好货',
- re_name: '90天便宜好货'
- }
- ],
- actTime: new Date()
- };
- },
- computed: {
- ...mapState(['loginInterceptor']),
- ...mapState('user', ['hasLogin', 'userInfo']),
- ...mapState('latlon', ['lat', 'lon'])
- },
- onLoad: function(option) {
- // #ifndef MP
- if (option.spread) {
- // 存储其他邀请人
- uni.setStorageSync('spread', option.spread);
- }
- // #endif
- // #ifdef MP
- if (option.scene) {
- // 存储小程序邀请人
- uni.setStorage({
- key: 'spread_code',
- data: option.scene
- });
- }
- // #endif
- this.getaddress();
- },
- onShow: function() {
- // 判断是否强制登录
- // if (this.loginInterceptor && !this.hasLogin) {
- // // 登录拦截
- // interceptor();
- // }
- this.loadData();
- this.getBargainList();
- // this.getProducts()
- },
- //下拉刷新
- onPullDownRefresh() {
- this.loadData();
- },
- // #ifndef MP
- // 监听导航栏输入框点击事件
- onNavigationBarSearchInputClicked(e) {
- //跳转到搜索页面
- this.clickSearch();
- },
- //点击导航栏 buttons 时触发
- onNavigationBarButtonTap(e) {
- const index = e.index;
- if (index === 0) {
- this.$api.msg('点击了扫描');
- } else if (index === 1) {
- // #ifdef APP-PLUS
- const pages = getCurrentPages();
- const page = pages[pages.length - 1];
- const currentWebview = page.$getAppWebview();
- currentWebview.hideTitleNViewButtonRedDot({
- index
- });
- // #endif
- uni.navigateTo({
- url: '/pages/user/notice'
- });
- }
- },
- // #endif
- methods: {
- openewm() {
- this.$refs.popup.open()
- },
- navTo(url) {
- uni.navigateTo({
- url: url
- })
- },
- ...mapMutations('latlon', ['setLat', 'setLon']),
- navToTab(url) {
- uni.switchTab({
- url: url
- });
- },
- //砍价商品推荐详情页
- navToDetailPages(item) {
- let id = item.product_id;
- //let type = 2;
- uni.navigateTo({
- url: '/pages/product/product?id=' + id
- });
- },
- openSubscribe: function(e) {
- let page = e;
- // #ifndef MP
- uni.navigateTo({
- url: page
- });
- // #endif
- // #ifdef MP
- uni.showLoading({
- title: '正在加载'
- });
- openBargainSubscribe()
- .then(res => {
- uni.hideLoading();
- uni.navigateTo({
- url: page
- });
- })
- .catch(err => {
- uni.hideLoading();
- });
- // #endif
- },
- getBargainList() {
- let that = this;
- getBargainList({
- page: that.page,
- limit: that.limit
- })
- .then(function(res) {
- that.$set(that, 'bargainlist', res.data.slice(0, 2));
- })
- .catch(res => {
- console.log(res, 'getBargainList');
- });
- },
- Mask() {
- this.MaskShow = false;
- this.shareShow = true;
- uni.setStorage({
- key: 'FirstEntry',
- data: true,
- success: function() {
- console.log(uni.getStorageSync('FirstEntry'), 'Mask');
- }
- });
- },
- Toshare() {
- if (this.userInfo == '') {
- getUserInfo({})
- .then(({ data }) => {
- this.setUserInfo(data);
- this.userInfo = data;
- })
- .catch(e => {});
- } else {
- this.shareShow = false;
- uni.navigateTo({
- url: '/pages/user/shareQrCode?spread=' + this.userInfo.uid
- });
- }
- },
- Tocancel() {
- this.shareShow = false;
- },
- // 监听切换事件
- listChange(e) {
- this.checkid = e.detail.current;
- },
- // 點擊搜索框
- clickSearch() {
- uni.navigateTo({
- url: '/pages/product/search'
- });
- },
- // 点击触发领取优惠券
- setCoupons(item) {
- // 判断是否已经领取了优惠券
- let obj = this;
- uni.showModal({
- title: '领取提示',
- content: '是否领取优惠券',
- success(e) {
- if (e.confirm) {
- setCoupons({ couponId: item.id }).then(e => {
- item.is_use = true;
- uni.showToast({
- title: '领取成功',
- type: 'top',
- duration: 2000
- });
- });
- }
- }
- });
- },
- //商品种类切换
- change(item) {
- let id = item;
- this.checkid = id;
- if (this.checkid == 1) {
- // console.log(1);
- this.detail = this.selected_detail;
- } else if (this.checkid == 2) {
- // console.log(2);
- this.detail = this.new_product;
- } else {
- this.detail = this.cheap_good;
- }
- },
- // 监听图片加载完成
- onImageError(key, index) {
- this[key][index].image = '/static/error/errorImage.jpg';
- },
- // 请求载入数据
- async loadData() {
- loadIndexs({})
- .then(({ data }) => {
- let goods = data.info;
- this.carouselList = data.banner;
- this.swiperLength = this.carouselList.length;
- this.menusList = data.menus;
- this.goodsList = goods.firstList; //最新商品
- this.bastList = goods.bastList; //精品推荐
- console.log(this.bastList, 'this.bastList6666666666666666666666');
- this.wechat_qrcode = data.wechat_qrcode
- console.log(data.wechat_qrcode)
- this.bastBanner = data.benefit; //促销单品
- this.$set(this, 'couponArray', data.couponList); //保存卡包券
- uni.stopPullDownRefresh();
- })
- .catch(e => {
- uni.stopPullDownRefresh();
- });
- },
- //轮播图切换修改背景色
- swiperChange(e) {
- const index = e.detail.current;
- this.swiperCurrent = index;
- this.titleNViewBackground = this.carouselList[index].background;
- },
- //详情页
- navToDetailPage(item) {
- let id = item.id;
- uni.navigateTo({
- url: '/pages/product/product?id=' + id
- });
- },
- // 轮播图跳转
- bannerNavToUrl(item) {
- console.log(item)
- // #ifdef H5
- console.log(item.wap_url.indexOf('http'),'66666666666')
- if (item.wap_url.indexOf('http') > -1) {
- console.log('hello word')
- window.location.href = item.wap_url;
- }
- // #endif
- //测试数据没有写id,用title代替
- uni.navigateTo({
- url: item.wap_url
- });
- },
- //获取定位信息
- getaddress() {
- console.log('dizhi+++++++++++')
- let obj = this;
- uni.getLocation({
- type:'gcj02',
- success: res => {
- console.log('66666666666666666666')
- let latitude = Math.abs(+res.latitude);
- let longitude = Math.abs(+res.longitude);
- obj.setLat(latitude);
- obj.setLon(longitude);
- console.log(obj.lat, obj.lon, '经纬度数据');
- obj.getStoreList(latitude, longitude);
- },
- fail: err => {
- console.log(err,'shi+++++++++++++++')
- openMap().then(e => {
- this.getaddress();
- });
- }
- });
- },
- //获取门店列表
- getStoreList(latitude, longitude) {
- let obj = this;
- getStoreList({
- page: 1,
- limit: 3,
- latitude: latitude,
- longitude: longitude
- }).then(({ data }) => {
- data.list = data.list.map(item => {
- item.space = obj.space(obj.lat, obj.lon, item.latitude*1, item.longitude*1);
- console.log(item.space, 'item.space++++++++++');
- return item;
- });
- obj.storeList = data.list;
- });
- },
- space(lat1, lng1, lat2, lng2) {
- console.log(lat1, lng1, lat2, lng2, '位置信息');
- var radLat1 = (lat1 * Math.PI) / 180.0;
- var radLat2 = (lat2 * Math.PI) / 180.0;
- var a = radLat1 - radLat2;
- var b = (lng1 * Math.PI) / 180.0 - (lng2 * Math.PI) / 180.0;
- var s = 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(a / 2), 2) + Math.cos(radLat1) * Math.cos(radLat2) * Math.pow(Math.sin(b / 2), 2)));
- s = s * 6378.137;
- s = Math.round(s * 10000) / 10000;
- // return s * 1000;
- if (s > 1) {
- return s.toFixed(2) + 'km';
- } else {
- return (s * 1000).toFixed(2) + 'm'; // 单位米
- }
- }
- }
- };
- </script>
- <style lang="scss">
- .Mask {
- width: 100%;
- height: 100vh;
- position: fixed;
- z-index: 99999;
- background-color: rgba(0, 0, 0, 0.7);
- top: 0;
- image {
- width: 100%;
- height: 100vh;
- }
- }
- // 热销商品
- .hot-goods {
- margin: 0 25rpx;
- padding: 5rpx 25rpx 30rpx 25rpx;
- background-color: #fff;
- border-radius: 10rpx;
- .hot-headers {
- margin: 25rpx 0;
- width: 100%;
- display: flex;
- .img {
- width: 32rpx;
- height: 32rpx;
- margin-right: 10rpx;
- }
- .hot-title {
- font-size: 30rpx;
- margin-right: 15rpx;
- }
- .more {
- line-height: 1;
- padding: 5rpx 10rpx 5rpx 15rpx;
- text-align: center;
- font-size: 20rpx;
- border-radius: 15rpx;
- color: #ffffff;
- background: linear-gradient(90deg, rgba(250, 52, 38, 1) 0%, rgba(249, 30, 83, 1) 100%);
- image {
- width: 20rpx;
- height: 20rpx;
- }
- }
- }
- .hot-lists {
- line-height: 1;
- display: flex;
- .hot-produce {
- width: 100%;
- height: 260rpx;
- border-top: 1px solid #f0f0f0;
- display: flex;
- padding-top: 28rpx;
- .produce-image {
- width: 200rpx;
- height: 200rpx;
- image {
- width: 200rpx;
- height: 200rpx;
- border: 1px solid #f0f0f0;
- }
- }
- .produce-content {
- // flex-direction: column;
- margin-left: 30rpx;
- height: 200rpx;
- position: relative;
- width: calc(100% - 200rpx - 30rpx);
- .produce-name {
- font-size: 28rpx;
- font-weight: bold;
- line-height: 35rpx;
- color: #343434;
- }
- .produce-info {
- font-size: 20rpx;
- margin-top: 25rpx;
- }
- .produce-price {
- display: flex;
- align-items: flex-end;
- color: #ff383e;
- font-size: 24rpx;
- margin-top: 70rpx;
- font-weight: bold;
- text {
- font-size: 36rpx;
- }
- .produce-price-1 {
- font-size: 22rpx;
- font-weight: 500;
- text-decoration: line-through;
- color: rgba(170, 170, 170, 1);
- margin-left: 20rpx;
- }
- }
- .produce-price1 {
- height: 100%;
- letter-spacing: 3rpx;
- color: #ff383e;
- font-size: 24rpx;
- font-weight: bold;
- .produce-center {
- width: 100%;
- position: absolute;
- bottom: 0;
- display: flex;
- justify-content: space-between;
- align-items: center;
- .kanjia_word {
- .word-1 {
- font-size: 22rpx;
- color: #666666;
- }
- .word-2 {
- font-size: 28rpx;
- color: #ff383e;
- margin-top: 10rpx;
- }
- }
- .kanjia_button {
- height: 50rpx;
- width: 150rpx;
- border-radius: 25rpx;
- font-size: 26rpx;
- font-weight: 500;
- color: #ff383e;
- border: 1px solid rgba(255, 56, 62, 1);
- }
- }
- }
- }
- }
- }
- }
- .input-box {
- position: absolute;
- width: 100%;
- padding: 25rpx;
- background-color: rgba(0, 0, 0, 0);
- z-index: 999;
- height: 44px;
- .iconsearch {
- font-size: 50rpx;
- }
- .input-content {
- border-radius: 99rpx;
- flex-grow: 1;
- padding: 10rpx 200rpx;
- background-color: #fff;
- // justify-content: center;
- .input {
- flex-grow: 1;
- input {
- font-size: $font-lg;
- }
- }
- }
- .input-button {
- padding-left: 20rpx;
- font-size: $font-lg;
- height: 100%;
- }
- }
- /* #ifdef MP */
- .mp-height {
- height: 44px;
- }
- .input-box {
- position: fixed;
- top: 0;
- left: 0;
- width: 100%;
- padding: 25rpx;
- background-color: #ffffff;
- z-index: 999;
- height: 44px;
- .iconsearch {
- font-size: 50rpx;
- }
- .input-content {
- border-radius: 99rpx;
- flex-grow: 1;
- padding: 10rpx 30rpx;
- background-color: rgba(231, 231, 231, 0.7);
- .input {
- flex-grow: 1;
- input {
- font-size: $font-lg;
- }
- }
- }
- .input-button {
- padding-left: 20rpx;
- font-size: $font-lg;
- height: 100%;
- }
- }
- page {
- .cate-section {
- position: relative;
- z-index: 5;
- border-radius: 16rpx 16rpx 0 0;
- margin-top: -20rpx;
- }
- .carousel-section {
- padding: 0;
- .titleNview-placing {
- padding-top: 0;
- height: 0;
- }
- .carousel {
- .carousel-item {
- padding: 0;
- }
- }
- .swiper-dots {
- left: 45rpx;
- bottom: 40rpx;
- }
- }
- }
- /* #endif */
- page {
- background: #f7f8f7;
- }
- .m-t {
- margin-top: 16rpx;
- }
- /* 头部 轮播图 */
- .carousel-section {
- position: relative;
- // padding-top: 10px;
- overflow: hidden;
- .titleNview-placing {
- height: var(--status-bar-height);
- // padding-top: 44px;
- box-sizing: content-box;
- }
- .titleNview-background {
- position: absolute;
- top: 0;
- left: 0;
- width: 100%;
- height: 426rpx;
- transition: 0.4s;
- }
- .carousel {
- width: 100%;
- height: 426rpx;
- .carousel-item {
- width: 100%;
- height: 100%;
- // padding: 0 28rpx;
- overflow: hidden;
- }
- image {
- width: 100%;
- height: 100%;
- // border-radius: $border-radius-sm;
- }
- }
- }
- .swiper-dots {
- display: flex;
- position: absolute;
- left: 60rpx;
- bottom: 15rpx;
- width: 72rpx;
- height: 36rpx;
- 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==);
- background-size: 100% 100%;
- .num {
- width: 36rpx;
- height: 36rpx;
- border-radius: 50px;
- font-size: 24rpx;
- color: #fff;
- text-align: center;
- line-height: 36rpx;
- }
- .sign {
- position: absolute;
- top: 0;
- left: 50%;
- line-height: 36rpx;
- font-size: 12rpx;
- color: #fff;
- transform: translateX(-50%);
- }
- }
- /* 分类 */
- .cate-section {
- display: flex;
- justify-content: space-around;
- align-items: center;
- flex-wrap: wrap;
- padding: 30rpx 22rpx;
- background-color: #fff;
- margin-bottom: 20rpx;
- position: relative;
- .cate-item {
- display: flex;
- flex-direction: column;
- align-items: center;
- font-size: $font-sm + 2rpx;
- color: $font-color-dark;
- }
- /* 原图标颜色太深,不想改图了,所以加了透明度 */
- image {
- width: 88rpx;
- height: 88rpx;
- margin-bottom: 14rpx;
- border-radius: 50%;
- opacity: 0.7;
- }
- }
- // 中间广告图片
- .ad-1 {
- width: 100%;
- height: 210rpx;
- padding: 10rpx 0;
- background: #fff;
- image {
- width: 100%;
- height: 100%;
- }
- }
- /*公用边框样式*/
- %icon {
- margin-right: 10rpx;
- display: inline-block;
- padding: 2rpx 10rpx;
- border: 1rpx solid $color-yellow;
- color: $color-yellow;
- line-height: 1;
- font-size: $font-base;
- border-radius: 10rpx;
- }
- .f-header {
- display: flex;
- align-items: center;
- height: 92rpx;
- padding: 6rpx 30rpx 8rpx;
- image {
- flex-shrink: 0;
- width: 80rpx;
- height: 80rpx;
- margin-right: 20rpx;
- }
- .tit-box {
- @extend %font-title-box;
- }
- .tit {
- @extend %font-title;
- }
- .iconenter {
- font-size: $font-lg + 2rpx;
- color: $font-color-light;
- }
- .f-left-icon {
- @extend %f-left-icon;
- }
- .iconfont {
- font-size: $font-sm - 2rpx;
- }
- }
- // 会员升级礼包
- .uservip {
- border-radius: $border-radius-sm;
- background-color: white;
- box-shadow: $box-shadow;
- height: 300rpx;
- margin: 0 30rpx;
- image {
- height: 100%;
- width: 300rpx;
- }
- .detail {
- position: relative;
- padding: 20rpx;
- height: 100%;
- .icon {
- @extend %icon;
- }
- .price-box {
- position: absolute;
- bottom: 20rpx;
- width: calc(100% - 40rpx);
- .price {
- font-size: $font-lg + 2rpx;
- font-weight: bold;
- color: $font-color-base;
- }
- .text {
- color: $color-gray;
- font-size: $font-sm;
- }
- }
- .title {
- font-size: $font-lg;
- font-weight: bold;
- }
- }
- }
- /* 猜你喜欢 */
- .guess-section {
- display: flex;
- flex-wrap: wrap;
- padding: 0 30rpx;
- .guess-item {
- overflow: hidden;
- display: flex;
- flex-direction: column;
- width: 48%;
- margin-bottom: 4%;
- border-radius: $border-radius-sm;
- background-color: white;
- box-shadow: $box-shadow;
- &:nth-child(2n + 1) {
- margin-right: 4%;
- }
- }
- .image-wrapper {
- width: 100%;
- height: 330rpx;
- border-radius: 3px;
- overflow: hidden;
- image {
- width: 100%;
- height: 100%;
- opacity: 1;
- }
- }
- .title {
- font-size: $font-base;
- color: $font-color-dark;
- font-weight: bold;
- line-height: 80rpx;
- }
- .price {
- font-size: $font-lg;
- color: $font-color-base;
- font-weight: bold;
- line-height: 1;
- line-height: 80rpx;
- }
- .icon {
- @extend %icon;
- }
- .detail {
- line-height: 1;
- }
- .tip {
- color: white;
- background-color: $color-yellow;
- line-height: 1.5;
- font-size: $font-sm;
- padding-left: 20rpx;
- }
- }
- // 推荐
- .recommend {
- width: 95%;
- height: 155rpx;
- margin: 0rpx auto;
- padding-top: 30rpx;
- font-size: 26rpx;
- text-align: center;
- color: #333333;
- align-items: flex-start;
- .recommend_list {
- width: 33%;
- }
- .re_title {
- font-size: 32rpx;
- font-weight: bold;
- }
- .re_name {
- color: #999999;
- padding-top: 10rpx;
- }
- .selected_icon {
- width: 25rpx;
- height: 10rpx;
- margin: 0px auto;
- display: none;
- image {
- width: 100%;
- height: 100%;
- }
- }
- .active {
- display: block;
- }
- .active_color {
- color: #dc4d46 !important;
- }
- }
- // 列表
- .list-box-h {
- height: 1550rpx;
- }
- // 优惠券
- .coupon-list {
- display: inline-block;
- }
- .row {
- border-radius: 15rpx;
- margin: 25rpx;
- height: 155rpx;
- // width: 552rpx;
- overflow: hidden;
- background-color: #ffffff;
- padding-right: 25rpx;
- .list-interval {
- border: 1px dashed $border-color-light;
- height: 100%;
- .top,
- .bottom {
- border-radius: 100rpx;
- width: 30rpx;
- height: 30rpx;
- position: absolute;
- background-color: $page-color-base;
- right: -15rpx;
- }
- .top {
- top: -18rpx;
- }
- .bottom {
- bottom: -18rpx;
- }
- }
- .list-money {
- height: 100%;
- min-width: 155rpx;
- text-align: center;
- image {
- height: 100%;
- width: 20rpx;
- }
- .list-money-text {
- flex-grow: 1;
- padding: 0 25rpx;
- .tit {
- text-align: center;
- padding: 15rpx 0rpx;
- font-size: 55rpx;
- color: $color-red;
- font-weight: bold;
- &.noAction {
- color: $font-color-light;
- }
- }
- .price {
- padding-bottom: 25rpx;
- color: $font-color-light;
- }
- }
- }
- .row_list_right {
- // flex-grow: 1;
- min-width: 200rpx;
- padding-left: 25rpx;
- line-height: 1;
- .right_time {
- padding: 10rpx 0rpx;
- color: $font-color-light;
- font-size: $font-sm;
- }
- .right_top {
- margin: 15rpx 0;
- .right_name {
- font-size: $font-base;
- color: #bc253a;
- font-weight: bold;
- }
- .right_title {
- font-size: $font-base;
- color: $font-base;
- font-weight: bold;
- &.noAction {
- color: $font-color-light;
- }
- }
- }
- }
- .right_use {
- margin: 15rpx 0;
- padding: 10rpx;
- width: 160rpx;
- text-align: center;
- color: #fff;
- background-color: #bc253a;
- border-radius: 50rpx;
- font-size: $font-sm;
- &.noAction {
- background-color: $font-color-light;
- }
- }
- .iconlocation {
- font-size: 36rpx;
- color: $font-color-light;
- }
- }
- .store-wrapper {
- margin: 20rpx 0;
- background-color: #fff;
- padding: 0 0rpx 25rpx;
- .title-wrapper {
- padding-left: 20rpx;
- justify-content: flex-start;
- align-items: center;
- height: 86rpx;
- line-height: 86rpx;
- image {
- width: 36rpx;
- height: 36rpx;
- background: linear-gradient(43deg, #ffc063, #ffa163);
- border-radius: 50%;
- }
- view {
- padding-left: 10rpx;
- font-size: 32rpx;
- font-family: PingFang SC;
- font-weight: bold;
- color: #242424;
- }
- .title-b {
- font-size: 24rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #8b8b8b;
- }
- }
- .goods-wrapper {
- padding: 0 20rpx;
- justify-content: space-between;
- flex-wrap: wrap;
- .good {
- margin-bottom: 20rpx;
- width: 345rpx;
- height: 480rpx;
- background: #ffffff;
- box-shadow: 0px 0px 10rpx rgba(50, 50, 52, 0.2);
- border-radius: 10rpx;
- .good-img {
- width: 345rpx;
- height: 345rpx;
- border-radius: 10rpx;
- }
- .good-name {
- font-size: 30rpx;
- font-family: PingFang SC;
- font-weight: bold;
- color: #333333;
- line-height: 35rpx;
- padding-left: 21rpx;
- }
- .good-info {
- padding-top: 10rpx;
- padding-left: 21rpx;
- font-size: 26rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #666666;
- line-height: 35rpx;
- }
- .good-price {
- padding-left: 21rpx;
- padding-top: 30rpx;
- font-size: 36rpx;
- font-family: PingFang SC;
- font-weight: bold;
- color: #ff4c4c;
- line-height: 35rpx;
- height: 35rpx;
- .old-price {
- display: inline-block;
- padding-left: 8rpx;
- font-size: 26rpx;
- font-family: PingFang SC;
- font-weight: bold;
- text-decoration: line-through;
- color: #999999;
- }
- }
- }
- }
- .store {
- margin: 0 auto 20rpx;
- width: 710rpx;
- height: 210rpx;
- background: #ffffff;
- box-shadow: 0px 0px 10rpx 0px rgba(0, 0, 0, 0.1);
- border-radius: 10rpx;
- padding: 19rpx 25rpx 11rpx 20rpx;
- justify-content: flex-start;
- .store-img {
- flex-shrink: 0;
- width: 180rpx;
- height: 180rpx;
- border-radius: 10rpx;
- // background-color: red;
- }
- .store-info {
- width: 100%;
- height: 100%;
- padding-left: 19rpx;
- position: relative;
- .store-name {
- font-size: 30rpx;
- font-family: PingFang SC;
- font-weight: bold;
- color: #333333;
- }
- .store-detail {
- padding-top: 10rpx;
- font-size: 22rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #666666;
- }
- .store-tip {
- width: 66rpx;
- height: 40rpx;
- background: linear-gradient(120deg, #ffc063, #ffa163);
- border-radius: 8rpx;
- position: absolute;
- right: 0;
- top: 0;
- font-size: 24rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #ffffff;
- line-height: 40rpx;
- text-align: center;
- }
- .store-des {
- // width: 400rpx;
- position: absolute;
- bottom: 0;
- font-size: 24rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #999999;
- height: 35rpx;
- image {
- margin-right: 8rpx;
- width: 17rpx;
- height: 24rpx;
- }
- }
- }
- }
- }
- .ewm {
- width: 75rpx;
- height: 75rpx;
- position: absolute;
- right: 10rpx;
- bottom: -75rpx;
- background-color: #fff;
- border-radius: 50%;
- box-shadow: 0 0 10rpx rgba($color: #000000, $alpha: 0.6);
- image {
- width: 50rpx;
- height: 50rpx;
- position: absolute;
- top: 0;
- left: 0;
- bottom: 0;
- right: 0;
- margin: auto;
- }
- .ewm-tit {
- position: absolute;
- bottom: 10rpx;
- font-size: 10rpx;
- }
- .closeEwm {
- width: 40rpx;
- height: 40rpx;
- position: absolute;
- top: -40rpx;
- right: -20rpx;
- image {
- width: 100%;
- height: 100%;
- }
- }
- }
- .popup-box {
- width: 400rpx;
- height: 450rpx;
- background-color: #fff;
- border-radius: 20rpx;
- padding-top: 20rpx;
- position: relative;
-
- .gzhqr {
- display: block;
-
- width: 360rpx;
- height: 360rpx;
- margin: 0 auto 20rpx;
- }
-
- view {
- text-align: center;
- }
-
- .close-img {
- position: absolute;
- width: 50rpx;
- height: 50rpx;
- top: -20rpx;
- right: -20rpx;
- }
- }
-
- </style>
|