Browse Source

no message

宇宙无敌M1处理器的MacBook Pro 4 years ago
parent
commit
e14a8fc065

+ 0 - 1
common/env.js

xqd
@@ -1,6 +1,5 @@
 // export const envHost = 'https://t5.9026.com'; //开发环境
 export const envHost = 'https://wechat.fresherbaby.com'
-// export const imgHost='https://www.juyinzhengxin.com/';
 // export const imgHost = 'https://t5.9026.com/upload/';
 export const imgHost = 'https://wechat.fresherbaby.com/upload/'
 export const imgHost2 = 'https://wechat.fresherbaby.com/'

+ 0 - 1
common/request.js

xqd
@@ -52,7 +52,6 @@ const post = function(url, data, showloading) {
 			data: data,
 			header: header,
 			success: function(res) {
-				console.info(res)
 				if (res.statusCode == 200) {
 					if (res.data.code == 403) {
 						store.commit('logout');

+ 6 - 0
pages.json

xqd
@@ -593,6 +593,12 @@
 					"style": {
 						"navigationBarTitleText": "上传证件"
 					}
+				},
+				{
+					"path": "wechatrecord",
+					"style": {
+						"navigationBarTitleText": "病例记录"
+					}
 				}
 			]
 		},

+ 541 - 532
pages/childcare/child_care.vue

xqd
@@ -1,533 +1,542 @@
-<template>
-	<view class="">
-		<view class="cu-list menu">
-			<view class="cu-item arrow" @click="showpeople=true">
-				<view class="content">
-					<text class="text-grey">儿保用户</text>
-				</view>
-				<view class="action">
-					<text class="text-grey text-sm">{{value}}</text>
-				</view>
-			</view>
-			<view class="cu-item arrow" @click="xuanzefuwu">
-				<view class="content">
-					<text class="text-grey">服务机构</text>
-				</view>
-				<view class="action">
-					<text class="text-grey text-sm">{{servicejigou}}</text>
-				</view>
-			</view>
-			<view class="padding-sm bg-white" v-if="doctor!=''">
-				<scroll-view scroll-x="true" enable-flex="true" style="display: flex;height: 145rpx;">
-					<view class="flex flex-direction align-center justify-center margin-right-xs" @click="gotodoctorinfo(item.id)"
-					 style="width: 168rpx;height: 130rpx;" v-for="(item,index) in doctor.docter" :key="index">
-						<u-avatar :src="item.avatar" mode="circle"></u-avatar>
-						<view class="">
-							{{item.name}}
-						</view>
-					</view>
-				</scroll-view>
-				<view class="">
-					<rich-text :nodes="doctor.nurse_notice"></rich-text>
-				</view>
-			</view>
-			<view class="cu-item arrow" @click="vaccinesList">
-				<view class="content">
-					<text class="text-grey">儿保项目</text>
-				</view>
-				<view class="action">
-					<text class="text-grey text-sm" v-if="childcare.length==0">请选择儿保项目</text>
-					<text class="text-orange text-sm" v-else>合计:¥{{yimiao}}</text>
-				</view>
-			</view>
-			<view class="cu-item arrow" @click="yuyuetime">
-				<view class="content">
-					<text class="text-grey">预约时间</text>
-				</view>
-				<view class="action">
-					<text class="text-grey text-sm">{{yuyuevalue}}</text>
-				</view>
-			</view>
-			<view class="text-gray text-sm" style="margin: 25rpx 37rpx;line-height: 38rpx;">
-				<rich-text :nodes="nurse_notice"></rich-text>
-			</view>
-		</view>
-		<!-- <u-picker mode="multiSelector" @confirm="callbacktime" v-model="show" range-key="start_time_period" :range="multiSelector"></u-picker> -->
-		<u-popup v-model="showpeople" mode="bottom" border-radius="14" length="50%">
-			<view class="popup_title">
-				<view class="popup_title_text">选择就诊人</view>
-			</view>
-			<scroll-view style="height: 70%;" scroll-y="true">
-				<view class="popup_list" v-for="(item, index) in patientList" :key="index" :data-index="index" @click="xuanzehuanzhe(item)">
-					<view class="popup_list_title">
-						<view class="title">{{item.name}}</view>
-						<view class="body">
-							{{item.sex==1?'男':'女'}}
-						</view>
-					</view>
-					<view class="popup_list_button flex align-center">
-						<u-radio-group v-model="value">
-							<u-radio @change="peopleRadioChange" :key="index" :name="item.name">
-							</u-radio>
-						</u-radio-group>
-					</view>
-				</view>
-			</scroll-view>
-			<u-gap height="10" bg-color="#f9f9f9"></u-gap>
-			<view class="popup_button">
-				<image style="width: 32rpx;height: 32rpx;margin-right: 15rpx;" src="https://zhengda.oss-cn-chengdu.aliyuncs.com/baoma/static/img/addjiu.png"
-				 mode=""></image>
-				<view class="" @click="addPeople">
-					添加就诊人档案
-				</view>
-			</view>
-		</u-popup>
-		<view class="cu-bar bg-white tabbar" style="position: fixed;bottom: 0;width: 100%;">
-			<view class="submit" style="background-color: #0B73B9;color: white;" @click="gotopay">
-				提交申请
-			</view>
-		</view>
-		<u-popup v-model="dateshow" mode="bottom" :safe-area-inset-bottom="true" border-radius="14" length="50%" height="700rpx">
-			<datepicker :date="multiSelector" @callbacktime="callbacktime" type="5" ref="date"></datepicker>
-		</u-popup>
-		<view class="cu-tabbar-height"></view>
-		<view class="cu-tabbar-height"></view>
-	</view>
-</template>
-
-<script>
-	import datepicker from '../../components/datepicker/datepicker'
-	import {
-		mapState,
-		mapMutations,
-		mapGetters,
-		mapActions
-	} from 'vuex';
-	var user = require('../../common/user.js');
-	export default {
-		computed: {
-			...mapState(['user']),
-			...mapGetters({
-				hasLogin: 'verifyJwt'
-			})
-		},
-		components: {
-			datepicker
-		},
-		onLoad() {
-			this.$util.getAgreement().then(res => {
-				this.nurse_notice = res.data.nurse_notice
-			}).catch(err => {
-
-			})
-		},
-		onShow() {
-			let price = 0
-			if (this.doctor != null) {
-				this.servicejigou = this.doctor.name
-				this.jigouID = this.doctor.id
-			}
-			if (this.childcare.length != 0) {
-				this.childcare.forEach(item => {
-					price += item.price / 100
-				})
-				this.yimiao = price.toFixed(2)
-			}
-			this.getarchives()
-			this.multiSelector = []
-			this.gettime()
-		},
-		onHide() {
-			this.yimiao = ""
-		},
-		data() {
-			return {
-				showpeople: false,
-				huanzheID: "",
-				value: "请选择儿保用户",
-				patientList: [],
-				show: false,
-				yuyuevalue: "请选择预约时间",
-				multiSelector: [],
-				timehour: "",
-				doctor: "",
-				servicejigou: "请选择服务机构",
-				jigouID: "",
-				yimiao: "",
-				yimiaoInfo: "",
-				time: "",
-				childcare: [],
-				dateshow: false,
-				is_Scheduling: true,
-				nurse_notice: ""
-			}
-		},
-		methods: {
-			// 选中某个单选框时,由radio时触发
-			peopleRadioChange(e) {
-				console.log(e);
-			},
-			xuanzehuanzhe(item) {
-				this.huanzheID = item.id
-				this.value = item.name
-				this.showpeople = false
-			},
-			getarchives: async function() {
-				let res = await this.$request.post("/api/v1/patient/patientList")
-				if (res.status == 0) {
-					this.patientList = res.data.data
-				}
-			},
-			gettime: async function() {
-				if (this.doctor == '') {
-					return false
-				}
-				let res = await this.$request.post("/api/v1/docter/timePeriodList", {
-					organization_id: this.doctor.id,
-					schedule_type: 3
-				})
-				console.log(res)
-				if (res.status == 0) {
-					let times = []
-					// res.data.list.forEach(item => {
-					// 	item.start_time_period = item.start_time_period + '-' + item.end_time_period
-					// })
-					// this.multiSelector.push(res.data.dates)
-					// this.multiSelector.push(res.data.list)
-					if (res.data.data.length == 0) {
-						this.is_Scheduling = false
-						return false
-					}
-					let nian = res.data.data.map((item, index) => {
-						if (item.schedule_period.length != 0) {
-							return {
-								date: item.schedule_date,
-								id: item.id,
-								week: item.week
-							}
-						}
-					})
-					res.data.data.forEach(item => {
-						if (item.schedule_period.length != 0) {
-							let time = item.schedule_period.map(itm => {
-								if (item.id == itm.schedule_id) {
-									if (itm.time_period != null) {
-										itm.organization.org_id = itm.organization['id']
-										return {
-											yeardate: itm.schedule_date,
-											schedule_id: itm.schedule_id,
-											can_appoint_num: itm.can_appoint_num,
-											...itm.organization,
-											...itm.time_period
-										}
-									}
-								}
-							})
-							time = time.filter(item => item !== undefined)
-							times.push(time)
-						}
-					})
-					// time[0].forEach(item => {
-					// 	item.start_time_period = item.start_time_period + '-' + item.end_time_period
-					// })
-					nian = nian.filter(item => item !== undefined)
-					this.multiSelector.push(nian)
-					times.forEach(item => {
-						item.sort((a, b) => {
-							return a.end_time_period > b.end_time_period ? 1 : -1
-						})
-					})
-					this.multiSelector.push(times)
-					let arr = this.multiSelector[1][0]
-					arr.forEach(item => {
-						item.year = nian[0].date
-					})
-					this.$refs.date.rightday = arr
-					console.log(this.multiSelector)
-				}
-			},
-			callbacktime(item) {
-				// this.timehour = this.multiSelector[1][arr[1]].id
-				// this.yuyuevalue = this.multiSelector[0][arr[0]] + " " + this.multiSelector[1][arr[1]].start_time_period
-				// this.time = this.multiSelector[0][arr[0]]
-				
-				
-				let arr = item.year.split(/[- :]/)
-				let nndate = new Date(arr[0], arr[1] - 1, arr[2]);
-				nndate = Date.parse(nndate)
-				let currentTime = Date.parse(new Date())
-				if ((nndate - currentTime) / (1000 * 60 * 60 * 24) > this.doctor.can_vaccine_days) {
-					uni.showToast({
-						title: "尚未到可预约时间",
-						icon: "none"
-					})
-					return false
-				}
-				this.timehour = item.id
-				this.yuyuevalue = item.year + " " + item.start_time_period + "-" + item.end_time_period
-				this.time = item.year
-				this.dateshow = false
-			},
-			//添加就诊人
-			addPeople(e) {
-				uni.navigateTo({
-					url: "../archives/add_archives"
-				})
-			},
-			xuanzefuwu() {
-				this.yimiao = ""
-				this.yimiaoInfo = ""
-				this.childcare = []
-				uni.navigateTo({
-					url: "../vaccines/mechanism?type=" + 3
-				})
-			},
-			vaccinesList() {
-				if (this.doctor == '') {
-					uni.showToast({
-						title: "请先选择机构",
-						icon: "none"
-					})
-					return false
-				}
-				uni.navigateTo({
-					url: "child_careList?id=" + this.doctor.id
-				})
-			},
-			yuyuetime() {
-				if (this.multiSelector[0] == undefined || this.multiSelector[1] == undefined) {
-					uni.showToast({
-						title: "尚未排班",
-						icon: "none"
-					})
-					return false
-				}
-				if (this.multiSelector[0].length == 0 && this.multiSelector[1].length == 0) {
-					uni.showToast({
-						title: "尚未排班",
-						icon: "none"
-					})
-					return false
-				}
-				// if (!this.is_Scheduling) {
-				// 	uni.showToast({
-				// 		title: "尚未排班",
-				// 		icon: "none"
-				// 	})
-				// 	return false
-				// }
-				if (this.doctor == '') {
-					uni.showToast({
-						title: "请先选择机构",
-						icon: "none"
-					})
-					return false
-				}
-				this.dateshow = true
-			},
-			gotopay: async function() {
-				if (this.huanzheID == "") {
-					uni.showToast({
-						title: "请先选择接种用户",
-						icon: "none"
-					})
-					return false
-				}
-				if (this.doctor == "") {
-					uni.showToast({
-						title: "请先选择机构",
-						icon: "none"
-					})
-					return false
-				}
-				if (this.yimiao == "") {
-					uni.showToast({
-						title: "请先选择儿保项目",
-						icon: "none"
-					})
-					return false
-				}
-				if (this.timehour == "") {
-					uni.showToast({
-						title: "请先选择预约时间",
-						icon: "none"
-					})
-					return false
-				}
-				let obj = {
-					product_type: 5,
-					patient_id: this.huanzheID,
-					total_amount: this.yimiao,
-					organization_id: this.doctor.id,
-					schedule_date: this.time,
-					time_period_id: this.timehour,
-					nurse_ids: this.childcare.map(item => {
-						return item.id
-					}),
-					payment_type: 2
-				}
-				console.log(this.yimiao)
-				if (this.yimiao == 0) {
-					let res = await this.$request.post("/api/v1/order/appointPlaceOrder", {
-						product_type: obj.product_type,
-						patient_id: obj.patient_id,
-						total_amount: obj.total_amount * 100,
-						organization_id: obj.organization_id,
-						schedule_date: obj.schedule_date,
-						time_period_id: obj.time_period_id,
-						nurse_ids: JSON.stringify(obj.nurse_ids),
-						payment_type: obj.payment_type,
-					})
-					if (res.status == 0) {
-						uni.showToast({
-							title: "提交成功!",
-							icon: "none",
-							duration: 1000
-						})
-						setTimeout(() => {
-							uni.redirectTo({
-								url: "../order/order?type=" + obj.product_type
-							})
-						}, 1000)
-					}else{
-						uni.showModal({
-							title: "提示",
-							content: res.message,
-							confirmText: "确定",
-							showCancel: false,
-							success: (rr) => {
-								
-							}
-						})
-					}
-				} else {
-					uni.navigateTo({
-						url: "../order/payment?data=" + JSON.stringify(obj)
-					})
-				}
-
-			},
-			gotodoctorinfo(id) {
-				uni.navigateTo({
-					url: "../doctor_related/doctor_info?id=" + id + "&index=2"
-				})
-			}
-		}
-	}
-</script>
-
-<style lang="scss" scoped>
-	.main {}
-
-	.popup_title {
-		height: 15%;
-		width: 100%;
-		display: flex;
-		justify-content: center;
-		align-items: center;
-		border-bottom: 1rpx solid #f9f9f9;
-	}
-
-	.textareasty {
-		background-color: white;
-		border: 1px solid #efefef;
-		border-radius: 16rpx;
-		padding: 15rpx;
-		margin: 15rpx auto;
-	}
-
-	.popup_title_text {
-		width: auto;
-		height: auto;
-		font-size: 34rpx;
-		font-weight: 540;
-	}
-
-	.popup_list {
-		display: flex;
-		height: 10vh;
-		width: auto;
-		border-bottom: 1rpx solid #f9f9f9;
-	}
-
-	.popup_list_title {
-		height: 100%;
-		width: 90%;
-		display: inline-block;
-		padding: 0 0 0 30rpx;
-
-		.title {
-			height: 50%;
-			width: auto;
-			font-size: 32rpx;
-			font-weight: 500;
-			padding: 20rpx 0 0 0;
-		}
-
-		.body {
-			height: 50%;
-			color: #a1a1a1;
-			height: auto;
-			width: auto;
-			font-size: 30rpx;
-			padding: 10rpx 0 0 0;
-		}
-	}
-
-	.popup_button {
-		height: 80rpx;
-		width: 100%;
-		display: flex;
-		justify-content: center;
-		align-items: center;
-
-		view {
-			color: #0b73ba;
-			font-weight: 500;
-		}
-	}
-
-	/**选择号码的样式和选择患者不同
-	需要更改样式*/
-	.phone {
-		height: 20%;
-		width: 100%;
-
-		.list {
-			height: 100%;
-			width: 100%;
-			display: flex;
-			padding: 0 10rpx 0 30rpx;
-
-
-			.title {
-				height: 100%;
-				width: 65%;
-				font-size: 32rpx;
-				color: #7d7d7d;
-				display: flex;
-
-				align-items: center;
-			}
-
-			.phone {
-				height: 100%;
-				width: 30%;
-				font-size: 32rpx;
-				font-weight: 500;
-				display: flex;
-				justify-content: center;
-				align-items: center;
-			}
-
-			.button {
-				height: 100%;
-				width: 5%;
-				display: flex;
-				justify-content: center;
-				align-items: center;
-			}
-
-		}
-	}
+<template>
+	<view class="">
+		<view class="cu-list menu">
+			<view class="cu-item arrow" @click="showpeople=true">
+				<view class="content">
+					<text class="text-grey">儿保用户</text>
+				</view>
+				<view class="action">
+					<text class="text-grey text-sm">{{value}}</text>
+				</view>
+			</view>
+			<view class="cu-item arrow" @click="xuanzefuwu">
+				<view class="content">
+					<text class="text-grey">服务机构</text>
+				</view>
+				<view class="action">
+					<text class="text-grey text-sm">{{servicejigou}}</text>
+				</view>
+			</view>
+			<view class="padding-sm bg-white" v-if="doctor!=''">
+				<scroll-view scroll-x="true" enable-flex="true" style="display: flex;height: 145rpx;">
+					<view class="flex flex-direction align-center justify-center margin-right-xs"
+						@click="gotodoctorinfo(item.id)" style="width: 168rpx;height: 130rpx;"
+						v-for="(item,index) in doctor.docter" :key="index">
+						<u-avatar :src="item.avatar" mode="circle"></u-avatar>
+						<view class="">
+							{{item.name}}
+						</view>
+					</view>
+				</scroll-view>
+				<view class="">
+					<rich-text :nodes="doctor.nurse_notice"></rich-text>
+				</view>
+			</view>
+			<view class="cu-item arrow" @click="vaccinesList">
+				<view class="content">
+					<text class="text-grey">儿保项目</text>
+				</view>
+				<view class="action">
+					<text class="text-grey text-sm" v-if="childcare.length==0">请选择儿保项目</text>
+					<text class="text-orange text-sm" v-else>合计:¥{{yimiao}}</text>
+				</view>
+			</view>
+			<view class="cu-item arrow" @click="yuyuetime">
+				<view class="content">
+					<text class="text-grey">预约时间</text>
+				</view>
+				<view class="action">
+					<text class="text-grey text-sm">{{yuyuevalue}}</text>
+				</view>
+			</view>
+			<view class="text-gray text-sm" style="margin: 25rpx 37rpx;line-height: 38rpx;">
+				<rich-text :nodes="nurse_notice"></rich-text>
+			</view>
+		</view>
+		<!-- <u-picker mode="multiSelector" @confirm="callbacktime" v-model="show" range-key="start_time_period" :range="multiSelector"></u-picker> -->
+		<u-popup v-model="showpeople" mode="bottom" border-radius="14" length="50%">
+			<view class="popup_title">
+				<view class="popup_title_text">选择就诊人</view>
+			</view>
+			<scroll-view style="height: 70%;" scroll-y="true">
+				<view class="popup_list" v-for="(item, index) in patientList" :key="index" :data-index="index"
+					@click="xuanzehuanzhe(item)">
+					<view class="popup_list_title">
+						<view class="title">{{item.name}}</view>
+						<view class="body">
+							{{item.sex==1?'男':'女'}}
+						</view>
+					</view>
+					<view class="popup_list_button flex align-center">
+						<u-radio-group v-model="value">
+							<u-radio @change="peopleRadioChange" :key="index" :name="item.name">
+							</u-radio>
+						</u-radio-group>
+					</view>
+				</view>
+			</scroll-view>
+			<u-gap height="10" bg-color="#f9f9f9"></u-gap>
+			<view class="popup_button">
+				<image style="width: 32rpx;height: 32rpx;margin-right: 15rpx;"
+					src="https://zhengda.oss-cn-chengdu.aliyuncs.com/baoma/static/img/addjiu.png" mode=""></image>
+				<view class="" @click="addPeople">
+					添加就诊人档案
+				</view>
+			</view>
+		</u-popup>
+		<view class="cu-bar bg-white tabbar" style="position: fixed;bottom: 0;width: 100%;">
+			<view class="submit" style="background-color: #0B73B9;color: white;" @click="gotopay">
+				提交申请
+			</view>
+		</view>
+		<u-popup v-model="dateshow" mode="bottom" :safe-area-inset-bottom="true" border-radius="14" length="50%"
+			height="700rpx">
+			<datepicker :date="multiSelector" @callbacktime="callbacktime" type="5" ref="date"></datepicker>
+		</u-popup>
+		<view class="cu-tabbar-height"></view>
+		<view class="cu-tabbar-height"></view>
+	</view>
+</template>
+
+<script>
+	import datepicker from '../../components/datepicker/datepicker'
+	import {
+		mapState,
+		mapMutations,
+		mapGetters,
+		mapActions
+	} from 'vuex';
+	var user = require('../../common/user.js');
+	export default {
+		computed: {
+			...mapState(['user']),
+			...mapGetters({
+				hasLogin: 'verifyJwt'
+			})
+		},
+		components: {
+			datepicker
+		},
+		onLoad() {
+			this.$util.getAgreement().then(res => {
+				this.nurse_notice = res.data.nurse_notice
+			}).catch(err => {
+
+			})
+		},
+		onShow() {
+			let price = 0
+			if (this.doctor != null) {
+				this.servicejigou = this.doctor.name
+				this.jigouID = this.doctor.id
+			}
+			if (this.childcare.length != 0) {
+				this.childcare.forEach(item => {
+					price += item.price / 100
+				})
+				this.yimiao = price.toFixed(2)
+			}
+			this.getarchives()
+			this.multiSelector = []
+			this.gettime()
+		},
+		onHide() {
+			this.yimiao = ""
+		},
+		data() {
+			return {
+				showpeople: false,
+				huanzheID: "",
+				value: "请选择儿保用户",
+				patientList: [],
+				show: false,
+				yuyuevalue: "请选择预约时间",
+				multiSelector: [],
+				timehour: "",
+				doctor: "",
+				servicejigou: "请选择服务机构",
+				jigouID: "",
+				yimiao: "",
+				yimiaoInfo: "",
+				time: "",
+				childcare: [],
+				dateshow: false,
+				is_Scheduling: true,
+				nurse_notice: ""
+			}
+		},
+		methods: {
+			// 选中某个单选框时,由radio时触发
+			peopleRadioChange(e) {
+				console.log(e);
+			},
+			xuanzehuanzhe(item) {
+				this.huanzheID = item.id
+				this.value = item.name
+				this.showpeople = false
+			},
+			getarchives: async function() {
+				let res = await this.$request.post("/api/v1/patient/patientList")
+				if (res.status == 0) {
+					this.patientList = res.data.data
+				}
+			},
+			gettime: async function() {
+				if (this.doctor == '') {
+					return false
+				}
+				let res = await this.$request.post("/api/v1/docter/timePeriodList", {
+					organization_id: this.doctor.id,
+					schedule_type: 3
+				})
+				console.log(res)
+				if (res.status == 0) {
+					let times = []
+					// res.data.list.forEach(item => {
+					// 	item.start_time_period = item.start_time_period + '-' + item.end_time_period
+					// })
+					// this.multiSelector.push(res.data.dates)
+					// this.multiSelector.push(res.data.list)
+					if (res.data.data.length == 0) {
+						this.is_Scheduling = false
+						return false
+					}
+					let nian = res.data.data.map((item, index) => {
+						if (item.schedule_period.length != 0) {
+							return {
+								date: item.schedule_date,
+								id: item.id,
+								week: item.week
+							}
+						}
+					})
+					res.data.data.forEach(item => {
+						if (item.schedule_period.length != 0) {
+							let time = item.schedule_period.map(itm => {
+								if (item.id == itm.schedule_id) {
+									if (itm.time_period != null) {
+										itm.organization.org_id = itm.organization['id']
+										return {
+											yeardate: itm.schedule_date,
+											schedule_id: itm.schedule_id,
+											can_appoint_num: itm.can_appoint_num,
+											...itm.organization,
+											...itm.time_period
+										}
+									}
+								}
+							})
+							time = time.filter(item => item !== undefined)
+							times.push(time)
+						}
+					})
+					// time[0].forEach(item => {
+					// 	item.start_time_period = item.start_time_period + '-' + item.end_time_period
+					// })
+					nian = nian.filter(item => item !== undefined)
+					this.multiSelector.push(nian)
+					times.forEach(item => {
+						item.sort((a, b) => {
+							return a.end_time_period > b.end_time_period ? 1 : -1
+						})
+					})
+					this.multiSelector.push(times)
+					let arr = this.multiSelector[1][0]
+					arr.forEach(item => {
+						item.year = nian[0].date
+					})
+					this.$refs.date.rightday = arr
+					console.log(this.multiSelector)
+				}
+			},
+			callbacktime(item) {
+				// this.timehour = this.multiSelector[1][arr[1]].id
+				// this.yuyuevalue = this.multiSelector[0][arr[0]] + " " + this.multiSelector[1][arr[1]].start_time_period
+				// this.time = this.multiSelector[0][arr[0]]
+
+				let arr = item.year.split(/[- :]/)
+				let nndate = new Date(arr[0], arr[1] - 1, arr[2]);
+				nndate = Date.parse(nndate)
+				let currentTime = Date.parse(new Date())
+				if ((nndate - currentTime) / (1000 * 60 * 60 * 24) > this.doctor.can_nurse_days) {
+					uni.showToast({
+						title: "尚未到可预约时间",
+						icon: "none"
+					})
+					return false
+				}
+				this.timehour = item.id
+				this.yuyuevalue = item.year + " " + item.start_time_period + "-" + item.end_time_period
+				this.time = item.year
+				this.dateshow = false
+			},
+			//添加就诊人
+			addPeople(e) {
+				uni.navigateTo({
+					url: "../archives/add_archives"
+				})
+			},
+			xuanzefuwu() {
+				this.yimiao = ""
+				this.yimiaoInfo = ""
+				this.childcare = []
+				uni.navigateTo({
+					url: "../vaccines/mechanism?type=" + 3
+				})
+			},
+			vaccinesList() {
+				if (this.doctor == '') {
+					uni.showToast({
+						title: "请先选择机构",
+						icon: "none"
+					})
+					return false
+				}
+				uni.navigateTo({
+					url: "child_careList?id=" + this.doctor.id
+				})
+			},
+			yuyuetime() {
+				if (this.multiSelector[0] == undefined || this.multiSelector[1] == undefined) {
+					uni.showToast({
+						title: "尚未排班",
+						icon: "none"
+					})
+					return false
+				}
+				if (this.multiSelector[0].length == 0 && this.multiSelector[1].length == 0) {
+					uni.showToast({
+						title: "尚未排班",
+						icon: "none"
+					})
+					return false
+				}
+				// if (!this.is_Scheduling) {
+				// 	uni.showToast({
+				// 		title: "尚未排班",
+				// 		icon: "none"
+				// 	})
+				// 	return false
+				// }
+				if (this.doctor == '') {
+					uni.showToast({
+						title: "请先选择机构",
+						icon: "none"
+					})
+					return false
+				}
+				this.dateshow = true
+			},
+			gotopay: async function() {
+				if (this.huanzheID == "") {
+					uni.showToast({
+						title: "请先选择接种用户",
+						icon: "none"
+					})
+					return false
+				}
+				if (this.doctor == "") {
+					uni.showToast({
+						title: "请先选择机构",
+						icon: "none"
+					})
+					return false
+				}
+				if (this.yimiao == "") {
+					uni.showToast({
+						title: "请先选择儿保项目",
+						icon: "none"
+					})
+					return false
+				}
+				if (this.timehour == "") {
+					uni.showToast({
+						title: "请先选择预约时间",
+						icon: "none"
+					})
+					return false
+				}
+				let obj = {
+					product_type: 5,
+					patient_id: this.huanzheID,
+					total_amount: this.yimiao,
+					organization_id: this.doctor.id,
+					schedule_date: this.time,
+					time_period_id: this.timehour,
+					nurse_ids: this.childcare.map(item => {
+						return item.id
+					}),
+					payment_type: 2
+				}
+				console.log(this.yimiao)
+				if (this.yimiao == 0) {
+					let res = await this.$request.post("/api/v1/order/appointPlaceOrder", {
+						product_type: obj.product_type,
+						patient_id: obj.patient_id,
+						total_amount: obj.total_amount * 100,
+						organization_id: obj.organization_id,
+						schedule_date: obj.schedule_date,
+						time_period_id: obj.time_period_id,
+						nurse_ids: JSON.stringify(obj.nurse_ids),
+						payment_type: obj.payment_type,
+					})
+					if (res.status == 0) {
+						this.orderPay(res.data.order_id, obj.product_type)
+					} else {
+						uni.showModal({
+							title: "提示",
+							content: res.message,
+							confirmText: "确定",
+							showCancel: false,
+							success: (rr) => {
+
+							}
+						})
+					}
+				} else {
+					uni.navigateTo({
+						url: "../order/payment?data=" + JSON.stringify(obj)
+					})
+				}
+			},
+			gotodoctorinfo(id) {
+				uni.navigateTo({
+					url: "../doctor_related/doctor_info?id=" + id + "&index=2"
+				})
+			},
+			async orderPay(num, type) {
+				let res = await this.$request.post("/api/v1/order/orderPay", {
+					order_id: num,
+				})
+				if (res.status == 0) {
+					uni.showToast({
+						title: "提交成功!",
+						icon: "none",
+						duration: 1000
+					})
+					setTimeout(() => {
+						uni.redirectTo({
+							url: "../order/order?type=" + type
+						})
+					}, 1000)
+				}
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.main {}
+
+	.popup_title {
+		height: 15%;
+		width: 100%;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		border-bottom: 1rpx solid #f9f9f9;
+	}
+
+	.textareasty {
+		background-color: white;
+		border: 1px solid #efefef;
+		border-radius: 16rpx;
+		padding: 15rpx;
+		margin: 15rpx auto;
+	}
+
+	.popup_title_text {
+		width: auto;
+		height: auto;
+		font-size: 34rpx;
+		font-weight: 540;
+	}
+
+	.popup_list {
+		display: flex;
+		height: 10vh;
+		width: auto;
+		border-bottom: 1rpx solid #f9f9f9;
+	}
+
+	.popup_list_title {
+		height: 100%;
+		width: 90%;
+		display: inline-block;
+		padding: 0 0 0 30rpx;
+
+		.title {
+			height: 50%;
+			width: auto;
+			font-size: 32rpx;
+			font-weight: 500;
+			padding: 20rpx 0 0 0;
+		}
+
+		.body {
+			height: 50%;
+			color: #a1a1a1;
+			height: auto;
+			width: auto;
+			font-size: 30rpx;
+			padding: 10rpx 0 0 0;
+		}
+	}
+
+	.popup_button {
+		height: 80rpx;
+		width: 100%;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+
+		view {
+			color: #0b73ba;
+			font-weight: 500;
+		}
+	}
+
+	/**选择号码的样式和选择患者不同
+	需要更改样式*/
+	.phone {
+		height: 20%;
+		width: 100%;
+
+		.list {
+			height: 100%;
+			width: 100%;
+			display: flex;
+			padding: 0 10rpx 0 30rpx;
+
+
+			.title {
+				height: 100%;
+				width: 65%;
+				font-size: 32rpx;
+				color: #7d7d7d;
+				display: flex;
+
+				align-items: center;
+			}
+
+			.phone {
+				height: 100%;
+				width: 30%;
+				font-size: 32rpx;
+				font-weight: 500;
+				display: flex;
+				justify-content: center;
+				align-items: center;
+			}
+
+			.button {
+				height: 100%;
+				width: 5%;
+				display: flex;
+				justify-content: center;
+				align-items: center;
+			}
+
+		}
+	}
 </style>

+ 50 - 24
pages/common_tools/my_consulting/consultingInfo.vue

xqd xqd xqd xqd
@@ -1,7 +1,7 @@
 <template>
 	<view class="main">
 		<load-refresh ref="loadRefresh" :isPaging="false" :isRefresh="true" refreshType="loader" refreshTime="2000"
-		 heightReduce="10" backgroundCover="#fff" @refresh="refresh">
+			heightReduce="10" backgroundCover="#fff" @refresh="refresh">
 			<view slot="content-list">
 				<view class="list">
 					<!-- 头像 -->
@@ -16,7 +16,9 @@
 						<!-- 名字+标签 -->
 						<view class="name">
 							<view style="margin-right: 15rpx;">{{orderInfo.docter.name}}</view>
-							<view class="label" v-for="(itm,idx) in orderInfo.docter.label_texts" :key="index">{{itm.label_name}}</view>
+							<view class="label" v-for="(itm,idx) in orderInfo.docter.label_texts" :key="index">
+								{{itm.label_name}}
+							</view>
 						</view>
 						<!-- 科室 -->
 						<view class="department">
@@ -35,36 +37,50 @@
 						<text class="font_style">{{orderInfo.order_sn}}</text>
 					</view>
 					<view class="text-gray margin-top-xs padding-tb-xs">
-						<text class="text-leftstyle">状态:</text><text v-if="orderInfo.order_status==1" class="font_style" style="color: rgb(238, 170, 63);">未支付</text>
-						<text v-else-if="orderInfo.order_status==2" class="font_style" style="color: rgb(238, 170, 63);">待接单</text>
-						<text v-else-if="orderInfo.order_status==3" class="font_style" style="color: rgb(238, 170, 63);">进行中</text>
-						<text v-else-if="orderInfo.order_status==4" class="font_style" style="color: rgb(238, 170, 63);">已完成</text>
-						<text v-else-if="orderInfo.order_status==5" class="font_style" style="color: rgb(238, 170, 63);">已取消</text>
+						<text class="text-leftstyle">状态:</text><text v-if="orderInfo.order_status==1" class="font_style"
+							style="color: rgb(238, 170, 63);">未支付</text>
+						<text v-else-if="orderInfo.order_status==2" class="font_style"
+							style="color: rgb(238, 170, 63);">待接单</text>
+						<text v-else-if="orderInfo.order_status==3" class="font_style"
+							style="color: rgb(238, 170, 63);">进行中</text>
+						<text v-else-if="orderInfo.order_status==4" class="font_style"
+							style="color: rgb(238, 170, 63);">已完成</text>
+						<text v-else-if="orderInfo.order_status==5" class="font_style"
+							style="color: rgb(238, 170, 63);">已取消</text>
 					</view>
 					<view class="text-gray margin-top-xs padding-tb-xs">
-						<text class="text-leftstyle">下单时间:</text><text class="font_style">{{orderInfo.created_at}}</text>
+						<text class="text-leftstyle">下单时间:</text><text
+							class="font_style">{{orderInfo.created_at}}</text>
 					</view>
 					<view class="text-gray margin-top-xs padding-tb-xs" v-if="orderInfo.end_time!=0">
-						<text class="text-leftstyle">结束时间:</text><text class="font_style">{{formatDate(orderInfo.end_time * 1000)}}</text>
+						<text class="text-leftstyle">结束时间:</text><text
+							class="font_style">{{formatDate(orderInfo.end_time * 1000)}}</text>
 					</view>
 					<view class="text-gray margin-top-xs padding-tb-xs" v-if="orderInfo.product_type==1">
-						<text class="text-leftstyle">咨询时长:</text><text class="font_style">{{orderInfo.consult_duration}}秒</text>
+						<text class="text-leftstyle">咨询时长:</text><text
+							class="font_style">{{orderInfo.consult_duration}}秒</text>
 					</view>
 					<view class="text-gray margin-top-xs padding-tb-xs">
-						<text class="text-leftstyle">咨询患者:</text><text class="font_style">{{orderInfo.order_patient.name}}</text>
+						<text class="text-leftstyle">咨询患者:</text><text
+							class="font_style">{{orderInfo.order_patient.name}}</text>
 					</view>
 					<view class="text-gray margin-top-xs padding-tb-xs">
-						<text class="text-leftstyle">已付款:</text><text class="font_style">¥{{orderInfo.total_amount/100}}</text>
+						<text class="text-leftstyle">{{orderInfo.order_status==1?'未付款:':'已付款:'}}</text><text
+							class="font_style">¥{{orderInfo.total_amount/100}}</text>
 					</view>
 				</view>
 				<view class="cu-tabbar-height"></view>
 				<view class="cu-tabbar-height"></view>
-				<view class="cu-bar bg-white tabbar" v-if="orderInfo.order_status==4&&orderInfo.product_type==2" style="position: fixed;bottom: 0;width: 100%;display: flex;justify-content: flex-end;height: 108rpx;">
-					<u-button shape="circle" :custom-style="customStyle" @click="gotochat" :ripple="true">咨询会话</u-button>
+				<view class="cu-bar bg-white tabbar" v-if="orderInfo.order_status==4&&orderInfo.product_type==2"
+					style="position: fixed;bottom: 0;width: 100%;display: flex;justify-content: flex-end;height: 108rpx;">
+					<u-button shape="circle" :custom-style="customStyle" @click="gotochat" :ripple="true">咨询会话
+					</u-button>
 					<!-- <u-button shape="circle" :custom-style="customStyle" @click="gotopinjia" :ripple="true">查看评价</u-button> -->
-					<u-button shape="circle" :custom-style="customStylebtn" @click="gosuggest" :ripple="true">意见单</u-button>
+					<u-button shape="circle" :custom-style="customStylebtn" @click="gosuggest" :ripple="true">意见单
+					</u-button>
 				</view>
-				<view class="cu-bar bg-white tabbar" v-else-if="orderInfo.order_status==3" style="position: fixed;bottom: 0;width: 100%;">
+				<view class="cu-bar bg-white tabbar" v-else-if="orderInfo.order_status==3"
+					style="position: fixed;bottom: 0;width: 100%;">
 					<view class="submit" style="background-color: #0B73B9;color: white;" @click="gotochat">
 						{{orderInfo.product_type==1?'回拨':'咨询会话'}}
 					</view>
@@ -145,15 +161,25 @@
 						phoneNumber: this.orderInfo.callback_phone
 					})
 				} else if (this.orderInfo.product_type == 2) {
-					console.log(this.orderInfo.docter)
-					let obj = {
-						id: this.orderInfo.docter.id,
-						name: this.orderInfo.docter.name,
-						avatar: this.orderInfo.docter.avatar
+					console.log(this.orderInfo.order_status)
+					if (this.orderInfo.order_status == 4) {
+						uni.showModal({
+							title: "提示",
+							showCancel: false,
+							content: "请前往患者档案详情查看详细聊天记录",
+						})
+						return false
+					} else {
+						let obj = {
+							id: this.orderInfo.docter.id,
+							name: this.orderInfo.docter.name,
+							avatar: this.orderInfo.docter.avatar
+						}
+						uni.navigateTo({
+							url: "conversation?doctor=" + JSON.stringify(obj) + "&doctorstatus=" + this.orderInfo
+								.order_status
+						})
 					}
-					uni.navigateTo({
-						url: "conversation?doctor=" + JSON.stringify(obj) + "&doctorstatus=" + this.orderInfo.order_status
-					})
 				}
 			}
 		}

