liuyuanhang 4 роки тому
батько
коміт
fe7d99b83e
3 змінених файлів з 31 додано та 11 видалено
  1. 3 0
      pages/index/index.vue
  2. 27 10
      pages/service/more.vue
  3. 1 1
      pages/service/setservice.vue

+ 3 - 0
pages/index/index.vue

xqd
@@ -414,6 +414,9 @@
 							title:'错误!'
 						})
 					}
+					uni.navigateTo({
+						url: '/pages/me_evaluate'
+					})
 				}else if(e.type==5){
 					// 5.服务包通知 点击查看用户详情
 					id = e.relation_id

+ 27 - 10
pages/service/more.vue

xqd xqd xqd xqd xqd xqd xqd
@@ -264,7 +264,7 @@
 				</view>
 				<!-- 右 -->
 				<view class="right">
-					<u-input v-model="form.is_appoint[0].base_price" type="digit" :border="true" placeholder="请输入金额" />
+					<u-input v-model="form.is_appoint.base_price" type="digit" :border="true" placeholder="请输入金额" />
 				</view>
 			</view>
 			<!-- 服务时间 -->
@@ -450,7 +450,7 @@
 				</view>
 				<!-- 右 -->
 				<view class="right">
-					<u-input v-model="form.is_appoint[0].person" type="digit" :border="true" placeholder="请输入人次" />
+					<u-input v-model="form.is_appoint.person" type="digit" :border="true" placeholder="请输入人次" />
 				</view>
 			</view>
 		</view>
@@ -573,6 +573,7 @@
 				}],
 
 				/********************保存的数据****************************/
+				
 				form: {
 					is_chat: {
 						base_price: "0",
@@ -717,10 +718,23 @@
 					this.showList[2].flag = res.data.show.is_appoint;
 
 					// 获取医院
-					if (res.data.org != null) {
+					if (res.data.org.length!=0) {
 						this.hospital=[];
+						this.hospital = res.data.org;
 						// this.hospital = res.data.org;
 						this.hospitals = res.data.orgs;
+						if(res.data.orgs.length==1){
+							this.form.is_appoint.hospitals[0].relation_id = res.data.orgs[0].id
+						}else if(res.data.orgs.length==2){
+							this.form.is_appoint.hospitals[0].relation_id = res.data.orgs[0].id
+							this.form.is_appoint.hospitals[1].relation_id = res.data.orgs[1].id
+						}else{
+							uni.showToast({
+								icon:'none',
+								title:'医院不存在'
+							})
+						}
+						
 						
 					}
 
@@ -730,26 +744,28 @@
 					this.form.is_chat.person ='';
 					this.form.is_appoint.person='';
 					
-					if (res.data.list.phone != null) {
+					if (res.data.list.phone.length != 0) {
 						// 渲染电话的基础数据
 						this.form.is_phone.base_price = res.data.list.phone.base_price;
 						this.form.is_phone.step_price = res.data.list.phone.step_price;
 						this.form.is_phone.person = res.data.list.phone.person;
 					}
 
-					if (res.data.list.chat != null) {
+					if (res.data.list.chat.length != 0) {
 						// 渲染图文的基础数据
 						this.form.is_chat.base_price = res.data.list.chat.base_price;
 						this.form.is_chat.step_price = res.data.list.chat.step_price;
 						this.form.is_chat.person = res.data.list.chat.person;
 					}
 
-					if (res.data.list.men != null) {
+					if (res.data.list.men.length != 0) {
 						// 渲染门诊预约的基础数据
-						this.form.is_appoint.base_price = res.data.list.men.base_price;
-						this.form.is_appoint.step_price = res.data.list.men.step_price;
-						this.form.is_appoint.person = res.data.list.men.person;
+						this.form.is_appoint.base_price = res.data.list.men[0].base_price;
+						this.form.is_appoint.step_price = res.data.list.men[0].step_price;
+						this.form.is_appoint.person = res.data.list.men[0].person;
 					}
+					
+				
 
 					
 
@@ -792,7 +808,6 @@
 				});
 				let oks, dh1, dh2, dh3, tw1, tw2, tw3;
 
-				console.log(e.list.phone)
 				// 电话
 				if (e.list.phone.length != 0) {
 					dh1 = this.dh.timeList1;
@@ -858,6 +873,8 @@
 					let men = e.list.men;
 					let men1 =  e.list.men[0].service_time.split(',');
 					let men2 =  e.list.men[1].service_time.split(',');
+					this.form.is_appoint.hospitals[0].relation_id = e.list.men[0].relation_id
+					this.form.is_appoint.hospitals[1].relation_id = e.list.men[1].relation_id
 					var men1s=[];//保存转换后的整型字符串
 					var men2s=[];//保存转换后的整型字符串
 					 men1.forEach(function(data,index,arr){  

+ 1 - 1
pages/service/setservice.vue

xqd
@@ -64,7 +64,7 @@
 				}, {
 					zhonglei: '门诊预约',
 					state: false,
-					Opening: 2
+					Opening: 0
 				}]
 			}
 		},