更新
This commit is contained in:
@@ -121,7 +121,6 @@ export default {
|
|||||||
this.$bus.$on("pullDownRefresh", () => {
|
this.$bus.$on("pullDownRefresh", () => {
|
||||||
this.paramter.currentPage = 1;
|
this.paramter.currentPage = 1;
|
||||||
this.isReachBottom = false;
|
this.isReachBottom = false;
|
||||||
|
|
||||||
this.obtainLocation();
|
this.obtainLocation();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@@ -168,8 +167,8 @@ export default {
|
|||||||
this.isReachBottom = true;
|
this.isReachBottom = true;
|
||||||
}
|
}
|
||||||
this.tableList = this.tableList.concat(res.data.list);
|
this.tableList = this.tableList.concat(res.data.list);
|
||||||
uni.stopPullDownRefresh();
|
|
||||||
}
|
}
|
||||||
|
uni.stopPullDownRefresh();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
sift(params) {
|
sift(params) {
|
||||||
|
|||||||
@@ -47,9 +47,7 @@ export default {
|
|||||||
this.$bus.$emit("pullDownRefresh");
|
this.$bus.$emit("pullDownRefresh");
|
||||||
}
|
}
|
||||||
if (this.currentTab === "user") {
|
if (this.currentTab === "user") {
|
||||||
setTimeout(() => {
|
this.$bus.$emit("userPullDownRefresh");
|
||||||
uni.stopPullDownRefresh();
|
|
||||||
}, 500);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onReachBottom() {
|
onReachBottom() {
|
||||||
|
|||||||
@@ -106,6 +106,15 @@ export default {
|
|||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
if (this.userInfo.id) {
|
if (this.userInfo.id) {
|
||||||
|
this.statisticOrderTotalData();
|
||||||
|
|
||||||
|
this.$bus.$on("userPullDownRefresh", () => {
|
||||||
|
this.statisticOrderTotalData();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
statisticOrderTotalData() {
|
||||||
serve
|
serve
|
||||||
.statisticOrderTotalData({
|
.statisticOrderTotalData({
|
||||||
customerId: this.userInfo.id,
|
customerId: this.userInfo.id,
|
||||||
@@ -114,10 +123,9 @@ export default {
|
|||||||
if (res.code === 20000) {
|
if (res.code === 20000) {
|
||||||
this.statisticInfo = res.data;
|
this.statisticInfo = res.data;
|
||||||
}
|
}
|
||||||
|
uni.stopPullDownRefresh();
|
||||||
});
|
});
|
||||||
}
|
},
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
jumpOrder(status = "") {
|
jumpOrder(status = "") {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/subPackages/order/list/index?status=${status}`,
|
url: `/subPackages/order/list/index?status=${status}`,
|
||||||
|
|||||||
@@ -16,7 +16,9 @@
|
|||||||
<scroll-view
|
<scroll-view
|
||||||
style="flex: 1; overflow: hidden"
|
style="flex: 1; overflow: hidden"
|
||||||
scroll-y="true"
|
scroll-y="true"
|
||||||
|
:refresher-triggered="refresherTriggered"
|
||||||
@scrolltolower="scrolltolower"
|
@scrolltolower="scrolltolower"
|
||||||
|
@refresherrefresh="refresherrefresh"
|
||||||
>
|
>
|
||||||
<view class="frame">
|
<view class="frame">
|
||||||
<template v-if="tableList.length">
|
<template v-if="tableList.length">
|
||||||
@@ -88,6 +90,7 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
isReachBottom: false,
|
isReachBottom: false,
|
||||||
|
refresherTriggered: false,
|
||||||
style: {},
|
style: {},
|
||||||
paramter: {
|
paramter: {
|
||||||
currentPage: 1,
|
currentPage: 1,
|
||||||
@@ -111,6 +114,11 @@ export default {
|
|||||||
this.getCInfoByPage();
|
this.getCInfoByPage();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
refresherrefresh() {
|
||||||
|
this.paramter.currentPage = 1;
|
||||||
|
this.isReachBottom = false;
|
||||||
|
this.getCInfoByPage();
|
||||||
|
},
|
||||||
jumpDetails(item) {
|
jumpDetails(item) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/subPackages/order/details/index?orderInfo=${JSON.stringify(
|
url: `/subPackages/order/details/index?orderInfo=${JSON.stringify(
|
||||||
@@ -145,6 +153,7 @@ export default {
|
|||||||
});
|
});
|
||||||
this.tableList = this.tableList.concat(list);
|
this.tableList = this.tableList.concat(list);
|
||||||
}
|
}
|
||||||
|
this.refresherTriggered = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
timeHandle(item) {
|
timeHandle(item) {
|
||||||
|
|||||||
@@ -154,7 +154,6 @@ export default {
|
|||||||
findBSiteInfoByPage() {
|
findBSiteInfoByPage() {
|
||||||
if (this.isReachBottom) return;
|
if (this.isReachBottom) return;
|
||||||
homeServe.findBSiteInfoByPage(this.paramter).then((res) => {
|
homeServe.findBSiteInfoByPage(this.paramter).then((res) => {
|
||||||
this.refresherTriggered = false;
|
|
||||||
if (res.code === 20000) {
|
if (res.code === 20000) {
|
||||||
if (this.paramter.currentPage == 1) {
|
if (this.paramter.currentPage == 1) {
|
||||||
this.tableList = [];
|
this.tableList = [];
|
||||||
@@ -168,6 +167,7 @@ export default {
|
|||||||
}
|
}
|
||||||
this.tableList = this.tableList.concat(res.data.list);
|
this.tableList = this.tableList.concat(res.data.list);
|
||||||
}
|
}
|
||||||
|
this.refresherTriggered = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user