|
@@ -2,21 +2,22 @@
|
|
|
<view class="container">
|
|
<view class="container">
|
|
|
<!-- 小程序头部兼容 -->
|
|
<!-- 小程序头部兼容 -->
|
|
|
<!-- #ifdef MP -->
|
|
<!-- #ifdef MP -->
|
|
|
- <view class="input-box flex" @click="clickSearch">
|
|
|
|
|
|
|
+ <!-- <view class="input-box flex" @click="clickSearch">
|
|
|
<view class=" input-content flex">
|
|
<view class=" input-content flex">
|
|
|
<view class="iconfont iconsearch"></view>
|
|
<view class="iconfont iconsearch"></view>
|
|
|
<view class="input"><input type="text" disabled placeholder="请输入搜索内容" /></view>
|
|
<view class="input"><input type="text" disabled placeholder="请输入搜索内容" /></view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="mp-height"></view>
|
|
|
|
|
|
|
+ <view class="mp-height"></view> -->
|
|
|
<!-- #endif -->
|
|
<!-- #endif -->
|
|
|
<!-- 头部轮播 -->
|
|
<!-- 头部轮播 -->
|
|
|
<!-- <view class="headerInput" >
|
|
<!-- <view class="headerInput" >
|
|
|
<input type="text" placeholder="请输入搜索内容"/>
|
|
<input type="text" placeholder="请输入搜索内容"/>
|
|
|
</view> -->
|
|
</view> -->
|
|
|
<view class="carousel-section" style="background-color: #fff;">
|
|
<view class="carousel-section" style="background-color: #fff;">
|
|
|
- <view class="headerInput">
|
|
|
|
|
- <input type="text" value="" placeholder="请输入搜索内容" />
|
|
|
|
|
|
|
+ <view class="headerInput" @click="clickSearch">
|
|
|
|
|
+ <image src="../../static/img/is.png" mode=""></image>请输入搜索内容
|
|
|
|
|
+ <!-- <input type="text" value="" placeholder="请输入搜索内容" /> -->
|
|
|
</view>
|
|
</view>
|
|
|
<!-- 标题栏和状态栏占位符 -->
|
|
<!-- 标题栏和状态栏占位符 -->
|
|
|
<view class="titleNview-placing"></view>
|
|
<view class="titleNview-placing"></view>
|
|
@@ -36,57 +37,38 @@
|
|
|
</view>
|
|
</view>
|
|
|
<!-- 分类 -->
|
|
<!-- 分类 -->
|
|
|
<view class="cate-section">
|
|
<view class="cate-section">
|
|
|
- <view class="cate-item">
|
|
|
|
|
|
|
+ <view class="cate-item" @click="tabTo('/pages/category/category')">
|
|
|
<image src="/static/icon/in1.png"></image>
|
|
<image src="/static/icon/in1.png"></image>
|
|
|
<text>全部分类</text>
|
|
<text>全部分类</text>
|
|
|
</view>
|
|
</view>
|
|
|
- <navigator url="/pages/product/groupBooking/index">
|
|
|
|
|
|
|
+ <navigator url="/pages/product/classify?type=2">
|
|
|
<view class="cate-item">
|
|
<view class="cate-item">
|
|
|
<image src="/static/icon/in2.png"></image>
|
|
<image src="/static/icon/in2.png"></image>
|
|
|
<text>热销专区</text>
|
|
<text>热销专区</text>
|
|
|
</view>
|
|
</view>
|
|
|
</navigator>
|
|
</navigator>
|
|
|
- <navigator url="/pages/product/seckill">
|
|
|
|
|
|
|
+ <navigator url="/pages/money/USDT">
|
|
|
<view class="cate-item">
|
|
<view class="cate-item">
|
|
|
<image src="/static/icon/in3.png"></image>
|
|
<image src="/static/icon/in3.png"></image>
|
|
|
<text>充值送积分</text>
|
|
<text>充值送积分</text>
|
|
|
</view>
|
|
</view>
|
|
|
</navigator>
|
|
</navigator>
|
|
|
- <navigator url="/pages/index/sign">
|
|
|
|
|
- <view class="cate-item">
|
|
|
|
|
|
|
+ <!-- <navigator url="/pages/index/sign"> -->
|
|
|
|
|
+ <view class="cate-item" @click="Toshare">
|
|
|
<image src="/static/icon/in4.png"></image>
|
|
<image src="/static/icon/in4.png"></image>
|
|
|
<text>邀请有礼</text>
|
|
<text>邀请有礼</text>
|
|
|
</view>
|
|
</view>
|
|
|
- </navigator>
|
|
|
|
|
|
|
+ <!-- </navigator> -->
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
<!-- 精选好物 -->
|
|
<!-- 精选好物 -->
|
|
|
<view class="goods">
|
|
<view class="goods">
|
|
|
- <hot-goods></hot-goods>
|
|
|
|
|
- <!-- <view class="goods-top">
|
|
|
|
|
- <image src="../../static/icon/jxgoods.png" mode=""></image>
|
|
|
|
|
- <text>精选好物</text><text>买多赚多</text>
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="goods-list">
|
|
|
|
|
- <view class="goods-list-top">
|
|
|
|
|
- <view class="goods-list-title">
|
|
|
|
|
- <text>精选好货 平台推荐</text><br>
|
|
|
|
|
- <text>买到就是赚到</text>
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="goods-list-more">
|
|
|
|
|
- <image src="../../static/icon/more.png"></image>
|
|
|
|
|
- </view>
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="list">
|
|
|
|
|
- <view class="list-g">
|
|
|
|
|
- <scroll-view class="scroll-x" :scroll-x="true">
|
|
|
|
|
- <view>A</view>
|
|
|
|
|
- <view>B</view>
|
|
|
|
|
- <view>C</view>
|
|
|
|
|
- </scroll-view>
|
|
|
|
|
- </view>
|
|
|
|
|
- </view>
|
|
|
|
|
- </view> -->
|
|
|
|
|
|
|
+ <hot-goods :goodsList="goodsList"></hot-goods>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <!-- <br> -->
|
|
|
|
|
+ <!-- 为你推荐 -->
|
|
|
|
|
+ <view class="recommend-h">
|
|
|
|
|
+ <recommend :bastList="bastList"></recommend>
|
|
|
</view>
|
|
</view>
|
|
|
<!-- <view class="ad-1"><image src="/static/temp/ad1.jpg" mode="scaleToFill"></image></view> -->
|
|
<!-- <view class="ad-1"><image src="/static/temp/ad1.jpg" mode="scaleToFill"></image></view> -->
|
|
|
<!-- 可领取优惠券 -->
|
|
<!-- 可领取优惠券 -->
|
|
@@ -163,7 +145,7 @@
|
|
|
<!-- </view> -->
|
|
<!-- </view> -->
|
|
|
<!-- 拼团楼层 -->
|
|
<!-- 拼团楼层 -->
|
|
|
|
|
|
|
|
- <view class="recommend flex">
|
|
|
|
|
|
|
+ <!-- <view class="recommend flex">
|
|
|
<view class="recommend_list" @click="change(ls.id)" v-for="ls in recommend">
|
|
<view class="recommend_list" @click="change(ls.id)" v-for="ls in recommend">
|
|
|
<view class="re_title" v-bind:class="{ active_color: ls.id == checkid }">{{ ls.re_title }}</view>
|
|
<view class="re_title" v-bind:class="{ active_color: ls.id == checkid }">{{ ls.re_title }}</view>
|
|
|
<view class="re_name" v-bind:class="{ active_color: ls.id == checkid }">{{ ls.re_name }}</view>
|
|
<view class="re_name" v-bind:class="{ active_color: ls.id == checkid }">{{ ls.re_name }}</view>
|
|
@@ -171,9 +153,9 @@
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
<swiper id="list-box" @change="listChange" :style="{ height: swiperHeight + 'px' }" :current="checkid">
|
|
<swiper id="list-box" @change="listChange" :style="{ height: swiperHeight + 'px' }" :current="checkid">
|
|
|
- <swiper-item>
|
|
|
|
|
|
|
+ <swiper-item> -->
|
|
|
<!-- <scroll-view scroll-y="true" class="list-box-h"> -->
|
|
<!-- <scroll-view scroll-y="true" class="list-box-h"> -->
|
|
|
- <view class="guess-section">
|
|
|
|
|
|
|
+ <!-- <view class="guess-section">
|
|
|
<view v-for="(item, index) in bastList" :key="index" class="guess-item" @click="navToDetailPage(item)">
|
|
<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>
|
|
<view class="image-wrapper"><image :src="item.image" mode="scaleToFill"></image></view>
|
|
|
<text class="title clamp margin-c-20">{{ item.store_name }}</text>
|
|
<text class="title clamp margin-c-20">{{ item.store_name }}</text>
|
|
@@ -188,10 +170,10 @@
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
- </view>
|
|
|
|
|
|
|
+ </view> -->
|
|
|
<!-- </scroll-view> -->
|
|
<!-- </scroll-view> -->
|
|
|
- </swiper-item>
|
|
|
|
|
- <swiper-item>
|
|
|
|
|
|
|
+ <!-- </swiper-item> -->
|
|
|
|
|
+ <!-- <swiper-item>
|
|
|
<scroll-view scroll-y="true" class="list-box-h">
|
|
<scroll-view scroll-y="true" class="list-box-h">
|
|
|
<view class="guess-section">
|
|
<view class="guess-section">
|
|
|
<view v-for="(item, index) in goodsList" :key="index" class="guess-item" @click="navToDetailPage(item)">
|
|
<view v-for="(item, index) in goodsList" :key="index" class="guess-item" @click="navToDetailPage(item)">
|
|
@@ -234,9 +216,9 @@
|
|
|
</scroll-view>
|
|
</scroll-view>
|
|
|
</swiper-item>
|
|
</swiper-item>
|
|
|
</swiper>
|
|
</swiper>
|
|
|
-
|
|
|
|
|
|
|
+ -->
|
|
|
<!-- 精品 商品 -->
|
|
<!-- 精品 商品 -->
|
|
|
- <view class="f-header m-t">
|
|
|
|
|
|
|
+ <!-- <view class="f-header m-t">
|
|
|
<view class="f-left-icon"></view>
|
|
<view class="f-left-icon"></view>
|
|
|
<view class="tit-box"><text class="tit">精品推荐</text></view>
|
|
<view class="tit-box"><text class="tit">精品推荐</text></view>
|
|
|
<navigator url="/pages/product/classify?type=1"><text class="iconfont iconenter">更多</text></navigator>
|
|
<navigator url="/pages/product/classify?type=1"><text class="iconfont iconenter">更多</text></navigator>
|
|
@@ -256,9 +238,9 @@
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
- </view>
|
|
|
|
|
|
|
+ </view> -->
|
|
|
<!-- 最新 商品 -->
|
|
<!-- 最新 商品 -->
|
|
|
- <view class="f-header m-t">
|
|
|
|
|
|
|
+ <!-- <view class="f-header m-t">
|
|
|
<view class="f-left-icon"></view>
|
|
<view class="f-left-icon"></view>
|
|
|
<view class="tit-box"><text class="tit">最新商品</text></view>
|
|
<view class="tit-box"><text class="tit">最新商品</text></view>
|
|
|
<navigator url="/pages/product/classify?type=3"><text class="iconfont iconenter">更多</text></navigator>
|
|
<navigator url="/pages/product/classify?type=3"><text class="iconfont iconenter">更多</text></navigator>
|
|
@@ -278,9 +260,9 @@
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
- </view>
|
|
|
|
|
|
|
+ </view> -->
|
|
|
<!-- 促销 商品 -->
|
|
<!-- 促销 商品 -->
|
|
|
- <view class="f-header m-t">
|
|
|
|
|
|
|
+ <!-- <view class="f-header m-t">
|
|
|
<view class="f-left-icon"></view>
|
|
<view class="f-left-icon"></view>
|
|
|
<view class="tit-box"><text class="tit">促销商品</text></view>
|
|
<view class="tit-box"><text class="tit">促销商品</text></view>
|
|
|
<navigator url="/pages/product/classify?type=4"><text class="iconfont iconenter">更多</text></navigator>
|
|
<navigator url="/pages/product/classify?type=4"><text class="iconfont iconenter">更多</text></navigator>
|
|
@@ -300,7 +282,7 @@
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
- </view>
|
|
|
|
|
|
|
+ </view> -->
|
|
|
<!-- 会员升级专区 -->
|
|
<!-- 会员升级专区 -->
|
|
|
<!-- <view class="f-header m-t">
|
|
<!-- <view class="f-header m-t">
|
|
|
<view class="f-left-icon"></view>
|
|
<view class="f-left-icon"></view>
|
|
@@ -366,6 +348,7 @@
|
|
|
<script>
|
|
<script>
|
|
|
import seckill from '../../components/seckill/seckill.vue';
|
|
import seckill from '../../components/seckill/seckill.vue';
|
|
|
import hotGoods from './child/hotGoods.vue';
|
|
import hotGoods from './child/hotGoods.vue';
|
|
|
|
|
+import recommend from './child/recommend.vue'
|
|
|
import { loadIndexs } from '@/api/index.js';
|
|
import { loadIndexs } from '@/api/index.js';
|
|
|
import { getUserInfo } from '@/api/user.js';
|
|
import { getUserInfo } from '@/api/user.js';
|
|
|
import { setCoupons } from '@/api/functionalUnit.js';
|
|
import { setCoupons } from '@/api/functionalUnit.js';
|
|
@@ -376,7 +359,8 @@ import { mapState } from 'vuex';
|
|
|
export default {
|
|
export default {
|
|
|
components: {
|
|
components: {
|
|
|
seckill,
|
|
seckill,
|
|
|
- hotGoods
|
|
|
|
|
|
|
+ hotGoods,
|
|
|
|
|
+ recommend
|
|
|
},
|
|
},
|
|
|
watch: {
|
|
watch: {
|
|
|
//自适应swiper高度
|
|
//自适应swiper高度
|
|
@@ -519,6 +503,12 @@ export default {
|
|
|
},
|
|
},
|
|
|
// #endif
|
|
// #endif
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ //跳转
|
|
|
|
|
+ tabTo(url) {
|
|
|
|
|
+ uni.switchTab({
|
|
|
|
|
+ url: url
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
//砍价商品推荐详情页
|
|
//砍价商品推荐详情页
|
|
|
navToDetailPages(item) {
|
|
navToDetailPages(item) {
|
|
|
let id = item.product_id;
|
|
let id = item.product_id;
|
|
@@ -652,6 +642,7 @@ export default {
|
|
|
this.swiperLength = this.carouselList.length;
|
|
this.swiperLength = this.carouselList.length;
|
|
|
this.menusList = data.menus;
|
|
this.menusList = data.menus;
|
|
|
this.goodsList = goods.firstList; //最新商品
|
|
this.goodsList = goods.firstList; //最新商品
|
|
|
|
|
+ console.log(goods.firstList)
|
|
|
this.bastList = goods.bastList; //精品推荐
|
|
this.bastList = goods.bastList; //精品推荐
|
|
|
this.bastBanner = data.benefit; //促销单品
|
|
this.bastBanner = data.benefit; //促销单品
|
|
|
this.$set(this, 'couponArray', data.couponList); //保存卡包券
|
|
this.$set(this, 'couponArray', data.couponList); //保存卡包券
|
|
@@ -696,20 +687,35 @@ export default {
|
|
|
//搜索栏
|
|
//搜索栏
|
|
|
.headerInput {
|
|
.headerInput {
|
|
|
z-index: 9;
|
|
z-index: 9;
|
|
|
- background-color: rgba(255,255,255,0.8);
|
|
|
|
|
|
|
+ background-color: rgba(255,255,255,0.5);
|
|
|
border-radius: 25rpx;
|
|
border-radius: 25rpx;
|
|
|
- padding: 5rpx 28rpx;
|
|
|
|
|
|
|
+ padding: 8rpx 28rpx;
|
|
|
width: 90%;
|
|
width: 90%;
|
|
|
position: relative;
|
|
position: relative;
|
|
|
top: 30px;
|
|
top: 30px;
|
|
|
left: 5%;
|
|
left: 5%;
|
|
|
text-align: center;
|
|
text-align: center;
|
|
|
|
|
+ color: #fff;
|
|
|
|
|
+ image {
|
|
|
|
|
+ width: 34rpx;
|
|
|
|
|
+ height: 34rpx;
|
|
|
|
|
+ margin-bottom: -5rpx;
|
|
|
|
|
+ margin-right: 10rpx;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
//精选好物
|
|
//精选好物
|
|
|
.goods {
|
|
.goods {
|
|
|
margin-top: 20rpx;
|
|
margin-top: 20rpx;
|
|
|
background-color: #fff;
|
|
background-color: #fff;
|
|
|
padding: 40rpx 5%;
|
|
padding: 40rpx 5%;
|
|
|
|
|
+ margin-bottom: 20rpx;
|
|
|
|
|
+ }
|
|
|
|
|
+ //为你推荐
|
|
|
|
|
+ .recommend-h {
|
|
|
|
|
+ margin: 0rpx auto;
|
|
|
|
|
+ background-color: #fff;
|
|
|
|
|
+ padding-top: 30rpx;
|
|
|
|
|
+ font-size: 26rpx;
|
|
|
}
|
|
}
|
|
|
.Mask {
|
|
.Mask {
|
|
|
width: 100%;
|
|
width: 100%;
|
|
@@ -943,7 +949,7 @@ page {
|
|
|
.carousel-item {
|
|
.carousel-item {
|
|
|
width: 100%;
|
|
width: 100%;
|
|
|
height: 100%;
|
|
height: 100%;
|
|
|
- padding: 0 28rpx;
|
|
|
|
|
|
|
+ padding: 0 5%;
|
|
|
overflow: hidden;
|
|
overflow: hidden;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -1156,12 +1162,10 @@ page {
|
|
|
// 推荐
|
|
// 推荐
|
|
|
.recommend {
|
|
.recommend {
|
|
|
width: 95%;
|
|
width: 95%;
|
|
|
- height: 155rpx;
|
|
|
|
|
margin: 0rpx auto;
|
|
margin: 0rpx auto;
|
|
|
padding-top: 30rpx;
|
|
padding-top: 30rpx;
|
|
|
font-size: 26rpx;
|
|
font-size: 26rpx;
|
|
|
text-align: center;
|
|
text-align: center;
|
|
|
- color: #333333;
|
|
|
|
|
align-items: flex-start;
|
|
align-items: flex-start;
|
|
|
|
|
|
|
|
.recommend_list {
|
|
.recommend_list {
|