|
@@ -7,17 +7,12 @@
|
|
|
<view class="iconfont iconsearch"></view>
|
|
|
<view class="input"><input type="text" disabled placeholder="请输入搜索内容" /></view>
|
|
|
</view>
|
|
|
- </view>
|
|
|
- <view class="mp-height"></view> -->
|
|
|
+ </view> -->
|
|
|
<!-- #endif -->
|
|
|
<!-- 头部轮播 -->
|
|
|
- <!-- <view class="headerInput" >
|
|
|
- <input type="text" placeholder="请输入搜索内容"/>
|
|
|
- </view> -->
|
|
|
<view class="carousel-section" style="background-color: #fff;">
|
|
|
<view class="headerInput" @click="clickSearch">
|
|
|
<image src="../../static/img/is.png" mode=""></image>请输入搜索内容
|
|
|
- <!-- <input type="text" value="" placeholder="请输入搜索内容" /> -->
|
|
|
</view>
|
|
|
<!-- 标题栏和状态栏占位符 -->
|
|
|
<view class="titleNview-placing"></view>
|
|
@@ -28,12 +23,6 @@
|
|
|
<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">
|
|
@@ -53,290 +42,19 @@
|
|
|
<text>充值送积分</text>
|
|
|
</view>
|
|
|
</navigator>
|
|
|
- <!-- <navigator url="/pages/index/sign"> -->
|
|
|
<view class="cate-item" @click="Toshare">
|
|
|
<image src="/static/icon/in4.png"></image>
|
|
|
<text>邀请有礼</text>
|
|
|
</view>
|
|
|
- <!-- </navigator> -->
|
|
|
</view>
|
|
|
-
|
|
|
<!-- 精选好物 -->
|
|
|
<view class="goods">
|
|
|
<hot-goods :goodsList="goodsList"></hot-goods>
|
|
|
</view>
|
|
|
- <!-- <br> -->
|
|
|
<!-- 为你推荐 -->
|
|
|
<view class="recommend-h">
|
|
|
<recommend :bastList="bastList"></recommend>
|
|
|
</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="recommend flex">
|
|
|
- <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_name" v-bind:class="{ active_color: ls.id == checkid }">{{ ls.re_name }}</view>
|
|
|
- <image class="selected_icon" v-bind:class="{ active: ls.id == checkid }" src="/static/img/img04.png"></image>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- <swiper id="list-box" @change="listChange" :style="{ height: swiperHeight + 'px' }" :current="checkid">
|
|
|
- <swiper-item> -->
|
|
|
- <!-- <scroll-view scroll-y="true" class="list-box-h"> -->
|
|
|
- <!-- <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> -->
|
|
|
- <!-- </scroll-view> -->
|
|
|
- <!-- </swiper-item> -->
|
|
|
- <!-- <swiper-item>
|
|
|
- <scroll-view scroll-y="true" class="list-box-h">
|
|
|
- <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>
|
|
|
- </scroll-view>
|
|
|
- </swiper-item>
|
|
|
- <swiper-item>
|
|
|
- <scroll-view scroll-y="true">
|
|
|
- <view class="guess-section">
|
|
|
- <view v-for="(item, index) in bastBanner" :key="index" class="guess-item" @click="navToDetailPage(item)">
|
|
|
- <navigator :url="item.link">
|
|
|
- <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.stock + item.unit_name }}</text>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </navigator>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </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>
|
|
@@ -349,7 +67,7 @@
|
|
|
import seckill from '../../components/seckill/seckill.vue';
|
|
|
import hotGoods from './child/hotGoods.vue';
|
|
|
import recommend from './child/recommend.vue'
|
|
|
-import { loadIndexs } from '@/api/index.js';
|
|
|
+import { loadIndexs,getHot } from '@/api/index.js';
|
|
|
import { getUserInfo } from '@/api/user.js';
|
|
|
import { setCoupons } from '@/api/functionalUnit.js';
|
|
|
import { getBargainList } from '@/api/product.js';
|
|
@@ -470,7 +188,7 @@ export default {
|
|
|
interceptor();
|
|
|
}
|
|
|
this.loadData();
|
|
|
- this.getBargainList();
|
|
|
+ // this.getBargainList();
|
|
|
},
|
|
|
//下拉刷新
|
|
|
onPullDownRefresh() {
|
|
@@ -478,29 +196,29 @@ export default {
|
|
|
},
|
|
|
// #ifndef MP
|
|
|
// 监听导航栏输入框点击事件
|
|
|
- onNavigationBarSearchInputClicked(e) {
|
|
|
- //跳转到搜索页面
|
|
|
- this.clickSearch();
|
|
|
- },
|
|
|
+ // 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'
|
|
|
- });
|
|
|
- }
|
|
|
- },
|
|
|
+ // 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: {
|
|
|
//跳转
|
|
@@ -541,20 +259,20 @@ export default {
|
|
|
});
|
|
|
// #endif
|
|
|
},
|
|
|
- getBargainList() {
|
|
|
- let that = this;
|
|
|
+ // 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({
|
|
|
+ // 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;
|
|
@@ -616,19 +334,19 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
//商品种类切换
|
|
|
- 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;
|
|
|
- }
|
|
|
- },
|
|
|
+ // 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';
|
|
@@ -638,13 +356,11 @@ export default {
|
|
|
loadIndexs({})
|
|
|
.then(({ data }) => {
|
|
|
let goods = data.info;
|
|
|
+ console.log(goods)
|
|
|
this.carouselList = data.banner;
|
|
|
this.swiperLength = this.carouselList.length;
|
|
|
- this.menusList = data.menus;
|
|
|
this.goodsList = goods.firstList; //最新商品
|
|
|
- console.log(goods.firstList)
|
|
|
- this.bastList = goods.bastList; //精品推荐
|
|
|
- this.bastBanner = data.benefit; //促销单品
|
|
|
+ // this.bastList = goods.bastList; //精品推荐
|
|
|
this.$set(this, 'couponArray', data.couponList); //保存卡包券
|
|
|
|
|
|
uni.stopPullDownRefresh();
|