+ 494 - 478
pages/login/login.vue

xqd
@@ -1,484 +1,500 @@
-<template>
-	<view class="register">
-
-		<view class="content">
-			<!-- 头部logo -->
-			<view class="header">
-				<image src="https://zhengda.oss-cn-chengdu.aliyuncs.com/baoma/static/img/loginlogo.png"></image>
-			</view>
-			<!-- 主体 -->
-			<view class="main">
-				<wInput v-model="phoneData" type="number" maxlength="11" placeholder="手机号"></wInput>
-				<wInput v-model="verCode" type="number" maxlength="6" placeholder="验证码" isShowCode ref="runCode" @setCode="getVerCode()"></wInput>
-			</view>
-
-			<wButton class="wbutton" text="登 录" :rotate="isRotate" @click.native="startReg()" bgColor="linear-gradient(to right, rgba(11,115,185,0.7), rgba(11,115,185,0.6))"></wButton>
-			<view class="flex justify-between align-center" style="margin-top: 60rpx;">
-				<button v-if="!isphoneNum" style="margin-top: 20rpx;" :class="['buttonBorder',!istrue?'dlbutton':'dlbutton_loading']"
-				 open-type="getPhoneNumber" @getphonenumber="getphone">
-					<view :class="istrue?'rotate_loop':''">
-						<text v-if="istrue" class="cuIcon cuIcon-loading1"></text>
-						<view v-if="!istrue">
-							<slot name="text">微信授权一键登录</slot>
-						</view>
-					</view>
-				</button>
-				<button v-else style="margin-top: 20rpx;" :class="['buttonBorder',!istrue?'dlbutton':'dlbutton_loading']" open-type="getUserInfo"
-				 @getuserinfo="wxLogin">
-					<view :class="istrue?'rotate_loop':''">
-						<text v-if="istrue" class="cuIcon cuIcon-loading1"></text>
-						<view v-if="!istrue">
-							<slot name="text">微信授权一键登录</slot>
-						</view>
-					</view>
-				</button>
-				<button style="margin-top: 20rpx;color:#0B73B9 ;" class="buttonBorder dlbutton" @click="toindex()">
-					<slot name="text">游客登录</slot>
-				</button>
-			</view>
-
-			<u-popup v-model="show" mode="center" :mask-close-able="false" border-radius="16">
-				<view style="width: 500rpx;height: 400rpx;position: relative;" class="flex flex-direction align-center justify-center">
-					<view class="text-xl text-bold" style="position: absolute;top:30rpx">
-						提示
-					</view>
-					<view class="text-gray margin-top-sm text-lg padding-lr-sm">
-						需要获取用户个人信息及资料方便后续注册
-					</view>
-					<button open-type="getUserInfo" style="width: 100%;font-size: 32rpx;position: absolute;bottom: 0;" @getuserinfo="wxLogin">确认授权</button>
-				</view>
-			</u-popup>
-
-			<!-- 底部信息 -->
-			<view class="footer">
-				<view class="flex align-center" @click="isqueren">
-					<image :src="imgitem.name" mode="" style="width: 30rpx;height: 30rpx;"></image>
-					<text style="color: #0B73B9;" @click.stop="gotoxieyi">《熙宝HMO》</text>
-					<text style="color: #999999;">服务协议</text>
-				</view>
-			</view>
-		</view>
-		<u-no-network></u-no-network>
-	</view>
-</template>
-
-<script>
-	var _this;
-	import wInput from '../../components/watch-input.vue' //input
-	import wButton from '../../components/watch-button.vue' //button
-	var user = require('../../common/user.js');
-	import {
-		mapState,
-		mapMutations,
-		mapGetters,
-		mapActions
-	} from 'vuex';
-	import IMService from "../../common/goeasyimutil.js";
-	import store from '@/store'
-	export default {
-		computed: {
-			...mapGetters({
-				hasLogin: 'verifyJwt'
-			}),
-			...mapState(['user'])
-		},
-		data() {
-			return {
-				//logo图片 base64
-				phoneData: '', // 用户/电话
-				verCode: "", //验证码
-				showAgree: true, //协议是否选择
-				isRotate: false, //是否加载旋转
-				istrue: false,
-				num: 1,
-				imgitem: {
-					istrue: false,
-					name: "https://zhengda.oss-cn-chengdu.aliyuncs.com/baoma/static/img/xieyi.png"
-				},
-				show: false,
-				isphoneNum: false,
-				nodeEl: ""
-			}
-		},
-		// onShow() {
-		// 	uni.checkSession({
-		// 		success() {
-		// 			console.log("已登录")
-		// 			return;
-		// 		},
-		// 		fail() {
-		// 			uni.navigateTo({
-		// 				url: "../doctor_related/doctor_info"
-		// 			})
-		// 		}
-		// 	})
-		// },
-		components: {
-			wInput,
-			wButton,
-		},
-		mounted() {
-			_this = this;
-		},
-		onLoad() {
-			this.isphone()
-			this.$util.getAgreement().then(res => {
-				this.nodeEl = res.data.login_protocol
-				console.log(res)
-			}).catch(err => {
-
-			})
-
-		},
-		methods: {
-			gotoxieyi() {
-				uni.navigateTo({
-					url: "../index/agreement?data=" + encodeURIComponent(this.nodeEl)
-				})
-			},
-			isShowAgree() {
-				//是否选择协议
-				_this.showAgree = !_this.showAgree;
-			},
-			getVerCode: async function() {
-				//获取验证码
-				if (_this.phoneData.length != 11) {
-					uni.showToast({
-						icon: 'none',
-						position: 'bottom',
-						title: '手机号不正确'
-					});
-					return false;
-				}
-				if (!_this.$util.isNum(_this.phoneData)) {
-					uni.showToast({
-						title: "手机号不正确",
-						icon: "none",
-						position: "bottom"
-					})
-					return false
-				}
-				if (!_this.$util.isPhoneNumber(_this.phoneData)) {
-					uni.showToast({
-						title: "手机号不正确",
-						icon: "none",
-						position: "bottom"
-					})
-					return false
-				}
-				let res = await this.$request.post("/api/v1/common/sendVerifyCode", {
-					phone: this.phoneData,
-					type: 1
-				})
-				console.log(res)
-				if (res.status == 0) {
-					this.$refs.runCode.$emit('runCode'); //触发倒计时(一般用于请求成功验证码后调用)
-				}
-				// _this.$refs.runCode.$emit('runCode', 0); //假装模拟下需要 终止倒计时
-			},
-			startReg: function() {
-				//注册
-				if (this.isRotate) {
-					//判断是否加载中,避免重复点击请求
-					return false;
-				}
-				if (!this.imgitem.istrue) {
-					uni.showToast({
-						icon: 'none',
-						position: 'bottom',
-						title: '请先同意协议'
-					});
-					return false;
-				}
-				if (this.phoneData.length != 11) {
-					uni.showToast({
-						icon: 'none',
-						position: 'bottom',
-						title: '手机号不正确'
-					});
-					return false;
-				}
-				if (this.verCode.length != 6) {
-					uni.showToast({
-						icon: 'none',
-						position: 'bottom',
-						title: '验证码不正确'
-					});
-					return false;
-				}
-				uni.login({
-					success: (res) => {
-						_this.isRotate = true
-						this.$request.post("/api/v1/common/wxLogin", {
-							wechat_code: res.code,
-							phone: this.phoneData,
-							verify_code: this.verCode
-						}).then(res => {
-							if (res.status == 0) {
-								if (res.data.token) {
-									store.commit('setJwt', res.data.token);
-									store.commit('setUser', res.data);
-									store.commit('login');
-									let loginResult = getApp().globalData.imService.login({
-										flag: "member_" + res.data.id,
-										nickname: res.data.nickname,
-										avatar: res.data.avatar
+<template>
+	<view class="register">
+
+		<view class="content">
+			<!-- 头部logo -->
+			<view class="header">
+				<image src="https://zhengda.oss-cn-chengdu.aliyuncs.com/baoma/static/img/loginlogo.png"></image>
+			</view>
+			<!-- 主体 -->
+			<view class="main">
+				<wInput v-model="phoneData" type="number" maxlength="11" placeholder="手机号"></wInput>
+				<wInput v-model="verCode" type="number" maxlength="6" placeholder="验证码" isShowCode ref="runCode"
+					@setCode="getVerCode()"></wInput>
+			</view>
+
+			<wButton class="wbutton" text="登 录" :rotate="isRotate" @click.native="startReg()"
+				bgColor="linear-gradient(to right, rgba(11,115,185,0.7), rgba(11,115,185,0.6))"></wButton>
+			<view class="flex justify-between align-center" style="margin-top: 60rpx;">
+				<button v-if="!isphoneNum" style="margin-top: 20rpx;"
+					:class="['buttonBorder',!istrue?'dlbutton':'dlbutton_loading']" open-type="getPhoneNumber"
+					@getphonenumber="getphone">
+					<view :class="istrue?'rotate_loop':''">
+						<text v-if="istrue" class="cuIcon cuIcon-loading1"></text>
+						<view v-if="!istrue">
+							<slot name="text">微信授权一键登录</slot>
+						</view>
+					</view>
+				</button>
+				<button v-else style="margin-top: 20rpx;"
+					:class="['buttonBorder',!istrue?'dlbutton':'dlbutton_loading']" @click="wxLogin">
+					<view :class="istrue?'rotate_loop':''">
+						<text v-if="istrue" class="cuIcon cuIcon-loading1"></text>
+						<view v-if="!istrue">
+							<slot name="text">微信授权一键登录</slot>
+						</view>
+					</view>
+				</button>
+				<button style="margin-top: 20rpx;color:#0B73B9 ;" class="buttonBorder dlbutton" @click="toindex()">
+					<slot name="text">游客登录</slot>
+				</button>
+			</view>
+
+			<u-popup v-model="show" mode="center" :mask-close-able="false" border-radius="16">
+				<view style="width: 500rpx;height: 400rpx;position: relative;"
+					class="flex flex-direction align-center justify-center">
+					<view class="text-xl text-bold" style="position: absolute;top:30rpx">
+						提示
+					</view>
+					<view class="text-gray margin-top-sm text-lg padding-lr-sm">
+						需要获取用户个人信息及资料方便后续注册
+					</view>
+					<button style="width: 100%;font-size: 32rpx;position: absolute;bottom: 0;"
+						@click="wxLogin">确认授权</button>
+				</view>
+			</u-popup>
+
+			<!-- 底部信息 -->
+			<view class="footer">
+				<view class="flex align-center" @click="isqueren">
+					<image :src="imgitem.name" mode="" style="width: 30rpx;height: 30rpx;"></image>
+					<text style="color: #0B73B9;" @click.stop="gotoxieyi">《熙宝HMO》</text>
+					<text style="color: #999999;">服务协议</text>
+				</view>
+			</view>
+		</view>
+		<u-no-network></u-no-network>
+	</view>
+</template>
+
+<script>
+	var _this;
+	import wInput from '../../components/watch-input.vue' //input
+	import wButton from '../../components/watch-button.vue' //button
+	var user = require('../../common/user.js');
+	import {
+		mapState,
+		mapMutations,
+		mapGetters,
+		mapActions
+	} from 'vuex';
+	import IMService from "../../common/goeasyimutil.js";
+	import store from '@/store'
+	export default {
+		computed: {
+			...mapGetters({
+				hasLogin: 'verifyJwt'
+			}),
+			...mapState(['user'])
+		},
+		data() {
+			return {
+				//logo图片 base64
+				phoneData: '', // 用户/电话
+				verCode: "", //验证码
+				showAgree: true, //协议是否选择
+				isRotate: false, //是否加载旋转
+				istrue: false,
+				num: 1,
+				imgitem: {
+					istrue: false,
+					name: "https://zhengda.oss-cn-chengdu.aliyuncs.com/baoma/static/img/xieyi.png"
+				},
+				show: false,
+				isphoneNum: false,
+				nodeEl: ""
+			}
+		},
+		// onShow() {
+		// 	uni.checkSession({
+		// 		success() {
+		// 			console.log("已登录")
+		// 			return;
+		// 		},
+		// 		fail() {
+		// 			uni.navigateTo({
+		// 				url: "../doctor_related/doctor_info"
+		// 			})
+		// 		}
+		// 	})
+		// },
+		components: {
+			wInput,
+			wButton,
+		},
+		mounted() {
+			_this = this;
+		},
+		onLoad() {
+			this.isphone()
+			this.$util.getAgreement().then(res => {
+				this.nodeEl = res.data.login_protocol
+				console.log(res)
+			}).catch(err => {
+
+			})
+
+		},
+		methods: {
+			gotoxieyi() {
+				uni.navigateTo({
+					url: "../index/agreement?data=" + encodeURIComponent(this.nodeEl)
+				})
+			},
+			isShowAgree() {
+				//是否选择协议
+				_this.showAgree = !_this.showAgree;
+			},
+			getVerCode: async function() {
+				//获取验证码
+				if (_this.phoneData.length != 11) {
+					uni.showToast({
+						icon: 'none',
+						position: 'bottom',
+						title: '手机号不正确'
+					});
+					return false;
+				}
+				if (!_this.$util.isNum(_this.phoneData)) {
+					uni.showToast({
+						title: "手机号不正确",
+						icon: "none",
+						position: "bottom"
+					})
+					return false
+				}
+				if (!_this.$util.isPhoneNumber(_this.phoneData)) {
+					uni.showToast({
+						title: "手机号不正确",
+						icon: "none",
+						position: "bottom"
+					})
+					return false
+				}
+				let res = await this.$request.post("/api/v1/common/sendVerifyCode", {
+					phone: this.phoneData,
+					type: 1
+				})
+				console.log(res)
+				if (res.status == 0) {
+					this.$refs.runCode.$emit('runCode'); //触发倒计时(一般用于请求成功验证码后调用)
+				}
+				// _this.$refs.runCode.$emit('runCode', 0); //假装模拟下需要 终止倒计时
+			},
+			startReg: function() {
+				//注册
+				if (this.isRotate) {
+					//判断是否加载中,避免重复点击请求
+					return false;
+				}
+				if (!this.imgitem.istrue) {
+					uni.showToast({
+						icon: 'none',
+						position: 'bottom',
+						title: '请先同意协议'
+					});
+					return false;
+				}
+				if (this.phoneData.length != 11) {
+					uni.showToast({
+						icon: 'none',
+						position: 'bottom',
+						title: '手机号不正确'
+					});
+					return false;
+				}
+				if (this.verCode.length != 6) {
+					uni.showToast({
+						icon: 'none',
+						position: 'bottom',
+						title: '验证码不正确'
+					});
+					return false;
+				}
+				uni.login({
+					success: (res) => {
+						_this.isRotate = true
+						this.$request.post("/api/v1/common/wxLogin", {
+							wechat_code: res.code,
+							phone: this.phoneData,
+							verify_code: this.verCode
+						}).then(res => {
+							if (res.status == 0) {
+								if (res.data.token) {
+									store.commit('setJwt', res.data.token);
+									store.commit('setUser', res.data);
+									store.commit('login');
+									let loginResult = getApp().globalData.imService.login({
+										flag: "member_" + res.data.id,
+										nickname: res.data.nickname,
+										avatar: res.data.avatar
+									});
+									if (loginResult) {
+										//连接IM
+										getApp().globalData.imService.connectIM();
+									}
+									uni.showToast({
+										title: "登录成功",
+										icon: "none"
+									}, 1500)
+									setTimeout(() => {
+										uni.navigateBack({
+											delta: 1
+										})
+									}, 1500)
+								}
+							} else {
+								uni.showToast({
+									title: res.message,
+									icon: "none"
+								})
+								_this.isRotate = false
+							}
+						}).catch(err => {
+
+						})
+
+					}
+				})
+			},
+			isphone: async function() {
+				uni.login({
+					success: (re) => {
+						this.$request.post("/api/v1/common/getUserByCode", {
+							wechat_code: re.code
+						}).then(data => {
+							console.log(data)
+							if (data.data != null && data.data.phone != "") {
+								uni.setStorageSync('phone', data.data.phone)
+								this.isphoneNum = true
+							}
+						}).catch(err => {
+
+						})
+					}
+				})
+
+			},
+			getphone: async function(e) {
+				if (this.imgitem.istrue) {
+					_this.istrue = true
+					uni.login({
+						success: (res) => {
+							console.log(res)
+							this.$request.post("/api/v1/common/getPhoneNumber", {
+								wechat_code: res.code,
+								iv: e.detail.iv,
+								encryptData: e.detail.encryptedData
+							}).then(data => {
+								console.log(data)
+								if (data.status == 0) {
+									this.show = true
+								} else {
+									_this.istrue = false
+									uni.showToast({
+										title: "授权失败",
+										icon: "none"
+									})
+								}
+							}).catch(err => {
+
+							})
+						}
+					})
+				} else {
+					uni.showToast({
+						title: "请先同意协议",
+						icon: "none"
+					})
+				}
+
+			},
+			wxLogin: async function() {
+				// if (e.detail.errMsg == "getUserInfo:fail auth deny") {
+				// 	uni.showToast({
+				// 		title: '微信登录失败',
+				// 		icon: "none"
+				// 	});
+				// 	return;
+				// }
+				wx.getUserProfile({
+					desc: "用于完善用户资料",
+					success: (data) => {
+						if (data.errMsg !== 'getUserProfile:ok') {
+							uni.showToast({
+								title: data.errMsg,
+								icon: "none"
+							})
+						} else {
+							if (this.imgitem.istrue) {
+								console.log(data)
+								user.loginByWeixin(data)
+									.then(res => {
+										this.show = false
+										if (res.status == 0) {
+											console.log(res.data)
+											store.commit('setJwt', res.data.token);
+											store.commit('setUser', res.data);
+											console.log("进来了")
+											store.commit('login');
+											getApp().globalData.imService = new IMService();
+											let loginResult = getApp().globalData.imService.login(res.data);
+											if (loginResult) {
+												//连接IM
+												getApp().globalData.imService.connectIM();
+											}
+											uni.showToast({
+												title: "登录成功",
+												icon: "none",
+												duration: 2000
+											})
+										}
+										setTimeout(function() {
+											_this.istrue = false
+											uni.navigateBack({
+												delta: 1
+											})
+										}, 2000)
+									})
+									.catch(res => {
+										uni.showToast({
+											title: '微信登录失败',
+											icon: "none"
+										});
 									});
-									if (loginResult) {
-										//连接IM
-										getApp().globalData.imService.connectIM();
-									}
-									uni.showToast({
-										title: "登录成功",
-										icon: "none"
-									}, 1500)
-									setTimeout(() => {
-										uni.navigateBack({
-											delta: 1
-										})
-									}, 1500)
-								}
 							} else {
 								uni.showToast({
-									title: res.message,
+									title: "请先同意协议",
 									icon: "none"
 								})
-								_this.isRotate = false
-							}
-						}).catch(err => {
-
-						})
-
-					}
-				})
-			},
-			isphone: async function() {
-				uni.login({
-					success: (re) => {
-						this.$request.post("/api/v1/common/getUserByCode", {
-							wechat_code: re.code
-						}).then(data => {
-							console.log(data)
-							if (data.data != null && data.data.phone != "") {
-								uni.setStorageSync('phone', data.data.phone)
-								this.isphoneNum = true
-							}
-						}).catch(err => {
-
-						})
-					}
-				})
-
-			},
-			getphone: async function(e) {
-				if (this.imgitem.istrue) {
-					_this.istrue = true
-					uni.login({
-						success: (res) => {
-							console.log(res)
-							this.$request.post("/api/v1/common/getPhoneNumber", {
-								wechat_code: res.code,
-								iv: e.detail.iv,
-								encryptData: e.detail.encryptedData
-							}).then(data => {
-								console.log(data)
-								if (data.status == 0) {
-									this.show = true
-								} else {
-									_this.istrue = false
-									uni.showToast({
-										title: "授权失败",
-										icon: "none"
-									})
-								}
-							}).catch(err => {
-
-							})
-						}
-					})
-				} else {
-					uni.showToast({
-						title: "请先同意协议",
-						icon: "none"
-					})
-				}
-
-			},
-			wxLogin: async function(e) {
-				if (e.detail.errMsg == "getUserInfo:fail auth deny") {
-					uni.showToast({
-						title: '微信登录失败',
-						icon: "none"
-					});
-					return;
-				}
-				if (this.imgitem.istrue) {
-					console.log(e)
-					user.loginByWeixin(e.detail)
-						.then(res => {
-							this.show = false
-							if (res.status == 0) {
-								console.log(res.data)
-								store.commit('setJwt', res.data.token);
-								store.commit('setUser', res.data);
-								console.log("进来了")
-								store.commit('login');
-								getApp().globalData.imService = new IMService();
-								let loginResult = getApp().globalData.imService.login(res.data);
-								if (loginResult) {
-									//连接IM
-									getApp().globalData.imService.connectIM();
-								}
-								uni.showToast({
-									title: "登录成功",
-									icon: "none",
-									duration: 2000
-								})
-							}
-							setTimeout(function() {
-								_this.istrue = false
-								uni.navigateBack({
-									delta: 1
-								})
-							}, 2000)
-						})
-						.catch(res => {
-							uni.showToast({
-								title: '微信登录失败',
-								icon: "none"
-							});
-						});
-				} else {
-					uni.showToast({
-						title: "请先同意协议",
-						icon: "none"
-					})
-				}
-
-			},
-			toindex() {
-				uni.switchTab({
-					url: "../index/index"
-				})
-			},
-			isqueren() {
-				this.num++
-				if (this.num % 2 == 0) {
-					this.imgitem.name = "https://zhengda.oss-cn-chengdu.aliyuncs.com/baoma/static/img/xieyixuan.png"
-					this.imgitem.istrue = true
-
-				} else {
-					this.imgitem.name = "https://zhengda.oss-cn-chengdu.aliyuncs.com/baoma/static/img/xieyi.png"
-					this.imgitem.istrue = false
-				}
-			}
-		}
-	}
-</script>
-
-<style>
-	@import url("../../components/colorui/icon.css");
-	@import url("./css/main.css");
-
-	page {
-		background-color: #fff;
-	}
-
-	.dlbutton {
-		display: flex;
-		justify-content: center;
-		align-items: center;
-		color: #84BB43;
-		font-size: 30rpx;
-		white-space: nowrap;
-		overflow: hidden;
-		width: 294rpx;
-		height: 88rpx;
-		background: linear-gradient(to right, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 255.6));
-		box-shadow: 0rpx 0rpx 13rpx 0rpx rgba(164, 217, 228, 0.4);
-		border-radius: 2.5rem;
-		margin-top: 0rpx;
-	}
-
-	.dlbutton_loading {
-		display: flex;
-		justify-content: center;
-		align-items: center;
-		color: #84BB43;
-		font-size: 30rpx;
-		width: 100rpx;
-		height: 100rpx;
-		background: linear-gradient(to right, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 255.6));
-		box-shadow: 0rpx 0rpx 13rpx 0rpx rgba(164, 217, 228, 0.4);
-		border-radius: 2.5rem;
-		margin-top: 0rpx;
-	}
-
-	.buttonBorder {
-		border: none;
-		border-radius: 2.5rem;
-		-webkit-box-shadow: 0 0 60rpx 0 rgba(0, 0, 0, .2);
-		box-shadow: 0 0 60rpx 0 rgba(0, 0, 0, .2);
-		-webkit-transition: all 0.4s cubic-bezier(.57, .19, .51, .95);
-		-moz-transition: all 0.4s cubic-bezier(.57, .19, .51, .95);
-		-ms-transition: all 0.4s cubic-bezier(.57, .19, .51, .95);
-		-o-transition: all 0.4s cubic-bezier(.57, .19, .51, .95);
-		transition: all 0.4s cubic-bezier(.57, .19, .51, .95);
-	}
-
-	/* 旋转动画 */
-	.rotate_loop {
-		-webkit-transition-property: -webkit-transform;
-		-webkit-transition-duration: 1s;
-		-moz-transition-property: -moz-transform;
-		-moz-transition-duration: 1s;
-		-webkit-animation: rotate 1s linear infinite;
-		-moz-animation: rotate 1s linear infinite;
-		-o-animation: rotate 1s linear infinite;
-		animation: rotate 1s linear infinite;
-	}
-
-	@-webkit-keyframes rotate {
-		from {
-			-webkit-transform: rotate(0deg)
-		}
-
-		to {
-			-webkit-transform: rotate(360deg)
-		}
-	}
-
-	@-moz-keyframes rotate {
-		from {
-			-moz-transform: rotate(0deg)
-		}
-
-		to {
-			-moz-transform: rotate(359deg)
-		}
-	}
-
-	@-o-keyframes rotate {
-		from {
-			-o-transform: rotate(0deg)
-		}
-
-		to {
-			-o-transform: rotate(359deg)
-		}
-	}
-
-	@keyframes rotate {
-		from {
-			transform: rotate(0deg)
-		}
-
-		to {
-			transform: rotate(359deg)
-		}
-	}
-
-	button::after {
-		border: none;
-	}
+							}
+						}
+					}
+				})
+			},
+			toindex() {
+				uni.switchTab({
+					url: "../index/index"
+				})
+			},
+			isqueren() {
+				this.num++
+				if (this.num % 2 == 0) {
+					this.imgitem.name = "https://zhengda.oss-cn-chengdu.aliyuncs.com/baoma/static/img/xieyixuan.png"
+					this.imgitem.istrue = true
+
+				} else {
+					this.imgitem.name = "https://zhengda.oss-cn-chengdu.aliyuncs.com/baoma/static/img/xieyi.png"
+					this.imgitem.istrue = false
+				}
+			}
+		}
+	}
+</script>
+
+<style>
+	@import url("../../components/colorui/icon.css");
+	@import url("./css/main.css");
+
+	page {
+		background-color: #fff;
+	}
+
+	.dlbutton {
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		color: #84BB43;
+		font-size: 30rpx;
+		white-space: nowrap;
+		overflow: hidden;
+		width: 294rpx;
+		height: 88rpx;
+		background: linear-gradient(to right, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 255.6));
+		box-shadow: 0rpx 0rpx 13rpx 0rpx rgba(164, 217, 228, 0.4);
+		border-radius: 2.5rem;
+		margin-top: 0rpx;
+	}
+
+	.dlbutton_loading {
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		color: #84BB43;
+		font-size: 30rpx;
+		width: 100rpx;
+		height: 100rpx;
+		background: linear-gradient(to right, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 255.6));
+		box-shadow: 0rpx 0rpx 13rpx 0rpx rgba(164, 217, 228, 0.4);
+		border-radius: 2.5rem;
+		margin-top: 0rpx;
+	}
+
+	.buttonBorder {
+		border: none;
+		border-radius: 2.5rem;
+		-webkit-box-shadow: 0 0 60rpx 0 rgba(0, 0, 0, .2);
+		box-shadow: 0 0 60rpx 0 rgba(0, 0, 0, .2);
+		-webkit-transition: all 0.4s cubic-bezier(.57, .19, .51, .95);
+		-moz-transition: all 0.4s cubic-bezier(.57, .19, .51, .95);
+		-ms-transition: all 0.4s cubic-bezier(.57, .19, .51, .95);
+		-o-transition: all 0.4s cubic-bezier(.57, .19, .51, .95);
+		transition: all 0.4s cubic-bezier(.57, .19, .51, .95);
+	}
+
+	/* 旋转动画 */
+	.rotate_loop {
+		-webkit-transition-property: -webkit-transform;
+		-webkit-transition-duration: 1s;
+		-moz-transition-property: -moz-transform;
+		-moz-transition-duration: 1s;
+		-webkit-animation: rotate 1s linear infinite;
+		-moz-animation: rotate 1s linear infinite;
+		-o-animation: rotate 1s linear infinite;
+		animation: rotate 1s linear infinite;
+	}
+
+	@-webkit-keyframes rotate {
+		from {
+			-webkit-transform: rotate(0deg)
+		}
+
+		to {
+			-webkit-transform: rotate(360deg)
+		}
+	}
+
+	@-moz-keyframes rotate {
+		from {
+			-moz-transform: rotate(0deg)
+		}
+
+		to {
+			-moz-transform: rotate(359deg)
+		}
+	}
+
+	@-o-keyframes rotate {
+		from {
+			-o-transform: rotate(0deg)
+		}
+
+		to {
+			-o-transform: rotate(359deg)
+		}
+	}
+
+	@keyframes rotate {
+		from {
+			transform: rotate(0deg)
+		}
+
+		to {
+			transform: rotate(359deg)
+		}
+	}
+
+	button::after {
+		border: none;
+	}
 </style>

