Bladeren bron

修复bug

宇宙无敌M1处理器的MacBook Pro 4 jaren geleden
bovenliggende
commit
a96a19e235
4 gewijzigde bestanden met toevoegingen van 1057 en 1023 verwijderingen
  1. 520 496
      pages/doctor_related/select_doctor.vue
  2. 15 10
      pages/vaccines/mechanism.vue
  3. 6 3
      pages/vaccines/vaccinesList.vue
  4. 516 514
      pages/vaccines/vaccines_info.vue

+ 520 - 496
pages/doctor_related/select_doctor.vue

xqd
@@ -1,497 +1,521 @@
-<template>
-	<view class="">
-		<view class="margin-bottom-sm bg-white">
-			<u-dropdown>
-				<u-dropdown-item @change="allserive" v-model="value1" :title="options1[value1].label" :options="options1"></u-dropdown-item>
-				<u-dropdown-item @change="city" v-model="value2" :title="options2[value2].label||'定位中...'" :options="options2"></u-dropdown-item>
-				<u-dropdown-item @change="recommend" v-model="value3" :title="options3[value3].label" :options="options3"></u-dropdown-item>
-			</u-dropdown>
-			<view class="main">
-				<u-search :clearabled="false" shape="round" search-icon-color="#EEAA3F" placeholder="搜索医生姓名、医院名" @custom="searchvalue" :show-action="true"
-				 v-model="keyword"></u-search>
-				<!-- <view class="margin-top-sm text-df text-bold" @click="xuanzetime" v-if="istime">
-					选择时间:{{showtime}}
-					<u-picker mode="multiSelector" @confirm="callbacktime" v-model="show" :default-selector='[0, 1]' range-key="start_time_period"
-					 :range="multiSelector"></u-picker>
-				</view> -->
-				<view style="width: 100%;">
-					<view class="recommendstyle margin-top-sm" v-for="(item,index) in doctorList" :key="index">
-						<view class="base_item" @click="gotoinfo" :data-id="item.id">
-							<view class="base_item_zi">
-								<view class="base_item_zi_items">
-									<view class="base_item_zi_content" style="height: 241rpx;background-color:#FBFBFB;">
-										<u-image :fade="true" duration="450" width="120rpx" height="120rpx" :src="item.avatar" shape="circle">
-										</u-image>
-										<view class="follow_style" @click.stop="submitCollect" :data-index="index" :data-id="item.id" v-if="item.is_collect==0">
-											关注
-										</view>
-										<view class="follow_style" @click.stop="submitCollect" :data-index="index" :data-id="item.id" style="background-color: #fff;color: rgb(208, 105, 150);border:2rpx solid rgb(208, 105, 150);"
-										 v-else>
-											已关注
-										</view>
-										<view class="content_right">
-											<view class="" style="display: flex;align-items: center;">
-												<text style="font-size: 32rpx; font-weight: bold;">{{item.name}}</text>
-												<text class="text_style" v-for="(itm,index) in item.label_texts" :key="index">{{itm.label_name}}</text>
-											</view>
-											<view class="m_gray_small">
-												科室:{{item.office.name||'暂无'}} {{item.qualification.name||'暂无'}}
-											</view>
-											<view class="flex justify-start align-center flex-wrap" style="position: relative;">
-												<u-tag bg-color="#F2F2F2" color="#666666" border-color="#F2F2F2" v-if="item.is_chat==1" style="margin-top:20rpx ; margin-right: 20rpx;" text="图文" shape="circle" />
-												<u-tag bg-color="#F2F2F2" color="#666666" border-color="#F2F2F2" v-if="item.is_phone==1" style="margin-top:20rpx ; margin-right: 20rpx;" text="电话" shape="circle" />
-												<u-tag bg-color="#F2F2F2" color="#666666" border-color="#F2F2F2" v-if="item.is_appoint==1" style="margin-top:20rpx ; margin-right: 20rpx;" text="门诊" shape="circle" />
-											</view>
-										</view>
-									</view>
-									<view class="foot_juli padding-sm">
-										<u-line color="#f6f6f6" />
-										<view class="flex justify-center margin-top-sm" style="color: rgba(0,0,0,0.54);">
-											<view class="text-sm" style="flex: 1; text-align: left;">
-												评分:
-												<text style="color: #FF7B72;">{{item.score}}</text>
-											</view>
-											<view class="text-sm" style="flex: 1; text-align: center;">
-												服务:
-												<text style="color: #FF7B72;">{{item.service_persons}}</text>
-											</view>
-											<view class="text-sm" style="flex: 1; text-align: right;">
-												距离:
-												<text style="color: #FF7B72;">{{item.distance!='未知'?parseInt(item.distance/1000)+'km':'未知'}}</text>
-											</view>
-										</view>
-										<view class="doctor_style margin-top-sm">
-											<view class="doctor_style_item">
-												{{item.intro}}
-											</view>
-											<view class="text-black flex justify-between align-center margin-top-sm" style="font-size: 30rpx;">
-												<view class="jisu flex align-center">
-													<image src="../../static/img/speed.png" style="width: 30rpx;height: 30rpx;margin-right: 10rpx;margin-top: 6rpx;"
-													 mode=""></image>平均响应时长1分钟
-												</view>
-												<view class="">
-													服务
-													<text class="text-red text-bold text-xl" style="margin-right: 6rpx;">¥{{item.phone_price/100}}</text>
-													起
-												</view>
-											</view>
-										</view>
-									</view>
-								</view>
-							</view>
-						</view>
-					</view>
-				</view>
-			</view>
-		</view>
-		<view class="margin-tb padding-tb-xs">
-			<u-loadmore :status="nomore" :icon-type="flower" />
-		</view>
-		<u-back-top :scroll-top="scrollTop" bottom="80" top="400"></u-back-top>
-		<u-no-network></u-no-network>
-	</view>
-</template>
-
-<script>
-	var user = require('../../common/user.js');
-	import {
-		mapState,
-		mapMutations,
-		mapGetters,
-		mapActions
-	} from 'vuex';
-	export default {
-		onLoad(options) {
-			let date = new Date();
-			let nian = date.getFullYear()
-			let yue = date.getMonth() + 1
-			let ri = date.getDate()
-			if (options.index) {
-				this.value1 = options.index
-				if (this.value1 == 3) {
-					this.istime = true
-					this.timehour = 1,
-						this.timeday = nian + "-" + yue + "-" + ri
-				} else {
-					this.istime = false,
-						this.timehour = "",
-						this.timeday = ""
-				}
-			}
-			if (options.value != "") {
-				this.keyword = options.value
-			}
-		},
-		onShow() {
-			// this.gettime()
-			this.getDoctorList()
-			this.getareaList()
-		},
-		mounted() {
-
-		},
-		data() {
-			return {
-				scrollTop: 0,
-				keyword: "",
-				test: [1, 2, 3, 4, 5],
-				value1: 0,
-				value2: 0,
-				value3: 0,
-				options1: [{
-						label: '全部服务',
-						value: 0,
-					}, {
-						label: '电话咨询',
-						value: 1,
-					},
-					{
-						label: '图文咨询',
-						value: 2,
-					},
-					{
-						label: '门诊预约',
-						value: 3,
-					}
-				],
-				options2: [],
-				options3: [{
-						label: '推荐排序',
-						value: 0,
-					}, {
-						label: '距离最近',
-						value: 1,
-					},
-					{
-						label: '好评最多',
-						value: 2,
-					},
-					{
-						label: '服务最多',
-						value: 3,
-					},
-				],
-				doctorList: [],
-				timeday: "", //年月日
-				timehour: "", //时分
-				multiSelector: [],
-				params: {
-					year: false,
-					month: true,
-					day: true,
-					hour: true,
-					minute: true,
-					second: false
-				},
-				show: false,
-				istime: false,
-				showtime: "",
-				pageindex: 1,
-			}
-		},
-		watch: {
-			// keyword: function(newtext, jiu) {
-			// 	if (typeof newtext === 'string') {
-			// 		if (newtext.trim().length !== 0) {
-			// 			this.debounce(this.changeStr, 2000);
-			// 		} else {}
-			// 	}
-			// 	if (newtext == "") {
-			// 		this.list = []
-			// 	}
-			// }
-		},
-		onReachBottom() {
-			this.getDoctorList()
-		},
-		methods: {
-			//监听滚动
-			onPageScroll(e) {
-				this.scrollTop = e.scrollTop;
-			},
-			// debounce(fn, wait) {
-			// 	if (this.fun !== null) {
-			// 		clearTimeout(this.fun)
-			// 	}
-			// 	this.fun = setTimeout(fn, wait)
-			// },
-			allserive(value) {
-				this.value1 = value
-				if (this.value1 == 3) {
-					this.istime = true
-				} else {
-					this.istime = false
-				}
-				this.timeday = ""
-				this.timehour = ""
-				this.pageindex = 1
-				this.doctorList = []
-				this.getDoctorList()
-			},
-			city(value) {
-				console.log(value)
-				this.value2 = value
-				this.timeday = ""
-				this.timehour = ""
-				this.pageindex = 1
-				this.doctorList = []
-				this.getDoctorList()
-			},
-			recommend(value) {
-				this.value3 = value
-				this.timeday = ""
-				this.timehour = ""
-				this.pageindex = 1
-				this.doctorList = []
-				this.getDoctorList()
-			},
-			gotoinfo(e) {
-				let num
-				if (this.value1 == 0) {
-					num = 1
-				} else if (this.value1 == 1) {
-					num = 1
-				} else if (this.value1 == 2) {
-					num = 2
-				} else if (this.value1 == 3) {
-					num = 3
-				}
-				uni.navigateTo({
-					url: "./doctor_info?id=" + e.currentTarget.dataset.id + "&time=" + this.showtime + "&index=" + num
-				})
-			},
-			submitCollect: async function(e) {
-				let res = await this.$request.post("/api/v1/collection/submitCollect", {
-					type: 1,
-					relation_id: e.currentTarget.dataset.id,
-				})
-				if (res.status == 0) {
-					if (res.data.is_collect == 0) {
-						uni.showToast({
-							title: "取消成功",
-							icon: "none"
-						})
-						this.doctorList[e.currentTarget.dataset.index].is_collect = res.data.is_collect
-					} else {
-						uni.showToast({
-							title: "关注成功",
-							icon: "none"
-						})
-						this.doctorList[e.currentTarget.dataset.index].is_collect = res.data.is_collect
-					}
-				}
-			},
-			getDoctorList: async function() {
-				let area = ""
-				if (this.options2.length != 0) {
-					area = this.options2[this.value2].id
-				}
-				let res = await this.$request.post("/api/v1/docter/docterList", {
-					page: this.pageindex,
-					list_type: this.value1,
-					name: this.keyword,
-					city_id: area,
-					sort_type: this.value3,
-					latitude: uni.getStorageSync("latitude"),
-					longitude: uni.getStorageSync("longitude"),
-					schedule_date: this.timeday,
-					time_period_id: this.timehour
-				}, )
-				console.log(res, this.value1)
-
-				if (res.status == 0) {
-					if (this.pageindex > res.data.last_page) {
-						
-					} else {
-						this.doctorList = this.doctorList.concat(res.data.data)
-						this.pageindex++
-					}
-				}
-			},
-			gettime: async function() {
-				this.multiSelector = []
-				let res = await this.$request.post("/api/v1/docter/timePeriodList")
-				console.log(res)
-				let status = user.islogin(res)
-				if (status) {
-					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)
-					this.showtime = res.data.dates[0] + ' ' + res.data.list[0].start_time_period
-				}
-			},
-			getareaList: async function() {
-				let res = await this.$request.post("/api/v1/organization/organizationCityList")
-				if (res.status == 0) {
-					this.options2 = res.data
-					this.options2.forEach((item, index) => {
-						item.label = item.name
-						item.value = index
-					})
-				}
-			},
-			searchvalue() {
-				this.timeday = ""
-				this.timehour = ""
-				this.pageindex = 1
-				this.doctorList = []
-				this.getDoctorList()
-			},
-			xuanzetime() {
-				this.show = !this.show
-			},
-			//返回时间
-			callbacktime(arr) {
-				let date = new Date()
-				let year = date.getFullYear()
-				this.timeday = year + "-" + this.multiSelector[0][arr[0]]
-				console.log(this.timeday)
-				this.timehour = this.multiSelector[1][arr[1]].id
-				this.showtime = this.multiSelector[0][arr[0]] + " " + this.multiSelector[1][arr[1]].start_time_period
-				this.pageindex = 1
-				this.doctorList = []
-				this.getDoctorList()
-			}
-		}
-	};
-</script>
-
-<style scoped lang="scss">
-	.main {
-		padding-top: 10rpx;
-		padding-left: 20rpx;
-		padding-right: 20rpx;
-
-	}
-
-	.gridstyle {
-		height: 450rpx;
-		background-color: #fff;
-		border-radius: 15rpx;
-		display: flex;
-		align-items: center;
-		box-shadow: 0 0 50rpx 0 rgba(0, 0, 0, 0.1);
-		margin-top: 20rpx;
-	}
-
-	.doctor_style {
-		color: rgba(0, 0, 0, 0.54);
-	}
-
-	.doctor_style_item {
-		overflow: hidden;
-		text-overflow: ellipsis;
-		display: -webkit-box;
-		-webkit-line-clamp: 2;
-		-webkit-box-orient: vertical;
-	}
-
-	.jisu {
-		color: rgb(238, 170, 63);
-	}
-
-	.follow_style {
-		position: absolute;
-		bottom: 76rpx;
-		left: 37rpx;
-		z-index: 1;
-		width: 106rpx;
-		height: 40rpx;
-		padding: 4rpx 0;
-		background-color: rgb(208, 105, 150);
-		box-sizing: border-box;
-		color: #fff;
-		text-align: center;
-		border-radius: 60rpx;
-		font-size: 24rpx;
-		display: flex;
-		justify-content: center;
-		align-items: center;
-	}
-
-	.base_item {
-		// position: absolute;
-		// top: 0;
-		// left: 0;
-		// right: 0;
-		// z-index: 1;
-		width: 100%;
-		height: auto;
-		box-sizing: border-box;
-	}
-
-	.base_item_zi {
-		// padding-top: 20rpx;
-		// margin: 20rpx 20rpx;
-		position: relative;
-		box-sizing: border-box;
-	}
-
-	.base_item_zi_items {
-		box-shadow: 0 0 50rpx 0 rgba(0, 0, 0, 0.1);
-		background-color: #fff;
-		position: relative;
-		border-radius: 8rpx;
-		box-sizing: border-box;
-	}
-
-	.base_item_zi_content {
-		display: flex;
-		justify-content: center;
-		padding: 30rpx 30rpx;
-		overflow: hidden;
-		position: relative;
-		width: 100%;
-		box-sizing: border-box;
-	}
-
-	.text_style {
-		display: flex;
-		justify-content: center;
-		align-items: center;
-		font-weight: 400;
-		margin-left: 15rpx;
-		background-color: #E5F5FF;
-		color: #0B73B9;
-		// width: 100rpx;
-		height: 28rpx;
-		font-size: 20rpx;
-		border-radius: 10rpx;
-	}
-
-	.m_gray_small {
-		white-space: nowrap;
-		overflow: hidden;
-		text-overflow: ellipsis;
-		color: rgba(0, 0, 0, 0.54);
-		margin-top: 20rpx;
-		font-size: 28rpx;
-	}
-
-	.content_right {
-		flex: 1;
-		margin-left: 20rpx;
-		overflow: hidden;
-		position: relative;
-		box-sizing: border-box;
-	}
-
-	.foot_item {
-		background-color: #F7F7F7;
-		box-sizing: border-box;
-	}
-
-	.grid-text {
-		font-size: 28rpx;
-		margin-top: 4rpx;
-		color: $u-type-info;
-	}
-
-	.tltleStyle {
-		padding: 30rpx 30rpx 15rpx 15rpx;
-		// font-weight: bold;
-		// font-size: 40rpx;
-	}
+<template>
+	<view class="">
+		<view class="margin-bottom-sm bg-white">
+			<u-dropdown>
+				<u-dropdown-item @change="allserive" v-model="value1" :title="options1[value1].label" :options="options1"></u-dropdown-item>
+				<u-dropdown-item @change="city" v-model="value2" :title="options2[value2].label||'定位中...'" :options="options2"></u-dropdown-item>
+				<u-dropdown-item @change="recommend" v-model="value3" :title="options3[value3].label" :options="options3"></u-dropdown-item>
+			</u-dropdown>
+			<view class="main">
+				<u-search :clearabled="false" shape="round" search-icon-color="#EEAA3F" placeholder="搜索医生姓名、医院名" @custom="searchvalue"
+				 :show-action="true" v-model="keyword"></u-search>
+				<!-- <view class="margin-top-sm text-df text-bold" @click="xuanzetime" v-if="istime">
+					选择时间:{{showtime}}
+					<u-picker mode="multiSelector" @confirm="callbacktime" v-model="show" :default-selector='[0, 1]' range-key="start_time_period"
+					 :range="multiSelector"></u-picker>
+				</view> -->
+				<view style="width: 100%;">
+					<view class="recommendstyle margin-top-sm" v-for="(item,index) in doctorList" :key="index">
+						<view class="base_item" @click="gotoinfo" :data-id="item.id">
+							<view class="base_item_zi">
+								<view class="base_item_zi_items">
+									<view class="base_item_zi_content" style="height: 241rpx;background-color:#FBFBFB;">
+										<u-image :fade="true" duration="450" width="120rpx" height="120rpx" :src="item.avatar" shape="circle">
+										</u-image>
+										<view class="follow_style" @click.stop="submitCollect" :data-index="index" :data-id="item.id" v-if="item.is_collect==0">
+											关注
+										</view>
+										<view class="follow_style" @click.stop="submitCollect" :data-index="index" :data-id="item.id" style="background-color: #fff;color: rgb(208, 105, 150);border:2rpx solid rgb(208, 105, 150);"
+										 v-else>
+											已关注
+										</view>
+										<view class="content_right">
+											<view class="" style="display: flex;align-items: center;">
+												<text style="font-size: 32rpx; font-weight: bold;">{{item.name}}</text>
+												<text class="text_style" v-for="(itm,index) in item.label_texts" :key="index">{{itm.label_name}}</text>
+											</view>
+											<view class="m_gray_small">
+												科室:{{item.office.name||'暂无'}} {{item.qualification.name||'暂无'}}
+											</view>
+											<view class="flex justify-start align-center flex-wrap" style="position: relative;">
+												<u-tag bg-color="#F2F2F2" color="#666666" border-color="#F2F2F2" v-if="item.is_chat==1" style="margin-top:20rpx ; margin-right: 20rpx;"
+												 text="图文" shape="circle" />
+												<u-tag bg-color="#F2F2F2" color="#666666" border-color="#F2F2F2" v-if="item.is_phone==1" style="margin-top:20rpx ; margin-right: 20rpx;"
+												 text="电话" shape="circle" />
+												<u-tag bg-color="#F2F2F2" color="#666666" border-color="#F2F2F2" v-if="item.is_appoint==1" style="margin-top:20rpx ; margin-right: 20rpx;"
+												 text="门诊" shape="circle" />
+											</view>
+										</view>
+									</view>
+									<view class="foot_juli padding-sm">
+										<u-line color="#f6f6f6" />
+										<view class="flex justify-center margin-top-sm" style="color: rgba(0,0,0,0.54);">
+											<view class="text-sm" style="flex: 1; text-align: left;">
+												评分:
+												<text style="color: #FF7B72;">{{item.score}}</text>
+											</view>
+											<view class="text-sm" style="flex: 1; text-align: center;">
+												服务:
+												<text style="color: #FF7B72;">{{item.service_persons}}</text>
+											</view>
+											<view class="text-sm" style="flex: 1; text-align: right;">
+												距离:
+												<text style="color: #FF7B72;">{{item.distance!='未知'?parseInt(item.distance/1000)+'km':'未知'}}</text>
+											</view>
+										</view>
+										<view class="doctor_style margin-top-sm">
+											<view class="doctor_style_item">
+												{{item.intro}}
+											</view>
+											<view class="text-black flex justify-between align-center margin-top-sm" style="font-size: 30rpx;">
+												<view class="jisu flex align-center">
+													<image src="../../static/img/speed.png" style="width: 30rpx;height: 30rpx;margin-right: 10rpx;margin-top: 6rpx;"
+													 mode=""></image>平均响应时长1分钟
+												</view>
+												<view class="">
+													服务
+													<text class="text-red text-bold text-xl" style="margin-right: 6rpx;">¥{{getpricemin([item.phone_price,item.chat_price,item.appoint_price])/100}}</text>
+													起
+												</view>
+											</view>
+										</view>
+									</view>
+								</view>
+							</view>
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+		<view class="margin-tb padding-tb-xs">
+			<u-loadmore :status="nomore" :icon-type="flower" />
+		</view>
+		<u-back-top :scroll-top="scrollTop" bottom="80" top="400"></u-back-top>
+		<u-no-network></u-no-network>
+	</view>
+</template>
+
+<script>
+	var user = require('../../common/user.js');
+	import {
+		mapState,
+		mapMutations,
+		mapGetters,
+		mapActions
+	} from 'vuex';
+	import {
+		getLocation
+	} from "../../common/authorize.js"
+	export default {
+		onLoad(options) {
+			let date = new Date();
+			let nian = date.getFullYear()
+			let yue = date.getMonth() + 1
+			let ri = date.getDate()
+			if (options.index) {
+				this.value1 = options.index
+				if (this.value1 == 3) {
+					this.istime = true
+					this.timehour = 1,
+						this.timeday = nian + "-" + yue + "-" + ri
+				} else {
+					this.istime = false,
+						this.timehour = "",
+						this.timeday = ""
+				}
+			}
+			if (options.value != "") {
+				this.keyword = options.value
+			}
+		},
+		onShow() {
+			// this.gettime()
+			this.getareaList()
+			this.GetCurrentAddress()
+			// this.getDoctorList()
+		},
+		mounted() {
+
+		},
+		data() {
+			return {
+				scrollTop: 0,
+				keyword: "",
+				test: [1, 2, 3, 4, 5],
+				value1: 0,
+				value2: 0,
+				value3: 0,
+				options1: [{
+						label: '全部服务',
+						value: 0,
+					}, {
+						label: '电话咨询',
+						value: 1,
+					},
+					{
+						label: '图文咨询',
+						value: 2,
+					},
+					{
+						label: '门诊预约',
+						value: 3,
+					}
+				],
+				options2: [],
+				options3: [{
+						label: '推荐排序',
+						value: 0,
+					}, {
+						label: '距离最近',
+						value: 1,
+					},
+					{
+						label: '好评最多',
+						value: 2,
+					},
+					{
+						label: '服务最多',
+						value: 3,
+					},
+				],
+				doctorList: [],
+				timeday: "", //年月日
+				timehour: "", //时分
+				multiSelector: [],
+				params: {
+					year: false,
+					month: true,
+					day: true,
+					hour: true,
+					minute: true,
+					second: false
+				},
+				show: false,
+				istime: false,
+				showtime: "",
+				pageindex: 1,
+				city_name: ""
+			}
+		},
+		watch: {
+			// keyword: function(newtext, jiu) {
+			// 	if (typeof newtext === 'string') {
+			// 		if (newtext.trim().length !== 0) {
+			// 			this.debounce(this.changeStr, 2000);
+			// 		} else {}
+			// 	}
+			// 	if (newtext == "") {
+			// 		this.list = []
+			// 	}
+			// }
+		},
+		onReachBottom() {
+			this.getDoctorList()
+		},
+		methods: {
+			GetCurrentAddress() {
+				getLocation().then(res => {
+					this.city_name = res.address.address_component.city
+					this.options2.forEach((item, index) => {
+						if (item.name.indexOf(this.city_name.split('市')[0]) > -1) {
+							this.value2 = index
+							console.log(this.value2)
+						}
+					})
+					this.getDoctorList()
+				}).catch(res => {})
+			},
+			//取服务价格最小值
+			getpricemin(arr) {
+				return Math.min(...arr)
+			},
+			//监听滚动
+			onPageScroll(e) {
+				this.scrollTop = e.scrollTop;
+			},
+			// debounce(fn, wait) {
+			// 	if (this.fun !== null) {
+			// 		clearTimeout(this.fun)
+			// 	}
+			// 	this.fun = setTimeout(fn, wait)
+			// },
+			allserive(value) {
+				this.value1 = value
+				if (this.value1 == 3) {
+					this.istime = true
+				} else {
+					this.istime = false
+				}
+				this.timeday = ""
+				this.timehour = ""
+				this.pageindex = 1
+				this.doctorList = []
+				this.getDoctorList()
+			},
+			city(value) {
+				console.log(value)
+				this.value2 = value
+				this.timeday = ""
+				this.timehour = ""
+				this.pageindex = 1
+				this.doctorList = []
+				this.getDoctorList()
+			},
+			recommend(value) {
+				this.value3 = value
+				this.timeday = ""
+				this.timehour = ""
+				this.pageindex = 1
+				this.doctorList = []
+				this.getDoctorList()
+			},
+			gotoinfo(e) {
+				let num
+				if (this.value1 == 0) {
+					num = 1
+				} else if (this.value1 == 1) {
+					num = 1
+				} else if (this.value1 == 2) {
+					num = 2
+				} else if (this.value1 == 3) {
+					num = 3
+				}
+				uni.navigateTo({
+					url: "./doctor_info?id=" + e.currentTarget.dataset.id + "&time=" + this.showtime + "&index=" + num
+				})
+			},
+			submitCollect: async function(e) {
+				let res = await this.$request.post("/api/v1/collection/submitCollect", {
+					type: 1,
+					relation_id: e.currentTarget.dataset.id,
+				})
+				if (res.status == 0) {
+					if (res.data.is_collect == 0) {
+						uni.showToast({
+							title: "取消成功",
+							icon: "none"
+						})
+						this.doctorList[e.currentTarget.dataset.index].is_collect = res.data.is_collect
+					} else {
+						uni.showToast({
+							title: "关注成功",
+							icon: "none"
+						})
+						this.doctorList[e.currentTarget.dataset.index].is_collect = res.data.is_collect
+					}
+				}
+			},
+			getDoctorList: async function() {
+				let area = ""
+				if (this.options2.length != 0) {
+					area = this.options2[this.value2].id
+				}
+				let res = await this.$request.post("/api/v1/docter/docterList", {
+					page: this.pageindex,
+					list_type: this.value1,
+					name: this.keyword,
+					city_id: area,
+					sort_type: this.value3,
+					latitude: uni.getStorageSync("latitude"),
+					longitude: uni.getStorageSync("longitude"),
+					schedule_date: this.timeday,
+					time_period_id: this.timehour
+				}, )
+				console.log(res, this.value1)
+
+				if (res.status == 0) {
+					if (this.pageindex > res.data.last_page) {
+
+					} else {
+						this.doctorList = this.doctorList.concat(res.data.data)
+						this.pageindex++
+					}
+				}
+			},
+			gettime: async function() {
+				this.multiSelector = []
+				let res = await this.$request.post("/api/v1/docter/timePeriodList")
+				console.log(res)
+				let status = user.islogin(res)
+				if (status) {
+					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)
+					this.showtime = res.data.dates[0] + ' ' + res.data.list[0].start_time_period
+				}
+			},
+			getareaList: async function() {
+				let res = await this.$request.post("/api/v1/organization/organizationCityList")
+				if (res.status == 0) {
+					this.options2 = res.data
+					this.options2.forEach((item, index) => {
+						item.label = item.name
+						item.value = index
+					})
+				}
+			},
+			searchvalue() {
+				this.timeday = ""
+				this.timehour = ""
+				this.pageindex = 1
+				this.doctorList = []
+				this.getDoctorList()
+			},
+			xuanzetime() {
+				this.show = !this.show
+			},
+			//返回时间
+			callbacktime(arr) {
+				let date = new Date()
+				let year = date.getFullYear()
+				this.timeday = year + "-" + this.multiSelector[0][arr[0]]
+				console.log(this.timeday)
+				this.timehour = this.multiSelector[1][arr[1]].id
+				this.showtime = this.multiSelector[0][arr[0]] + " " + this.multiSelector[1][arr[1]].start_time_period
+				this.pageindex = 1
+				this.doctorList = []
+				this.getDoctorList()
+			}
+		}
+	};
+</script>
+
+<style scoped lang="scss">
+	.main {
+		padding-top: 10rpx;
+		padding-left: 20rpx;
+		padding-right: 20rpx;
+
+	}
+
+	.gridstyle {
+		height: 450rpx;
+		background-color: #fff;
+		border-radius: 15rpx;
+		display: flex;
+		align-items: center;
+		box-shadow: 0 0 50rpx 0 rgba(0, 0, 0, 0.1);
+		margin-top: 20rpx;
+	}
+
+	.doctor_style {
+		color: rgba(0, 0, 0, 0.54);
+	}
+
+	.doctor_style_item {
+		overflow: hidden;
+		text-overflow: ellipsis;
+		display: -webkit-box;
+		-webkit-line-clamp: 2;
+		-webkit-box-orient: vertical;
+	}
+
+	.jisu {
+		color: rgb(238, 170, 63);
+	}
+
+	.follow_style {
+		position: absolute;
+		bottom: 76rpx;
+		left: 37rpx;
+		z-index: 1;
+		width: 106rpx;
+		height: 40rpx;
+		padding: 4rpx 0;
+		background-color: rgb(208, 105, 150);
+		box-sizing: border-box;
+		color: #fff;
+		text-align: center;
+		border-radius: 60rpx;
+		font-size: 24rpx;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+	}
+
+	.base_item {
+		// position: absolute;
+		// top: 0;
+		// left: 0;
+		// right: 0;
+		// z-index: 1;
+		width: 100%;
+		height: auto;
+		box-sizing: border-box;
+	}
+
+	.base_item_zi {
+		// padding-top: 20rpx;
+		// margin: 20rpx 20rpx;
+		position: relative;
+		box-sizing: border-box;
+	}
+
+	.base_item_zi_items {
+		box-shadow: 0 0 50rpx 0 rgba(0, 0, 0, 0.1);
+		background-color: #fff;
+		position: relative;
+		border-radius: 8rpx;
+		box-sizing: border-box;
+	}
+
+	.base_item_zi_content {
+		display: flex;
+		justify-content: center;
+		padding: 30rpx 30rpx;
+		overflow: hidden;
+		position: relative;
+		width: 100%;
+		box-sizing: border-box;
+	}
+
+	.text_style {
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		font-weight: 400;
+		margin-left: 15rpx;
+		background-color: #E5F5FF;
+		color: #0B73B9;
+		// width: 100rpx;
+		height: 28rpx;
+		font-size: 20rpx;
+		border-radius: 10rpx;
+	}
+
+	.m_gray_small {
+		white-space: nowrap;
+		overflow: hidden;
+		text-overflow: ellipsis;
+		color: rgba(0, 0, 0, 0.54);
+		margin-top: 20rpx;
+		font-size: 28rpx;
+	}
+
+	.content_right {
+		flex: 1;
+		margin-left: 20rpx;
+		overflow: hidden;
+		position: relative;
+		box-sizing: border-box;
+	}
+
+	.foot_item {
+		background-color: #F7F7F7;
+		box-sizing: border-box;
+	}
+
+	.grid-text {
+		font-size: 28rpx;
+		margin-top: 4rpx;
+		color: $u-type-info;
+	}
+
+	.tltleStyle {
+		padding: 30rpx 30rpx 15rpx 15rpx;
+		// font-weight: bold;
+		// font-size: 40rpx;
+	}
 </style>

