zs 2 years ago
parent
commit
38e0427aaf

+ 14 - 0
pages/home/index.vue

@@ -117,6 +117,7 @@
 		onLoad: function() {
 			const that = this;
 			that.search();
+			uni.startPullDownRefresh();
 		},
 		methods: {
 			async search() {
@@ -257,6 +258,19 @@
 					this.scrollTop = 0
 				});
 			},
+			onPullDownRefresh: async function() {
+				const that = this;
+				that.$set(that, `bannerList`, [])
+				that.$set(that, `btnList`, [])
+				that.$set(that, `recomList`, [])
+				that.$set(that, `platformactList`, [])
+				that.$set(that, `marketList`, [])
+				that.$set(that, `skip`, 0)
+				that.$set(that, `limit`, 6)
+				that.$set(that, `page`, 0)
+				await that.search();
+				uni.stopPullDownRefresh();
+			}
 		}
 	}
 </script>

+ 18 - 4
pages/store/index.vue

@@ -7,7 +7,8 @@
 						<view class="list" v-for="(item,index) in list" :key="index" @tap="toShop(item)">
 							<view class="list_1">
 								<view class="l">
-									<image class="image" :src="item.logo&&item.logo.length>0?item.logo[0].url:''" mode=""></image>
+									<image class="image" :src="item.logo&&item.logo.length>0?item.logo[0].url:''"
+										mode=""></image>
 								</view>
 								<view class="c">
 									<view class="name">
@@ -19,13 +20,16 @@
 									</view>
 								</view>
 								<view class="r" @tap.stop="toFolllow(item)">
-									<text class="iconfont icon-yduishoucangshixin-copy" v-if="item.is_follow==true"></text>
+									<text class="iconfont icon-yduishoucangshixin-copy"
+										v-if="item.is_follow==true"></text>
 									<text class="iconfont icon-yduishoucangkongxin-copy" v-else></text>
 								</view>
 							</view>
 							<view class="list_2">
-								<view class="market" v-for="(tag,indexs) in item.market" :key="indexs" @tap.stop="toBuy(tag)">
-									<image class="image" :src="tag.file&&tag.file.length>0?tag.file[0].url:''" mode=""></image>
+								<view class="market" v-for="(tag,indexs) in item.market" :key="indexs"
+									@tap.stop="toBuy(tag)">
+									<image class="image" :src="tag.file&&tag.file.length>0?tag.file[0].url:''" mode="">
+									</image>
 									<view class="money">
 										¥{{tag.sell_money}}
 									</view>
@@ -60,6 +64,7 @@
 			await that.watchLogin();
 			// 查询列表
 			await that.search();
+			uni.startPullDownRefresh();
 		},
 		methods: {
 			// 监听用户是否登录
@@ -171,6 +176,15 @@
 					})
 				}
 			},
+			onPullDownRefresh: async function() {
+				const that = this;
+				that.$set(that, `list`, [])
+				that.$set(that, `skip`, 0)
+				that.$set(that, `limit`, 6)
+				that.$set(that, `page`, 0)
+				await that.search();
+				uni.stopPullDownRefresh();
+			}
 		}
 	}
 </script>

+ 10 - 0
pages/week/index.vue

@@ -85,6 +85,7 @@
 			const that = this;
 			that.searchConfig();
 			that.search();
+			uni.startPullDownRefresh();
 		},
 		methods: {
 			// 查询基本设置
@@ -234,6 +235,15 @@
 					})
 				}
 			},
+			onPullDownRefresh: async function() {
+				const that = this;
+				that.$set(that, `list`, [])
+				that.$set(that, `skip`, 0)
+				that.$set(that, `limit`, 6)
+				that.$set(that, `page`, 0)
+				await that.search();
+				uni.stopPullDownRefresh();
+			}
 		}
 	}
 </script>

+ 10 - 1
pagesMy/address/index.vue

@@ -70,7 +70,7 @@
 			const that = this;
 			that.searchConfig();
 			that.watchLogin();
