Browse Source

渲染更多设置接口

liuyuanhang 4 years ago
parent
commit
6a26a597e4

+ 2 - 2
common/env.js

xqd
@@ -1,4 +1,4 @@
-export const envHost = 'http://182.92.112.142/api/v2/'; //开发环境
+export const envHost = 'https://xiaoyunimg.top/api/v2/'; //开发环境
 // export const imgHost='https://www.juyinzhengxin.com/';
 export const imgHost = 'https://zhengda.oss-cn-chengdu.aliyuncs.com/juyin';
-export const imglocal = 'http://182.92.112.142/';
+export const imglocal = 'https://xiaoyunimg.top/';

+ 9 - 3
pages/index/index.vue

xqd xqd xqd
@@ -10,8 +10,9 @@
 					<view v-if="true" class="m-bg-white bdr4 pb20 header-box" style="border-radius: 32rpx;">
 						<view class="plr20 pt20 m-dpflex m-justify-start " style="margin-bottom: 60rpx;">
 							<view>
+							 
 								<image binderror="_binderror" mode="scaleToFill" :src="src" style="width: 100rpx;height: 100rpx;border-radius: 50%;"></image>
-								<view v-if="!renzheng" class="flex justify-center align-center" style="border-radius:30rpx ;font-size: 20rpx;padding: 10rpx;background-color: #EEAA3F;color: #FFFFFF;position: relative;top: -20rpx;"
+								<view v-if="!docterInfo.is_then" class="flex justify-center align-center" style="border-radius:30rpx ;font-size: 20rpx;padding: 10rpx;background-color: #EEAA3F;color: #FFFFFF;position: relative;top: -20rpx;"
 								 @click="gorz">未认证</view>
 								<view v-else class="flex justify-center align-center" style="border-radius:30rpx ;font-size: 20rpx;padding: 10rpx;background-color: #84BB43;color: #FFFFFF;position: relative;top: -20rpx;">已认证</view>
 							</view>
@@ -191,7 +192,7 @@
 					name: "",
 					avatar: "",
 					eva_num: "",
-					is_then: "",
+					is_then: false,
 					label: "",
 					sign: "",
 					score: "",
@@ -260,7 +261,12 @@
 				this.docterInfo.name = res.data.name;
 				this.src = res.data.avatar;
 				this.docterInfo.eva_num = res.data.eva_num;
-				this.docterInfo.is_then = res.data.is_then;
+				if(res.data.is_then==0){
+					this.docterInfo.is_then = false;
+				}else{
+					this.docterInfo.is_then = true;
+				}
+				
 				this.docterInfo.label = res.data.label;
 				this.docterInfo.sign = res.data.sign;
 				this.docterInfo.score = res.data.score;

+ 1 - 1
pages/information/information.vue

