Bläddra i källkod

修复诸多bug

宇宙无敌M1处理器的MacBook Pro 4 år sedan
förälder
incheckning
fe7fb1b22f

+ 149 - 149
components/datepicker/datepicker.vue

xqd
@@ -1,151 +1,151 @@
-<template>
-	<view class="main">
-		<view class="leftcontainer">
-			<scroll-view scroll-y="true" style="height: 700rpx;">
-				<view :class="leftindex==index?'leftstyle leftstyle_active':'leftstyle'" v-for="(item,index) in date[0]" @click="selectdate(item,index)"
-				 :key="index">
-					<view class="">
-						{{formatdate(item.week)}}
-					</view>
-					<view class="">
-						{{item.date}}
-					</view>
-				</view>
-			</scroll-view>
-		</view>
-		<view class="rightcontainer">
-			<scroll-view scroll-y="true" style="height: 700rpx;">
-				<u-grid :col="3">
-					<u-grid-item v-for="(itm,idx) in rightday" @click="selectday(itm)" :key="idx">
-						<view class="text-sm">
-							{{itm.intro}}
-						</view>
-						<view class="margin-top-sm">{{itm.start_time_period}} - {{itm.end_time_period}}</view>
-						<view :class="itm.can_appoint_num==0?'margin-top-sm text-gray text-sm':'margin-top-sm text-blue text-sm'">
-							可预约号源:{{itm.can_appoint_num}}
-						</view>
-					</u-grid-item>
-				</u-grid>
-			</scroll-view>
-		</view>
-	</view>
-</template>
-
-<script>
-	export default {
-		props: {
-			date: {
-				type: Array,
-			}
-		},
-		mounted() {
-
-		},
-		data() {
-			return {
-				leftindex: 0,
-				rightday: [],
-				year: ""
-			}
-		},
-
-		methods: {
-			formatdate(week) {
-				switch (week) {
-					case 1:
-						return "周一"
-						break;
-					case 2:
-						return "周二"
-						break;
-					case 3:
-						return "周三"
-						break;
-					case 4:
-						return "周四"
-						break;
-					case 5:
-						return "周五"
-						break;
-					case 6:
-						return "周六"
-						break;
-					case 7:
-						return "周日"
-						break;
-					default:
-						break;
-				}
-			},
+<template>
+	<view class="main">
+		<view class="leftcontainer">
+			<scroll-view scroll-y="true" style="height: 700rpx;">
+				<view :class="leftindex==index?'leftstyle leftstyle_active':'leftstyle'" v-for="(item,index) in date[0]" @click="selectdate(item,index)"
+				 :key="index">
+					<view class="">
+						{{formatdate(item.week)}}
+					</view>
+					<view class="">
+						{{item.date}}
+					</view>
+				</view>
+			</scroll-view>
+		</view>
+		<view class="rightcontainer">
+			<scroll-view scroll-y="true" style="height: 700rpx;">
+				<u-grid :col="3">
+					<u-grid-item v-for="(itm,idx) in rightday" @click="selectday(itm)" :key="idx">
+						<view class="text-sm">
+							{{itm.intro}}
+						</view>
+						<view class="margin-top-sm">{{itm.start_time_period}} - {{itm.end_time_period}}</view>
+						<view :class="itm.can_appoint_num==0?'margin-top-sm text-gray text-sm':'margin-top-sm text-blue text-sm'">
+							可预约号源:{{itm.can_appoint_num}}
+						</view>
+					</u-grid-item>
+				</u-grid>
+			</scroll-view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		props: {
+			date: {
+				type: Array,
+			}
+		},
+		mounted() {
+		},
+		data() {
+			return {
+				leftindex: 0,
+				rightday: [],
+				year: ""
+			}
+		},
+
+		methods: {
+			formatdate(week) {
+				switch (week) {
+					case 1:
+						return "周一"
+						break;
+					case 2:
+						return "周二"
+						break;
+					case 3:
+						return "周三"
+						break;
+					case 4:
+						return "周四"
+						break;
+					case 5:
+						return "周五"
+						break;
+					case 6:
+						return "周六"
+						break;
+					case 7:
+						return "周日"
+						break;
+					default:
+						break;
+				}
+			},
 			selectdate(item, index) {
-				this.leftindex = index
-				this.year = item.date
-				this.date[1].forEach(data => {
-					data.forEach(itm => {
-						if (itm.schedule_id == item.id) {
-							this.rightday = data
-						}
-					})
-				})
-			},
-			selectday(itm) {
-				let arr = itm.year + " " + itm.end_time_period;
-				arr = arr.split(/[- :]/)
-				let nndate = new Date(arr[0], arr[1] - 1, arr[2], arr[3], arr[4]);
-				nndate = Date.parse(nndate)
-				let currentTime = Date.parse(new Date())
-				if (nndate < currentTime) {
-					uni.showToast({
-						title: "不可预约已过时间",
-						icon: "none"
-					})
-					return false
-				}
-				if (itm.can_appoint_num == 0) {
-					uni.showToast({
-						title: "已无号源可预约",
-						icon: "none"
-					})
-					return false
-				}
-				if (this.year != "") {
-					itm.year = this.year
-				}
-				this.$emit('callbacktime', itm)
-			}
-		}
-	};
-</script>
-
-<style scoped>
-	.main {
-		display: flex;
-		/* margin-left: 15rpx;
-		margin-right: 15rpx; */
-	}
-
-	.leftcontainer {
-		border-right: 1rpx solid #efefef;
-		width: 25%;
-	}
-
-	.rightcontainer {
-		width: 75%;
-	}
-
-	.leftstyle {
-		width: 100%;
-		height: 80rpx;
-		display: flex;
-		justify-content: center;
-		align-items: center;
-		font-size: 30rpx;
-		color: #0B73B9;
-		flex-direction: column;
-	}
-
-	.leftstyle_active {
-		color: #fff;
-		background-color: #0B73B9;
-	}
+				console.log(this.date)
+				this.leftindex = index
+				this.year = item.date
+				this.date[1].forEach(data => {
+					data.forEach(itm => {
+						if (itm.schedule_id == item.id) {
+							this.rightday = data
+						}
+					})
+				})
+			},
+			selectday(itm) {
+				let arr = itm.year + " " + itm.end_time_period;
+				arr = arr.split(/[- :]/)
+				let nndate = new Date(arr[0], arr[1] - 1, arr[2], arr[3], arr[4]);
+				nndate = Date.parse(nndate)
+				let currentTime = Date.parse(new Date())
+				if (nndate < currentTime) {
+					uni.showToast({
+						title: "不可预约已过时间",
+						icon: "none"
+					})
+					return false
+				}
+				if (itm.can_appoint_num == 0) {
+					uni.showToast({
+						title: "已无号源可预约",
+						icon: "none"
+					})
+					return false
+				}
+				if (this.year != "") {
+					itm.year = this.year
+				}
+				this.$emit('callbacktime', itm)
+			}
+		}
+	};
+</script>
+
+<style scoped>
+	.main {
+		display: flex;
+		/* margin-left: 15rpx;
+		margin-right: 15rpx; */
+	}
+
+	.leftcontainer {
+		border-right: 1rpx solid #efefef;
+		width: 25%;
+	}
+
+	.rightcontainer {
+		width: 75%;
+	}
+
+	.leftstyle {
+		width: 100%;
+		height: 80rpx;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		font-size: 30rpx;
+		color: #0B73B9;
+		flex-direction: column;
+	}
+
+	.leftstyle_active {
+		color: #fff;
+		background-color: #0B73B9;
+	}
 </style>

+ 1 - 1
pages/archives/archives_info.vue

xqd
@@ -175,7 +175,7 @@
 		margin-left: 15rpx;
 		background-color: #E5F5FF;
 		color: #0B73B9;
-		width: 100rpx;
+		// width: 100rpx;
 		height: 28rpx;
 		font-size: 20rpx;
 		border-radius: 10rpx;

+ 29 - 2
pages/childcare/child_care.vue

xqd xqd xqd xqd
@@ -49,7 +49,7 @@
 				</view>
 			</view>
 			<view class="text-gray text-sm" style="margin: 25rpx 37rpx;line-height: 38rpx;">
-				{{nurse_notice}}
+				<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> -->
@@ -275,6 +275,9 @@
 				})
 			},
 			xuanzefuwu() {
+				this.yimiao = ""
+				this.yimiaoInfo = ""
+				this.childcare = []
 				uni.navigateTo({
 					url: "../vaccines/mechanism?type=" + 3
 				})
@@ -292,13 +295,27 @@
 				})
 			},
 			yuyuetime() {
-				if (!this.is_Scheduling) {
+				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: "请先选择机构",
@@ -372,6 +389,16 @@
 								url: "../order/order?type=" + obj.product_type
 							})
 						}, 1000)