-
+			uni.startPullDownRefresh();
 		},
 		methods: {
 			// 查询基本设置
@@ -261,6 +261,15 @@
 				that.$set(that, `skip`, 0)
 				that.$set(that, `limit`, 5)
 				that.$set(that, `page`, 0)
+			},
+			onPullDownRefresh: async function() {
+				const that = this;
+				that.$set(that, `list`, [])
+				that.$set(that, `skip`, 0)
+				that.$set(that, `limit`, 6)
+				that.$set(that, `page`, 0)
+				await that.search();
+				uni.stopPullDownRefresh();
 			}
 		}
 	}

+ 10 - 2
pagesMy/assets/index.vue

@@ -30,10 +30,18 @@
 			};
 		},
 		onLoad: function(e) {
-
+			uni.startPullDownRefresh();
 		},
 		methods: {
-
+			onPullDownRefresh: async function() {
+				const that = this;
+				that.$set(that, `list`, [])
+				that.$set(that, `skip`, 0)
+				that.$set(that, `limit`, 6)
+				that.$set(that, `page`, 0)
+				await that.search();
+				uni.stopPullDownRefresh();
+			}
 		}
 	}
 </script>

+ 11 - 1
pagesMy/collection/market.vue

@@ -139,7 +139,8 @@
 		onLoad: function() {
 			const that = this;
 			that.searchConfig();
-			that.watchLogin()
+			that.watchLogin();
+			uni.startPullDownRefresh();
 		},
 		methods: {
 			// 查询基本设置
@@ -312,6 +313,15 @@
 				that.$set(that, `skip`, 0)
 				that.$set(that, `limit`, 6)
 				that.$set(that, `page`, 0)
+			},
+			onPullDownRefresh: async function() {
+				const that = this;
+				that.$set(that, `list`, [])
+				that.$set(that, `skip`, 0)
+				that.$set(that, `limit`, 6)
+				that.$set(that, `page`, 0)
+				await that.search();
+				uni.stopPullDownRefresh();
 			}
 		}
 	}

+ 11 - 1
pagesMy/collection/shop.vue

@@ -119,7 +119,8 @@
 		onLoad: function() {
 			const that = this;
 			that.searchConfig();
-			that.watchLogin()
+			that.watchLogin();
+			uni.startPullDownRefresh();
 		},
 		methods: {
 			// 查询基本设置
@@ -281,6 +282,15 @@
 				that.$set(that, `skip`, 0)
 				that.$set(that, `limit`, 5)
 				that.$set(that, `page`, 0)
+			},
+			onPullDownRefresh: async function() {
+				const that = this;
+				that.$set(that, `list`, [])
+				that.$set(that, `skip`, 0)
+				that.$set(that, `limit`, 6)
+				that.$set(that, `page`, 0)
+				await that.search();
+				uni.stopPullDownRefresh();
 			}
 		}
 	}

+ 10 - 0
pagesMy/discount/index.vue

@@ -44,6 +44,7 @@
 			that.searchConfig();
 			// 监听用户是否登录
 			that.watchLogin();
+			uni.startPullDownRefresh();
 		},
 		methods: {
 			// 查询基本设置
@@ -132,6 +133,15 @@
 				that.$set(that, `skip`, 0)
 				that.$set(that, `limit`, 5)
 				that.$set(that, `page`, 0)
+			},
+			onPullDownRefresh: async function() {
+				const that = this;
+				that.$set(that, `list`, [])
+				that.$set(that, `skip`, 0)
+				that.$set(that, `limit`, 6)
+				that.$set(that, `page`, 0)
+				await that.search();
+				uni.stopPullDownRefresh();
 			}
 		}
 	}

+ 11 - 1
pagesMy/dough/index.vue

