소스 검색

接口修改完善

渣渣宝 4 년 전
부모
커밋
05b0cc9e26
3개의 변경된 파일38개의 추가작업 그리고 16개의 파일을 삭제
  1. 1 1
      pages/index/index.vue
  2. 34 11
      pages/service/more.vue
  3. 3 4
      pages/service/setservice.vue

+ 1 - 1
pages/index/index.vue

xqd
@@ -196,7 +196,7 @@
 				</view>
 			</view>
 			<view style="margin-top: 100rpx;">
-				<u-empty text="暂无通知" mode="list" v-if="docterMessageList.lenght==0"></u-empty>
+				<u-empty text="暂无通知" mode="list" v-if="docterMessageList.lenght<=0"></u-empty>
 			</view>
 			<view class="cu-tabbar-height"></view>
 		</view>

+ 34 - 11
pages/service/more.vue

xqd xqd xqd
@@ -1322,10 +1322,11 @@
 				forms.is_phone.pmEndTime = phone_pm != '' ? phone_pm[1] : '';
 				forms.is_phone.nightStartTime = phone_ni != '' ? phone_ni[0] : '';
 				forms.is_phone.nightEndTime = phone_ni != '' ? phone_ni[1] : '';
-				console.log("保存电话设置",forms.is_phone)
-				console.log("保存电话设置",forms)
-				let sp = await this.$request.post('doctor/getSettingPhone', {
-					data: forms.is_phone,
+				if(typeof forms == 'object'){
+				    forms = JSON.stringify(forms)
+				}
+				let sp = await this.$request.post('doctor/saveSettingPhone', {
+					data: forms,
 				});
 				if (sp.status == 0) {
 					uni.showToast({
@@ -1351,11 +1352,21 @@
 				forms.is_chat.pmEndTime = chat_pm != '' ? chat_pm[1] : '';
 				forms.is_chat.nightStartTime = chat_ni != '' ? chat_ni[0] : '';
 				forms.is_chat.nightEndTime = chat_ni != '' ? chat_ni[1] : '';
-				let sc = await this.$request.post('doctor/getSettingChat', {
-					data: forms.is_chat,
-					'type': 2
+				if(typeof forms == 'object'){
+				    forms = JSON.stringify(forms)
+				}
+				let sc = await this.$request.post('doctor/saveSettingChat', {
+					data: forms
 				});
 				console.log("保存电话设置",sc)
+				if (sc.status == 0) {
+					uni.showToast({
+						icon: 'none',
+						duration: 1500,
+						title: '操作成功',
+				
+					})
+				}
 			},
 			/**
 			 * 保存门诊设置
@@ -1382,11 +1393,23 @@
 						"org_id": forms.is_appoint.hospitalList[i].id,
 					})
 				}
-				let sm = await this.$request.post('doctor/getSettingChat', {
-					data: forms.is_appoint,
-					'type': 2
+				console.log("保存门诊shez",newMenList)
+				let a = ({'is_appoint':newMenList})
+				if(typeof a == 'object'){
+				    a = JSON.stringify(a)
+				}
+				let sm = await this.$request.post('doctor/saveSettingSchedule', {
+					data: a
 				});
-				console.log("保存电话设置",sm)
+				console.log("门诊保存返回数据",sm)
+				if (sm.status == 0) {
+					uni.showToast({
+						icon: 'none',
+						duration: 1500,
+						title: '操作成功',
+				
+					})
+				}
 			},
 			/**
 			 * 电话数据获取

+ 3 - 4
pages/service/setservice.vue

xqd xqd
@@ -10,9 +10,8 @@
 			<view style="width: 20%;">{{item.zhonglei}}</view>
 			<!-- 开通状态 -->
 			<view style="width: 40%;">
-				<text v-if="item.Opening == 0||item.Opening == false" style="text-decoration: underline; color: #888888;" @click="this.tcShow=true,num=index" >未开通</text>
-				<text v-if="item.Opening == 1" style="color: #888888;">申请中</text>
-				<text v-if="item.Opening == 3" style="color: #888888;">已拒绝</text>
+				<text v-if="item.Opening == 3||item.Opening == false" style="text-decoration: underline; color: #888888;" @click="this.tcShow=true,num=index" >未开通</text>
+				<text v-if="item.Opening == 1" style="color: #888888;">待审核</text>
 		
 			</view>
 			<!-- 服务状态 -->
@@ -127,7 +126,7 @@
 				if(typeof data != 'string'){
 					data = JSON.stringify(data);
 				}
-				let res = await this.$request.post('doctor/saveSettingBase',{'type':1,'data':data});
+				let res = await this.$request.post('doctor/saveSetting',{'type':1,'data':data});
 				console.log(res);
 				if(res.status==0){
 					uni.showToast({