Ver código fonte

增加判断

刘远航 4 anos atrás
pai
commit
c2d9dcac36
2 arquivos alterados com 15 adições e 11 exclusões
  1. 12 7
      pages/index/index.vue
  2. 3 4
      pages/zixun/xiangqing.vue

+ 12 - 7
pages/index/index.vue

@@ -291,15 +291,20 @@
 					curPage: this.page,
 					curPage: this.page,
 					pageSize: 10
 					pageSize: 10
 				});
 				});
-				if (res.data === null) {
-					// uni.showToast({
-					// 	title: '到底了',
-					// 	duration: 5000,
-					// 	icon: 'none'
-					// })
+				if (res.data.length == 0) {
+					uni.showToast({
+						title: '到底了',
+						duration: 3000,
+						icon: 'none'
+					})
 					return false;
 					return false;
 				}
 				}
-				this.docterMessageList = this.docterMessageList.concat(res.data)
+				if(this.page==1){
+					this.docterMessageList = [];
+					this.docterMessageList = res.data
+				}else{
+					this.docterMessageList = this.docterMessageList.concat(res.data)
+				}
 				// this.docterMessageList = res.data
 				// this.docterMessageList = res.data
 				console.log('我是docterMessageList',this.docterMessageList);
 				console.log('我是docterMessageList',this.docterMessageList);
 				console.log('我是接口数据',res.data);
 				console.log('我是接口数据',res.data);

+ 3 - 4
pages/zixun/xiangqing.vue

@@ -220,9 +220,7 @@
 				ID: '', //身份证
 				ID: '', //身份证
 				//病情描述
 				//病情描述
 				ms: '',
 				ms: '',
-				potolList:['https://zhengda.oss-cn-chengdu.aliyuncs.com/baoma/static/头像.png',
-							'https://zhengda.oss-cn-chengdu.aliyuncs.com/baoma/static/头像.png'
-							],
+				potolList:[],
 				
 				
 
 
 				//下部数据
 				//下部数据
@@ -276,7 +274,8 @@
 					this.placeTime = list.created_at;
 					this.placeTime = list.created_at;
 					this.xiadankh = list.nickname;
 					this.xiadankh = list.nickname;
 					this.receivingTime = list.receiving_time
 					this.receivingTime = list.receiving_time
-					if(list.prototype==2){
+			 
+					if(list.product_type==2){
 						// 图文咨询:
 						// 图文咨询:
 						this.ms = list.symptoms;
 						this.ms = list.symptoms;
 						this.potolList = list.medical_imgs;
 						this.potolList = list.medical_imgs;