@@ -97,7 +97,8 @@
 		},
 		onShow: function() {
 			const that = this;
-			that.watchLogin()
+			that.watchLogin();
+			uni.startPullDownRefresh();
 		},
 		methods: {
 			// 输入框
@@ -206,6 +207,15 @@
 				that.$set(that, `skip`, 0)
 				that.$set(that, `limit`, 6)
 				that.$set(that, `page`, 0)
+			},
+			onPullDownRefresh: async function() {
+				const that = this;
+				that.$set(that, `list`, [])
+				that.$set(that, `skip`, 0)
+				that.$set(that, `limit`, 6)
+				that.$set(that, `page`, 0)
+				await that.search();
+				uni.stopPullDownRefresh();
 			}
 		}
 	}

+ 10 - 0
pagesMy/integral/index.vue

@@ -57,6 +57,7 @@
 			that.searchConfig();
 			await that.searchOther();
 			await that.watchLogin();
+			uni.startPullDownRefresh();
 		},
         onHide: function() {
 			const that = this;
@@ -167,6 +168,15 @@
 				that.$set(that, `skip`, 0)
 				that.$set(that, `limit`, 6)
 				that.$set(that, `page`, 0)
+			},
+			onPullDownRefresh: async function() {
+				const that = this;
+				that.$set(that, `list`, [])
+				that.$set(that, `skip`, 0)
+				that.$set(that, `limit`, 6)
+				that.$set(that, `page`, 0)
+				await that.search();
+				uni.stopPullDownRefresh();
 			}
 		}
 	}

+ 16 - 3
pagesMy/order/after.vue

@@ -20,7 +20,8 @@
 										</view>
 									</view>
 									<view class="list_2">
-										<image class="image" :src="item.url&&item.url.length>0?item.url[0].url:''" mode="">
+										<image class="image" :src="item.url&&item.url.length>0?item.url[0].url:''"
+											mode="">
 										</image>
 										<view class="other">
 											<view class="name">
@@ -44,8 +45,10 @@
 										</view>
 									</view>
 									<view class="btn">
-										<button v-if="item.status=='0'||item.status=='1'" type="default" size="mini" @tap.stop="toCancel(item)">取消售后</button>
-										<button v-if="item.type!='0'" type="default" size="mini" @tap.stop="toRevise(item)">维护信息</button>
+										<button v-if="item.status=='0'||item.status=='1'" type="default" size="mini"
+											@tap.stop="toCancel(item)">取消售后</button>
+										<button v-if="item.type!='0'" type="default" size="mini"
+											@tap.stop="toRevise(item)">维护信息</button>
 									</view>
 								</view>
 								<view class="is_bottom" v-if="is_bottom">
@@ -118,6 +121,7 @@
 			await that.searchOther();
 			// 监听用户登录
 			await that.watchLogin();
+			uni.startPullDownRefresh();
 		},
 		methods: {
 			// 查询基本设置
@@ -263,6 +267,15 @@
 				that.$set(that, `skip`, 0)
 				that.$set(that, `limit`, 5)
 				that.$set(that, `page`, 0)
+			},
+			onPullDownRefresh: async function() {
+				const that = this;
+				that.$set(that, `list`, [])
+				that.$set(that, `skip`, 0)
+				that.$set(that, `limit`, 6)
+				that.$set(that, `page`, 0)
+				await that.search();
+				uni.stopPullDownRefresh();
 			}
 		}
 	}

+ 10 - 0
pagesMy/order/index.vue

@@ -183,6 +183,7 @@
 			that.searchConfig();
 			// 监听用户是否登录
 			that.watchLogin();
+			uni.startPullDownRefresh();
 		},
 		methods: {
 			// 查询基本设置
@@ -449,6 +450,15 @@
 				that.$set(that, `skip`, 0)
 				that.$set(that, `limit`, 5)
 				that.$set(that, `page`, 0)
+			},
+			onPullDownRefresh: async function() {
+				const that = this;
+				that.$set(that, `list`, [])
+				that.$set(that, `skip`, 0)
+				that.$set(that, `limit`, 6)
+				that.$set(that, `page`, 0)
+				await that.search();
+				uni.stopPullDownRefresh();
 			}
 		}
 	}