+ 7 - 1
pages/vaccines/vaccinesList.vue

xqd xqd
@@ -9,7 +9,8 @@
 				:options="options2"></u-dropdown-item>
 		</u-dropdown>
 		<view class="padding-lr-sm">
-			<u-search :clearabled="false" shape="round" :show-action="false" placeholder="搜索疫苗名称" v-model="keyword">
+			<u-search :clearabled="false" shape="round" @custom="search" :show-action="true" placeholder="搜索疫苗名称"
+				v-model="keyword">
 			</u-search>
 		</view>
 		<view class="margin-sm">
@@ -137,6 +138,11 @@
 				this.vaccineList = []
 				this.getvaccinesList()
 			},
+			search() {
+				this.pageindex = 1
+				this.vaccineList = []
+				this.getvaccinesList()
+			},
 			getvaccinesList: async function() {
 				let res = await this.$request.post("/api/v1/vaccine/vaccineList", {
 					page: this.pageindex,

+ 52 - 44
pages/vaccines/vaccines_info.vue

xqd xqd xqd xqd xqd xqd xqd xqd
@@ -142,7 +142,8 @@
 				time: "",
 				dateshow: false,
 				is_Scheduling: true,
-				vaccine_notice: ""
+				vaccine_notice: "",
+				is_loading: false
 			}
 		},
 		methods: {
@@ -156,7 +157,7 @@
 				this.showpeople = false
 			},
 			getarchives: async function() {
-				let res = await this.$request.post("/api/v1/patient/patientList")
+				let res = await this.$request.post("/api/v1/patient/patientList", {}, false)
 				if (res.status == 0) {
 					this.patientList = res.data.data
 				}
@@ -170,10 +171,9 @@
 				}
 				let res = await this.$request.post("/api/v1/docter/timePeriodList", {
 					organization_id: this.doctor.id,
-					schedule_type: 2,
-					vaccine_id:this.yimiaoInfo.id
+					schedule_type: 2,
+					vaccine_id: this.yimiaoInfo.id
 				})
-				console.log(res)
 				if (res.status == 0) {
 					let times = []
 					// res.data.list.forEach(item => {
@@ -224,8 +224,8 @@
 										return {
 											yeardate: itm.schedule_date,
 											schedule_id: itm.schedule_id,
-											can_appoint_num: itm.can_appoint_num,
-											can_appoint:itm.can_appoint,
+											can_appoint_num: itm.can_appoint_num,
+											can_appoint: itm.can_appoint,
 											...itm.organization,
 											...itm.time_period
 										}
@@ -260,6 +260,7 @@
 					})
 					this.multiSelector.push(times)
 					console.log(this.multiSelector)
