|
|
@@ -13,9 +13,9 @@
|
|
|
<!-- 轮播图 start -->
|
|
|
<view class="swiper-wrap">
|
|
|
<swiper class="top-swiper" autoplay="true" duration="400" interval="5000" @change="swiperChange">
|
|
|
- <swiper-item v-for="(item, index) in carouselList" :key="index" class="carousel-item"
|
|
|
+ <swiper-item v-for="(item, index) in imgUrls" :key="index" class="carousel-item"
|
|
|
@click="bannerNavToUrl(item)">
|
|
|
- <image :src="item.img" />
|
|
|
+ <image :src="item.pic" />
|
|
|
</swiper-item>
|
|
|
</swiper>
|
|
|
</view>
|
|
|
@@ -43,16 +43,16 @@
|
|
|
</view>
|
|
|
<view class="cate-item flex" @click="navto('/pages/store/shopStreet/index')">
|
|
|
<view class="img-wrapper flex">
|
|
|
- <image src="../../static/icon/c4.png" mode=""></image>
|
|
|
+ <image src="../../static/icon/c5.png" mode=""></image>
|
|
|
</view>
|
|
|
<view class="item-title">商铺列表</view>
|
|
|
</view>
|
|
|
- <view class="cate-item flex" @click="nav('/pages/user/shareQrCode')">
|
|
|
+ <!-- <view class="cate-item flex" @click="nav('/pages/user/shareQrCode')">
|
|
|
<view class="img-wrapper flex">
|
|
|
<image src="../../static/icon/c5.png" mode=""></image>
|
|
|
</view>
|
|
|
<view class="item-title">邀请有礼</view>
|
|
|
- </view>
|
|
|
+ </view> -->
|
|
|
</view>
|
|
|
<!-- 分类 end-->
|
|
|
<!-- 专区 start -->
|
|
|
@@ -124,7 +124,7 @@
|
|
|
|
|
|
</view>
|
|
|
</view>
|
|
|
- <!-- <uni-load-more :status="loadingType"></uni-load-more> -->
|
|
|
+ <uni-load-more :status="where.loadingType"></uni-load-more>
|
|
|
|
|
|
</view>
|
|
|
<view class="page-btm" style="padding-top: 20rpx;">
|
|
|
@@ -374,6 +374,7 @@
|
|
|
sortProduct: [],
|
|
|
where: {
|
|
|
// pid: 0,
|
|
|
+ loadingType: 'more',
|
|
|
page: 1,
|
|
|
limit: 30
|
|
|
},
|
|
|
@@ -532,6 +533,9 @@
|
|
|
this.reconnect();
|
|
|
},
|
|
|
methods: {
|
|
|
+ gocx() {
|
|
|
+ window.location.href = 'https://www.miit.gov.cn/'
|
|
|
+ },
|
|
|
//观看广告领奖
|
|
|
openGg() {
|
|
|
getUserInfo().then(res => {
|
|
|
@@ -567,6 +571,14 @@
|
|
|
swiperChange() {},
|
|
|
bannerNavToUrl(item) {
|
|
|
console.log(item)
|
|
|
+ uni.navigateTo({
|
|
|
+ url: item.url,
|
|
|
+ fail() {
|
|
|
+ uni.switchTab({
|
|
|
+ url:item.url
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
changeBarg() {},
|
|
|
loadCoupon() {
|
|
|
@@ -849,17 +861,26 @@
|
|
|
//分类产品
|
|
|
get_product_list: function() {
|
|
|
let that = this;
|
|
|
- if (that.loading) return;
|
|
|
- that.loading = true;
|
|
|
- that.loadTitle = '';
|
|
|
+ // if (that.loading) return;
|
|
|
+ if(that.where.loadingType == 'noMore' || that.where.loadingType == 'loading') {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ // that.loading = true;
|
|
|
+ // that.loadTitle = '';
|
|
|
+ that.where.loadingType = 'loading'
|
|
|
getProductslist(that.where)
|
|
|
.then(res => {
|
|
|
let list = res.data.list;
|
|
|
let productList = that.$util.SplitArray(list, that.sortProduct);
|
|
|
let loadend = list.length < that.where.limit;
|
|
|
- that.loadend = loadend;
|
|
|
- that.loading = false;
|
|
|
- that.loadTitle = loadend ? '已全部加载' : '加载更多';
|
|
|
+ // that.loadend = loadend;
|
|
|
+ // that.loading = false;
|
|
|
+ if(loadend) {
|
|
|
+ that.where.loadingType = 'noMore'
|
|
|
+ }else {
|
|
|
+ that.where.loadingType = 'more'
|
|
|
+ }
|
|
|
+ // that.loadTitle = loadend ? '已全部加载' : '加载更多';
|
|
|
that.$set(that, 'sortProduct', productList);
|
|
|
console.log(that.sortProduct,'sortProduct+++++++++++++++++')
|
|
|
that.$set(that.where, 'page', that.where.page + 1);
|
|
|
@@ -1032,17 +1053,19 @@
|
|
|
},
|
|
|
// 滚动到底部
|
|
|
onReachBottom() {
|
|
|
- if (this.navIndex == 0) {
|
|
|
- // 首页加载更多
|
|
|
- this.get_host_product();
|
|
|
- } else {
|
|
|
- // 分类栏目加载更多
|
|
|
- if (this.sortProduct.length > 0) {
|
|
|
- this.get_product_list();
|
|
|
- } else {
|
|
|
- this.get_host_product();
|
|
|
- }
|
|
|
- }
|
|
|
+ console.log('daodile')
|
|
|
+ this.get_product_list();
|
|
|
+ // if (this.navIndex == 0) {
|
|
|
+ // // 首页加载更多
|
|
|
+ // this.get_host_product();
|
|
|
+ // } else {
|
|
|
+ // // 分类栏目加载更多
|
|
|
+ // if (this.sortProduct.length > 0) {
|
|
|
+ // this.get_product_list();
|
|
|
+ // } else {
|
|
|
+ // this.get_host_product();
|
|
|
+ // }
|
|
|
+ // }
|
|
|
},
|
|
|
// 滚动监听
|
|
|
onPageScroll(e) {
|