gjy 2 rokov pred
rodič
commit
2eff2e5d6b

+ 2 - 1
pages/business/businessNew.vue

@@ -253,7 +253,8 @@
 				this.isShowAlert = true;
 			} else {
 				uni.navigateTo({
-					url: 'myAttention'
+					url: 'myAttention?selectType='+'关注'
+					
 				})
 			}
 

+ 10 - 2
pages/business/myAttention.vue

@@ -1,7 +1,7 @@
 <template>
 	<view>
 		<view class="content1">
-			<u-search placeholder="搜索用户名称" v-model="keyword" :show-action='false' bg-color="#F5F6FA"></u-search>
+			<u-search placeholder="搜索用户名称" v-model="keyword" :show-action='false' @search='keywordsearch' bg-color="#F5F6FA"></u-search>
 		</view>
 
 		<mescroll-body ref="mescrollRef" @init="mescrollInit" top="0" @down="downCallback" :up="upOption"
@@ -59,6 +59,7 @@
 				inputStyle: {
 					// "padding-left": '30rpx'
 				},
+				selectType:'',
 				upOption: {
 					// page: {
 					// 	num: 0, // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
@@ -84,7 +85,9 @@
 			console.log("userInfo", userInfo)
 
 		},
-		onLoad(options) {},
+		onLoad(options) {
+			this.selectType=options.selectType
+		},
 
 
 		methods: {
@@ -119,6 +122,10 @@
 					url: 'release'
 				})
 			},
+			keywordsearch(e){
+				this.keyword=e
+				this.upCallback({size:10,num:1})
+			},
 			/*上拉加载的回调: 其中page.num:当前页 从1开始, page.size:每页数据条数,默认10 */
 			upCallback(page) {
 				uni.showLoading({
@@ -137,6 +144,7 @@
 						placeDelivery: this.selectPlace,
 						tranType: this.selectType,
 						userIdFollow: this.userInfo.id,
+						followedId:this.keyword,
 						nowUserId: this.userInfo.id
 					}
 				} else {