刘远航 4 سال پیش
والد
کامیت
a0aa3c0a53
2فایلهای تغییر یافته به همراه48 افزوده شده و 13 حذف شده
  1. 34 2
      pages/index/index.vue
  2. 14 11
      pages/login/doctorRenzheng.vue

+ 34 - 2
pages/index/index.vue

xqd xqd xqd
@@ -199,6 +199,7 @@
 					service_days: "",
 					service_persons: ""
 				},
+				page:1,
 				docterMessageList: [],
 				//认证弹窗
 				rzModal: false,
@@ -267,17 +268,46 @@
 				this.docterInfo.service_persons = res.data.service_persons;
 			},
 			getDocterMessage: async function() {
+			 
 				let res = await this.$request.post("docterMessage/docterMessageList", {
-					curPage: 1,
+					curPage: this.page,
 					pageSize: 10
 				});
-				this.docterMessageList = res.data
+				if(res.data===null){
+					uni.showToast({
+						title:'到底了',
+						duration:5000,
+						icon:'none'
+					})
+					return false;
+				}	 
+				 this.docterMessageList=this.docterMessageList.concat(res.data)
+			
+	 
+				// this.docterMessageList = res.data
+				// console.log('我是',this.docterMessageList);
 			},
 			//全部已读
 			allread: async function() {
 				let res = await this.$request.post("docterMessage/okDocterMessage", {});
 				console.log(res);
 				if (res.message == "success") {
+					uni.showToast({
+						title:'操作完成',
+						duration:2000,
+						icon:'none'
+					})
+					this.page=1;
+					this.docterMessageList=[];
+					this.getDocterMessage();
+				}else if(res.message == '操作失败!'){
+					uni.showToast({
+						title:'操作完成',
+						duration:2000,
+						icon:'none'
+					})
+					this.page=1;
+					this.docterMessageList=[];
 					this.getDocterMessage();
 				}
 			},
@@ -368,10 +398,12 @@
 		},
 		//页面到底监听
 		onReachBottom() {
+			this.page++;
 			console.log('到底');
 			setTimeout(function() {
 				uni.stopPullDownRefresh();
 			}, 1000);
+			this.getDocterMessage();
 		}
 	}
 </script>

+ 14 - 11
pages/login/doctorRenzheng.vue

xqd xqd xqd
@@ -1,9 +1,9 @@
 <template>
 	<view style="width: 100%;height: 100%;">
 		<!-- 性别选择器 -->
-		<u-select v-model="sexshow" :list="sexlist" @confirm="sexconfirm"></u-select>
+		<u-select v-model="sexshow" :list="sexlist" @confirm="sexconfirm" @change='getsex'></u-select>
 		<!-- 省 -->
-		<u-select v-model="provinceshow" :list="provincelist" @confirm="provinceconfirm"></u-select>
+		<u-select v-model="provinceshow" :list="provincelist" @confirm="provinceconfirm" @change='getpro'></u-select>
 		<!-- 市 -->
 		<u-select v-model="cityshow" :list="citylist" @confirm="cityconfirm"></u-select>
 		<!-- 区县 -->
@@ -205,15 +205,8 @@
 						hospital: '选择医院', //医院
 						department: '科室名称', //科室
 						qualifications: '默认资质' //资质
-					}, {
-						name: '工作机构三',
-						province: '选择省份', //省
-						city: '选择城市', //市
-						area: '选择县区', //区
-						hospital: '选择医院', //医院
-						department: '科室名称', //科室
-						qualifications: '默认资质' //资质
 					}],
+					fromwork:[], // 向后台传的科室和资质
 					certificate: [], //证书
 					idPhoto: [], //身份证
 					doctorQualification: [] //医生资格
@@ -305,9 +298,19 @@
 				console.log(this.form.sex);
 			},
 			//省
-			provinceconfirm(e) {
+			provinceconfirm:async function() {
+				// 点击请求接口
+				let res = await this.$request.post('doctor/getCityList',{'type':1});
+				console.log('省份',res)
 				this.form.work[this.province].province = e[0].label
 			},
+			getpro:async function() {
+				// 点击请求接口
+				let res = await this.$request.post('doctor/getCityList',{'type':1});
+				console.log('省份',res)
+				// this.form.work[this.province].province = e[0].label
+			},
+			
 			//市
 			cityconfirm(e) {
 				this.form.work[this.city].city = e[0].label