首页刷新修改 工作台小程序

This commit is contained in:
1154079537 2024-04-28 17:41:28 +08:00
parent b6e393cfa0
commit b7be385655
5 changed files with 753 additions and 746 deletions

View File

@ -2,8 +2,8 @@
"name" : "惠农生活", "name" : "惠农生活",
"appid" : "__UNI__3A527D1", "appid" : "__UNI__3A527D1",
"description" : "", "description" : "",
"versionName" : "2.0.38", "versionName" : "2.0.39",
"versionCode" : 2038, "versionCode" : 2039,
"transformPx" : false, "transformPx" : false,
/* 5+App */ /* 5+App */
"app-plus" : { "app-plus" : {

File diff suppressed because it is too large Load Diff

View File

@ -29,11 +29,6 @@
</swiper-item> </swiper-item>
</block> </block>
</swiper> </swiper>
<!-- <view class="dots" :class="'dot'+txtStyle">
<block v-for="(item,index) in imgUrls" :key="index">
<view class="dot" :class="[docConfig == 1 ? 'square' : docConfig == 0 ? 'circular' : 'nodoc',index == swiperCur ? ' active' : '']"></view>
</block>
</view> -->
</view> </view>
</block> </block>
</view> </view>

View File

@ -654,8 +654,9 @@
}, },
}, },
onPullDownRefresh() { onPullDownRefresh() {
this.overflow = true; // this.overflow = true;
this.reconnect(); // this.reconnect();
// that.overflow = true;
// #ifdef APP-PLUS // #ifdef APP-PLUS
setTimeout(() => { setTimeout(() => {
this.hotPage = 1; this.hotPage = 1;
@ -1046,21 +1047,19 @@
if (that.loading || that.loadend) return; if (that.loading || that.loadend) return;
that.loading = true; that.loading = true;
that.loadTitle = ''; that.loadTitle = '';
getProductslist(that.where) getProductslist(that.where).then(res => {
.then(res => { let list = res.data.list;
let list = res.data.list; let productList = that.$util.SplitArray(list, that.sortProduct);
let productList = that.$util.SplitArray(list, that.sortProduct); let loadend = list.length < that.where.limit;
let loadend = list.length < that.where.limit; that.loadend = loadend;
that.loadend = loadend; that.loading = false;
that.loading = false; that.loadTitle = loadend ? '已全部加载' : '加载更多';
that.loadTitle = loadend ? '已全部加载' : '加载更多'; that.$set(that, 'sortProduct', productList);
that.$set(that, 'sortProduct', productList); that.$set(that.where, 'page', that.where.page + 1);
that.$set(that.where, 'page', that.where.page + 1); }).catch(err => {
}) that.loading = false;
.catch(err => { that.loadTitle = '加载更多';
that.loading = false; });
that.loadTitle = '加载更多';
});
}, },
/** /**
* 点击组件选项卡 * 点击组件选项卡
@ -1098,7 +1097,7 @@
that.hotLoading[e] = true; that.hotLoading[e] = true;
that.hotTitle = '加载中'; that.hotTitle = '加载中';
getProductHot(that.hotPage, that.hotLimit, 1, 1).then(res => { getProductHot(that.hotPage, that.hotLimit, 1, 1).then(res => {
console.log(res) uni.stopPullDownRefresh();
res.data.list = this.shuffleArray(res.data.list); res.data.list = this.shuffleArray(res.data.list);
let list = res.data.list; let list = res.data.list;
let productList = that.hostProduct; let productList = that.hostProduct;
@ -1133,6 +1132,7 @@
getProductslist({ getProductslist({
...query ...query
}).then(res => { }).then(res => {
uni.stopPullDownRefresh();
res.data.list = this.shuffleArray(res.data.list); res.data.list = this.shuffleArray(res.data.list);
let list = res.data.list; let list = res.data.list;
let productList = that.hostProduct; let productList = that.hostProduct;

View File

@ -286,7 +286,6 @@
</style> </style>
<template> <template>
<view class="wholeSale"> <view class="wholeSale">
<!-- 顶部 --> <!-- 顶部 -->
<view class="wholeSale-header" style="position: fixed;top: 0;left: 0;width: 100%;z-index: 999;"> <view class="wholeSale-header" style="position: fixed;top: 0;left: 0;width: 100%;z-index: 999;">
<!-- 适配不同机 --> <!-- 适配不同机 -->
@ -474,7 +473,6 @@
</view> </view>
</view> </view>
<loadmore :type="isLoading" v-if="isLoading || hostProduct.length > 0" style="padding: 40rpx 0 150rpx; 0"> <loadmore :type="isLoading" v-if="isLoading || hostProduct.length > 0" style="padding: 40rpx 0 150rpx; 0">
</loadmore> </loadmore>
<view class='pictrue' v-if="!isLoading && hostProduct.length == 0"> <view class='pictrue' v-if="!isLoading && hostProduct.length == 0">