|
@@ -49,19 +49,19 @@
|
|
|
<view class="groupBooking-wrapper">
|
|
|
<template v-for="(item,index) in czgoodList">
|
|
|
<view class="spgood" :key="item.id" @click="goProduct(item)">
|
|
|
- <view class="left-wrapper"><image :src="item.image" mode="scaleToFill"></image></view>
|
|
|
+ <view class="left-wrapper"><image :src="item.product.image" mode="scaleToFill"></image></view>
|
|
|
<view class="right-wrapper">
|
|
|
- <view class="right-title clamp">{{ item.title }}</view>
|
|
|
+ <view class="right-title clamp">{{ item.product.store_name }}</view>
|
|
|
<view class="ex-addr">
|
|
|
<image src="../../static/img/shop.png" mode="" class="name-img"></image>
|
|
|
- 子臣台州旗舰店
|
|
|
+ {{item.merchant.mer_name}}
|
|
|
<image src="../../static/img/point.png" mode="" class="point-img"></image>
|
|
|
200m
|
|
|
</view>
|
|
|
<view class="right-bottom">
|
|
|
<view class="sp-price">
|
|
|
<view class="now-price">¥ {{ item.price }}</view>
|
|
|
- <view class="old-price">¥ {{ item.product_price }}</view>
|
|
|
+ <view class="old-price">¥ {{ item.product.price }}</view>
|
|
|
</view>
|
|
|
<view class="sp-btn">马上拼</view>
|
|
|
</view>
|
|
@@ -111,107 +111,7 @@
|
|
|
<view class="bg"></view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <!-- 分类 -->
|
|
|
- <view class="cate-section">
|
|
|
- <view class="cate-item">
|
|
|
- <image src="/static/icon/c3.png"></image>
|
|
|
- <text>联盟礼包</text>
|
|
|
- </view>
|
|
|
- <navigator url="/pages/product/groupBooking/index">
|
|
|
- <view class="cate-item">
|
|
|
- <image src="/static/icon/c5.png"></image>
|
|
|
- <text>超值拼团</text>
|
|
|
- </view>
|
|
|
- </navigator>
|
|
|
- <navigator url="/pages/product/seckill">
|
|
|
- <view class="cate-item">
|
|
|
- <image src="/static/icon/c7.png"></image>
|
|
|
- <text>限时秒杀</text>
|
|
|
- </view>
|
|
|
- </navigator>
|
|
|
- <navigator url="/pages/index/sign">
|
|
|
- <view class="cate-item">
|
|
|
- <image src="/static/icon/c8.png"></image>
|
|
|
- <text>每日签到</text>
|
|
|
- </view>
|
|
|
- </navigator>
|
|
|
- </view>
|
|
|
-
|
|
|
- <view class="ad-1"><image src="/static/temp/ad1.jpg" mode="scaleToFill"></image></view>
|
|
|
- <!-- 可领取优惠券 -->
|
|
|
- <!-- <scroll-view class="coupon-box clamp" :scroll-x="true">
|
|
|
- <view v-for="(item, index) in couponArray" :key="item.id" class="coupon-list">
|
|
|
- <view class="row flex">
|
|
|
- <view class="list-money flex">
|
|
|
- <image :src="item.is_use ? '/static/img/img02.png' : '/static/img/img03.png'" mode="scaleToFill"></image>
|
|
|
- <view class="list-money-text">
|
|
|
- <view class="tit" :class="{ noAction: item.is_use }">
|
|
|
- <text>{{ item.coupon_price }}</text>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- <view class="list-interval position-relative">
|
|
|
- <view class="bottom"></view>
|
|
|
- <view class="top"></view>
|
|
|
- </view>
|
|
|
- <view class="row_list_right">
|
|
|
- <view class="right_top"><text class="right_title" :class="{ noAction: item.is_use }">满减券</text></view>
|
|
|
- <view class="right_time">
|
|
|
- <text>满{{ item.use_min_price }}使用</text>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- <view class="right_use" :class="{ noAction: item.is_use }" @click="setCoupons(item)">
|
|
|
- <text>{{ item.is_use ? '已领取' : '立即领取' }}</text>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </scroll-view> -->
|
|
|
-
|
|
|
- <!-- 秒杀楼层 -->
|
|
|
- <!-- <seckill></seckill> -->
|
|
|
- <!-- 砍价 -->
|
|
|
- <view class="hot-goods">
|
|
|
- <view class="hot-headers flex-upDown-center">
|
|
|
- <!-- <image class="img" src="../../static/img/img44.png"></image> -->
|
|
|
- <view class="hot-title">超值砍价</view>
|
|
|
- <view><view class="more" @click.stop="navTo('/pages/activity/goods_bargain/index')">更多</view></view>
|
|
|
- </view>
|
|
|
- <view class="hot-lists" v-for="(baritem, barindex) in bargainlist" :key="barindex" @click.stop="navToDetailPages(baritem)">
|
|
|
- <view class="hot-produce">
|
|
|
- <view class="produce-image"><image :src="baritem.image"></image></view>
|
|
|
- <view class="produce-content">
|
|
|
- <view class="produce-price1 ">
|
|
|
- <view class="produce-name line2">{{ baritem.title }}</view>
|
|
|
- <!-- <view class="produce-info">
|
|
|
- 已抢
|
|
|
- <text style="color: #FF383E">{{ baritem.sales }}</text>
|
|
|
- 箱/仅剩
|
|
|
- <text style="color:#FF383E">{{ baritem.stock }}</text>
|
|
|
- 箱
|
|
|
- </view> -->
|
|
|
- <view class="produce-center">
|
|
|
- <view class="kanjia_word">
|
|
|
- <view class="word-1">原价:¥{{ baritem.price }}</view>
|
|
|
- <view class="word-2">
|
|
|
- 砍后价
|
|
|
- <text style="font-size: 24rpx;">¥</text>
|
|
|
- <text style="font-size: 36rpx;">{{ baritem.min_price }}</text>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- <view
|
|
|
- class="kanjia_button flex-center"
|
|
|
- @tap.stop="openSubscribe('/pages/activity/goods_bargain_details/index?id=' + baritem.id + '&bargain=' + userInfo.uid)"
|
|
|
- >
|
|
|
- <view>查看详情</view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- <!-- 拼团楼层 -->
|
|
|
-
|
|
|
+ <!-- <view class="ad-1"><image src="/static/temp/ad1.jpg" mode="scaleToFill"></image></view> -->
|
|
|
<view class="recommend flex">
|
|
|
<view class="recommend_list" @click="change(ls.id)" v-for="ls in recommend" :key="ls.re_title">
|
|
|
<view class="re_title" v-bind:class="{ active_color: ls.id == checkid }">{{ ls.re_title }}</view>
|
|
@@ -283,127 +183,6 @@
|
|
|
</scroll-view>
|
|
|
</swiper-item>
|
|
|
</swiper>
|
|
|
-
|
|
|
- <!-- 精品 商品 -->
|
|
|
- <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="scaleToFill"></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=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="scaleToFill"></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=4"><text class="iconfont iconenter">更多</text></navigator>
|
|
|
- </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="scaleToFill"></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="uservip flex">
|
|
|
- <image @error="onImageError('userServant', 0)" lazy-load :src="userServant[0].image" mode="aspectFill"></image>
|
|
|
- <view class="detail">
|
|
|
- <view class="title">满园春1999元会员升级礼包</view>
|
|
|
- <view class="icon">自营</view>
|
|
|
- <view class="flex price-box">
|
|
|
- <view class="price">
|
|
|
- <text class="font-size-sm">¥</text>
|
|
|
- 18888
|
|
|
- </view>
|
|
|
- <view class="text">115人购买</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 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 class="Mask" v-show="shareShow">
|
|
|
<image @click="share" src="http://shicai.liuniu946.com/static/img/shareimg4.png"></image>
|
|
|
<view class="Toshare" @click="Toshare"></view>
|
|
@@ -414,10 +193,10 @@
|
|
|
|
|
|
<script>
|
|
|
import seckill from '../../components/seckill/seckill.vue';
|
|
|
-import { loadIndexs } from '@/api/index.js';
|
|
|
+import { loadIndexs,getIndexData } from '@/api/index.js';
|
|
|
import { getUserInfo } from '@/api/user.js';
|
|
|
import { setCoupons } from '@/api/functionalUnit.js';
|
|
|
-import { getBargainList } from '@/api/product.js';
|
|
|
+// import { getBargainList } from '@/api/product.js';
|
|
|
import { interceptor } from '@/utils/loginUtils';
|
|
|
import { mapState } from 'vuex';
|
|
|
import { getCombinationList } from '@/api/product.js';
|
|
@@ -541,7 +320,7 @@ export default {
|
|
|
interceptor();
|
|
|
}
|
|
|
this.loadData();
|
|
|
- this.getBargainList();
|
|
|
+ // this.getBargainList();
|
|
|
this.getCzgoods();
|
|
|
},
|
|
|
//下拉刷新
|
|
@@ -607,20 +386,20 @@ export default {
|
|
|
});
|
|
|
// #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');
|
|
|
- });
|
|
|
- },
|
|
|
+ // 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;
|
|
@@ -703,24 +482,30 @@ export default {
|
|
|
},
|
|
|
// 请求载入数据
|
|
|
async loadData() {
|
|
|
- loadIndexs({})
|
|
|
- .then(({ data }) => {
|
|
|
- console.log('index-data++++++++++++++++++', data);
|
|
|
- let goods = data.info;
|
|
|
- this.carouselList = data.banner;
|
|
|
- console.log(this.carouselList, 'lunbotu');
|
|
|
- this.swiperLength = this.carouselList.length;
|
|
|
- this.menusList = data.menus;
|
|
|
- this.goodsList = goods.firstList; //最新商品
|
|
|
- this.bastList = goods.bastList; //精品推荐
|
|
|
- this.bastBanner = data.benefit; //促销单品
|
|
|
- this.$set(this, 'couponArray', data.couponList); //保存卡包券
|
|
|
-
|
|
|
- uni.stopPullDownRefresh();
|
|
|
- })
|
|
|
- .catch(e => {
|
|
|
- uni.stopPullDownRefresh();
|
|
|
- });
|
|
|
+ // loadIndexs({})
|
|
|
+ // .then(({ data }) => {
|
|
|
+ // console.log('index-data++++++++++++++++++', data);
|
|
|
+ // let goods = data.info;
|
|
|
+ // this.carouselList = data.banner;
|
|
|
+ // console.log(this.carouselList, 'lunbotu');
|
|
|
+ // this.swiperLength = this.carouselList.length;
|
|
|
+ // this.menusList = data.menus;
|
|
|
+ // this.goodsList = goods.firstList; //最新商品
|
|
|
+ // this.bastList = goods.bastList; //精品推荐
|
|
|
+ // this.bastBanner = data.benefit; //促销单品
|
|
|
+ // this.$set(this, 'couponArray', data.couponList); //保存卡包券
|
|
|
+
|
|
|
+ // uni.stopPullDownRefresh();
|
|
|
+ // })
|
|
|
+ // .catch(e => {
|
|
|
+ // uni.stopPullDownRefresh();
|
|
|
+ // });
|
|
|
+ getIndexData().then(({data}) => {
|
|
|
+ console.log(data,'++++++++getIndexData')
|
|
|
+ this.carouselList = data.banner
|
|
|
+ this.swiperLength = this.carouselList.length;
|
|
|
+ this.menusList = data.menu;
|
|
|
+ })
|
|
|
},
|
|
|
//轮播图切换修改背景色
|
|
|
swiperChange(e) {
|
|
@@ -760,13 +545,13 @@ export default {
|
|
|
limit: 3
|
|
|
}).then(res => {
|
|
|
console.log(res, 'chaozhi++++++++++');
|
|
|
- this.czgoodList = res.data;
|
|
|
+ this.czgoodList = res.data.list;
|
|
|
});
|
|
|
},
|
|
|
goProduct(e) {
|
|
|
console.log(e)
|
|
|
uni.navigateTo({
|
|
|
- url: '/pages/product/groupBooking/productGroup?id=' + e.id
|
|
|
+ url: '/pages/product/groupBooking/productGroup?id=' + e.product_group_id
|
|
|
});
|
|
|
}
|
|
|
}
|