123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850 |
- <template>
- <view class="container">
- <!-- 小程序头部兼容 -->
- <!-- #ifdef MP -->
- <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>
- <!-- #endif -->
- <!-- 头部轮播 -->
- <view class="carousel-section">
- <!-- 标题栏和状态栏占位符 -->
- <view class="titleNview-placing"></view>
- <!-- 背景色区域 -->
- <view class="titleNview-background" :style="{ backgroundColor: '#5DBC7C' }"></view>
- <swiper class="carousel" autoplay="true" duration="400" interval="5000" @change="swiperChange">
- <!-- <swiper class="carousel" autoplay="true" duration="400" interval="5000"> -->
- <swiper-item v-for="(item, index) in carouselList" :key="index" class="carousel-item">
- <image :src="item.pic" mode="aspectFill" @click="bannerNavToUrl(item)"></image>
- </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">
- <navigator url="/pages/shoping/list">
- <view class="cate-item">
- <image class="Uimg" src="/static/icon/u5.png"></image>
- <text>商家联盟</text>
- </view>
- </navigator>
- <navigator url="/pages/product/giftBag">
- <view class="cate-item">
- <image src="/static/icon/c3.png"></image>
- <text>联盟礼包</text>
- </view>
- </navigator>
- <navigator url="/pages/integral/index">
- <view class="cate-item">
- <image src="/static/icon/c6.png"></image>
- <text>积分商城</text>
- </view>
- </navigator>
- <navigator url="/pages/sign/index">
- <view class="cate-item">
- <image src="/static/icon/c8.png"></image>
- <text>每日签到</text>
- </view>
- </navigator>
- </view>
- <view class="cate-section">
- <navigator url="/pages/groupBooking/index">
- <view class="cate-item">
- <image src="/static/icon/c5.png"></image>
- <text>超值拼团</text>
- </view>
- </navigator>
- <navigator url="/pages/seckill/seckill">
- <view class="cate-item">
- <!--v-if="userInfo.level>0"-->
- <image src="/static/icon/c7.png"></image>
- <text>限时秒杀</text>
- </view>
- </navigator>
- <navigator url="/pages/received/index?state=0">
- <view class="cate-item">
- <!--v-if="userInfo.level>0"-->
- <image src="/static/icon/c9.png"></image>
- <text>收付款</text>
- </view>
- </navigator>
- <!-- <view class="cate-item"><text class="none-font-color">每日签到</text></view> -->
- <view class="cate-item"><text class="none-font-color">每日签到</text></view>
- </view>
- <!-- <view class="ad-1"><image src="/static/temp/ad1.jpg" mode="scaleToFill"></image></view> -->
- <!-- 会员升级专区 -->
- <!-- <view class="f-header m-t">
- <view class="f-left-icon"></view>
- <view class="tit-box"><text class="tit">会员升级专区</text></view>
- </view> -->
- <!-- <view class="uservip flex" v-for="(ls,index) in userServant" @click="navToDetailPage(ls)">
- <image @error="onImageError('userServant', index)" lazy-load :src="ls.image" mode="aspectFill"></image>
- <view class="detail">
- <view class="title">{{ls.store_name}}</view>
- <view class="icon" v-if="ls.mer_id==0">自营</view>
- <view class="flex price-box">
- <view class="price">
- <text class="font-size-sm">¥</text>
- {{ls.price|moneyNum}}
- </view>
- <view class="text">售出{{ls.sales}}</view>
- </view>
- </view>
- </view> -->
- <!-- 秒杀楼层 -->
- <seckill v-if="userInfo.level > 0"></seckill>
- <!-- 团购楼层 -->
- <!-- <view class="f-header m-t">
- <view class="f-left-icon"></view>
- <view class="tit-box"><text class="tit">超值拼团</text></view>
- <text class="iconfont iconenter">更多</text>
- </view> -->
- <!-- <view class="group-section">
- <swiper class="g-swiper" :duration="500">
- <swiper-item class="g-swiper-item" v-for="(item, index) in goodsList" :key="index" v-if="index % 2 === 0" @click="navToDetailPage(item)">
- <view class="g-item left">
- <image :src="item.image" mode="aspectFill"></image>
- <view class="t-box">
- <text class="title clamp">{{ item.store_name }}</text>
- <view class="price-box">
- <text class="price">¥{{ item.price }}</text>
- <text class="m-price">¥188</text>
- </view>
- <view class="pro-box">
- <view class="progress-box"><progress percent="72" activeColor="#fa436a" active stroke-width="6" /></view>
- <text>6人成团</text>
- </view>
- </view>
- </view>
- <view class="g-item right">
- <image :src="goodsList.image" mode="aspectFill"></image>
- <view class="t-box">
- <text class="title clamp">{{ goodsList.store_name }}</text>
- <view class="price-box">
- <text class="price">¥{{ goodsList.price }}</text>
- <text class="m-price">¥188</text>
- </view>
- <view class="pro-box">
- <view class="progress-box"><progress percent="72" activeColor="#fa436a" active stroke-width="6" /></view>
- <text>10人成团</text>
- </view>
- </view>
- </view>
- </swiper-item>
- </swiper>
- </view> -->
- <!-- 最新 商品 -->
- <view class="f-header m-t">
- <view class="f-left-icon"></view>
- <view class="tit-box"><text class="tit">最新商品</text></view>
- <navigator url="/pages/product/classify?type=3"><text class="iconfont iconenter">更多</text></navigator>
- </view>
- <view class="guess-section">
- <view v-for="(item, index) in goodsList" :key="index" class="guess-item" @click="navToDetailPage(item)">
- <view class="image-wrapper"><image :src="item.image" mode="aspectFill"></image></view>
- <text class="title clamp margin-c-20">{{ item.store_name }}</text>
- <view class="cmy-hr"></view>
- <view class="price margin-c-20 flex">
- <view>
- <text class="font-size-sm ">¥</text>
- {{ item.price | moneyNum }}
- </view>
- <view class="font-size-sm">
- <text class="font-color-gray">售出{{ item.sales }}</text>
- </view>
- </view>
- </view>
- </view>
- <!-- 促销 商品 -->
- <!-- <view class="f-header m-t">
- <view class="f-left-icon"></view>
- <view class="tit-box"><text class="tit">促销商品</text></view>
- </view>
- <view class="guess-section">
- <view v-for="(item, index) in bastBanner" :key="index" class="guess-item" @click="navToDetailPage(item)">
- <view class="image-wrapper"><image :src="item.image" mode="aspectFill"></image></view>
- <text class="title clamp margin-c-20">{{ item.store_name }}</text>
- <view class="cmy-hr"></view>
- <view class="price margin-c-20 flex">
- <view>
- <text class="font-size-sm ">¥</text>
- {{ item.price }}
- </view>
- <view class="font-size-sm">
- <text class="font-color-gray">{{ item.sales }}人购买</text>
- </view>
- </view>
- </view>
- </view> -->
- <!-- 精品 商品 -->
- <!-- <view class="f-header m-t">
- <view class="f-left-icon"></view>
- <view class="tit-box"><text class="tit">联盟礼包</text></view>
- <text class="iconfont iconenter">更多</text>
- </view> -->
- <!-- <view class="guess-section">
- <view v-for="(item, index) in bastList" :key="index" class="guess-item" @click="navToDetailPage(item)">
- <view class="image-wrapper"><image :src="item.image" mode="aspectFill"></image></view>
- <text class="title clamp margin-c-20">{{ item.store_name }}</text>
- <view class="cmy-hr"></view>
- <view class="price margin-c-20 flex">
- <view>
- <text class="font-size-sm ">¥</text>
- {{ item.price }}
- </view>
- <view class="font-size-sm">
- <text class="font-color-gray">{{ item.sales }}人购买</text>
- </view>
- </view>
- </view>
- </view> -->
- <!-- 精品推荐 -->
- <view class="f-header m-t">
- <view class="f-left-icon"></view>
- <view class="tit-box"><text class="tit">精品推荐</text></view>
- <navigator url="/pages/product/classify?type=1"><text class="iconfont iconenter">更多</text></navigator>
- </view>
- <view class="guess-section">
- <view v-for="(item, index) in bastList" :key="index" class="guess-item" @click="navToDetailPage(item)">
- <view class="image-wrapper"><image :src="item.image" mode="aspectFill"></image></view>
- <text class="title clamp margin-c-20">{{ item.store_name }}</text>
- <view class="cmy-hr"></view>
- <view class="price margin-c-20 flex">
- <view>
- <text class="font-size-sm ">¥</text>
- {{ item.price | moneyNum }}
- </view>
- <view class="font-size-sm">
- <text class="font-color-gray">售出{{ item.sales }}</text>
- </view>
- </view>
- </view>
- <!-- <view v-for="(item, index) in goodsList" :key="index" class="guess-item" @click="navToDetailPage(item)">
- <view class="image-wrapper"><image @error="onImageError('goodsList', index)" lazy-load :src="item.image" mode="aspectFill"></image></view>
- <text class="title clamp margin-c-20">
- <text class="icon">自营</text>
- {{ item.title }}
- </text>
- <view class="hr"></view>
- <view class="price margin-c-20 flex">
- <view>
- <text class="font-size-sm ">¥</text>
- {{ item.price }}
- </view>
- <view class="font-size-sm">
- <view class='detail'>
- <text class="icon">代理价</text>
- <text></text>
- </view>
- <view class="detail">
- <text class="font-color-yellow">会员价</text>
- <text class="font-color-yellow">7.5折</text>
- </view>
- </view>
- </view>
- <view class="tip">兑换价¥44+44积分</view>
- </view> -->
- </view>
- </view>
- </template>
- <script>
- import seckill from './seckill';
- import { loadIndexs } from '@/api/index.js';
- import { interceptor } from '@/utils/loginUtils';
- import { userinfo } from '@/api/user.js';
- import { mapState } from 'vuex';
- export default {
- components: {
- seckill
- },
- filters: {
- moneyNum: function(value) {
- return +value;
- }
- },
- data() {
- return {
- titleNViewBackground: '',
- swiperCurrent: 0,
- swiperLength: 0,
- carouselList: [], //轮播列表
- goodsList: [], //最新商品列表
- bastList: [], //精品推荐列表
- bastBanner: [], //促销商品列表
- menusList: [], //头部菜单
- userServant: [
- {
- image: ''
- }
- ] //用户推广服务
- };
- },
- computed: {
- ...mapState(['loginInterceptor']),
- ...mapState('user', ['hasLogin', 'userInfo'])
- },
- onLoad(option) {
- let agree = uni.getStorageSync("agree")||false;
- // 判断是否已经同意协议
- if(!agree){
- uni.redirectTo({url:"/pages/contract/start"})
- }
- if (option.spread) {
- // 存储邀请人
- uni.setStorage({
- key: 'spread',
- data: option.spread
- });
- }
- },
- onShow() {
- // 判断是否强制登录
- if (this.loginInterceptor && !this.hasLogin) {
- // 登录拦截
- userinfo()
- .then(e => {})
- .catch(e => {
- console.log(e);
- });
- }
- 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/notice/notice'
- });
- }
- },
- // #endif
- methods: {
- // 點擊搜索框
- clickSearch() {
- uni.navigateTo({
- url: '/pages/product/search'
- });
- },
- // 监听图片加载完成
- 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; //精品推荐
- this.bastBanner = goods.bastBanner; //促销单品
- this.userServant = goods.platoonList; //服务商品
- });
- },
- //轮播图切换修改背景色
- swiperChange(e) {
- const index = e.detail.current;
- this.swiperCurrent = index;
- // this.titleNViewBackground = this.carouselList[index].background;
- },
- //详情页
- navToDetailPage(item) {
- uni.navigateTo({
- url: '/pages/product/product?id=' + item.id
- });
- },
- // 轮播图跳转
- bannerNavToUrl(item) {
- // #ifdef H5
- if (item.wap_url.indexOf('http') > 0) {
- window.location.href = item.wap_url;
- }
- // #endif
- //测试数据没有写id,用title代替
- uni.navigateTo({
- url: item.wap_url
- });
- }
- }
- };
- </script>
- <style lang="scss">
- /* #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: $page-color-base;
- }
- .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: -50rpx;
- width: 850rpx;
- height: 220rpx;
- transition: 0.4s;
- border-bottom-left-radius: 100rpx;
- border-bottom-right-radius: 100rpx;
- }
- }
- .carousel {
- width: 100%;
- height: 240rpx;
- .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;
- .cate-item {
- display: flex;
- flex-direction: column;
- align-items: center;
- font-size: $font-sm + 2rpx;
- color: $font-color-dark;
- .none-font-color {
- color: $page-color-base;
- }
- .Uimg {
- border-radius: 999px;
- }
- }
- /* 原图标颜色太深,不想改图了,所以加了透明度 */
- image {
- width: 88rpx;
- height: 88rpx;
- margin-bottom: 14rpx;
- border-radius: 50%;
- opacity: 0.7;
- }
- }
- .ad-1 {
- width: 100%;
- height: 210upx;
- padding: 10upx 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;
- }
- /* 秒杀专区 */
- .seckill-section {
- padding: 4rpx 30rpx 24rpx;
- .s-header {
- display: flex;
- align-items: center;
- height: 92rpx;
- line-height: 1;
- .tit-box {
- @extend %font-title-box;
- }
- .tit {
- @extend %font-title;
- }
- .f-left-icon {
- @extend %f-left-icon;
- }
- .tip {
- font-size: $font-sm - 10rpx;
- color: $font-color-light;
- margin: 0 20rpx 0 40rpx;
- }
- .timer {
- display: inline-block;
- width: 40rpx;
- height: 36rpx;
- text-align: center;
- line-height: 36rpx;
- margin-right: 14rpx;
- font-size: $font-sm + 2rpx;
- color: #fff;
- border-radius: 2px;
- background: rgba(0, 0, 0, 0.8);
- }
- .iconenter {
- font-size: $font-sm;
- color: $font-color-light;
- flex: 1;
- text-align: right;
- }
- }
- .floor-list {
- white-space: nowrap;
- background-color: white;
- padding: 20rpx;
- border-radius: 5rpx;
- box-shadow: $box-shadow;
- }
- .scoll-wrapper {
- display: flex;
- align-items: flex-start;
- }
- .floor-item {
- width: 150rpx;
- margin-right: 20rpx;
- font-size: $font-sm + 2rpx;
- color: $font-color-dark;
- line-height: 1.8;
- image {
- width: 150rpx;
- height: 150rpx;
- border-radius: 6rpx;
- }
- .price {
- color: $color-red;
- }
- }
- }
- .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;
- }
- }
- /* 团购楼层 */
- .group-section {
- padding: 0rpx 30rpx 24rpx;
- .g-swiper {
- height: 650rpx;
- border-radius: 5rpx;
- box-shadow: $box-shadow;
- }
- .g-swiper-item {
- width: 100%;
- padding: 20rpx;
- padding-bottom: 30rpx;
- display: flex;
- background-color: white;
- }
- image {
- width: 100%;
- height: 460rpx;
- border-radius: 4px;
- }
- .g-item {
- display: flex;
- flex-direction: column;
- overflow: hidden;
- }
- .left {
- flex: 1.2;
- margin-right: 24rpx;
- .t-box {
- padding-top: 20rpx;
- }
- }
- .right {
- flex: 0.8;
- flex-direction: column-reverse;
- .t-box {
- padding-bottom: 20rpx;
- }
- }
- .t-box {
- height: 160rpx;
- font-size: $font-base + 2rpx;
- color: $font-color-dark;
- line-height: 1.6;
- }
- .price {
- color: $uni-color-primary;
- }
- .m-price {
- font-size: $font-sm + 2rpx;
- text-decoration: line-through;
- color: $font-color-light;
- margin-left: 8rpx;
- }
- .pro-box {
- display: flex;
- align-items: center;
- margin-top: 10rpx;
- font-size: $font-sm;
- color: $font-base;
- padding-right: 10rpx;
- }
- .progress-box {
- flex: 1;
- border-radius: $border-radius-sm;
- overflow: hidden;
- margin-right: 8rpx;
- }
- }
- // 会员升级礼包
- .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%;
- flex-grow: 1;
- .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;
- }
- }
- </style>
|