首页刷新修改 工作台小程序
This commit is contained in:
parent
b6e393cfa0
commit
b7be385655
@ -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" : {
|
||||||
|
@ -182,10 +182,10 @@
|
|||||||
<view class="content">
|
<view class="content">
|
||||||
<block v-if="nowMenuList.length > 0">
|
<block v-if="nowMenuList.length > 0">
|
||||||
<u-transition v-for="(item, index) in nowMenuList" :key="item.name" show>
|
<u-transition v-for="(item, index) in nowMenuList" :key="item.name" show>
|
||||||
<view class="examine" @click.stop="editFlag ? removeMenu(item) : clickMenu(item)" @longpress="editFlag = true">
|
<view class="examine" @click.stop="editFlag ? removeMenu(item) : clickMenu(item)"
|
||||||
|
@longpress="editFlag = true">
|
||||||
<image class="icon_img" :src="item.pic" mode="aspectFit">
|
<image class="icon_img" :src="item.pic" mode="aspectFit">
|
||||||
</image>
|
</image>
|
||||||
<!-- <u-icon v-if="editFlag" class="icon" name="minus-circle-fill" color="red"></u-icon> -->
|
|
||||||
<view v-if="editFlag" class="icon" style="background-color: red;">删除</view>
|
<view v-if="editFlag" class="icon" style="background-color: red;">删除</view>
|
||||||
<text class="text">{{ item.name }}</text>
|
<text class="text">{{ item.name }}</text>
|
||||||
</view>
|
</view>
|
||||||
@ -289,8 +289,6 @@
|
|||||||
computed: {
|
computed: {
|
||||||
...mapGetters(['userInfo', 'location', 'isLogin'])
|
...mapGetters(['userInfo', 'location', 'isLogin'])
|
||||||
},
|
},
|
||||||
created() {},
|
|
||||||
onLoad() {},
|
|
||||||
onShow() {
|
onShow() {
|
||||||
this.street = this.$store.state.storage.address.townName;
|
this.street = this.$store.state.storage.address.townName;
|
||||||
this.getNav();
|
this.getNav();
|
||||||
@ -304,6 +302,15 @@
|
|||||||
}
|
}
|
||||||
this.getUserInfo();
|
this.getUserInfo();
|
||||||
this.imgUrls = uni.getStorageSync('swiperImgList');
|
this.imgUrls = uni.getStorageSync('swiperImgList');
|
||||||
|
|
||||||
|
// 加载缓存中的菜单 2024/04/28
|
||||||
|
let menu = uni.getStorageSync('gatherMenuList');
|
||||||
|
if (menu) {
|
||||||
|
menu = JSON.parse(menu);
|
||||||
|
} else {
|
||||||
|
menu = [];
|
||||||
|
}
|
||||||
|
this.nowMenuList = menu;
|
||||||
},
|
},
|
||||||
onPullDownRefresh() {
|
onPullDownRefresh() {
|
||||||
this.getUserInfo()
|
this.getUserInfo()
|
||||||
@ -329,6 +336,13 @@
|
|||||||
onHide() {
|
onHide() {
|
||||||
uni.$emit('showLoading', false);
|
uni.$emit('showLoading', false);
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
nowMenuList(newVal, oldVal) {
|
||||||
|
if (newVal) {
|
||||||
|
uni.setStorageSync('gatherMenuList', JSON.stringify(newVal));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
changeSwiper(e) {
|
changeSwiper(e) {
|
||||||
if (e.length > 0 && e[1].value) {
|
if (e.length > 0 && e[1].value) {
|
||||||
|
@ -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>
|
||||||
|
@ -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,8 +1047,7 @@
|
|||||||
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;
|
||||||
@ -1056,8 +1056,7 @@
|
|||||||
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 => {
|
||||||
.catch(err => {
|
|
||||||
that.loading = false;
|
that.loading = false;
|
||||||
that.loadTitle = '加载更多';
|
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;
|
||||||
|
@ -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">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user