+ 15 - 10
pages/vaccines/mechanism.vue

xqd xqd
@@ -67,8 +67,13 @@
 		methods: {
 			GetCurrentAddress() {
 				getLocation().then(res => {
-					console.log(res)
 					this.city_name = res.address.address_component.city
+					this.options1.forEach((item,index)=>{
+						if(item.name.indexOf(this.city_name.split('市')[0])>-1){
+							this.value1 = index
+							console.log(this.value1)
+						}
+					})
 					this.getMechanismList()
 				}).catch(res => {})
 			},
@@ -84,23 +89,23 @@
 			},
 			PickerChange(e) {
 				this.value1 = e.detail.value
-				this.city_name = ""
+				this.city_name = this.options1[this.value1].name
 				this.pageindex = 1
 				this.mechanismList = []
 				this.getMechanismList()
 			},
 			getMechanismList: async function() {
-				let area = ""
-				if (this.options1.length != 0) {
-					area = this.options1[this.value1].id
-				}
+				// let area = ""
+				// if (this.options1.length != 0) {
+				// 	area = this.options1[this.value1].name
+				// }
 				let res = await this.$request.post("/api/v1/organization/organizationList", {
 					page: this.pageindex,
-					city_id: area,
-					latitude: uni.getStorageSync('latitude'),
-					longitude: uni.getStorageSync('longitude'),
+					// city_id: area,
+					latitude: uni.getStorageSync('latitude'), //25.123157,
+					longitude: uni.getStorageSync('longitude'), //102.758524,
 					schedule_type: this.type,
-					city_name: this.city_name
+					city_name: this.city_name //'昆明市'
 				})
 				console.log(res)
 				if (res.status == 0) {

+ 6 - 3
pages/vaccines/vaccinesList.vue

xqd xqd
@@ -19,12 +19,15 @@
 						<view class="mianfei margin-right-xs" style="font-size:22rpx;color: #EEAA3F;">
 							{{item.type==1?'免费':'¥'+item.price/100}}
 						</view>
-						<view class="typestyle" style="font-size:22rpx;color: #0B73B9;">
+						<view class="typestyle margin-right-xs" style="font-size:22rpx;color: #0B73B9;">
 							{{item.type==1?'I类':'II类'}}
 						</view>
+						<view class="typestyle padding-lr-xs" style="font-size:22rpx;color: #fa3534;background-color: #fab6b6;" v-if="item.stock<=0">
+							缺苗
+						</view>
 					</view>
 					<view class="margin-top-xs" style="color: #999999; font-size: 26rpx;">
-						备注:<text style="color: #666666;">{{item.remark}}</text>
+						备注:<text style="color: #666666;">{{item.remark||''}}</text>
 					</view>
 					<view class="margin-top-xs" style="color: #999999; font-size: 26rpx;">
 						厂家:<text style="color: #666666;">{{item.supplier||'暂无厂家'}}</text>
@@ -185,7 +188,7 @@
 	}
 
 	.typestyle {
-		width: 44rpx;
+		width: 64rpx;
 		height: 30rpx;
 		background: #E5F5FF;
 		// border-radius: 16rpx;

+ 516 - 514
pages/vaccines/vaccines_info.vue

xqd
@@ -1,515 +1,517 @@
-<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.vaccine_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">{{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;">
-				{{vaccine_notice}}
-			</view>
-		</view>
-		<!-- <u-picker mode="multiSelector" @confirm="callbacktime" v-model="show" :default-selector='[0, 1]' 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="submitpay">
-				提交申请
-			</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" 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'
-	var user = require('../../common/user.js');
-	export default {
-		onLoad() {
-			this.$util.getAgreement().then(res => {
-				this.vaccine_notice = res.data.vaccine_notice
-			}).catch(err => {
-
-			})
-		},
-		components: {
-			datepicker
-		},
-		onShow() {
-			if (this.doctor != null) {
-				this.servicejigou = this.doctor.name
-				this.jigouID = this.doctor.id
-			}
-			if (this.yimiaoInfo != null) {
-				this.yimiao = this.yimiaoInfo.name
-			}
-			this.getarchives()
-			this.multiSelector = []
-			this.gettime()
-		},
-		data() {
-			return {
-				showpeople: false,
-				huanzheID: "",
-				value: "请选择接种用户",
-				patientList: [],
-				show: false,
-				yuyuevalue: "请选择预约时间",
-				multiSelector: [],
-				timehour: "",
-				doctor: "",
-				servicejigou: "请选择服务机构",
-				jigouID: "",
-				yimiao: "请选择接种疫苗",
-				yimiaoInfo: "",
-				time: "",
-				dateshow: false,
-				is_Scheduling: true,
-				vaccine_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: 2
-				})
-				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 => {
-					// 	return item.schedule_date
-					// })
-					// let time = res.data.data.map(item => {
-					// 	return item.schedule_period.map(itm => {
-					// 		itm.organization.org_id = itm.organization['id']
-					// 		return {
-					// 			can_appoint_num: itm.can_appoint_num,
-					// 			...itm.organization,
-					// 			...itm.time_period
-					// 		}
-					// 	})
-					// })
-					// time[0].forEach(item => {
-					// 	item.start_time_period = item.start_time_period + '-' + item.end_time_period
-					// })
-					// this.multiSelector.push(nian)
-					// // time[0].sort((a,b)=> {return a.end_time_period>b.end_time_period?1:-1})
-					// this.multiSelector.push(time[0])
-					// console.log(this.multiSelector)
-					let nian = res.data.data.map(item => {
-						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)
-					// time[0].sort((a,b)=> {return a.end_time_period>b.end_time_period?1:-1})
-					times.forEach(item => {
-						item.sort((a, b) => {
-							return a.end_time_period > b.end_time_period ? 1 : -1
-						})
-						// for (let i = item.length - 1; i >= 0; i--) {
-						// 	let arr = item[i].yeardate + " " + item[i].end_time_period;
-						// 	arr = arr.split(/[- :]/)
-						// 	let nndate = Date.parse(new Date(arr[0], arr[1] - 1, arr[2], arr[3], arr[4]));
-						// 	let currentTime = Date.parse(new Date())
-						// 	// console.log(nndate<currentTime,index)
-						// 	if (nndate < currentTime) {
-						// 		item.splice(i, 1)
-						// 	}
-						// }
-					})
-					this.multiSelector.push(times)
-					let arr = this.multiSelector[1][0]
-					arr.forEach(item => {
-						item.year = nian[0].date
-					})
-					this.$refs.date.rightday = arr
-				}
-			},
-			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]]
-				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() {
-				uni.navigateTo({
-					url: "mechanism?type=" + 2
-				})
-			},
-			vaccinesList() {
-				if (this.doctor == '') {
-					uni.showToast({
-						title: "请先选择机构",
-						icon: "none"
-					})
-					return false
-				}
-				uni.navigateTo({
-					url: "vaccinesList?id=" + this.doctor.id
-				})
-			},
-			yuyuetime() {
-				if (!this.is_Scheduling) {
-					uni.showToast({
-						title: "尚未排班",
-						icon: "none"
-					})
-					return false
-				}
-				if (this.doctor == '') {
-					uni.showToast({
-						title: "请先选择机构",
-						icon: "none"
-					})
-					return false
-				}
-				this.dateshow = true
-			},
-			submitpay() {
-				if (this.huanzheID == "") {
-					uni.showToast({
-						title: "请先选择接种用户",
-						icon: "none"
-					})
-					return false
-				}
-				if (this.doctor == "") {
-					uni.showToast({
-						title: "请先选择机构",
-						icon: "none"
-					})
-					return false
-				}
-				if (this.yimiaoInfo == "") {
-					uni.showToast({
-						title: "请先选择疫苗",
-						icon: "none"
-					})
-					return false
-				}
-				if (this.timehour == "") {
-					uni.showToast({
-						title: "请先选择预约时间",
-						icon: "none"
-					})
-					return false
-				}
-				uni.requestSubscribeMessage({
-					tmplIds: ['M9b6PPKtD7PEqLsSnQ453iTIHtIZZpixOBjUjax8YXU', 'Sg0lKmOexTnxxDzy39E26aNvmc3w4qKUnxl21A9dWns',
-						'phcsQ7ZbsJapfmx3NMChaxepR9tJFiqbO25P9tujErI'
-					],
-					success: (res) => {
-						this.gotopay()
-					},
-					fail: (err) => {
-						this.gotopay()
-					}
-				})
-			},
-			gotopay: async function() {
-
-				let obj = {
-					product_type: 4,
-					patient_id: this.huanzheID,
-					total_amount: 0,
-					organization_id: this.doctor.id,
-					schedule_date: this.time,
-					time_period_id: this.timehour,
-					vaccine_id: this.yimiaoInfo.id,
-					payment_type: 2
-				}
-				// if ((this.yimiaoInfo.price / 100) == 0) {
-				let res = await this.$request.post("/api/v1/order/appointPlaceOrder", {
-					product_type: obj.product_type,
-					patient_id: obj.patient_id,
-					total_amount: 0,
-					organization_id: obj.organization_id,
-					schedule_date: obj.schedule_date,
-					time_period_id: obj.time_period_id,
-					vaccine_id: obj.vaccine_id,
-					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.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.vaccine_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">{{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;">
+				{{vaccine_notice}}
+			</view>
+		</view>
+		<!-- <u-picker mode="multiSelector" @confirm="callbacktime" v-model="show" :default-selector='[0, 1]' 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="submitpay">
+				提交申请
+			</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" 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'
+	var user = require('../../common/user.js');
+	export default {
+		onLoad() {
+			this.$util.getAgreement().then(res => {
+				this.vaccine_notice = res.data.vaccine_notice
+			}).catch(err => {
+
+			})
+		},
+		components: {
+			datepicker
+		},
+		onShow() {
+			if (this.doctor != null) {
+				this.servicejigou = this.doctor.name
+				this.jigouID = this.doctor.id
+			}
+			if (this.yimiaoInfo != null) {
+				this.yimiao = this.yimiaoInfo.name
+			}
+			this.getarchives()
+			this.multiSelector = []
+			this.gettime()
+		},
+		data() {
+			return {
+				showpeople: false,
+				huanzheID: "",
+				value: "请选择接种用户",
+				patientList: [],
+				show: false,
+				yuyuevalue: "请选择预约时间",
+				multiSelector: [],
+				timehour: "",
+				doctor: "",
+				servicejigou: "请选择服务机构",
+				jigouID: "",
+				yimiao: "请选择接种疫苗",
+				yimiaoInfo: "",
+				time: "",
+				dateshow: false,
+				is_Scheduling: true,
+				vaccine_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: 2
+				})
+				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 => {
+					// 	return item.schedule_date
+					// })
+					// let time = res.data.data.map(item => {
+					// 	return item.schedule_period.map(itm => {
+					// 		itm.organization.org_id = itm.organization['id']
+					// 		return {
+					// 			can_appoint_num: itm.can_appoint_num,
+					// 			...itm.organization,
+					// 			...itm.time_period
+					// 		}
+					// 	})
+					// })
+					// time[0].forEach(item => {
+					// 	item.start_time_period = item.start_time_period + '-' + item.end_time_period
+					// })
+					// this.multiSelector.push(nian)
+					// // time[0].sort((a,b)=> {return a.end_time_period>b.end_time_period?1:-1})
+					// this.multiSelector.push(time[0])
+					// console.log(this.multiSelector)
+					let nian = res.data.data.map(item => {
+						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)
+					// time[0].sort((a,b)=> {return a.end_time_period>b.end_time_period?1:-1})
+					times.forEach(item => {
+						item.sort((a, b) => {
+							return a.end_time_period > b.end_time_period ? 1 : -1
+						})
+						// for (let i = item.length - 1; i >= 0; i--) {
+						// 	let arr = item[i].yeardate + " " + item[i].end_time_period;
+						// 	arr = arr.split(/[- :]/)
+						// 	let nndate = Date.parse(new Date(arr[0], arr[1] - 1, arr[2], arr[3], arr[4]));
+						// 	let currentTime = Date.parse(new Date())
+						// 	// console.log(nndate<currentTime,index)
+						// 	if (nndate < currentTime) {
+						// 		item.splice(i, 1)
+						// 	}
+						// }
+					})
+					this.multiSelector.push(times)
+					let arr = this.multiSelector[1][0]
+					arr.forEach(item => {
+						item.year = nian[0].date
+					})
+					this.$refs.date.rightday = arr
+				}
+			},
+			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]]
+				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 = ""
+				uni.navigateTo({
+					url: "mechanism?type=" + 2
+				})
+			},
+			vaccinesList() {
+				if (this.doctor == '') {
+					uni.showToast({
+						title: "请先选择机构",
+						icon: "none"
+					})
+					return false
+				}
+				uni.navigateTo({
+					url: "vaccinesList?id=" + this.doctor.id
+				})
+			},
+			yuyuetime() {
+				if (!this.is_Scheduling) {
+					uni.showToast({
+						title: "尚未排班",
+						icon: "none"
+					})
+					return false
+				}
+				if (this.doctor == '') {
+					uni.showToast({
+						title: "请先选择机构",
+						icon: "none"
+					})
+					return false
+				}
+				this.dateshow = true
+			},
+			submitpay() {
+				if (this.huanzheID == "") {
+					uni.showToast({
+						title: "请先选择接种用户",
+						icon: "none"
+					})
+					return false
+				}
+				if (this.doctor == "") {
+					uni.showToast({
+						title: "请先选择机构",
+						icon: "none"
+					})
+					return false
+				}
+				if (this.yimiaoInfo == "") {
+					uni.showToast({
+						title: "请先选择疫苗",
+						icon: "none"
+					})
+					return false
+				}
+				if (this.timehour == "") {
+					uni.showToast({
+						title: "请先选择预约时间",
+						icon: "none"
+					})
+					return false
+				}
+				uni.requestSubscribeMessage({
+					tmplIds: ['M9b6PPKtD7PEqLsSnQ453iTIHtIZZpixOBjUjax8YXU', 'Sg0lKmOexTnxxDzy39E26aNvmc3w4qKUnxl21A9dWns',
+						'phcsQ7ZbsJapfmx3NMChaxepR9tJFiqbO25P9tujErI'
+					],
+					success: (res) => {
+						this.gotopay()
+					},
+					fail: (err) => {
+						this.gotopay()
+					}
+				})
+			},
+			gotopay: async function() {
+
+				let obj = {
+					product_type: 4,
+					patient_id: this.huanzheID,
+					total_amount: 0,
+					organization_id: this.doctor.id,
+					schedule_date: this.time,
+					time_period_id: this.timehour,
+					vaccine_id: this.yimiaoInfo.id,
+					payment_type: 2
+				}
+				// if ((this.yimiaoInfo.price / 100) == 0) {
+				let res = await this.$request.post("/api/v1/order/appointPlaceOrder", {
+					product_type: obj.product_type,
+					patient_id: obj.patient_id,
+					total_amount: 0,
+					organization_id: obj.organization_id,
+					schedule_date: obj.schedule_date,
+					time_period_id: obj.time_period_id,
+					vaccine_id: obj.vaccine_id,
+					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.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;
+			}
+
+		}
+	}
 </style>