wkyy 3 éve
szülő
commit
1705235062
1 módosított fájl, 14 hozzáadás és 7 törlés
  1. 14 7
      pages/friend/index.vue

+ 14 - 7
pages/friend/index.vue

@@ -335,19 +335,26 @@
 					sgd[item] = this.list[item]
 					sgd[item] = this.list[item]
 					formList.push(sgd);
 					formList.push(sgd);
 				}
 				}
+				let refreshList = [];
+				for(var i=0; i<3; i++) {
+					var num=Math.floor(Math.random()*8+0);
+					refreshList.push(formList[num]);
+				}
+				refreshList.push({type: '1'});
+				refreshList.push({memberId: this.memberId});
 				
 				
-				var num1=Math.floor(Math.random()*8+0);
-				var num2=Math.floor(Math.random()*8+0);
-				var num3=Math.floor(Math.random()*8+0);
-				console.log(formList[num1]);
-				console.log(formList[num2]);
-				console.log(formList[num3]);
+				var obj = {};
+				for(var m in refreshList) {
+					for(var n in refreshList[m]) {
+						obj[n] = refreshList[m][n];
+					}
+				}
 				
 				
 				uni.showLoading({
 				uni.showLoading({
 					title: "加载中",
 					title: "加载中",
 					mask: true,
 					mask: true,
 				})
 				})
-				friendApi.findFriendsList({memberId: this.memberId},formList[num1],formList[num2],formList[num3]).then((res) => {
+				friendApi.findFriendsList(obj).then((res) => {
 					this.friendList = res.data.data;
 					this.friendList = res.data.data;
 					uni.hideLoading();
 					uni.hideLoading();
 				}).catch(error => {
 				}).catch(error => {