+					}else{
+						uni.showModal({
+							title: "提示",
+							content: res.message,
+							confirmText: "确定",
+							showCancel: false,
+							success: (rr) => {
+								
+							}
+						})
 					}
 				} else {
 					uni.navigateTo({

+ 13 - 13
pages/common_tools/home_doctor.vue

xqd xqd
@@ -1,33 +1,33 @@
 <template>
 	<view style="height: 100%;width: 100%; padding: 20rpx 30rpx;">
-		<view class="list" v-for="item,index in doctorList" :key='index' @click.stop="clicklist" :data-id="item.id"
+		<view class="list" v-for="item,index in doctorList" :key='index' @click.stop="clicklist" :data-id="item.docter.id"
 		 :data-index="index">
 			<!-- 头像 -->
 			<view class="portrait">
 				<view style="padding-top: 20rpx;">
-					<image class="img" :src="item.avatar"></image>
-					<view class="bun_true" @click.stop="follow" :data-index="index" :data-id="item.id" v-if="item.is_collect==0">关注</view>
-					<view class="bun_false" @click.stop="follow" :data-index="index" :data-id="item.id" v-else>已关注</view>
+					<image class="img" :src="item.docter.avatar"></image>
+					<view class="bun_true" @click.stop="follow" :data-index="index" :data-id="item.docter.id" v-if="item.docter.is_collect==0">关注</view>
+					<view class="bun_false" @click.stop="follow" :data-index="index" :data-id="item.docter.id" v-else>已关注</view>
 				</view>
 			</view>
 			<!-- 文字 -->
 			<view class="text">
 				<!-- 名字+标签 -->
 				<view class="name">
-					<view style="margin-right: 15rpx;">{{item.name}}</view>
-					<view class="label" v-for="(itm,idx) in item.label_texts" :key="index">{{itm.label_name}}</view>
+					<view style="margin-right: 15rpx;">{{item.docter.name}}</view>
+					<view class="label" v-for="(itm,idx) in item.docter.label_texts" :key="index">{{itm.label_name}}</view>
 				</view>
 				<!-- 科室 -->
 				<view class="department">
 					<text>科室:</text>
-					<text style="color: #333333;">{{item.office.name||'暂无'}}</text>
-					<text style="color: #333333;">{{item.qualification.name||'暂无'}}</text>
+					<text style="color: #333333;">{{item.docter.office.name||'暂无'}}</text>
+					<text style="color: #333333;">{{item.docter.qualification.name||'暂无'}}</text>
 				</view>
 				<!-- 选项 -->
 				<view class="option">
-					<view v-if="item.is_chat==1">图文</view>
-					<view v-if="item.is_phone==1">电话</view>
-					<view v-if="item.is_appoint==1">门诊</view>
+					<view v-if="item.docter.is_chat==1">图文</view>
+					<view v-if="item.docter.is_phone==1">电话</view>
+					<view v-if="item.docter.is_appoint==1">门诊</view>
 				</view>
 			</view>
 		</view>
@@ -93,9 +93,9 @@
 				}
 			},
 			gethome_doctor: async function() {
-				let res = await this.$request.post("/api/v1/docter/docterList", {
+				let res = await this.$request.post("/api/v1/user/familyDocterList", {
 					page: this.pageindex,
-					is_pack_docter:1
+					// is_pack_docter:1
 				})
 				console.log(res)
 				if (res.status == 0) {

+ 116 - 109
pages/common_tools/me_order/me_order.vue

xqd
@@ -1,110 +1,117 @@
-<template style="background: #F6F6F6;">
-	<view style="height: 100%;width: 100%;padding: 20rpx 28rpx;">
-		<view class="" v-for="(itm,idx) in serviceList" :key="idx">
-			<view class="list" @click="list(itm)">
-				<!-- 左边 -->
-				<view class="left">
-					<view style="font-size: 30rpx;font-weight: bold;margin-bottom: 20rpx;">{{itm.order_pack.insurance_policy}}</view>
-					<view style="font-size: 26rpx;color: #999999;">{{itm.order_pack.pack_name}}</view>
-				</view>
-				<!-- 右边 -->
-				<view class="ringht">
-					<u-icon name="arrow-right" color="#C0C0C0"></u-icon>
-				</view>
-			</view>
-		</view>
-		<u-empty text="暂无数据" :show="show" mode="order" margin-top="250"></u-empty>
-		<view class="cu-tabbar-height"></view>
-		<view class="cu-tabbar-height"></view>
-	</view>
-</template>
-
-<script>
-	export default {
-		mounted() {
-			this.getInsurance()
-		},
-		data() {
-			return {
-				pageindex: 1,
-				serviceList: [],
-				show: false
-			}
-		},
-		methods: {
-			//关注
-			list(item) {
-				uni.showLoading({
-					title: "加载中,请等待"
-				})
-				uni.downloadFile({
-					url: item.order_pack.insurance_img_url,
-					success(res) {
-						console.log(res)
-						let data = res.tempFilePath;
-						uni.openDocument({
-							filePath: data,
-							fileType: 'pdf',
-							success: (res) => {
-								uni.hideLoading()
-							}
-						})
-					}
-				})
-				// uni.navigateTo({
-				// 	url: "order_details?pdfurl=" + item.order_pack.insurance_img_url
-				// })
-				// uni.navigateTo({
-				// 	url: '/pages/common_tools/me_order/order_details?data=' + JSON.stringify(item)
-				// 	// url: '/pages/customer/customer-datails?n=' + n
-				// })
-			},
-			getInsurance: async function() {
-				let res = await this.$request.post("/api/v1/order/orderList", {
-					page: this.pageindex,
-					list_type: 1,
-					product_type: 6,
-				})
-				console.log(res)
-				if (res.status == 0) {
-					if (this.pageindex > res.data.last_page) {
-						uni.showToast({
-							title: "没有更多了",
-							icon: "none"
-						})
-					} else {
-						this.serviceList = this.serviceList.concat(res.data.data)
-						this.pageindex++
-					}
-				}
-				if (this.serviceList.length == 0) {
-					this.show = true
-				} else {
-					this.show = false
-				}
-			}
-		}
-	}
-</script>
-
-<style>
-	.list {
-		box-shadow: 0px 2px 12px 0px rgba(0, 0, 0, 0.04);
-		border-radius: 12px;
-		background: #FFFFFF;
-		margin-bottom: 20rpx;
-		display: flex;
-		justify-content: center;
-		align-items: center;
-		padding: 48rpx 28rpx;
-	}
-
-	.left {
-		width: 95%;
-		display: initial;
-	}
-
-	.ringht {
-		width: 5%;
-	}
+<template style="background: #F6F6F6;">
+	<view style="height: 100%;width: 100%;padding: 20rpx 28rpx;">
+		<view class="" v-for="(itm,idx) in serviceList" :key="idx">
+			<view class="list" @click="list(itm)">
+				<!-- 左边 -->
+				<view class="left">
+					<view style="font-size: 30rpx;font-weight: bold;margin-bottom: 20rpx;">{{itm.order_pack.insurance_policy}}</view>
+					<view style="font-size: 26rpx;color: #999999;">{{itm.order_pack.pack_name}}</view>
+				</view>
+				<!-- 右边 -->
+				<view class="ringht">
+					<u-icon name="arrow-right" color="#C0C0C0"></u-icon>
+				</view>
+			</view>
+		</view>
+		<u-empty text="暂无数据" :show="show" mode="order" margin-top="250"></u-empty>
+		<view class="cu-tabbar-height"></view>
+		<view class="cu-tabbar-height"></view>
+	</view>
+</template>
+
+<script>
+	export default {
+		mounted() {
+			this.getInsurance()
+		},
+		data() {
+			return {
+				pageindex: 1,
+				serviceList: [],
+				show: false
+			}
+		},
+		methods: {
+			//关注
+			list(item) {
+				uni.showLoading({
+					title: "加载中,请等待"
+				})
+				uni.downloadFile({
+					url: item.order_pack.insurance_img_url,
+					success(res) {
+						console.log(res)
+						let data = res.tempFilePath;
+						uni.openDocument({
+							filePath: data,
+							fileType: 'pdf',
+							success: (res) => {
+								uni.hideLoading()
+							}
+						})
+					}
+				})
+				// uni.navigateTo({
+				// 	url: "order_details?pdfurl=" + item.order_pack.insurance_img_url
+				// })
+				// uni.navigateTo({
+				// 	url: '/pages/common_tools/me_order/order_details?data=' + JSON.stringify(item)
+				// 	// url: '/pages/customer/customer-datails?n=' + n
+				// })
+			},
+			getInsurance: async function() {
+				let res = await this.$request.post("/api/v1/order/orderList", {
+					page: this.pageindex,
+					list_type: 1,
+					product_type: 6,
+					is_pack_expire: 2
+				})
+				console.log(res)
+				if (res.status == 0) {
+					if (this.pageindex > res.data.last_page) {
+						uni.showToast({
+							title: "没有更多了",
+							icon: "none"
+						})
+					} else {
+						let i = res.data.data.length
+						while (i--) {
+							if (res.data.data[i].order_pack.insurance_img_url == '') {
+								res.data.data.splice(i, 1)
+							}
+						}
+						this.serviceList = this.serviceList.concat(res.data.data)
+						this.pageindex++
+					}
+				}
+				if (this.serviceList.length == 0) {
+					this.show = true
+				} else {
+					this.show = false
+				}
+			}
+		}
+	}
+</script>
+
+<style>
+	.list {
+		box-shadow: 0px 2px 12px 0px rgba(0, 0, 0, 0.04);
+		border-radius: 12px;
+		background: #FFFFFF;
+		margin-bottom: 20rpx;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		padding: 48rpx 28rpx;
+	}
+
+	.left {
+		width: 95%;
+		display: initial;
+	}
+
+	.ringht {
+		width: 5%;
+	}
 </style>

+ 0 - 1
pages/common_tools/my_consulting/my_consulting.vue

xqd
@@ -445,7 +445,6 @@
 						// 		res.data.data.splice(index, 1)
 						// 	}
 						// })
-						console.log(res.data.data)
 						this.pageindex++
 						this.ordersList = this.ordersList.concat(res.data.data)
 						// this.totalPage = res.data.last_page

+ 3 - 0
pages/doctor_related/doctor_info.vue

xqd
@@ -200,6 +200,9 @@
 				location: {}
 
 			}
+		},
+		onShareAppMessage() {
+			
 		},
 		methods: {
 			getdoctorInfo: async function() {

+ 3 - 3
pages/doctor_related/info_write.vue

xqd
@@ -113,13 +113,13 @@
 				</view>
 			</view>
 			<view class="text-gray text-sm" style="margin: 25rpx 37rpx;line-height: 38rpx;" v-if="type == 1">
-				{{phone_notice}}
+				<rich-text :nodes="phone_notice"></rich-text>
 			</view>
 			<view class="text-gray text-sm" style="margin: 25rpx 37rpx;line-height: 38rpx;" v-else-if="type == 2">
-				{{chat_notice}}
+				<rich-text :nodes="chat_notice"></rich-text>
 			</view>
 			<view class="text-gray text-sm" style="margin: 25rpx 37rpx;line-height: 38rpx;" v-else>
-				{{clinic_notice}}
+				<rich-text :nodes="clinic_notice"></rich-text>
 			</view>
 		<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">

+ 4 - 2
pages/index/agreement.vue

xqd xqd
@@ -2,6 +2,8 @@
 	<view class="main">
 		<!-- <rich-text :nodes="nodeEl"></rich-text> -->
 		<u-parse :html="nodeEl"></u-parse>
+		<view class="cu-tabbar-height"></view>
+		<view class="cu-tabbar-height"></view>
 	</view>
 </template>
 
@@ -21,7 +23,7 @@
 <style scoped>
 	.main {
 		min-height: 100vh;
-		margin-left: 10rpx;
-		margin-right: 10rpx;
+		padding-left: 20rpx;
+		padding-right: 20rpx;
 	}
 </style>

+ 2 - 1
pages/index/index.vue

xqd
@@ -323,7 +323,8 @@
 				let res = await this.$request.post("/api/v1/docter/docterList", {
 					page: this.pageindex,
 					latitude: this.latitude,
-					longitude: this.longitude
+					longitude: this.longitude,
+					sort_type: 1
 				}, false)
 				if (res.status == 0) {
 					// this.doctorList = res.data.data

+ 146 - 86
pages/order/payment.vue

xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd
@@ -67,9 +67,12 @@
 											<span class="couponItem-subject-right-header-icon">{{item.type==1?'满减':'折扣'}}</span>
 											{{item.title}}
 										</view>
-										<button :data-index="index" @click="collectCoupons(item,index)" class="couponItem-subject-right-btn">使用</button>
-										<view class="closing-date">
-											{{item.start_time}} - {{item.end_time}}
+										<button :data-index="index" @click="collectCoupons(item,index)" class="couponItem-subject-right-btn">使用</button>
+										<view class="closing-date" v-if="item.expire_type == 2">
+											{{item.start_time}} - {{item.end_time}}
+										</view>
+										<view class="closing-date" v-else>
+											有效期:{{item.effective_days}}天
 										</view>
 									</view>
 								</view>
@@ -94,8 +97,7 @@
 				<view style="height: 20%;width: auto;padding-left: 40rpx;">
 					<view style="font-size: 30rpx;display: flex;align-items: center;height: 100%;">
 						<text v-if="value=='钱包余额支付'">余额支付 (余额¥{{info.balance/100}}元)</text>
-						<text v-else>服务包抵扣</text>
-						<!-- <text v-else>微信支付</text> -->
+						<text v-else-if="value=='服务包抵扣'">服务包抵扣</text>
 					</view>
 				</view>
 				<!-- 按钮占25% -->
@@ -143,7 +145,8 @@
 			<u-radio-group v-model="value" v-for="(item, index) in paymenMethod" :key="index">
 				<uni-list-item :border="false" @click="setmode(item)" :clickable="true">
 					<view slot="header">
-						<text style="font-size: 28rpx;font-weight: 400;color: #333333;">{{item.name}}</text>
+						<u-icon :name="item.iconName" :color="item.color" size="32"></u-icon>
+						<text style="font-size: 28rpx;font-weight: 400;color: #333333;margin-left: 10rpx;">{{item.name}}</text>
 					</view>
 					<view slot="footer">
 						<u-radio @change="radioChange" :key="index" :name="item.name" :disabled="item.disabled">
@@ -176,7 +179,9 @@
 			if (this.infodata.product_type != 6) {
 				this.paymenMethod.push({
 					name: '服务包抵扣',
-					disabled: false
+					disabled: false,
+					iconName: "bag-fill",
+					color: "#fa3534"
 				})
 			}
 			console.log(this.infodata)
@@ -210,7 +215,14 @@
 				value: '钱包余额支付',
 				paymenMethod: [{
 					name: '钱包余额支付',
-					disabled: false
+					disabled: false,
+					iconName: "rmb-circle-fill",
+					color: "#ff9900"
+				}, {
+					name: "微信支付",
+					disabled: false,
+					iconName: "weixin-fill",
+					color: "#19be6b"
 				}],
 				//弹出层控制
 				popupShow: false,
@@ -241,7 +253,7 @@
 				res.data.forEach(it => {
 					if (it == this.infodata.docter_id) {
 						this.serviceid = item.id
-						this.showservice = false
+						this.showservice = false
 						console.log(this.serviceid)
 					} else {
 						uni.showModal({
@@ -259,10 +271,10 @@
 					// docter_id:this.infodata.docter_id
 					list_type: 1,
 					product_type: 6,
-					is_pack_expire: 2,
-					order_status:3
+					is_pack_expire: 2,
+					order_status: 3
 				})
-				console.log(res)
+
 				if (res.status == 0) {
 					if (this.pageservice > res.data.last_page) {
 						uni.showToast({
@@ -284,7 +296,7 @@
 				let res = await this.$request.post("/api/v1/coupon/userCouponList", {
 					page: this.pageindex
 				})
-				console.log(res)
+
 				if (res.status == 0) {
 					if (this.pageindex > res.data.last_page) {
 						uni.showToast({
@@ -337,6 +349,8 @@
 
 				} else if (this.value == '钱包余额支付') {
 					this.paytype = 2
+				} else if (this.value == '微信支付') {
+					this.paytype = 1
 				}
 			},
 			collectCoupons(item, index) {
@@ -387,7 +401,7 @@
 					})
 					return false
 				}
-				if (this.info.balance < this.infodata.total_amount * 100) {
+				if (this.info.balance < this.orderAmount * 100) {
 					uni.showModal({
 						title: "错误提示",
 						content: "余额不足,请先充值",
@@ -493,7 +507,7 @@
 				if (res.status == 0) {
 					this.order_id = res.data.order_id
 					return true
-					console.log(res)
+
 				} else {
 					uni.showModal({
 						title: "提示",
@@ -531,7 +545,7 @@
 					is_need_insurance: num,
 					team_id: this.infodata.team_id
 				})
-				console.log(res)
+
 				if (res.status == 0) {
 					this.order_id = res.data.order_id
 					return true
@@ -697,7 +711,7 @@
 					user_coupon_id: this.couponid,
 					order_pack_id: this.serviceid
 				})
-				console.log(res)
+
 				if (res.status == 0) {
 					this.order_id = res.data.order_id
 					return true
@@ -723,43 +737,67 @@
 				if (this.infodata.product_type == 1) {
 					this.payphone().then(res => {
 						if (res) {
-							this.popupShow = true
-							this.show = true
+							if (this.paytype != 1) {
+								this.popupShow = true
+								this.show = true
+							} else {
+								this.orderPay()
+							}
 						}
 					})
 				} else if (this.infodata.product_type == 2) {
 					this.paychat().then(res => {
 						if (res) {
-							this.popupShow = true
-							this.show = true
+							if (this.paytype != 1) {
+								this.popupShow = true
+								this.show = true
+							} else {
+								this.orderPay()
+							}
 						}
 					})
 				} else if (this.infodata.product_type == 6) {
 					this.paypacks().then(res => {
 						if (res) {
-							this.popupShow = true
-							this.show = true
+							if (this.paytype != 1) {
+								this.popupShow = true
+								this.show = true
+							} else {
+								this.orderPay()
+							}
 						}
 					})
 				} else if (this.infodata.product_type == 3) {
 					this.payyuyue().then(res => {
 						if (res) {
-							this.popupShow = true
-							this.show = true
+							if (this.paytype != 1) {
+								this.popupShow = true
+								this.show = true
+							} else {
+								this.orderPay()
+							}
 						}
 					})
 				} else if (this.infodata.product_type == 4) {
 					this.payvaccines().then(res => {
 						if (res) {
-							this.popupShow = true
-							this.show = true
+							if (this.paytype != 1) {
+								this.popupShow = true
+								this.show = true
+							} else {
+								this.orderPay()
+							}
 						}
 					})
 				} else if (this.infodata.product_type == 5) {
 					this.paychildcare().then(res => {
 						if (res) {
-							this.popupShow = true
-							this.show = true
+							if (this.paytype != 1) {
+								this.popupShow = true
+								this.show = true
+							} else {
+								this.orderPay()
+							}
 						}
 					})
 				}
@@ -769,67 +807,89 @@
 					order_id: this.order_id,
 					pay_password: this.password
 				})
-				if (res.status == 0) {
-					this.popupShow = false
-					this.show = false
-					uni.showToast({
-						title: "支付成功!",
-						duration: 1500
-					})
-					setTimeout(() => {
-						uni.redirectTo({
-							url: "order?type=" + this.infodata.product_type
-						})
-					}, 1500)
-				} else {
-					if (res.message == '密码错误') {
-						uni.showModal({
-							title: "提示",
-							content: res.message,
-							confirmText: "重试",
-							success: (res) => {
-								if (res.confirm) {
-									this.password = ""
-								} else if (res.cancel) {
-									this.popupShow = false
-									this.show = false
-									this.password = ""
-								}
-							},
-						})
-					} else if (res.message == '未设置支付密码') {
-						uni.showModal({
-							title: "提示",
-							content: res.message,
-							confirmText: "设置",
-							success: (res) => {
-								if (res.confirm) {
-									this.password = ""
-									uni.navigateTo({
-										url: "../index/paypassword"
-									})
-								} else if (res.cancel) {
-									this.popupShow = false
-									this.show = false
-									this.password = ""
-								}
-							},
+				console.log(res)
+				if (this.paytype != 1) {
+					if (res.status == 0) {
+						this.popupShow = false
+						this.show = false
+						uni.showToast({
+							title: "支付成功!",
+							duration: 1500
 						})
+						setTimeout(() => {
+							uni.redirectTo({
+								url: "order?type=" + this.infodata.product_type
+							})
+						}, 1500)
 					} else {
-						uni.showModal({
-							title: "提示",
-							content: res.message,
-							confirmText: "确定",
-							showCancel: false,
-							success: (rr) => {
-								if (rr.confirm) {
-									this.popupShow = false
-									this.show = false
-									this.password = ""
+						if (res.message == '密码错误') {
+							uni.showModal({
+								title: "提示",
+								content: res.message,
+								confirmText: "重试",
+								success: (res) => {
+									if (res.confirm) {
+										this.password = ""
+									} else if (res.cancel) {
+										this.popupShow = false
+										this.show = false
+										this.password = ""
+									}
+								},
+							})
+						} else if (res.message == '未设置支付密码') {
+							uni.showModal({
+								title: "提示",
+								content: res.message,
+								confirmText: "设置",
+								success: (res) => {
+									if (res.confirm) {
+										this.password = ""
+										uni.navigateTo({
+											url: "../index/paypassword"
+										})
+									} else if (res.cancel) {
+										this.popupShow = false
+										this.show = false
+										this.password = ""
+									}
+								},
+							})
+						} else {
+							uni.showModal({
+								title: "提示",
+								content: res.message,
+								confirmText: "确定",
+								showCancel: false,
+								success: (rr) => {
+									if (rr.confirm) {
+										this.popupShow = false
+										this.show = false
+										this.password = ""
+									}
 								}
-							}
-						})
+							})
+						}
 					}
+				} else {
+					uni.requestPayment({
+						nonceStr: res.data.nonceStr,
+						package: res.data.package,
+						paySign: res.data.paySign,
+						signType: res.data.signType,
+						timeStamp: res.data.timeStamp,
+						success: (res) => {
+							uni.redirectTo({
+								url: "order?type=" + this.infodata.product_type
+							})
+						},
+						fail: (err) => {
+							
+						},
+						complete: (res) => {
+							
+						}
+					})
 				}
 			},
 			// 按键被点击(点击退格键不会触发此事件)

+ 1 - 1
pages/personal/coupon/coupon.vue

xqd
@@ -27,7 +27,7 @@
 									</view>
 									<view class="text-gray text-sm flex">
 										<text class="" v-if="item.expire_type==2">有效期:{{formatDate(item.start_time*1000)}}-{{formatDate(item.end_time*1000)}}</text>
-										<text class="" v-else>{{formatDate(item.expire_time*1000)}} 期</text>
+										<text class="" v-else>{{formatDate(item.expire_time*1000)}} 期</text>
 									</view>
 								</view>
 								<view class="action">

+ 346 - 333
pages/personal/coupon/couponList.vue

xqd
@@ -1,334 +1,347 @@
-<template>
-	<view class="main">
-		<view class="body-Discount margin-top-sm">
-			<view class="collar">
-				<!-- 	<view class="title-Discount">
-					领券
-				</view> -->
-				<view class="couponList">
-					<view class="couponItem" v-for="(item,index) in list" :key="index">
-						<view class="couponItem-subject">
-							<view class="couponItem-subject-left">
-								<view class="couponItem-subject-price">
-									<text class="couponItem-subject-icon">{{item.type==1?'¥':''}}</text>
-									<text class="couponItem-subject-price-min">{{item.type==1?item.money/100:item.discount.substring(0,item.discount.indexOf(".")+2)}}</text>
-									<view class="couponItem-subject-price-reduce">{{item.name}}</view>
-								</view>
-							</view>
-							<view class="couponItem-subject-right">
-								<view class="couponItem-subject-right-header">
-									<span class="couponItem-subject-right-header-icon">{{item.type==1?'满减':'折扣'}}</span>
-									{{item.title}}
-								</view>
-								<button :data-index="index" @click="collectCoupons(item,index)" v-if="item.is_receive==0" class="couponItem-subject-right-btn">领取</button>
-								<button v-else class="iscouponItem-subject-right-btn">已领取</button>
-								<view class="closing-date" v-if="item.expire_type == 2">
-									{{item.start_time}} - {{item.end_time}}
-								</view>
-								<view class="" v-else>
-									有效期:{{item.effective_days}}天
-								</view>
-							</view>
-						</view>
-					</view>
-				</view>
-			</view>
-		</view>
-		<u-empty text="暂无数据" :show="show" mode="order" margin-top="250"></u-empty>
-		<view class="cu-tabbar-height"></view>
-		<view class="cu-tabbar-height"></view>
-	</view>
-</template>
-
-<script>
-	export default {
-		data() {
-			return {
-				list: [],
-				pageindex: 1,
-				show: false
-			}
-		},
-		methods: {
-			getcoupon: async function() {
-				let res = await this.$request.post("/api/v1/coupon/couponList", {
-					page: this.pageindex
-				})
-				console.log(res)
-				if (res.status == 0) {
-					if (this.pageindex > res.data.last_page) {
-						uni.showToast({
-							title: "没有更多了",
-							icon: "none"
-						})
-					} else {
-						this.list = this.list.concat(res.data.data)
-						this.list.forEach(item => {
-							item.start_time = this.$util.formatDate(item.start_time)
-							item.end_time = this.$util.formatDate(item.end_time)
-						})
-						this.pageindex++
-					}
-				}
-				if (this.list.length == 0) {
-					this.show = true
-				} else {
-					this.show = false
-				}
-			},
-			collectCoupons: async function(item, index) {
-				let res = await this.$request.post("/api/v1/coupon/receiveCoupon", {
-					coupon_id: item.id
-				})
-				console.log(res)
-				if (res.status == 0) {
-					uni.showToast({
-						title: "领取成功"
-					})
-					this.list[index].is_receive = 1
-					this.$forceUpdate()
-				}
-			}
-		},
-		onLoad() {
-
-		},
-		onShow() {
-			this.getcoupon()
-		}
-	}
-</script>
-
-<style>
-	/* 优惠券样式 */
-	.discount {
-		position: relative;
-		display: inline-block;
-		margin-right: 5px;
-		margin-left: 15px;
-		padding: 0 9px 0 12px;
-		border-top: 1px solid rgb(11, 115, 186);
-		border-bottom: 1px solid rgb(11, 115, 186);
-		height: 16px;
-		line-height: 16px;
-		color: rgb(11, 115, 186);
-		font-size: 10px;
-	}
-
-	.discount::before {
-		content: "";
-		left: 0;
-		width: 7px;
-		position: absolute;
-		top: -1px;
-		height: 18px;
-		background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAkCAMAAACpD3pbAAAAPFBMVEUAAAD////kOTzqaGr+9vb4zc32vL3sdXfnTE/mRUfxmpz87O3yn6HqZ2npXWDlQEP97e33xsf3xsbxl5nHV2NIAAAAAXRSTlMAQObYZgAAAJpJREFUOMvllEsSwiAQRMnjF8g/3v+uKhIrjhHK0l16B4+C7hlALS07qSyS2kVlKnHmCpqdNvwYwTdY6yKGX7AeKtb+jmN3jLuYMMEd5XYBUMZ6cO/BHHhr7ut6wizxHOhvM+kUT5S5I77ZsGWU1kbsExsmiSdMBVc3l9a0tJaDdR+CVcryWtRBFLXYkku1oae955Xnv5Y+j/UKs1MGwyraxf4AAAAASUVORK5CYII=);
-		background-size: 15px 18px;
-		background-repeat: no-repeat;
-	}
-
-	.discount::after {
-		right: 0;
-		width: 4px;
-		background-position: -11px 0;
-		content: "";
-		position: absolute;
-		top: -1px;
-		height: 18px;
-		background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAkCAMAAACpD3pbAAAAPFBMVEUAAAD////kOTzqaGr+9vb4zc32vL3sdXfnTE/mRUfxmpz87O3yn6HqZ2npXWDlQEP97e33xsf3xsbxl5nHV2NIAAAAAXRSTlMAQObYZgAAAJpJREFUOMvllEsSwiAQRMnjF8g/3v+uKhIrjhHK0l16B4+C7hlALS07qSyS2kVlKnHmCpqdNvwYwTdY6yKGX7AeKtb+jmN3jLuYMMEd5XYBUMZ6cO/BHHhr7ut6wizxHOhvM+kUT5S5I77ZsGWU1kbsExsmiSdMBVc3l9a0tJaDdR+CVcryWtRBFLXYkku1oae955Xnv5Y+j/UKs1MGwyraxf4AAAAASUVORK5CYII=);
-		background-size: 15px 18px;
-		background-repeat: no-repeat;
-	}
-
-	/* 优惠头部 */
-	.header-Discount {
-		position: relative;
-		height: 46px;
-		line-height: 46px;
-		padding-left: 10px;
-		font-size: 15px;
-		color: #333;
-		text-align: center;
-		font-weight: 700;
-	}
-
-	.body-Discount {
-		padding: 0 18px;
-		font-size: 13px;
-		color: #333;
-		margin-bottom: 50px;
-	}
-
-	.body-Discount>.collar {
-		position: relative;
-		padding-bottom: 9px;
-	}
-
-	.body-Discount>.collar>.title-Discount {
-		height: 40px;
-		line-height: 40px;
-		color: #262626;
-		font-weight: 700;
-	}
-
-	.body-Discount>.collar .couponList>.couponItem {
-		color: rgb(11, 115, 186);
-		margin-bottom: 18px;
-		padding: 12px 10px;
-		border-top: 6px solid currentColor;
-		box-shadow: 0 0 6px 0 rgba(0, 0, 0, .1);
-		border-radius: 6px;
-	}
-
-	.body-Discount>.collar .couponList>.couponItem>.couponItem-subject {
-		display: flex;
-		min-height: 58px;
-		color: rgb(11, 115, 186);
-	}
-
-	.body-Discount>.collar .couponList>.couponItem>.couponItem-subject>.couponItem-subject-left {
-		width: 220rpx;
-		margin-right: 10px;
-		line-height: 1;
-		text-align: center;
-		display: flex;
-		flex-direction: column;
-		justify-content: center;
-		overflow: hidden;
-	}
-
-	.couponItem-subject-price {
-		overflow: hidden;
-		text-overflow: ellipsis;
-		white-space: nowrap;
-		line-height: 1;
-		text-align: center;
-	}
-
-	.couponItem-subject-icon {
-		font-size: 14px;
-		display: inline-block;
-		vertical-align: bottom;
-		margin: 0 4px 3px 0;
-	}
-
-	.couponItem-subject-price-min {
-		position: relative;
-		top: 1px;
-		font-size: 36px;
-		letter-spacing: 0;
-	}
-
-	.couponItem-subject-price-reduce {
-		font-size: 14px;
-		margin-top: 5px;
-	}
-
-	.couponItem-subject-right {
-		flex: 1;
-		position: relative;
-	}
-
-	.couponItem-subject-right-header {
-		height: 36px;
-		line-height: 18px;
-		overflow: hidden;
-		text-overflow: ellipsis;
-		display: -webkit-box;
-		-webkit-line-clamp: 1;
-		-webkit-box-orient: vertical;
-		font-size: 12px;
-		color: #666;
-	}
-
-	.couponItem-subject-right-header-icon {
-		background-color: rgb(11, 115, 186);
-		color: #fff;
-		font-size: 12px;
-		display: inline-block;
-		padding: 0 6px 0 12px;
-		height: 14px;
-		margin-right: 4px;
-		line-height: 14px;
-		position: relative;
-		border-radius: 0 3px 3px 0;
-	}
-
-	.couponItem-subject-right-header-icon::before {
-		position: absolute;
-		z-index: 1;
-		content: "";
-		width: 0;
-		top: 0;
-		left: -7px;
-		height: 0;
-		border-top: 7px solid #fff;
-		border-right: 7px solid transparent;
-		border-bottom: 7px solid #fff;
-		border-left: 7px solid #fff;
-	}
-
-	.couponItem-subject-right-header-icon::after {
-		content: ".";
-		position: absolute;
-		color: #fff;
-		left: 5px;
-		top: -6px;
-		font-size: 20px;
-	}
-
-	.couponItem-subject-right-btn {
-		background-color: rgb(11, 115, 186);
-		color: #fff;
-		font-size: 12px;
-		position: absolute;
-		right: 0;
-		bottom: 0;
-		width: 68px;
-		height: 20px;
-		line-height: 20px;
-		text-align: center;
-		border-radius: 10px;
-		box-sizing: border-box;
-		z-index: 2;
-	}
-
-	.iscouponItem-subject-right-btn {
-		background-color: #dcdcdc;
-		color: #fff;
-		font-size: 12px;
-		position: absolute;
-		right: 0;
-		bottom: 0;
-		width: 68px;
-		height: 20px;
-		line-height: 20px;
-		text-align: center;
-		border-radius: 10px;
-		box-sizing: border-box;
-		z-index: 2;
-	}
-
-	.desc-style {
-		padding: 5px 18px 10px 18px;
-		line-height: 1.3;
-		position: relative;
-		font-size: 12px;
-		max-height: 46px;
-		overflow: hidden;
-		color: #666;
-		background-color: white;
-	}
-
-	.closing-date {
-		/* padding-right: 68px; */
-		position: absolute;
-		left: -18rpx;
-		bottom: 0;
-		box-sizing: border-box;
-		width: 100%;
-		line-height: 20px;
-		font-size: 10px;
-		color: #8c8c8c;
-	}
+<template>
+	<view class="main">
+		<view class="body-Discount margin-top-sm">
+			<view class="collar">
+				<!-- 	<view class="title-Discount">
+					领券
+				</view> -->
+				<view class="couponList">
+					<view class="couponItem" v-for="(item,index) in list" :key="index">
+						<view class="couponItem-subject">
+							<view class="couponItem-subject-left">
+								<view class="couponItem-subject-price">
+									<text class="couponItem-subject-icon">{{item.type==1?'¥':''}}</text>
+									<text class="couponItem-subject-price-min">{{item.type==1?item.money/100:item.discount.substring(0,item.discount.indexOf(".")+2)}}</text>
+									<view class="couponItem-subject-price-reduce">{{item.name}}</view>
+								</view>
+							</view>
+							<view class="couponItem-subject-right">
+								<view class="couponItem-subject-right-header">
+									<span class="couponItem-subject-right-header-icon">{{item.type==1?'满减':'折扣'}}</span>
+									{{item.title}}
+								</view>
+								<button :data-index="index" @click="collectCoupons(item,index)" v-if="item.is_receive==0" class="couponItem-subject-right-btn">领取</button>
+								<button v-else class="iscouponItem-subject-right-btn">已领取</button>
+								<view class="closing-date" v-if="item.expire_type == 2">
+									{{item.start_time}} - {{item.end_time}}
+								</view>
+								<view class="" v-else>
+									有效期:{{item.effective_days}}天
+								</view>
+							</view>
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+		<u-empty text="暂无数据" :show="show" mode="order" margin-top="250"></u-empty>
+		<view class="cu-tabbar-height"></view>
+		<view class="cu-tabbar-height"></view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				list: [],
+				pageindex: 1,
+				show: false
+			}
+		},
+		methods: {
+			getcoupon: async function() {
+				let res = await this.$request.post("/api/v1/coupon/couponList", {
+					page: this.pageindex
+				})
+				console.log(res)
+				if (res.status == 0) {
+					if (this.pageindex > res.data.last_page) {
+						uni.showToast({
+							title: "没有更多了",
+							icon: "none"
+						})
+					} else {
+						this.list = this.list.concat(res.data.data)
+						this.list.forEach((item, index) => {
+							item.start_time = this.$util.formatDate(item.start_time)
+							item.end_time = this.$util.formatDate(item.end_time)
+						})
+						let i = this.list.length
+						while (i--) {
+							if (this.list[i].position_type == 2) {
+								this.list.splice(i, 1)
+							}
+						}
+						this.pageindex++
+					}
+				}
+				if (this.list.length == 0) {
+					this.show = true
+				} else {
+					this.show = false
+				}
+			},
+			collectCoupons: async function(item, index) {
+				if (item.num == 0) {
+					uni.showToast({
+						title: "该优惠卷数量不足",
+						icon: "none"
+					})
+					return false
+				}
+				let res = await this.$request.post("/api/v1/coupon/receiveCoupon", {
+					coupon_id: item.id
+				})
+				console.log(res)
+				if (res.status == 0) {
+					uni.showToast({
+						title: "领取成功"
+					})
+					this.list[index].is_receive = 1
+					this.$forceUpdate()
+				}
+			}
+		},
+		onLoad() {
+
+		},
+		onShow() {
+			this.getcoupon()
+		}
+	}
+</script>
+
+<style>
+	/* 优惠券样式 */
+	.discount {
+		position: relative;
+		display: inline-block;
+		margin-right: 5px;
+		margin-left: 15px;
+		padding: 0 9px 0 12px;
+		border-top: 1px solid rgb(11, 115, 186);
+		border-bottom: 1px solid rgb(11, 115, 186);
+		height: 16px;
+		line-height: 16px;
+		color: rgb(11, 115, 186);
+		font-size: 10px;
+	}
+
+	.discount::before {
+		content: "";
+		left: 0;
+		width: 7px;
+		position: absolute;
+		top: -1px;
+		height: 18px;
+		background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAkCAMAAACpD3pbAAAAPFBMVEUAAAD////kOTzqaGr+9vb4zc32vL3sdXfnTE/mRUfxmpz87O3yn6HqZ2npXWDlQEP97e33xsf3xsbxl5nHV2NIAAAAAXRSTlMAQObYZgAAAJpJREFUOMvllEsSwiAQRMnjF8g/3v+uKhIrjhHK0l16B4+C7hlALS07qSyS2kVlKnHmCpqdNvwYwTdY6yKGX7AeKtb+jmN3jLuYMMEd5XYBUMZ6cO/BHHhr7ut6wizxHOhvM+kUT5S5I77ZsGWU1kbsExsmiSdMBVc3l9a0tJaDdR+CVcryWtRBFLXYkku1oae955Xnv5Y+j/UKs1MGwyraxf4AAAAASUVORK5CYII=);
+		background-size: 15px 18px;
+		background-repeat: no-repeat;
+	}
+
+	.discount::after {
+		right: 0;
+		width: 4px;
+		background-position: -11px 0;
+		content: "";
+		position: absolute;
+		top: -1px;
+		height: 18px;
+		background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAkCAMAAACpD3pbAAAAPFBMVEUAAAD////kOTzqaGr+9vb4zc32vL3sdXfnTE/mRUfxmpz87O3yn6HqZ2npXWDlQEP97e33xsf3xsbxl5nHV2NIAAAAAXRSTlMAQObYZgAAAJpJREFUOMvllEsSwiAQRMnjF8g/3v+uKhIrjhHK0l16B4+C7hlALS07qSyS2kVlKnHmCpqdNvwYwTdY6yKGX7AeKtb+jmN3jLuYMMEd5XYBUMZ6cO/BHHhr7ut6wizxHOhvM+kUT5S5I77ZsGWU1kbsExsmiSdMBVc3l9a0tJaDdR+CVcryWtRBFLXYkku1oae955Xnv5Y+j/UKs1MGwyraxf4AAAAASUVORK5CYII=);
+		background-size: 15px 18px;
+		background-repeat: no-repeat;
+	}
+
+	/* 优惠头部 */
+	.header-Discount {
+		position: relative;
+		height: 46px;
+		line-height: 46px;
+		padding-left: 10px;
+		font-size: 15px;
+		color: #333;
+		text-align: center;
+		font-weight: 700;
+	}
+
+	.body-Discount {
+		padding: 0 18px;
+		font-size: 13px;
+		color: #333;
+		margin-bottom: 50px;
+	}
+
+	.body-Discount>.collar {
+		position: relative;
+		padding-bottom: 9px;
+	}
+
+	.body-Discount>.collar>.title-Discount {
+		height: 40px;
+		line-height: 40px;
+		color: #262626;
+		font-weight: 700;
+	}
+
+	.body-Discount>.collar .couponList>.couponItem {
+		color: rgb(11, 115, 186);
+		margin-bottom: 18px;
+		padding: 12px 10px;
+		border-top: 6px solid currentColor;
+		box-shadow: 0 0 6px 0 rgba(0, 0, 0, .1);
+		border-radius: 6px;
+	}
+
+	.body-Discount>.collar .couponList>.couponItem>.couponItem-subject {
+		display: flex;
+		min-height: 58px;
+		color: rgb(11, 115, 186);
+	}
+
+	.body-Discount>.collar .couponList>.couponItem>.couponItem-subject>.couponItem-subject-left {
+		width: 220rpx;
+		margin-right: 10px;
+		line-height: 1;
+		text-align: center;
+		display: flex;
+		flex-direction: column;
+		justify-content: center;
+		overflow: hidden;
+	}
+
+	.couponItem-subject-price {
+		overflow: hidden;
+		text-overflow: ellipsis;
+		white-space: nowrap;
+		line-height: 1;
+		text-align: center;
+	}
+
+	.couponItem-subject-icon {
+		font-size: 14px;
+		display: inline-block;
+		vertical-align: bottom;
+		margin: 0 4px 3px 0;
+	}
+
+	.couponItem-subject-price-min {
+		position: relative;
+		top: 1px;
+		font-size: 36px;
+		letter-spacing: 0;
+	}
+
+	.couponItem-subject-price-reduce {
+		font-size: 14px;
+		margin-top: 5px;
+	}
+
+	.couponItem-subject-right {
+		flex: 1;
+		position: relative;
+	}
+
+	.couponItem-subject-right-header {
+		height: 36px;
+		line-height: 18px;
+		overflow: hidden;
+		text-overflow: ellipsis;
+		display: -webkit-box;
+		-webkit-line-clamp: 1;
+		-webkit-box-orient: vertical;
+		font-size: 12px;
+		color: #666;
+	}
+
+	.couponItem-subject-right-header-icon {
+		background-color: rgb(11, 115, 186);
+		color: #fff;
+		font-size: 12px;
+		display: inline-block;
+		padding: 0 6px 0 12px;
+		height: 14px;
+		margin-right: 4px;
+		line-height: 14px;
+		position: relative;
+		border-radius: 0 3px 3px 0;
+	}
+
+	.couponItem-subject-right-header-icon::before {
+		position: absolute;
+		z-index: 1;
+		content: "";
+		width: 0;
+		top: 0;
+		left: -7px;
+		height: 0;
+		border-top: 7px solid #fff;
+		border-right: 7px solid transparent;
+		border-bottom: 7px solid #fff;
+		border-left: 7px solid #fff;
+	}
+
+	.couponItem-subject-right-header-icon::after {
+		content: ".";
+		position: absolute;
+		color: #fff;
+		left: 5px;
+		top: -6px;
+		font-size: 20px;
+	}
+
+	.couponItem-subject-right-btn {
+		background-color: rgb(11, 115, 186);
+		color: #fff;
+		font-size: 12px;
+		position: absolute;
+		right: 0;
+		bottom: 0;
+		width: 68px;
+		height: 20px;
+		line-height: 20px;
+		text-align: center;
+		border-radius: 10px;
+		box-sizing: border-box;
+		z-index: 2;
+	}
+
+	.iscouponItem-subject-right-btn {
+		background-color: #dcdcdc;
+		color: #fff;
+		font-size: 12px;
+		position: absolute;
+		right: 0;
+		bottom: 0;
+		width: 68px;
+		height: 20px;
+		line-height: 20px;
+		text-align: center;
+		border-radius: 10px;
+		box-sizing: border-box;
+		z-index: 2;
+	}
+
+	.desc-style {
+		padding: 5px 18px 10px 18px;
+		line-height: 1.3;
+		position: relative;
+		font-size: 12px;
+		max-height: 46px;
+		overflow: hidden;
+		color: #666;
+		background-color: white;
+	}
+
+	.closing-date {
+		/* padding-right: 68px; */
+		position: absolute;
+		left: -18rpx;
+		bottom: 0;
+		box-sizing: border-box;
+		width: 100%;
+		line-height: 20px;
+		font-size: 10px;
+		color: #8c8c8c;
+	}
 </style>

+ 1 - 1
pages/personal/recharge.vue

xqd
@@ -34,7 +34,7 @@
 				温馨提示
 			</view>
 			<view class="text-sm" style="color: #999999;font-weight: 400;margin-top: 15rpx;">
-				{{recharge_notice}}
+				<rich-text :nodes="recharge_notice"></rich-text>
 			</view>
 		</view>
 		<view class="margin-lr" style="margin-top: 210rpx;">

+ 1 - 1
pages/service_packs/packs_details.vue

xqd
@@ -216,7 +216,7 @@
 						id: this.packs.id,
 						price: this.packs.price,
 						is_need_insure: this.packs.is_need_insure,
-						service_pack_protocol: this.packs.service_pack_protocol,
+						service_pack_protocol: encodeURIComponent(this.packs.service_pack_protocol),
 						team_id: this.value
 					}
 					uni.navigateTo({

+ 522 - 522
pages/service_packs/packs_information.vue

xqd
@@ -1,523 +1,523 @@
-<template>
-	<view style="background-color: #f7f4f8; width: auto;">
-		<view style="height: 100%;">
-
-			<!-- 列选择器 -->
-			<!-- <u-select v-model="choiceName" :list="babyList" value-name="id" label-name="name" @confirm="confirm1"></u-select> -->
-			<u-select v-model="relationship" :list="guanxilist" @confirm="confirm2"></u-select>
-			<!-- model控制开关 mode控制显示方向-->
-			<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 babyList" :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="steps">
-				<u-steps :list="numList" :current="current"></u-steps>
-			</view> -->
-
-			<!-- 分隔 -->
-			<u-gap height="30" bg-color="#f9f9f9"></u-gap>
-
-			<!-- 宝贝信息 -->
-			<view>
-				<view>
-					<!-- 标题 -->
-					<view class="information-title">患者计划</view>
-					<u-line color="#ededed" />
-					<!-- 姓名 -->
-					<uni-list :border="false">
-						<uni-list-item :border="false" :clickable="true" @click="showpeople = true">
-							<!-- 自定义左(header)右(footer)的内容 -->
-							<view slot="header">
-								<text class="xinghao">*</text>
-								<text style="font-size: 28rpx;">用户姓名</text>
-							</view>
-							<view slot="footer">
-								<text style="font-size: 30rpx;">{{value}}</text>
-							</view>
-						</uni-list-item>
-
-						<!-- 身份证 -->
-						<!-- <uni-list-item :border="false">
-							<view slot="header">
-								<text class="xinghao">*</text>
-								<text style="font-size: 28rpx;">宝贝身份证</text>
-							</view>
-							<view slot="footer">
-								<u-input v-model="babyID" type="idcard" :border="false" placeholder="请填写宝贝身份证" :clearable="false" input-align="right"
-								 height="50" />
-							</view>
-						</uni-list-item> -->
-
-						<!-- 社保 -->
-						<uni-list-item :border="false">
-							<!-- 自定义左(header)右(footer)的内容 -->
-							<view slot="header">
-								<text class="xinghao">*</text>
-								<text style="font-size: 28rpx;">是否有社保</text>
-							</view>
-							<view slot="footer">
-								<u-radio-group v-model="guarantee" @change="radioGroupChange">
-									<u-radio v-for="(item, index) in list" :key="index" :name="item.name" :disabled="item.disabled">
-										{{item.name}}
-									</u-radio>
-								</u-radio-group>
-							</view>
-						</uni-list-item>
-					</uni-list>
-				</view>
-			</view>
-
-			<!-- 分隔 -->
-			<u-gap height="30" bg-color="#f9f9f9"></u-gap>
-
-			<!-- 监护人信息 -->
-			<view>
-				<view>
-					<!-- 标题 -->
-					<view class="information-title">监护人信息</view>
-
-					<!-- 线条 -->
-					<u-line color="#ededed" />
-
-					<uni-list :border="false">
-						<!-- 监护人姓名 -->
-						<uni-list-item :border="false">
-							<!-- 自定义左(header)右(footer)的内容 -->
-							<view slot="header">
-								<text class="xinghao">*</text>
-								<text style="font-size: 28rpx;">监护人姓名</text>
-							</view>
-							<view slot="footer">
-								<u-input v-model="guardianName" type="text" :border="false" placeholder="请填写您真实姓名" :clearable="false"
-								 input-align="right" height="50" />
-							</view>
-						</uni-list-item>
-
-						<!-- 关系 -->
-						<uni-list-item :border="false" :showArrow="true" :clickable="true" @click="relationship = true">
-							<!-- 自定义左(header)右(footer)的内容 -->
-							<view slot="header">
-								<text class="xinghao">*</text>
-								<text style="font-size: 28rpx;">与患者的关系</text>
-							</view>
-							<view slot="footer">
-								<!-- <view style="color: #AAAAAA;" v-if="nRelationship == '' ">请选择</view> -->
-								<view style="color: #AAAAAA;">{{nRelationship.label}}</view>
-							</view>
-						</uni-list-item>
-					</uni-list>
-				</view>
-			</view>
-			<view class="flex align-center padding bg-white" v-if="packs.is_need_insure==1">
-				<u-switch v-model="checked" size="40"></u-switch>
-				<view class="margin-left-sm">
-					本服务包赠送一份保险服务,是否领取保险。如领取保险需要同意<text class="text-blue" @click.stop="gotoxieyi(packs.service_pack_protocol)">《保单协议》</text>
-				</view>
-			</view>
-		</view>
-		<!-- 按钮 -->
-		<view class="cu-bar bg-white tabbar border shop" style="position: fixed; bottom: 0; z-index: 99;width: 100%;">
-			<view class="submit text-white" @click="next" style="background-color: rgb(11,115,186); font-size: 32rpx;">下一步</view>
-		</view>
-	</view>
-</template>
-
-<script>
-	export default {
-		onLoad(op) {
-			// console.log(JSON.parse(op.data))
-			this.packs = JSON.parse(op.data)
-		},
-		onShow() {
-			this.getarchives()
-		},
-		mounted() {
-
-		},
-		data() {
-			return {
-				//当前处于第几步
-				current: 0,
-				numList: [{
-					name: '基本信息'
-				}, {
-					name: '确认订单'
-				}, {
-					name: '支付结果'
-				}],
-				list: [{
-						name: '是',
-						disabled: false
-					},
-					{
-						name: '否',
-						disabled: false
-					}
-				],
-				//控制列选择器
-				choiceName: false,
-				relationship: false,
-				choicelist: [{
-						value: '1',
-						label: '测试1'
-					},
-					{
-						value: '2',
-						label: '测试2'
-					}
-				],
-				guanxilist: [{
-						value: '1',
-						label: '父子'
-					},
-					{
-						value: '2',
-						label: '母子'
-					},
-					{
-						value: '3',
-						label: '祖孙'
-					},
-					{
-						value: '4',
-						label: '亲属'
-					},
-					{
-						value: '5',
-						label: '本人'
-					},
-					{
-						value: '6',
-						label: '其他'
-					}
-				],
-				/**
-				 * 需要传的数据
-				 * 名字
-				 * 身份证
-				 * 社保 值为  是  否
-				 * 监护人姓名
-				 * */
-				babyNmae: {
-					label: "请选择",
-					value: ""
-				},
-				babyID: '',
-				guarantee: '',
-				guardianName: '',
-				nRelationship: {
-					value: "",
-					label: "请选择"
-				},
-				babyList: [],
-				isindex: -1,
-				packs: "",
-				showpeople: false,
-				value: "",
-				huanzheID: "",
-				checked: false,
-				isagreement: false,
-				currentbaby: {}
-			}
-		},
-		methods: {
-			gotoxieyi(item) {
-				uni.navigateTo({
-					url: "../index/agreement?data=" + item
-				})
-			},
-			getarchives: async function() {
-				let res = await this.$request.post("/api/v1/patient/patientList")
-				if (res.status == 0) {
-					this.babyList = res.data.data
-					this.value = this.babyList[0].name
-					this.huanzheID = this.babyList[0].id
-					this.currentbaby = this.babyList[0]
-					// if (this.babyList[0].card_back_img_url == '' && this.babyList[0].card_img_url == '') {
-					// 	let imglist = [{
-					// 		url: this.babyList[0].card_img_url
-					// 	}, {
-					// 		url: this.babyList[0].card_back_img_url
-					// 	}]
-					// 	uni.showModal({
-					// 		title: "提示",
-					// 		content: "该档案人未上传证件照无法购买本服务包",
-					// 		confirmText: "前往设置",
-					// 		success: (res) => {
-					// 			if (res.confirm) {
-					// 				uni.navigateTo({
-					// 					url: "../archives/upcard?id=" + this.babyList[0].id + "&data=" + JSON.stringify(imglist)
-					// 				})
-					// 				// this.showpeople = false
-					// 			} else if (res.cancel) {
-					// 				// this.showpeople = false
-					// 			}
-					// 		}
-					// 	})
-					// }
-				}
-			},
-			peopleRadioChange(e) {
-				console.log(e);
-			},
-			xuanzehuanzhe(item) {
-				// if (item.card_back_img_url == '' && item.card_img_url == '') {
-				// 	let imglist = [{
-				// 		url: item.card_img_url
-				// 	}, {
-				// 		url: item.card_back_img_url
-				// 	}]
-				// 	uni.showModal({
-				// 		title: "提示",
-				// 		content: "该档案人未上传证件照无法购买本服务包",
-				// 		confirmText: "前往设置",
-				// 		success: (res) => {
-				// 			if (res.confirm) {
-				// 				uni.navigateTo({
-				// 					url: "../archives/upcard?id=" + item.id + "&data=" + JSON.stringify(imglist)
-				// 				})
-				// 				this.showpeople = false
-				// 			} else if (res.cancel) {
-				// 				this.showpeople = false
-				// 			}
-				// 		}
-				// 	})
-				// 	return false
-				// }
-				this.currentbaby = item
-				this.huanzheID = item.id
-				this.value = item.name
-				this.showpeople = false
-			},
-			addPeople(e) {
-				uni.navigateTo({
-					url: "../archives/add_archives"
-				})
-			},
-			// 选中任一radio时,由radio-group触发
-			radioGroupChange(e) {
-				if (e == "是") {
-					this.isindex = 1
-				} else {
-					this.isindex = 0
-				}
-				console.log(this.isindex)
-			},
-			confirm1(e) {
-				console.log(e)
-				this.babyNmae = e[0]
-			},
-			confirm2(e) {
-				this.nRelationship = e[0]
-			},
-			//下一步
-			next(e) {
-				if (this.currentbaby.card_number == '' && this.checked) {
-					uni.showModal({
-						title: "提示",
-						content: "该宝贝尚未填写身份证,请前往填写",
-						confirmText: "去填写",
-						showCancel: false,
-						success: (res) => {
-							if (res.confirm) {
-								uni.navigateTo({
-									url: "../archives/add_archives?info=" + JSON.stringify(this.currentbaby)
-								})
-							}
-						}
-					})
-					return false
-				}
-				if (this.value == "请选择") {
-					uni.showToast({
-						title: "请选择宝贝",
-						icon: "none"
-					})
-					return false
-				}
-				if (this.isindex == -1) {
-					uni.showToast({
-						title: "请选择是否有社保",
-						icon: "none"
-					})
-					return false
-				}
-				if (this.guardianName == "") {
-					uni.showToast({
-						title: "请填写监护人姓名",
-						icon: "none"
-					})
-					return false
-				}
-				if (this.nRelationship.label == "请选择") {
-					uni.showToast({
-						title: "请选择关系",
-						icon: "none"
-					})
-					return false
-				}
-				// if (!this.isagreement) {
-				// 	uni.showToast({
-				// 		title: "请先同意保单协议",
-				// 		icon: "none"
-				// 	})
-				// 	return false
-				// }
-				// if (this.babyID == '') {
-				// 	uni.showToast({
-				// 		title: "请填写宝贝身份证号",
-				// 		icon: "none"
-				// 	})
-				// 	return false
-				// }
-				let obj = {
-					product_type: 6,
-					patient_id: this.huanzheID,
-					total_amount: this.packs.price / 100,
-					service_pack_id: this.packs.id,
-					is_security: this.isindex,
-					guardian_name: this.guardianName,
-					relationship_type: this.nRelationship.value,
-					is_need_insurance: this.checked,
-					payment_type: 2,
-					team_id: this.packs.team_id
-				}
-				console.log(obj)
-				uni.navigateTo({
-					url: "../order/payment?data=" + JSON.stringify(obj)
-				})
-			}
-		}
-	}
-</script>
-
-<style lang="scss">
-	.steps {
-		padding-top: 50rpx;
-		padding-bottom: 30rpx;
-		height: auto;
-		background-color: #FFFFFF;
-
-	}
-
-	/* 信息标题 */
-	.information-title {
-		height: auto;
-		width: auto;
-		font-size: 30rpx;
-		font-weight: 600;
-		padding: 30rpx 0 20rpx 30rpx;
-		background-color: #FFFFFF;
-	}
-
-	/* 星号 */
-	.xinghao {
-		width: 20px;
-		height: 20px;
-		display: inline-block;
-		vertical-align: middle;
-		text-align: center;
-		line-height: 26px;
-		font-size: 15px;
-		color: #f00;
-	}
-
-	.information-button {
-		height: 10vh;
-		padding: 0 20rpx;
-	}
-
-	.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;
-		}
-	}
+<template>
+	<view style="background-color: #f7f4f8; width: auto;">
+		<view style="height: 100%;">
+
+			<!-- 列选择器 -->
+			<!-- <u-select v-model="choiceName" :list="babyList" value-name="id" label-name="name" @confirm="confirm1"></u-select> -->
+			<u-select v-model="relationship" :list="guanxilist" @confirm="confirm2"></u-select>
+			<!-- model控制开关 mode控制显示方向-->
+			<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 babyList" :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="steps">
+				<u-steps :list="numList" :current="current"></u-steps>
+			</view> -->
+
+			<!-- 分隔 -->
+			<u-gap height="30" bg-color="#f9f9f9"></u-gap>
+
+			<!-- 宝贝信息 -->
+			<view>
+				<view>
+					<!-- 标题 -->
+					<view class="information-title">患者计划</view>
+					<u-line color="#ededed" />
+					<!-- 姓名 -->
+					<uni-list :border="false">
+						<uni-list-item :border="false" :clickable="true" @click="showpeople = true">
+							<!-- 自定义左(header)右(footer)的内容 -->
+							<view slot="header">
+								<text class="xinghao">*</text>
+								<text style="font-size: 28rpx;">用户姓名</text>
+							</view>
+							<view slot="footer">
+								<text style="font-size: 30rpx;">{{value}}</text>
+							</view>
+						</uni-list-item>
+
+						<!-- 身份证 -->
+						<!-- <uni-list-item :border="false">
+							<view slot="header">
+								<text class="xinghao">*</text>
+								<text style="font-size: 28rpx;">宝贝身份证</text>
+							</view>
+							<view slot="footer">
+								<u-input v-model="babyID" type="idcard" :border="false" placeholder="请填写宝贝身份证" :clearable="false" input-align="right"
+								 height="50" />
+							</view>
+						</uni-list-item> -->
+
+						<!-- 社保 -->
+						<uni-list-item :border="false">
+							<!-- 自定义左(header)右(footer)的内容 -->
+							<view slot="header">
+								<text class="xinghao">*</text>
+								<text style="font-size: 28rpx;">是否有社保</text>
+							</view>
+							<view slot="footer">
+								<u-radio-group v-model="guarantee" @change="radioGroupChange">
+									<u-radio v-for="(item, index) in list" :key="index" :name="item.name" :disabled="item.disabled">
+										{{item.name}}
+									</u-radio>
+								</u-radio-group>
+							</view>
+						</uni-list-item>
+					</uni-list>
+				</view>
+			</view>
+
+			<!-- 分隔 -->
+			<u-gap height="30" bg-color="#f9f9f9"></u-gap>
+
+			<!-- 监护人信息 -->
+			<view>
+				<view>
+					<!-- 标题 -->
+					<!-- <view class="information-title">监护人信息</view> -->
+
+					<!-- 线条 -->
+					<u-line color="#ededed" />
+
+					<!-- <uni-list :border="false">
+						
+						<uni-list-item :border="false">
+						
+							<view slot="header">
+								<text class="xinghao">*</text>
+								<text style="font-size: 28rpx;">监护人姓名</text>
+							</view>
+							<view slot="footer">
+								<u-input v-model="guardianName" type="text" :border="false" placeholder="请填写您真实姓名" :clearable="false"
+								 input-align="right" height="50" />
+							</view>
+						</uni-list-item>
+
+						
+						<uni-list-item :border="false" :showArrow="true" :clickable="true" @click="relationship = true">
+						
+							<view slot="header">
+								<text class="xinghao">*</text>
+								<text style="font-size: 28rpx;">与患者的关系</text>
+							</view>
+							<view slot="footer">
+								 <view style="color: #AAAAAA;" v-if="nRelationship == '' ">请选择</view>
+								<view style="color: #AAAAAA;">{{nRelationship.label}}</view>
+							</view>
+						</uni-list-item>
+					</uni-list> -->
+				</view>
+			</view>
+			<view class="flex align-center padding bg-white" v-if="packs.is_need_insure==1">
+				<u-switch v-model="checked" size="40"></u-switch>
+				<view class="margin-left-sm">
+					本服务包赠送一份保险服务,是否领取保险。如领取保险需要同意<text class="text-blue" @click.stop="gotoxieyi(packs.service_pack_protocol)">《保单协议》</text>
+				</view>
+			</view>
+		</view>
+		<!-- 按钮 -->
+		<view class="cu-bar bg-white tabbar border shop" style="position: fixed; bottom: 0; z-index: 99;width: 100%;">
+			<view class="submit text-white" @click="next" style="background-color: rgb(11,115,186); font-size: 32rpx;">下一步</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		onLoad(op) {
+			// console.log(JSON.parse(op.data))
+			this.packs = JSON.parse(op.data)
+		},
+		onShow() {
+			this.getarchives()
+		},
+		mounted() {
+
+		},
+		data() {
+			return {
+				//当前处于第几步
+				current: 0,
+				numList: [{
+					name: '基本信息'
+				}, {
+					name: '确认订单'
+				}, {
+					name: '支付结果'
+				}],
+				list: [{
+						name: '是',
+						disabled: false
+					},
+					{
+						name: '否',
+						disabled: false
+					}
+				],
+				//控制列选择器
+				choiceName: false,
+				relationship: false,
+				choicelist: [{
+						value: '1',
+						label: '测试1'
+					},
+					{
+						value: '2',
+						label: '测试2'
+					}
+				],
+				guanxilist: [{
+						value: '1',
+						label: '父子'
+					},
+					{
+						value: '2',
+						label: '母子'
+					},
+					{
+						value: '3',
+						label: '祖孙'
+					},
+					{
+						value: '4',
+						label: '亲属'
+					},
+					{
+						value: '5',
+						label: '本人'
+					},
+					{
+						value: '6',
+						label: '其他'
+					}
+				],
+				/**
+				 * 需要传的数据
+				 * 名字
+				 * 身份证
+				 * 社保 值为  是  否
+				 * 监护人姓名
+				 * */
+				babyNmae: {
+					label: "请选择",
+					value: ""
+				},
+				babyID: '',
+				guarantee: '',
+				guardianName: '',
+				nRelationship: {
+					value: "",
+					label: "请选择"
+				},
+				babyList: [],
+				isindex: -1,
+				packs: "",
+				showpeople: false,
+				value: "",
+				huanzheID: "",
+				checked: false,
+				isagreement: false,
+				currentbaby: {}
+			}
+		},
+		methods: {
+			gotoxieyi(item) {
+				uni.navigateTo({
+					url: "../index/agreement?data=" + item
+				})
+			},
+			getarchives: async function() {
+				let res = await this.$request.post("/api/v1/patient/patientList")
+				if (res.status == 0) {
+					this.babyList = res.data.data
+					this.value = this.babyList[0].name
+					this.huanzheID = this.babyList[0].id
+					this.currentbaby = this.babyList[0]
+					// if (this.babyList[0].card_back_img_url == '' && this.babyList[0].card_img_url == '') {
+					// 	let imglist = [{
+					// 		url: this.babyList[0].card_img_url
+					// 	}, {
+					// 		url: this.babyList[0].card_back_img_url
+					// 	}]
+					// 	uni.showModal({
+					// 		title: "提示",
+					// 		content: "该档案人未上传证件照无法购买本服务包",
+					// 		confirmText: "前往设置",
+					// 		success: (res) => {
+					// 			if (res.confirm) {
+					// 				uni.navigateTo({
+					// 					url: "../archives/upcard?id=" + this.babyList[0].id + "&data=" + JSON.stringify(imglist)
+					// 				})
+					// 				// this.showpeople = false
+					// 			} else if (res.cancel) {
+					// 				// this.showpeople = false
+					// 			}
+					// 		}
+					// 	})
+					// }
+				}
+			},
+			peopleRadioChange(e) {
+				console.log(e);
+			},
+			xuanzehuanzhe(item) {
+				// if (item.card_back_img_url == '' && item.card_img_url == '') {
+				// 	let imglist = [{
+				// 		url: item.card_img_url
+				// 	}, {
+				// 		url: item.card_back_img_url
+				// 	}]
+				// 	uni.showModal({
+				// 		title: "提示",
+				// 		content: "该档案人未上传证件照无法购买本服务包",
+				// 		confirmText: "前往设置",
+				// 		success: (res) => {
+				// 			if (res.confirm) {
+				// 				uni.navigateTo({
+				// 					url: "../archives/upcard?id=" + item.id + "&data=" + JSON.stringify(imglist)
+				// 				})
+				// 				this.showpeople = false
+				// 			} else if (res.cancel) {
+				// 				this.showpeople = false
+				// 			}
+				// 		}
+				// 	})
+				// 	return false
+				// }
+				this.currentbaby = item
+				this.huanzheID = item.id
+				this.value = item.name
+				this.showpeople = false
+			},
+			addPeople(e) {
+				uni.navigateTo({
+					url: "../archives/add_archives"
+				})
+			},
+			// 选中任一radio时,由radio-group触发
+			radioGroupChange(e) {
+				if (e == "是") {
+					this.isindex = 1
+				} else {
+					this.isindex = 0
+				}
+				console.log(this.isindex)
+			},
+			confirm1(e) {
+				console.log(e)
+				this.babyNmae = e[0]
+			},
+			confirm2(e) {
+				this.nRelationship = e[0]
+			},
+			//下一步
+			next(e) {
+				if (this.currentbaby.card_number == '' && this.checked) {
+					uni.showModal({
+						title: "提示",
+						content: "该宝贝尚未填写身份证,请前往填写",
+						confirmText: "去填写",
+						showCancel: false,
+						success: (res) => {
+							if (res.confirm) {
+								uni.navigateTo({
+									url: "../archives/add_archives?info=" + JSON.stringify(this.currentbaby)
+								})
+							}
+						}
+					})
+					return false
+				}
+				if (this.value == "请选择") {
+					uni.showToast({
+						title: "请选择宝贝",
+						icon: "none"
+					})
+					return false
+				}
+				if (this.isindex == -1) {
+					uni.showToast({
+						title: "请选择是否有社保",
+						icon: "none"
+					})
+					return false
+				}
+				if (this.guardianName == "") {
+					uni.showToast({
+						title: "请填写监护人姓名",
+						icon: "none"
+					})
+					return false
+				}
+				if (this.nRelationship.label == "请选择") {
+					uni.showToast({
+						title: "请选择关系",
+						icon: "none"
+					})
+					return false
+				}
+				// if (!this.isagreement) {
+				// 	uni.showToast({
+				// 		title: "请先同意保单协议",
+				// 		icon: "none"
+				// 	})
+				// 	return false
+				// }
+				// if (this.babyID == '') {
+				// 	uni.showToast({
+				// 		title: "请填写宝贝身份证号",
+				// 		icon: "none"
+				// 	})
+				// 	return false
+				// }
+				let obj = {
+					product_type: 6,
+					patient_id: this.huanzheID,
+					total_amount: this.packs.price / 100,
+					service_pack_id: this.packs.id,
+					is_security: this.isindex,
+					guardian_name: this.guardianName,
+					relationship_type: this.nRelationship.value,
+					is_need_insurance: this.checked,
+					payment_type: 2,
+					team_id: this.packs.team_id
+				}
+				console.log(obj)
+				uni.navigateTo({
+					url: "../order/payment?data=" + JSON.stringify(obj)
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.steps {
+		padding-top: 50rpx;
+		padding-bottom: 30rpx;
+		height: auto;
+		background-color: #FFFFFF;
+
+	}
+
+	/* 信息标题 */
+	.information-title {
+		height: auto;
+		width: auto;
+		font-size: 30rpx;
+		font-weight: 600;
+		padding: 30rpx 0 20rpx 30rpx;
+		background-color: #FFFFFF;
+	}
+
+	/* 星号 */
+	.xinghao {
+		width: 20px;
+		height: 20px;
+		display: inline-block;
+		vertical-align: middle;
+		text-align: center;
+		line-height: 26px;
+		font-size: 15px;
+		color: #f00;
+	}
+
+	.information-button {
+		height: 10vh;
+		padding: 0 20rpx;
+	}
+
+	.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;
+		}
+	}
 </style>

+ 35 - 13
pages/vaccines/vaccines_info.vue

xqd xqd xqd xqd xqd
@@ -48,7 +48,7 @@
 				</view>
 			</view>
 			<view class="text-gray text-sm" style="margin: 25rpx 37rpx;line-height: 38rpx;">
-				{{vaccine_notice}}
+				<rich-text :nodes="vaccine_notice"></rich-text>
 			</view>
 		</view>
 		<!-- <u-picker mode="multiSelector" @confirm="callbacktime" v-model="show" :default-selector='[0, 1]' range-key="start_time_period"
@@ -251,11 +251,18 @@
 						// }
 					})
 					this.multiSelector.push(times)
+					console.log(this.multiSelector)
 					let arr = this.multiSelector[1][0]
-					arr.forEach(item => {
-						item.year = nian[0].date
-					})
-					this.$refs.date.rightday = arr
+					if (arr != undefined) {
+						arr.forEach(item => {
+							item.year = nian[0].date
+						})
+						this.$refs.date.rightday = arr
+					} else {
+						arr = []
+						this.$refs.date.rightday = arr
+					}
+
 				}
 			},
 			callbacktime(item) {
@@ -286,6 +293,7 @@
 				})
 			},
 			xuanzefuwu() {
+				this.multiSelector = []
 				this.yimiao = "请选择接种疫苗"
 				this.yimiaoInfo = ""
 				uni.navigateTo({
@@ -305,13 +313,27 @@
 				})
 			},
 			yuyuetime() {
-				if (!this.is_Scheduling) {
+				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: "请先选择机构",
@@ -400,13 +422,13 @@
 					uni.showModal({
 						title: "提示",
 						content: res.message,
-						confirmText: "查看预约",
-						success: (res) => {
-							if(res.confirm){
-								uni.navigateTo({
-									url:"../common_tools/my_consulting/my_appointment"
-								})
-							}
+						confirmText: "查看预约",
+						success: (res) => {
+							if (res.confirm) {
+								uni.navigateTo({
+									url: "../common_tools/my_consulting/my_appointment"
+								})
+							}
 						}
 					})
 				}