|
@@ -69,7 +69,7 @@ export default {
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
shareList: [],
|
|
shareList: [],
|
|
- status: 0,
|
|
|
|
|
|
+ status: null,
|
|
};
|
|
};
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
@@ -77,12 +77,23 @@ export default {
|
|
this.$http
|
|
this.$http
|
|
.post("wap/share/queryDevShare", {
|
|
.post("wap/share/queryDevShare", {
|
|
userId: uni.getStorageSync("userId"),
|
|
userId: uni.getStorageSync("userId"),
|
|
- state: this.status,
|
|
|
|
|
|
+ state: null,
|
|
})
|
|
})
|
|
.then((res) => {
|
|
.then((res) => {
|
|
- this.shareList = res.data.data;
|
|
|
|
- if (this.shareList && this.status != null) {
|
|
|
|
- this.status = null;
|
|
|
|
|
|
+ if (res.data.data) {
|
|
|
|
+ this.shareList = res.data.data;
|
|
|
|
+ if (this.shareList && this.status != null) {
|
|
|
|
+ const hasStatusZero = this.shareList.some(
|
|
|
|
+ (item) => item.state === 0
|
|
|
|
+ );
|
|
|
|
+ console.log(hasStatusZero);
|
|
|
|
+ if (!hasStatusZero) {
|
|
|
|
+ this.state = null;
|
|
|
|
+ this.getShareList();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ this.state = null;
|
|
this.getShareList();
|
|
this.getShareList();
|
|
}
|
|
}
|
|
});
|
|
});
|
|
@@ -146,19 +157,16 @@ export default {
|
|
});
|
|
});
|
|
},
|
|
},
|
|
},
|
|
},
|
|
|
|
+ onShow() {
|
|
|
|
+ this.getShareList();
|
|
|
|
+ },
|
|
|
|
+
|
|
onPullDownRefresh() {
|
|
onPullDownRefresh() {
|
|
this.getShareList();
|
|
this.getShareList();
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
uni.stopPullDownRefresh();
|
|
uni.stopPullDownRefresh();
|
|
}, 1000);
|
|
}, 1000);
|
|
},
|
|
},
|
|
- onLoad(option) {
|
|
|
|
- this.status = option.shareStatus;
|
|
|
|
- if (this.status == "all") {
|
|
|
|
- this.status = null;
|
|
|
|
- }
|
|
|
|
- this.getShareList();
|
|
|
|
- },
|
|
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|
|
|
|
|