guhongwei 2 tahun lalu
induk
melakukan
158df1572e
2 mengubah file dengan 40 tambahan dan 15 penghapusan
  1. 30 15
      pages.json
  2. 10 0
      pagesHome/market/search.vue

+ 30 - 15
pages.json

@@ -21,7 +21,8 @@
 		{
 			"path": "pages/home/index",
 			"style": {
-				"navigationBarTitleText": "首页"
+				"navigationBarTitleText": "首页",
+				"enablePullDownRefresh": true
 			}
 		},
 		{
@@ -58,19 +59,22 @@
 				{
 					"path": "collection/market",
 					"style": {
-						"navigationBarTitleText": "我收藏的商品"
+						"navigationBarTitleText": "我收藏的商品",
+						"enablePullDownRefresh": true
 					}
 				},
 				{
 					"path": "collection/shop",
 					"style": {
-						"navigationBarTitleText": "我收藏的店铺"
+						"navigationBarTitleText": "我收藏的店铺",
+						"enablePullDownRefresh": true
 					}
 				},
 				{
 					"path": "order/index",
 					"style": {
-						"navigationBarTitleText": "订单列表"
+						"navigationBarTitleText": "订单列表",
+						"enablePullDownRefresh": true
 					}
 				},
 				{
@@ -82,7 +86,8 @@
 				{
 					"path": "order/after",
 					"style": {
-						"navigationBarTitleText": "售后列表"
+						"navigationBarTitleText": "售后列表",
+						"enablePullDownRefresh": true
 					}
 				},
 				{
@@ -118,31 +123,36 @@
 				{
 					"path": "discount/index",
 					"style": {
-						"navigationBarTitleText": "我的优惠劵"
+						"navigationBarTitleText": "我的优惠劵",
+						"enablePullDownRefresh": true
 					}
 				},
 				{
 					"path": "integral/index",
 					"style": {
-						"navigationBarTitleText": "我的尊荣"
+						"navigationBarTitleText": "我的尊荣",
+						"enablePullDownRefresh": true
 					}
 				},
 				{
 					"path": "assets/index",
 					"style": {
-						"navigationBarTitleText": "我的资产"
+						"navigationBarTitleText": "我的资产",
+						"enablePullDownRefresh": true
 					}
 				},
 				{
 					"path": "dough/index",
 					"style": {
-						"navigationBarTitleText": "我的拼团"
+						"navigationBarTitleText": "我的拼团",
+						"enablePullDownRefresh": true
 					}
 				},
 				{
 					"path": "address/index",
 					"style": {
-						"navigationBarTitleText": "收货地址"
+						"navigationBarTitleText": "收货地址",
+						"enablePullDownRefresh": true
 					}
 				},
 				{
@@ -193,13 +203,15 @@
 				{
 					"path": "market/type",
 					"style": {
-						"navigationBarTitleText": "商品分类"
+						"navigationBarTitleText": "商品分类",
+						"enablePullDownRefresh": true
 					}
 				},
 				{
 					"path": "exchange/index",
 					"style": {
-						"navigationBarTitleText": "兑换中心"
+						"navigationBarTitleText": "兑换中心",
+						"enablePullDownRefresh": true
 					}
 				},
 				{
@@ -223,7 +235,8 @@
 				{
 					"path": "shop/index",
 					"style": {
-						"navigationBarTitleText": "店铺"
+						"navigationBarTitleText": "店铺",
+						"enablePullDownRefresh": true
 					}
 				},
 				{
@@ -253,13 +266,15 @@
 				{
 					"path": "recom/index",
 					"style": {
-						"navigationBarTitleText": "商品类别"
+						"navigationBarTitleText": "商品类别",
+						"enablePullDownRefresh": true
 					}
 				},
 				{
 					"path": "activity/list",
 					"style": {
-						"navigationBarTitleText": "活动列表"
+						"navigationBarTitleText": "活动列表",
+						"enablePullDownRefresh": true
 					}
 				},
 				{

+ 10 - 0
pagesHome/market/search.vue

@@ -125,6 +125,7 @@
 			that.searchConfig();
 			await that.searchOther();
 			await that.search();
+			uni.startPullDownRefresh();
 		},
 		methods: {
 			// 查询基本设置
@@ -267,6 +268,15 @@
 				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();
 		}
 	}
 </script>