xqd
@@ -114,7 +114,7 @@
 				     success: (res) => {
 						 let tempFilePaths = res.tempFilePaths;		 
 							const uploadTask = wx.uploadFile({
-								 url: 'http://182.92.112.142/api/v2/Common/uploadFile',
+								 url: 'https://xiaoyunimg.top/api/v2/Common/uploadFile',
 								 filePath: tempFilePaths[0],
 								 name: 'file',
 								 success: function (uploadFileRes) { 

+ 44 - 40
pages/login/doctorRenzheng.vue

xqd xqd xqd xqd xqd
@@ -28,10 +28,10 @@
 		<view style="padding: 0 28rpx;">
 			<view class="flex align-center" style="margin: 20rpx 0;">
 				<view style="width: 30%;font-weight: bold;" class="felx align-center">
-					<view>医生姓名</view>
+					<view>医生姓名</view>
 				</view>
 				<view style="width: 70%;">
-					<u-input v-model="form.name" type="text" :border="false" placeholder="请填写真实姓名" input-align="right" />
+					<u-input v-model="form.name"  type="text" :border="false" placeholder="请填写真实姓名" input-align="right" />
 				</view>
 			</view>
 			<u-line color="#f0f2f5" />
@@ -260,6 +260,18 @@
 					name: '', //姓名
 					sex: '', //性别
 					ID: '', //身份证
+					works:[  // 入库数组
+						{ 
+							hospital: '', //医院id
+							department: '', //科室id
+							qualifications: '' //资质id
+						},
+						{ 
+							hospital: '', //医院id
+							department: '', //科室id
+							qualifications: '' //资质id
+						}
+					],
 					work1: { //工作机构
 						name: '工作机构一',
 						province: '选择省份', //省
@@ -278,10 +290,12 @@
 						department: '科室名称', //科室
 						qualifications: '默认资质' //资质
 					},
-					fromwork: [], // 向后台传的科室和资质
-					certificate: [], //证书
-					idPhoto: [], //身份证
-					doctorQualification: [] //医生资格
+					// certificate: [], //证书
+					// idPhoto: [], //身份证
+					// doctorQualification: [] ,//医生资格
+					practice: ["https://dss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=3363295869,2467511306&fm=26&gp=0.jpg",'https://dss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=3363295869,2467511306&fm=26&gp=0.jpg'], // 医师执业证书(清晰照片和信息页面) 必须两个都传,不可以只上传一个
+					card_photo: ["https://dss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=3363295869,2467511306&fm=26&gp=0.jpg","https://dss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=3363295869,2467511306&fm=26&gp=0.jpg"], //身份证 , 必须两个都传,不可以只上传一个
+					is_quail: ["https://dss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=3363295869,2467511306&fm=26&gp=0.jpg","https://dss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=3363295869,2467511306&fm=26&gp=0.jpg"] //医生资格, 必须两个都传,不可以只上传一个
 				},
 				//性别选择
 				sexshow: false,
@@ -545,40 +559,42 @@
 			},
 			//医院选择器
 			yy(e) {
-				console.log('打开了医院选择器1')
+				console.log('打开了医院选择器1',e)
 				this.form.work1.hospital = e[0].label
-				this.work[0].id = e[0].value
+				this.form.works[0].hospital = e[0].value;
+				 
 				this.departmentconfirm()
 			},
 			yy2(e) {
-				console.log('打开了医院选择器2')
+				console.log('打开了医院选择器2',e)
 				this.form.work2.hospital = e[0].label
-				this.work[1].id = e[0].value
+				this.form.works[1].hospital = e[0].value;
 				this.departmentconfirm()
 			},
 			//科室
 			ks(e) {
-				console.log('打开了科室选择器1')
+				console.log('打开了科室选择器1',e)
 				this.form.work1.department = e[0].label
-				this.work[0].depart = e[0].value
+				this.form.works[0].department = e[0].value;
+				
 				this.qualificationsconfirm()
 			},
 			ks2(e) {
-				console.log('打开了科室选择器2')
+				console.log('打开了科室选择器2',e)
 				this.form.work2.department = e[0].label
-				this.work[1].depart = e[0].value
+				this.form.works[1].department = e[0].value;
 				this.qualificationsconfirm()
 			},
 			//资质
 			zz(e) {
 				console.log('打开了资质选择器1')
 				this.form.work1.qualifications = e[0].label
-				this.work[0].qualifications = e[0].value
+				this.form.works[0].qualifications = e[0].value;
 			},
 			zz2(e) {
 				console.log('打开了资质选择器2')
 				this.form.work2.qualifications = e[0].label
-				this.work[1].qualifications = e[0].value
+				this.form.works[1].qualifications = e[0].value;
 			},
 			/*******************接口*********************/
 			//省
@@ -664,32 +680,20 @@
 			},
 			// 保存
 			bc: async function() {
-				console.log(this.province);
-				return false;
-				// 提交需要参数
-				let froms = {
-					doctor_name: '', //姓名
-					doctor_sex: 1, //性别,1男,2女
-					doctor_card: '', //身份证
-					work: [{ //工作机构
-						id: '医院的id',
-						depart: '科室id', //省
-						qualifications: '资质id', //市
-
-					}, {
-						id: '医院的id',
-						depart: '科室id', //省
-						qualifications: '资质id', //市
-					}],
-					practice: [], // 医师执业证书(清晰照片和信息页面) 必须两个都传,不可以只上传一个
-					card_photo: [], //身份证 , 必须两个都传,不可以只上传一个
-					is_quail: [] //医生资格, 必须两个都传,不可以只上传一个
+				 
+				if(typeof this.form.works != 'string'){
+					this.form.works = JSON.stringify(this.form.works);
 				}
+				
 				// 注意要 {'doctor_name':'ddd',doctor_sex:1....}分开传值因为我方便拦截垃圾数据
-				let res = await this.$request.post('doctor/addthen', froms);
-				uni.switchTab({
-					url: '../index/index'
-				})
+				let res = await this.$request.post('doctor/addthen', this.form);
+				console.log('res...:',res);
+				if(res.status==0){
+					uni.switchTab({
+						url: '../index/index'
+					})
+				}
+				
 			},
 			ChooseImage() {
 				let that = this;

+ 1 - 1
pages/login/login.vue

xqd
@@ -332,7 +332,7 @@
  
 		 
 			getPhoneNumber: async function(e) {
-				let res = await this.$request.post("api/v2/common/getPhoneNumber", {
+				let res = await this.$request.post("common/getPhoneNumber", {
 					iv: e.detail.iv,
 					encryptedData: e.detail.encryptedData,
 					session_key: this.session_key,

+ 174 - 418
pages/service/more.vue

xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd
@@ -2,7 +2,7 @@
 	<view style="width: 100%;height: 100%;">
 		<u-gap height="20" bg-color="#f3f3f3"></u-gap>
 		<!-- 电话咨询 -->
-		<view class="v">
+		<view class="v" v-show="showList[0].flag">
 			<!-- 标题 -->
 			<view class="title">电话咨询</view>
 			<!-- 线 -->
@@ -12,7 +12,7 @@
 				<!-- 左 -->
 				<view class="left">
 					<view class="t1">基础价格<text style="font-size: 24rpx;color: #666666;margin-left: 10rpx;">(元)</text></view>
-					<view class="t2">基础价格为包含十分钟的起步价</view>
+		 			<view class="t2">基础价格为包含十分钟的起步价</view>
 				</view>
 				<!-- 右 -->
 				<view class="right">
@@ -28,7 +28,7 @@
 				</view>
 				<!-- 右 -->
 				<view class="right">
-					<u-input v-model="tlePhone.additional" type="text" :border="true" placeholder="请输入金额" />
+					<u-input v-model="telePhone.additional" type="text" :border="true" placeholder="请输入金额" />
 				</view>
 			</view>
 			<!-- 服务时间 -->
@@ -57,7 +57,7 @@
 										<!-- 按钮 -->
 										<u-checkbox @change="" v-model="item.checked" shape="circle" size="40">
 										</u-checkbox>
-										<text style="display:flex;width: 50%;font-size: 28rpx;">{{item.name}}</text>
+										<text style="display:flex;width: 55%;font-size: 28rpx;">{{item.name}}</text>
 									</view>
 								</u-checkbox-group>
 							</view>
@@ -82,7 +82,7 @@
 										<u-checkbox @change="" v-model="item.checked" shape="circle" size="40">
 										</u-checkbox>
 										<!-- 字体 -->
-										<text style="display:flex;width: 50%;font-size: 28rpx;">{{item.name}}</text>
+										<text style="display:flex;width: 55%;font-size: 28rpx;">{{item.name}}</text>
 									</view>
 								</u-checkbox-group>
 							</view>
@@ -106,7 +106,7 @@
 										<!-- 按钮 -->
 										<u-checkbox @change="" v-model="item.checked" shape="circle" size="40">
 										</u-checkbox>
-										<text style="display:flex;width: 50%;font-size: 28rpx;">{{item.name}}</text>
+										<text style="display:flex;width: 55%;font-size: 28rpx;">{{item.name}}</text>
 									</view>
 								</u-checkbox-group>
 							</view>
@@ -124,7 +124,7 @@
 				</view>
 				<!-- 右 -->
 				<view class="right">
-					<u-input v-model="tlePhone.peopleNum" type="text" :border="true" placeholder="请输入人次" />
+					<u-input v-model="telePhone.peopleNum" type="text" :border="true" placeholder="请输入人次" />
 				</view>
 			</view>
 		</view>
@@ -132,7 +132,7 @@
 		<u-gap height="20" bg-color="#f3f3f3"></u-gap>
 
 		<!-- 图文咨询 -->
-		<view class="v">
+		<view class="v" v-show="showList[1].flag">
 			<!-- 标题 -->
 			<view class="title">图文咨询</view>
 			<!-- 线 -->
@@ -175,7 +175,7 @@
 										<!-- 按钮 -->
 										<u-checkbox @change="" v-model="item.checked" shape="circle" size="40">
 										</u-checkbox>
-										<text style="display:flex;width: 50%;font-size: 28rpx;">{{item.name}}</text>
+										<text style="display:flex;width: 55%;font-size: 28rpx;">{{item.name}}</text>
 									</view>
 								</u-checkbox-group>
 							</view>
@@ -200,7 +200,7 @@
 										<u-checkbox @change="" v-model="item.checked" shape="circle" size="40">
 										</u-checkbox>
 										<!-- 字体 -->
-										<text style="display:flex;width: 50%;font-size: 28rpx;">{{item.name}}</text>
+										<text style="display:flex;width: 55%;font-size: 28rpx;">{{item.name}}</text>
 									</view>
 								</u-checkbox-group>
 							</view>
@@ -224,7 +224,7 @@
 										<!-- 按钮 -->
 										<u-checkbox @change="" v-model="item.checked" shape="circle" size="40">
 										</u-checkbox>
-										<text style="display:flex;width: 50%;font-size: 28rpx;">{{item.name}}</text>
+										<text style="display:flex;width: 55%;font-size: 28rpx;">{{item.name}}</text>
 									</view>
 								</u-checkbox-group>
 							</view>
@@ -250,7 +250,7 @@
 		<u-gap height="20" bg-color="#f3f3f3"></u-gap>
 
 		<!-- 门诊预约 -->
-		<view class="v">
+		<view class="v" v-show="showList[2].flag">
 			<!-- 标题 -->
 			<view class="title">门诊预约</view>
 			<!-- 线 -->
@@ -299,7 +299,7 @@
 											<!-- 按钮 -->
 											<u-checkbox @change="" v-model="item.checked" shape="circle" size="40">
 											</u-checkbox>
-											<text style="display:flex;width: 50%;font-size: 28rpx;">{{item.name}}</text>
+											<text style="display:flex;width: 55%;font-size: 28rpx;">{{item.name}}</text>
 										</view>
 									</u-checkbox-group>
 								</view>
@@ -324,7 +324,7 @@
 											<u-checkbox @change="" v-model="item.checked" shape="circle" size="40">
 											</u-checkbox>
 											<!-- 字体 -->
-											<text style="display:flex;width: 50%;font-size: 28rpx;">{{item.name}}</text>
+											<text style="display:flex;width: 55%;font-size: 28rpx;">{{item.name}}</text>
 										</view>
 									</u-checkbox-group>
 								</view>
@@ -348,7 +348,7 @@
 											<!-- 按钮 -->
 											<u-checkbox @change="" v-model="item.checked" shape="circle" size="40">
 											</u-checkbox>
-											<text style="display:flex;width: 50%;font-size: 28rpx;">{{item.name}}</text>
+											<text style="display:flex;width: 55%;font-size: 28rpx;">{{item.name}}</text>
 										</view>
 									</u-checkbox-group>
 								</view>
@@ -382,7 +382,7 @@
 											<!-- 按钮 -->
 											<u-checkbox @change="" v-model="item.checked" shape="circle" size="40">
 											</u-checkbox>
-											<text style="display:flex;width: 50%;font-size: 28rpx;">{{item.name}}</text>
+											<text style="display:flex;width: 55%;font-size: 28rpx;">{{item.name}}</text>
 										</view>
 									</u-checkbox-group>
 								</view>
@@ -407,7 +407,7 @@
 											<u-checkbox @change="" v-model="item.checked" shape="circle" size="40">
 											</u-checkbox>
 											<!-- 字体 -->
-											<text style="display:flex;width: 50%;font-size: 28rpx;">{{item.name}}</text>
+											<text style="display:flex;width: 55%;font-size: 28rpx;">{{item.name}}</text>
 										</view>
 									</u-checkbox-group>
 								</view>
@@ -431,7 +431,7 @@
 											<!-- 按钮 -->
 											<u-checkbox @change="" v-model="item.checked" shape="circle" size="40">
 											</u-checkbox>
-											<text style="display:flex;width: 50%;font-size: 28rpx;">{{item.name}}</text>
+											<text style="display:flex;width: 55%;font-size: 28rpx;">{{item.name}}</text>
 										</view>
 									</u-checkbox-group>
 								</view>
@@ -465,18 +465,29 @@
 <script>
 	export default {
 		onLoad(options) {
-
+			this.getShows();
 		},
 		mounted() {
 
 		},
 		data() {
 			return {
+				// 控制列表显示:0=电话,1=图文,2=门诊预约
+				showList:[
+					{
+						flag: true
+					}, {
+						flag:true
+					},{
+						flag:true
+					},
+				],
 				hospital: [{
-					name: '***医院'
+					name: '熊科医院'
 				}, {
-					name: '*****医院'
+					name: '测试医院'
 				}],
+				hospitals: [],
 				hospitalcurrent: 0,
 				list: [{
 						name: '00:00-08:00'
@@ -496,410 +507,26 @@
 
 				//电话时间列表
 				dh: {
-					timeList1: [{
-						id: 0,
-						name: '00:00-01:00',
-						checked: false
-					}, {
-						id: 1,
-						name: '01:00-02:00',
-						checked: false
-					}, {
-						id: 2,
-						name: '02:00-03:00',
-						checked: false
-					}, {
-						id: 3,
-						name: '03:00-04:00',
-						checked: false
-					}, {
-						id: 4,
-						name: '04:00-05:00',
-						checked: false
-					}, {
-						id: 5,
-						name: '05:00-06:00',
-						checked: false
-					}, {
-						id: 6,
-						name: '06:00-07:00',
-						checked: false
-					}, {
-						id: 7,
-						name: '07:00-08:00',
-						checked: false
-					}],
-					timeList2: [{
-						id: 8,
-						name: '08:00-09:00',
-						checked: false
-					}, {
-						id: 9,
-						name: '09:00-10:00',
-						checked: false
-					}, {
-						id: 10,
-						name: '10:00-11:00',
-						checked: false
-					}, {
-						id: 11,
-						name: '11:00-12:00',
-						checked: false
-					}, {
-						id: 12,
-						name: '12:00-13:00',
-						checked: false
-					}, {
-						id: 13,
-						name: '13:00-14:00',
-						checked: false
-					}, {
-						id: 14,
-						name: '14:00-15:00',
-						checked: false
-					}, {
-						id: 15,
-						name: '15:00-16:00',
-						checked: false
-					}],
-					timeList3: [{
-						id: 16,
-						name: '16:00-17:00',
-						checked: false
-					}, {
-						id: 1,
-						name: '17:00-18:00',
-						checked: false
-					}, {
-						id: 2,
-						name: '18:00-19:00',
-						checked: false
-					}, {
-						id: 3,
-						name: '19:00-20:00',
-						checked: false
-					}, {
-						id: 4,
-						name: '20:00-21:00',
-						checked: false
-					}, {
-						id: 5,
-						name: '21:00-22:00',
-						checked: false
-					}, {
-						id: 6,
-						name: '22:00-23:00',
-						checked: false
-					}, {
-						id: 7,
-						name: '23:00-00:00',
-						checked: false
-					}],
+					timeList1: [],
+					timeList2: [],
+					timeList3: [],
 				},
 				//图文时间列表
 				tw: {
-					timeList1: [{
-						id: 0,
-						name: '00:00-01:00',
-						checked: false
-					}, {
-						id: 1,
-						name: '01:00-02:00',
-						checked: false
-					}, {
-						id: 2,
-						name: '02:00-03:00',
-						checked: false
-					}, {
-						id: 3,
-						name: '03:00-04:00',
-						checked: false
-					}, {
-						id: 4,
-						name: '04:00-05:00',
-						checked: false
-					}, {
-						id: 5,
-						name: '05:00-06:00',
-						checked: false
-					}, {
-						id: 6,
-						name: '06:00-07:00',
-						checked: false
-					}, {
-						id: 7,
-						name: '07:00-08:00',
-						checked: false
-					}],
-					timeList2: [{
-						id: 8,
-						name: '08:00-09:00',
-						checked: false
-					}, {
-						id: 9,
-						name: '09:00-10:00',
-						checked: false
-					}, {
-						id: 10,
-						name: '10:00-11:00',
-						checked: false
-					}, {
-						id: 11,
-						name: '11:00-12:00',
-						checked: false
-					}, {
-						id: 12,
-						name: '12:00-13:00',
-						checked: false
-					}, {
-						id: 13,
-						name: '13:00-14:00',
-						checked: false
-					}, {
-						id: 14,
-						name: '14:00-15:00',
-						checked: false
-					}, {
-						id: 15,
-						name: '15:00-16:00',
-						checked: false
-					}],
-					timeList3: [{
-						id: 16,
-						name: '16:00-17:00',
-						checked: false
-					}, {
-						id: 17,
-						name: '17:00-18:00',
-						checked: false
-					}, {
-						id: 18,
-						name: '18:00-19:00',
-						checked: false
-					}, {
-						id: 19,
-						name: '19:00-20:00',
-						checked: false
-					}, {
-						id: 20,
-						name: '20:00-21:00',
-						checked: false
-					}, {
-						id: 21,
-						name: '21:00-22:00',
-						checked: false
-					}, {
-						id: 22,
-						name: '22:00-23:00',
-						checked: false
-					}, {
-						id: 23,
-						name: '23:00-00:00',
-						checked: false
-					}],
+					timeList1: [],
+					timeList2: [],
+					timeList3: [],
 				},
 				//门诊时间列表
 				mz1: {
-					timeList1: [{
-						id: 0,
-						name: '00:00-01:00',
-						checked: false
-					}, {
-						id: 1,
-						name: '01:00-02:00',
-						checked: false
-					}, {
-						id: 2,
-						name: '02:00-03:00',
-						checked: false
-					}, {
-						id: 3,
-						name: '03:00-04:00',
-						checked: false
-					}, {
-						id: 4,
-						name: '04:00-05:00',
-						checked: false
-					}, {
-						id: 5,
-						name: '05:00-06:00',
-						checked: false
-					}, {
-						id: 6,
-						name: '06:00-07:00',
-						checked: false
-					}, {
-						id: 7,
-						name: '07:00-08:00',
-						checked: false
-					}],
-					timeList2: [{
-						id: 8,
-						name: '08:00-09:00',
-						checked: false
-					}, {
-						id: 9,
-						name: '09:00-10:00',
-						checked: false
-					}, {
-						id: 10,
-						name: '10:00-11:00',
-						checked: false
-					}, {
-						id: 11,
-						name: '11:00-12:00',
-						checked: false
-					}, {
-						id: 12,
-						name: '12:00-13:00',
-						checked: false
-					}, {
-						id: 13,
-						name: '13:00-14:00',
-						checked: false
-					}, {
-						id: 14,
-						name: '14:00-15:00',
-						checked: false
-					}, {
-						id: 15,
-						name: '15:00-16:00',
-						checked: false
-					}],
-					timeList3: [{
-						id: 16,
-						name: '16:00-17:00',
-						checked: false
-					}, {
-						id: 17,
-						name: '17:00-18:00',
-						checked: false
-					}, {
-						id: 18,
-						name: '18:00-19:00',
-						checked: false
-					}, {
-						id: 19,
-						name: '19:00-20:00',
-						checked: false
-					}, {
-						id: 20,
-						name: '20:00-21:00',
-						checked: false
-					}, {
-						id: 21,
-						name: '21:00-22:00',
-						checked: false
-					}, {
-						id: 22,
-						name: '22:00-23:00',
-						checked: false
-					}, {
-						id: 23,
-						name: '23:00-00:00',
-						checked: false
-					}],
+					timeList1: [],
+					timeList2: [],
+					timeList3: [],
 				},
 				mz2: {
-					timeList1: [{
-						id: 0,
-						name: '00:00-01:00',
-						checked: false
-					}, {
-						id: 1,
-						name: '01:00-02:00',
-						checked: false
-					}, {
-						id: 2,
-						name: '02:00-03:00',
-						checked: false
-					}, {
-						id: 3,
-						name: '03:00-04:00',
-						checked: false
-					}, {
-						id: 4,
-						name: '04:00-05:00',
-						checked: false
-					}, {
-						id: 5,
-						name: '05:00-06:00',
-						checked: false
-					}, {
-						id: 6,
-						name: '06:00-07:00',
-						checked: false
-					}, {
-						id: 7,
-						name: '07:00-08:00',
-						checked: false
-					}],
-					timeList2: [{
-						id: 8,
-						name: '08:00-09:00',
-						checked: false
-					}, {
-						id: 9,
-						name: '09:00-10:00',
-						checked: false
-					}, {
-						id: 10,
-						name: '10:00-11:00',
-						checked: false
-					}, {
-						id: 11,
-						name: '11:00-12:00',
-						checked: false
-					}, {
-						id: 12,
-						name: '12:00-13:00',
-						checked: false
-					}, {
-						id: 13,
-						name: '13:00-14:00',
-						checked: false
-					}, {
-						id: 14,
-						name: '14:00-15:00',
-						checked: false
-					}, {
-						id: 15,
-						name: '15:00-16:00',
-						checked: false
-					}],
-					timeList3: [{
-						id: 16,
-						name: '16:00-17:00',
-						checked: false
-					}, {
-						id: 17,
-						name: '17:00-18:00',
-						checked: false
-					}, {
-						id: 18,
-						name: '18:00-19:00',
-						checked: false
-					}, {
-						id: 19,
-						name: '19:00-20:00',
-						checked: false
-					}, {
-						id: 20,
-						name: '20:00-21:00',
-						checked: false
-					}, {
-						id: 21,
-						name: '21:00-22:00',
-						checked: false
-					}, {
-						id: 22,
-						name: '22:00-23:00',
-						checked: false
-					}, {
-						id: 23,
-						name: '23:00-00:00',
-						checked: false
-					}],
+					timeList1: [],
+					timeList2: [],
+					timeList3: [],
 				},
 				//全选
 				all1: [{
@@ -974,6 +601,135 @@
 			}
 		},
 		methods: {
+			/**
+			 * @author Liu Yuanhang
+			 * 获取页面显示状态以及数据
+			 */
+			getShows:async function(){
+				let res = await this.$request.post('doctor/getSettingList',{'type':2});
+				if(res.status==0){
+					
+					// 1.控制列表显示,2.渲染数据
+					// this.showList[0].flag = res.data.show.is_phone;
+					// this.showList[1].flag = res.data.show.is_chat;
+					// this.showList[2].flag = res.data.show.is_appoint;
+					
+					// 渲染显示的基础价格设置
+					if(res.data.list.phone!=null){
+						// 渲染电话的基础数据
+						this.telePhone.Basics = res.data.list.phone.base_price;
+						this.telePhone.additional = res.data.list.phone.step_price;
+						this.telePhone.peopleNum = res.data.list.phone.person;
+					}
+					
+					if(res.data.list.chat!=null){
+						// 渲染图文的基础数据
+						this.imgText.Basics = res.data.list.chat.base_price;
+						this.imgText.additional = res.data.list.chat.step_price;
+						this.imgText.peopleNum = res.data.list.chat.person;
+					}
+					
+					if(res.data.list.men!=null){
+						// 渲染门诊预约的基础数据
+						this.mz.Basics = res.data.list.men[0].base_price;
+						this.mz.additional = res.data.list.men[0].step_price;
+						this.mz.peopleNum = res.data.list.men[0].person;
+					}
+					
+					// 获取医院
+					if(res.data.org!=null){
+						console.log('获取医院',res.data.org)
+						this.hospital = res.data.org;
+						this.hospitals = res.data.orgs;
+					}
+					
+					/* 渲染时间 */
+					//电话的时间
+					 let dhtime = res.data.times;
+					this.dh.timeList1 = dhtime.list1;
+					this.dh.timeList2 = dhtime.list2;
+					this.dh.timeList3 = dhtime.list3;
+					
+					//图文的时间
+					let twtime = res.data.times;
+					this.tw.timeList1 = twtime.list1;
+					this.tw.timeList2 = twtime.list2;
+					this.tw.timeList3 = twtime.list3;
+				
+					// 门诊时间
+					let mz1 = res.data.times;
+					this.mz1.timeList1 = mz1.list1;
+					this.mz1.timeList2 = mz1.list2;
+					this.mz1.timeList3 = mz1.list3;
+					
+					let mz2 = res.data.times;
+					this.mz2.timeList1 = mz2.list1;
+					this.mz2.timeList2 = mz2.list2;
+					this.mz2.timeList3 = mz2.list3;
+				}
+				this.reanders(res.data);
+			},
+			/**
+			 * 渲染选中数据
+			 * @author Liu Yuan hang
+			 * @param {Object} e
+			 */
+			reanders(e){
+				uni.showLoading({title: '渲染中',mask:true});
+				let oks,dh1,dh2,dh3,tw1,tw2,tw3;
+			
+				
+				// 电话
+			 if(e.list.phone!=null){
+				dh1=this.dh.timeList1;
+				dh2=this.dh.timeList2;
+				dh3=this.dh.timeList3;
+				 let phones = e.list.phone.service_time;
+				 console.log('我是电话',phones)
+				 for(let i=0;i<dh1.length;i++){
+					if(phones.indexOf(dh1[i].id)!=-1){
+						dh1[i].checked = true
+					}
+				 }
+				 
+				 for(let i=0;i<dh2.length;i++){
+					if(phones.indexOf(dh2[i].id)!=-1){
+						dh2[i].checked = true
+					}
+				 }
+				 
+				 for(let i=0;i<dh3.length;i++){
+					if(phones.indexOf(dh3[i].id)!=-1){
+						dh3[i].checked = true
+					}
+				 }
+			 }
+			 
+			 // 图文资讯渲染
+			 // if(e.list.chat!=null){
+				// tw1=this.tw.timeList1;
+				// tw2=this.tw.timeList2;
+				// tw3=this.tw.timeList3;
+				//  let chat = e.list.chat.service_time;
+				//  console.log('我是图文',chat)
+				//  for(let i=0;i<tw1.length;i++){
+				// 	if(chat.indexOf(tw1[i].id)!=-1){
+				// 		tw1[i].checked = true
+				// 	}
+				//  }
+				//  for(let i=0;i<tw2.length;i++){
+				// 	if(chat.indexOf(tw2[i].id)!=-1){
+				// 		tw2[i].checked = true
+				// 	}
+				//  }
+				//  for(let i=0;i<tw3.length;i++){
+				// 	if(chat.indexOf(tw3[i].id)!=-1){
+				// 		tw3[i].checked = true
+				// 	}
+				//  }
+			 // }
+				uni.hideLoading();
+			},
 			bc(e) {
 				console.log('电话' + this.telePhone)
 				console.log('图文' + this.imgText)
@@ -1188,7 +944,7 @@
 
 	.but {
 		margin-bottom: 28rpx;
-		width: 50%;
+		width: 55%;
 		display: flex;
 		align-items: center;
 		justify-content: center;

+ 38 - 2
pages/service/setservice.vue

xqd xqd xqd xqd
@@ -25,7 +25,7 @@
 			</view>
 			<!-- 控制器 -->
 			<view style="width: 15%;">
-			<u-switch v-model="item.state" active-color="#84bb43" inactive-color="#eee" :disabled="item.Opening"></u-switch>
+			<u-switch v-model="item.state" :data-index="item.state" active-color="#84bb43" inactive-color="#eee" @change="openSave" :disabled="item.Opening"></u-switch>
 			</view>
 			
 		</view>
@@ -38,6 +38,7 @@
 
 		},
 		onLoad() {
+			this.getStatus();
 
 		},
 		mounted() {
@@ -59,7 +60,7 @@
 				}, {
 					zhonglei: '图文咨询',
 					state: false,
-					Opening: 1
+					Opening: 0
 				}, {
 					zhonglei: '门诊预约',
 					state: false,
@@ -68,6 +69,41 @@
 			}
 		},
 		methods: {
+			/**
+			 * @author Liu Yuanhang
+			 * 查询开启状态(未完成暂时没有审核表)
+			 */
+			getStatus:async function(){
+				let res = await this.$request.post('doctor/getSettingList',{'type':1});
+				if(res.status==0){
+					this.serbicelist[0].state = res.data.is_phone;
+					this.serbicelist[1].state = res.data.is_chat;
+					this.serbicelist[2].state = res.data.is_appoint
+				}
+			},
+			
+			/**
+			 * @author Liu Yuanhang
+			 * 修改状态
+			 * @param {Object} e
+			 */
+			openSave:async function(e){
+				let list = this.serbicelist;
+			
+				let data =  {"is_chat":list[1]['state'],"is_phone":list[0]['state'],"is_appoint":list[2]['state']}
+				if(typeof data != 'string'){
+					data = JSON.stringify(data);
+				}
+				let res = await this.$request.post('doctor/saveSettingList',{'type':1,'data':data});
+				console.log(res);
+				if(res.status==0){
+					uni.showToast({
+						title:'操作成功',
+						duration:2000,
+						icon:'none'
+					})
+				}
+			},
 			// 下一页
 			next(){
 				uni.navigateTo({