+					this.is_loading = true
 					let arr = this.multiSelector[1][0]
 					if (arr != undefined) {
 						arr.forEach(item => {
@@ -270,7 +271,6 @@
 						arr = []
 						this.$refs.date.rightday = arr
 					}
-
 				}
 			},
 			callbacktime(item) {
@@ -304,11 +304,16 @@
 				this.multiSelector = []
 				this.yimiao = "请选择接种疫苗"
 				this.yimiaoInfo = ""
+				this.yuyuevalue = "请选择预约时间"
+				this.timehour = ""
 				uni.navigateTo({
 					url: "mechanism?type=" + 2
 				})
 			},
 			vaccinesList() {
+				this.yuyuevalue = "请选择预约时间"
+				this.timehour = ""
+				this.is_loading = false
 				if (this.doctor == '') {
 					uni.showToast({
 						title: "请先选择机构",
@@ -327,43 +332,46 @@
 					url: "vaccinesList?id=" + this.doctor.id + "&patient_id=" + this.huanzheID
 				})
 			},
-			yuyuetime() {
-				if (this.doctor == '') {
-					uni.showToast({
-						title: "请先选择机构",
-						icon: "none"
-					})
-					return false
-				}
-				if (this.yimiaoInfo == "") {
-					uni.showToast({
-						title: "请先选择疫苗",
-						icon: "none"
-					})
-					return false
-				}
-				if (this.multiSelector[0] == undefined || this.multiSelector[1] == undefined) {
-					uni.showToast({
-						title: "尚未排班",
-						icon: "none"
-					})
-					return false
-				}
-				if (this.multiSelector[0].length == 0 && this.multiSelector[1].length == 0) {
-					uni.showToast({
-						title: "尚未排班",
-						icon: "none"
-					})
-					return false
+			yuyuetime() {
+				if (this.is_loading) {
+					if (this.doctor == '') {
+						uni.showToast({
+							title: "请先选择机构",
+							icon: "none"
+						})
+						return false
+					}
+					if (this.yimiaoInfo == "") {
+						uni.showToast({
+							title: "请先选择疫苗",
+							icon: "none"
+						})
+						return false
+					}
+					if (this.multiSelector[0] == undefined || this.multiSelector[1] == undefined) {
+						uni.showToast({
+							title: "尚未排班",
+							icon: "none"
+						})
+						return false
+					}
+					if (this.multiSelector[0].length == 0 && this.multiSelector[1].length == 0) {
+						uni.showToast({
+							title: "尚未排班",
+							icon: "none"
+						})
+						return false
+					}
+					// if (!this.is_Scheduling) {
+					// 	uni.showToast({
+					// 		title: "尚未排班",
+					// 		icon: "none"
+					// 	})
+					// 	return false
+					// }
+					this.dateshow = true
 				}
-				// if (!this.is_Scheduling) {
-				// 	uni.showToast({
-				// 		title: "尚未排班",
-				// 		icon: "none"
-				// 	})
-				// 	return false
-				// }
-				this.dateshow = true
+
 			},
 			submitpay() {
 				if (this.huanzheID == "") {