Bladeren bron

Merge branch 'master' of http://1.14.104.71:10880/root/his_user_miniapp

yzx 1 week geleden
bovenliggende
commit
2b13e4588d

+ 4 - 0
api/packageOrder.js

@@ -42,4 +42,8 @@ let request = new Request().http
  // 领取礼品(创建订单)
  export function giftCreate(data) {
   	return request('/app/pop',data,'POST','application/json;charset=UTF-8');
+ }
+ 
+ export function getAgreement() {
+  	return request('/app/doctor/getAgreement',null,'GET');
  }

+ 207 - 54
pages_course/video.vue

@@ -29,13 +29,24 @@
 			:picture-in-picture-mode="[]"
 			:show-background-playback-button="false"
 			:src="videoUrl"
-			:danmu-list="danmuList" 
+			>
+			<!-- :danmu-list="danmuList"
 			enable-danmu
-			danmu-btn>
+			danmu-btn -->
+				<template v-show="showDanmu==1">
+					<text v-for="(item, index) in activeDanmus" :key="item.id" class="danmu-item danmuMove" 
+						:style="{
+						  top: item.top + 'px',
+						  ...item.style,
+						  'animation-duration': '8s'
+						 }" @animationend="animationend(item,index)">
+						{{ item.text }}
+					</text>
+				</template>
 				<cover-view class="video-danmu-btnbox" :style="{display: isfull&&crtShow&&isLogin&&isAddKf==1 ? 'block':'none'}">
-				<cover-image class="video-danmu-image"
-				 src="https://cos.his.cdwjyyh.com/fs/20250418/beaf9df1a6204b8babc3e28d9b563c62.png"
-				 @click="openDanmu(1)"></cover-image>
+					<cover-image class="video-danmu-image"
+					 src="https://cos.his.cdwjyyh.com/fs/20250418/beaf9df1a6204b8babc3e28d9b563c62.png"
+					 @click="openDanmu(1)"></cover-image>
 				</cover-view>
 			</video>
 		</view>
@@ -103,7 +114,7 @@
 		<!-- 线路 -->
 		<view class="video-line" @click="openPop" v-if="isLogin&&isAddKf==1">
 			<image :src="baseUrl+'/images/changePlayer-icon.png'"></image>
-			<text>线路{{lineIndex + 1 | numberToChinese}}</text>
+			<text>线路{{numberToChinese(lineIndex + 1)}}</text>
 		</view>
 		<!-- 线路弹窗 -->
 		<uni-popup ref="popup" type="bottom"  class="full-width-popup">
@@ -116,7 +127,7 @@
 				<view class="popupbox-content">
 					<view :class="lineIndex == index ? 'line-item line-active': 'line-item'"
 						v-for="(it,index) in lineList" :key="index" @click="handleLine(index)">
-						线路{{index + 1 | numberToChinese}}</view>
+						线路{{numberToChinese(lineIndex + 1)}}</view>
 				</view>
 			</view>
 		</uni-popup>
@@ -129,6 +140,7 @@
 		<uni-popup ref="danmuPopup" type="bottom" style="z-index: 999;" @change="changeShowPopup">
 			<view class="danmuPopup" :style="{marginLeft:isfull ? statusBarHeight+'px': 0,marginBottom: danmuboxHeight+'px'}">
 				<view class="danmuPopup-head border-line">
+					<image class="danmu-icon" :src="showDanmu==0?'/static/images/danmu-off.png':'/static/images/danmu-on.png'" mode="heightFix" @click="switchDanmu()"></image>
 					<u-input 
 					class="danmuPopup-input" 
 					placeholder="发个弹幕吧~" 
@@ -139,7 +151,7 @@
 					:autoBlur="true" 
 					maxlength="140" 
 					clearable 
-					v-model="danmuIput"></u-input>
+					v-model.trim="danmuIput"></u-input>
 					<button class="danmuPopup-send"  :disabled="danmubtnLoading"  @click="sendDanmu">发送</button>
 				</view>
 			</view>
@@ -334,19 +346,21 @@
 				danmuboxHeight: 0,
 				user: {},
 				crtShow: true,
-				isCheckRealUrl: false
+				isCheckRealUrl: false,
+				activeDanmus:[],
+				flagTime: 0,
+				danmuItemStyle:{
+					color: '#ffffff',
+					fontSize: '16px',
+					border: 'solid 1px #ffffff',
+					borderRadius: '5px',
+					padding: '2px 2px',
+					backgroundColor: 'rgba(255, 255, 255, 0.1)'
+				},
+				showDanmu: 1,
+				ctx: null
 			}
 		},
-		filters: {
-			numberToChinese(number) {
-				if (number) {
-					const chineseNumber = ['一', '二', '三', '四', '五', '六', '七', '八', '九'];
-					return chineseNumber[number - 1];
-				} else {
-					return ''
-				}
-			},
-		},
 		computed: {
 			isAnswer() {
 				return (item, name) => {
@@ -372,19 +386,9 @@
 			// 	this.loginByMp()
 			// }
 			var that=this;
-			// this.videoId=769;
-			// this.qwUserId=2110;
-			// this.corpId='ww5a88c4f879f204c5';
-			// this.linkType=0;
-			// this.urlOption.videoId=769;
-			// this.urlOption.courseId=79;
-			// this.urlOption.companyId=170;
-			// this.urlOption.companyUserId=3972;
-			// this.urlOption.qwUserId=1;
-			// this.urlOption.corpId='ww5a88c4f879f204c5';
-			// this.urlOption.qwExternalId=6213064;
-			// this.urlOption.qwUserId=2110;
-			// this.urlOption.linkType=0;
+			if (this.videoId) {
+				this.getH5CourseByVideo()
+			}
 			this.sortLink = this.urlOption.link || ''
 			this.getMenuButton()
 			// #ifndef H5
@@ -395,6 +399,7 @@
 				clearInterval(this.pingpangTimes)
 				this.socket = null
 			}
+			this.initTracks()
 		},
 		onShow() {
 			this.tipsOpen = false
@@ -406,9 +411,6 @@
 			} else {
 				this.user = {}
 			}
-			if (this.videoId) {
-				this.getH5CourseByVideo()
-			}
 			if(this.sortLink){
 				this.getLink()
 			} else {
@@ -468,6 +470,14 @@
 			this.clearIntegral()
 		},
 		methods: {
+			numberToChinese(number) {
+				if (number) {
+					const chineseNumber = ['一', '二', '三', '四', '五', '六', '七', '八', '九'];
+					return chineseNumber[number - 1];
+				} else {
+					return ''
+				}
+			},
 			keyboardHeightChange(res) {
 				// #ifndef H5
 				console.log("this.danmuboxHeight",this.danmuboxHeight)
@@ -496,6 +506,10 @@
 					}
 					this.playTime = currentTime
 				}
+				if (Math.floor(e.detail.currentTime) != this.flagTime) {
+					this.flagTime = Math.floor(e.detail.currentTime)
+					this.checkDanmu()
+				}
 			},
 			changeTime(that,e) {
 				that.playDurationSeek = 0
@@ -529,6 +543,7 @@
 			},
 			fullscreenchange(event) {
 				this.isfull = event.detail.fullScreen
+				this.initTracks()
 			},
 			controlstoggle(event) {
 				this.crtShow =  event.detail.show
@@ -1134,7 +1149,7 @@
 			},
 			// 发送弹幕
 			sendDanmu() {
-				if(this.danmuIput==''||this.danmuIput.trim()=='') {
+				if(this.danmuIput=='') {
 					uni.showToast({
 						title: '弹幕不能为空',
 						icon: 'none'
@@ -1152,6 +1167,16 @@
 							text: item.content,
 							time: item.timePoint ? Number(item.timePoint) : this.playTime,
 							color: "#FFFFFF",
+							mode: item.mode|| "scroll",
+							top: null,
+							style: {
+								color: item.isColor==1 ? item.color || this.danmuItemStyle.color : this.danmuItemStyle.color,//是否彩色1是0否
+								fontSize: item.fontSize || this.danmuItemStyle.fontSize, 
+								padding: this.danmuItemStyle.padding,
+								border:this.user.userId ==item.userId ? item.color ? `solid 1px ${item.color}`: this.danmuItemStyle.border : 'none',
+								borderRadius: this.user.userId==item.userId ? this.danmuItemStyle.borderRadius : 0,
+								backgroundColor: this.user.userId==item.userId ? this.danmuItemStyle.backgroundColor : 'transparent'
+							},
 						}))
 					} else {
 						this.danmuList = []
@@ -1196,7 +1221,7 @@
 					},
 				})
 				this.socket.onMessage((res) => {
-					console.log("收到消息parse",JSON.parse(res.data))
+					// console.log("收到消息parse",JSON.parse(res.data))
 					const redata = JSON.parse(res.data);
 					if(redata.cmd=="heartbeat"){
 						  //心跳
@@ -1226,7 +1251,6 @@
 						//重启
 						that.initSocket()
 					}
-					// that.msgEnd = true
 				})
 				//监听socket错误
 				this.socket.onError((err) => {
@@ -1252,9 +1276,9 @@
 						content: this.danmuIput,
 						timePoint: this.playTime, // 弹幕对应视频时间节点()秒
 						platform: 'uniapp',  //发送平台,app传值“app”,小程序传值“uniapp”
-						fontSize: '14px',
+						fontSize: '16px',
 						mode: "scroll",
-						color: "#fff",
+						color: "#ffffff",
 					};
 					this.socket.send({
 						data: JSON.stringify(data),
@@ -1264,7 +1288,6 @@
 							this.isSend = false;
 						},
 						fail: () => {
-							console.log("发送失败")
 							uni.showToast({
 								title: '发送失败',
 								icon: 'none'
@@ -1280,19 +1303,113 @@
 				if (!this.player) {
 					this.player = uni.createVideoContext('video-content-box');
 				}
-				this.player.sendDanmu({
+				// this.player.sendDanmu({
+				// 	text: content.content,
+				// 	color: "#FF0000",
+				// 	time: this.playTime + 1
+				// })
+				const id = content.userId +'_' + new Date().getTime()
+				const mystyle = {
+					color: content.color || this.danmuItemStyle.color,
+					fontSize: content.fontSize || this.danmuItemStyle.fontSize,
+					border: content.color ? `solid 1px ${content.color}`: this.danmuItemStyle.border,
+					borderRadius: this.danmuItemStyle.borderRadius,
+					padding: this.danmuItemStyle.padding,
+					backgroundColor: this.danmuItemStyle.backgroundColor
+				}
+				const otherstyle = {
+					color: content.color || this.danmuItemStyle.color,
+					fontSize: content.fontSize || this.danmuItemStyle.fontSize,
+					padding: this.danmuItemStyle.padding,
+				}
+				const mode = content.mode || "scroll"
+				const obj = {
+					id: content.id || id,
+					userId: content.userId,
 					text: content.content,
-					color: "#FF0000",
-					time: this.playTime + 1
+					time: this.flagTime + 1,
+					color: content.color || this.danmuItemStyle.color,
+					style: this.user.userId == content.userId ? mystyle : otherstyle,
+					top: null
+				}
+				console
+				if(this.showDanmu == 0) return
+				this.danmuList.push(obj)
+			},
+			initTracks() {
+				this.tracks = []
+				const trackHeight = 22; // 每行高度
+				const trackCount = 3
+				for (let i = 0; i < trackCount; i++) {
+					this.tracks.push({
+						top: i * trackHeight+10,
+						isFree: true
+					});
+				}
+			},
+			// 获取字体高度
+			getTextWidth(content) {
+				if (!this.ctx) {
+					this.ctx = uni.createCanvasContext('myCanvas')
+				}
+				const metrics = this.ctx.measureText(content)
+				return Math.ceil(metrics.width)
+			},
+			// 分配轨道
+			getFreeTrack(item) {
+				const width = this.getTextWidth(item.content)
+				const passWidth = width + uni.getSystemInfoSync().screenWidth
+				const duration = 8
+				for (let i = 0; i < this.tracks.length; i++) {
+					if (this.tracks[i].isFree) {
+						this.tracks[i].isFree = false;
+						// 等本条通过右边界的时间
+						let passtime = Math.ceil(duration * 1000 / passWidth * width)
+						passtime = passtime + 1000
+						// console.log("passtime==", passtime)
+						setTimeout(() => {
+							this.tracks[i].isFree = true;
+						}, passtime); // 5秒后释放轨道
+						return this.tracks[i].top;
+					}
+				}
+				// 无可用轨道
+				if (item.userId == this.user.userId) {
+					let trackHeight = this.tracks[this.tracks.length - 1].top
+					return Math.random() * trackHeight + 16 // 自己发的弹幕随机高度; // 无可用轨道
+				} else {
+					// console.log("无可用轨道")
+					return 'abandon'
+				}
+			},
+			// 检测并激活弹幕
+			checkDanmu() {
+				if(this.showDanmu == 0) return
+				// 筛选当前时间应出现的弹幕
+				const newDanmus = this.danmuList.filter((item) => Math.abs(item.time - this.flagTime) < 1)
+				// 分配轨道高度
+				newDanmus.forEach((item) => {
+					// 滚动弹幕随机高度
+					if(!item.top) {
+						item.top = this.getFreeTrack(item)
+					}
 				})
-				// setTimeout(()=>{
-				// 	this.player.sendDanmu({
-				// 		text: content.content,
-				// 		color: "#FF0000",
-				// 		time: this.playTime
-				// 	})
-				// },100)
-			}
+				// 过滤没有分配到空闲轨道弹幕
+				const aliveNewDanmus = newDanmus.filter((item) => item.top != 'abandon')
+				// 添加到活跃列表
+				this.activeDanmus = [...this.activeDanmus, ...aliveNewDanmus]
+			},
+			animationend(moveItem, i) {
+				// 移除动画结束的弹幕(性能优化)
+				this.activeDanmus = this.activeDanmus.filter((item) => item.id != moveItem.id)
+			},
+			switchDanmu() {
+				this.showDanmu = this.showDanmu == 1 ? 0:1
+				if(this.showDanmu == 0) {
+					this.activeDanmus = []
+					this.initTracks()
+				}
+			},
 		}
 	}
 </script>
@@ -1996,7 +2113,7 @@
 	}
 	.danmuPopup {
 		background-color: #fff;
-		padding-bottom: var(--window-bottom);
+		padding-bottom: calc(var(--window-bottom) + 10px);
 		&-head {
 			width: 100%;
 			padding: 10px;
@@ -2041,5 +2158,41 @@
 			color: #757575;
 		}
 	}
-	 
+	.danmu-item {
+		position: absolute;
+		top: 0;
+		white-space: nowrap;
+		font-size: 16px;
+		height: 20px;
+		display: inline-flex;
+		box-sizing: border-box;
+		align-items: center;
+	}
+	.danmuMove {
+		// animation: mymove 8s linear forwards;
+		// animation-duration: 8s;
+		animation-timing-function: linear;
+		animation-delay: 0s;
+		animation-iteration-count: 1;
+		animation-direction: normal;
+		animation-fill-mode: forwards;
+		animation-play-state: running;
+		animation-name: mymove;
+		will-change: transform;
+	}
+	
+	@keyframes mymove {
+		from {
+			transform: translateX(100vw);
+		}
+	
+		to {
+			transform: translateX(-100%);
+		}
+	}
+	.danmu-icon{
+		height: 24px;
+		width: 24px;
+		margin-right: 12px;
+	}
 </style>

+ 1 - 0
pages_doctor/doctorDetails.vue

@@ -555,6 +555,7 @@
 									align-items: center;
 									justify-content: flex-end;
 									.btn{
+										flex-shrink: 0;
 										border-radius: 30rpx;
 										padding: 10rpx 20rpx;
 										border: 1rpx solid #C39A58;

+ 46 - 2
pages_doctor/doctorInfo.vue

@@ -42,6 +42,24 @@
 					{{doctor.introduction}}
 				</view>
 			</view>
+			<view class="desc-box" v-if="imgs&&imgs.length>0">
+				<view class="title-box">
+					<view class="line"></view>
+					<view class="title">荣誉资质</view>
+				</view>
+				<view class="desc doc-imgs" >
+					<image v-for="i in imgs" :src="i" mode="aspectFill" @click="previewImage"></image>
+				</view>
+			</view>
+			<view class="desc-box" v-if="videoUrl">
+				<view class="title-box">
+					<view class="line"></view>
+					<view class="title">医生风采</view>
+				</view>
+				<view class="desc" >
+					<video :src="videoUrl" :poster="thumbnail" :autoplay='true' class="doc-video"></video>
+				</view>
+			</view>
 		</view>
 	</view>
 </template>
@@ -55,7 +73,10 @@
 				doctor:null,
 				department:null,
 				hospital:null,
-				pings:[]
+				pings:[],
+				videoUrl: '',
+				imgs: [],
+				thumbnail: ''
 			}
 		},
 		onLoad(options) {
@@ -75,6 +96,12 @@
 					urls: data
 				});
 			},
+			previewImage() {
+				uni.previewImage({
+					current: 0,
+					urls: this.imgs
+				});
+			},
 			getDoctorDetails() {
 				//联网加载数据
 				var that = this;
@@ -86,6 +113,9 @@
 						this.doctor=res.data.doctor;
 						this.department=res.data.department;
 						this.hospital=res.data.hospital;
+						this.thumbnail = this.doctor&&this.doctor.thumbnail;
+						this.videoUrl = this.doctor&&this.doctor.videoUrl;
+						this.imgs = this.doctor&&this.doctor.honorImgUrl? this.doctor.honorImgUrl.split(','):[];
 					}else{
 						uni.showToast({
 							icon:'none',
@@ -490,5 +520,19 @@
 			}
 		}
 	}
-	 
+	.doc-video {
+		width: 680rpx;
+		height: 382.5rpx;
+	}
+	.doc-imgs {
+		display: flex;
+		flex-direction: row;
+		flex-wrap: wrap;
+		align-items: center;
+		image {
+			height: 180rpx;
+			width: 320rpx;
+			margin: 0 10rpx 20rpx;
+		}
+	}
 </style>

+ 176 - 0
pages_index/components/choosePatient/choosePatient.vue

@@ -0,0 +1,176 @@
+<template>
+	<view class="patient-container">
+		<view class="patient-box">
+			<view class="patient-head">
+				<view class="patient-title">选择就诊人</view>
+				<view class="patient-title x-f addbtn" style="color: #fff;font-weight: normal;" @click="addPatient()"><u-icon name="plus" size="36rpx" color="#fff"></u-icon>添加</view>
+			</view>
+			<scroll-view scroll-x :scroll-into-view="scrollIntoView" :scroll-with-animation="true" class="patient-list" v-if="patientList&&patientList.length>0">
+				<view :id="'patient_'+i" :class="current == i ? 'patient-item patient-active':'patient-item'" v-for="(item,i) in patientList" :key="item.patientId" @click="handlePatient(item,i)">
+					<view class="patient-name textOne">{{item.patientName}}</view>
+					<view class="patient-info">
+						<text class="text" v-if="item.sex==1">男</text>
+						<text class="text" v-if="item.sex==2">女</text>
+						<text class="text">{{$getAge(item.birthday)}}岁</text>
+					</view>
+					<view class="checkmarkempty">
+						<u-icon v-show="current == i" name="checkmark" size="28rpx" color="#fff"></u-icon>
+					</view>
+				</view>
+				<view :id="'patient_'+patientList.length" class="patient-item additem"  @click="addPatient()">
+					<u-icon name="plus" size="36rpx" color="#FF5C03" style="font-weight: bold;"></u-icon>
+					<view class="patient-name" style="color: #ff5c03;">添加</view>
+				</view>
+			</scroll-view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {getPatientList} from '@/api/patient'
+	export default {
+		props: ['patient'],
+		data() {
+			return {
+				current: 0,
+				scrollIntoView: 'patient_0',
+				patientList: [],
+			}
+		},
+		methods: {
+			getPatientList(){
+				uni.showLoading({
+					title:"正在加载中"
+				})
+				getPatientList().then(
+					res => {
+						uni.hideLoading()
+						if(res.code==200){
+							this.patientList=res.data;
+							if(this.patient&&this.patient.patientId) {
+								const index = this.patientList.findIndex(item=>item.patientId == this.patient.patientId)
+								this.current = index > -1 ? index : 0
+							} else {
+								this.current = 0
+							}
+							const patient = this.patientList&&this.patientList.length> 0 ? this.patientList[this.current] : null
+							this.scrollIntoView = 'patient_'+ this.current
+							uni.$emit('refreshOrderPatient',patient)
+						}else{
+							uni.showToast({
+								icon:'none',
+								title: "请求失败",
+							});
+						}
+					},
+					rej => {}
+				);
+			},
+			addPatient() {
+				this.$emit('addPatient')
+			},
+			handlePatient(item,i) {
+				const patient = this.patientList&&this.patientList.length> 0 ? this.patientList[i] : null
+				this.current = i
+				this.scrollIntoView = 'patient_'+ i
+				uni.$emit('refreshOrderPatient',patient)
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	@mixin u-flex($flexD, $alignI, $justifyC) {
+		display: flex;
+		flex-direction: $flexD;
+		align-items: $alignI;
+		justify-content: $justifyC;
+	}
+	.additem {
+		text-align: center;
+		color: #ff5c03 !important;
+	}
+	.addbtn {
+		background-color: #FF5C03;
+		padding: 5rpx 10rpx;
+		box-sizing: border-box;
+		border-radius: 10rpx;
+	}
+	.patient{
+		&-container {
+			padding: 15rpx;
+		}
+		&-box {
+			padding: 30rpx 24rpx;
+			box-shadow: 0px 0px 5px 2px rgba(0,0,0,0.05);
+			background-color: #fff;
+			border-radius: 15rpx;
+		}
+		&-head {
+			@include u-flex(row, center, space-between);
+			font-size: 26rpx;
+			font-family: PingFang SC;
+			color: #222;
+		}
+		&-title {
+			font-size: 32rpx;
+			font-weight: bold;
+		}
+		&-list {
+			white-space: nowrap;
+			width: 100%;
+			@include u-flex(row, center, flex-start);
+		}
+		&-item {
+			height: 54px;
+			overflow: hidden;
+			margin-top: 20rpx;
+			width: 200rpx;
+			margin-right: 16rpx;
+			display: inline-block;
+			box-sizing: border-box;
+			padding: 10rpx 16rpx;
+			border-radius: 12rpx;
+			border: 1px solid #eee;
+			font-size: 26rpx;
+			font-family: PingFang SC;
+			color: #999;
+			position: relative;
+		}
+		&-active{
+			border: 1px solid #FF5C03;
+			&::after {
+				position: absolute;
+				bottom: 0;
+				right: 0;
+				content: "";
+				height: 0;
+				width: 0;
+				border-top: 24rpx solid transparent;
+				border-right: 24rpx solid #FF5C03;
+				border-bottom: 24rpx solid #FF5C03;
+				border-left: 24rpx solid transparent;
+				border-radius: 0 0 12rpx 0;
+			}
+		}
+		&-name {
+			overflow: hidden;
+			margin-bottom: 10rpx;
+			font-size: 30rpx;
+			font-weight: bold;
+			color: #222;
+		}
+		&-info {
+			@include u-flex(row, center, flex-start);
+			.text{
+				margin-right: 19upx;
+			}
+		}
+	}
+	.checkmarkempty {
+		position: absolute;
+		bottom: 0;
+		right: 0;
+		z-index: 2;
+	}
+</style>

+ 1 - 1
pages_index/packageDetails.vue

@@ -183,7 +183,7 @@
 		<view class="message-box" v-if="orderCount>0">
 			<view class="left">
 				<image src="/static/images/close.png" mode="" @click="closeOrder()" ></image>
-				<view class="text ellipsis">您有{{count}}个待支付订单</view>
+				<view class="text ellipsis">您有{{orderCount}}个待支付订单</view>
 			</view>
 			<view class="btn" @click="showOrder()">查看</view>
 		</view>

+ 149 - 80
pages_index/packageForm.vue

@@ -1,68 +1,74 @@
-<template>
-	<view class="content">
-		<view class="patient-cont">
-			<view class="chose-patient">
-				<view class="patient-box" @click="addPatient()" v-if="patient==null">
-					<view class="patient-item">
-						<view class="patient-tip">*</view>
-						<view class="patient-title">选择就诊人</view>
+<template>
+	<view>
+		<view class="content">
+			<choosePatient ref="choosePatient" class="patient" :patient="patient" @addPatient="addPatient"></choosePatient>
+			<!-- <view class="patient-cont">
+				<view class="chose-patient">
+					<view class="patient-box" @click="addPatient()" v-if="patient==null">
+						<view class="patient-item">
+							<view class="patient-tip">*</view>
+							<view class="patient-title">选择就诊人</view>
+						</view>
+						<view class="right" >
+							<image src="/static/images/arrow_gray.png" mode=""></image>
+						</view>
 					</view>
-					<view class="right" >
-						<image src="/static/images/arrow_gray.png" mode=""></image>
+					<view class="patient" @click="addPatient()" v-if="patient!=null">
+						<view  class="left">
+							<view class="name">{{patient.patientName}}</view>
+							<view class="info">
+								<text class="text" v-if="patient.sex==1">男</text>
+								<text class="text" v-if="patient.sex==2">女</text>
+								<text class="text">{{$getAge(patient.birthday)}}岁</text>
+								<text class="text">{{$parseIdCard(patient.idCard)}}</text>
+							</view>
+						</view>
+						<view class="right" >
+							<image src="/static/images/arrow_gray.png" mode=""></image>
+						</view>
 					</view>
 				</view>
-				<view class="patient" @click="addPatient()" v-if="patient!=null">
-					<view  class="left">
-						<view class="name">{{patient.patientName}}</view>
-						<view class="info">
-							<text class="text" v-if="patient.sex==1">男</text>
-							<text class="text" v-if="patient.sex==2">女</text>
-							<text class="text">{{$getAge(patient.birthday)}}岁</text>
-							<text class="text">{{$parseIdCard(patient.idCard)}}</text>
+			</view> -->
+			<view class="msg-cont">
+				<scroll-view
+					class="msg-scroll"
+					:scroll-top="scrollTop"
+					scroll-y="true"
+					:scroll-with-animation="true"
+				>
+				<view class="msgs">
+					<view class="msg-item" v-for="(item,index) in msgs" >
+						<view class="left" v-if="item.type==1">
+							<!-- <image class="img" src="https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/be32b8d2ae9f497297d10327656bb43c.png"></image> -->
+							<image class="img" mode="aspectFill" :src="agreement.avatar?agreement.avatar:'https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/1d7eb0607a074892964dd32e8735e540.jpg'"></image>
+							<view class="msg-content">{{item.content}}</view>
+						</view>
+						<view class="right" v-if="item.type==2">
+							<view class="msg-content">{{item.content}}</view>
+							<image class="img" mode="aspectFill" :src="avatar?avatar:'https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/1d7eb0607a074892964dd32e8735e540.jpg'"></image>
 						</view>
-					</view>
-					<view class="right" >
-						<image src="/static/images/arrow_gray.png" mode=""></image>
 					</view>
 				</view>
+				</scroll-view>
 			</view>
-		</view>
-		<view class="msg-cont">
-			<scroll-view
-				class="msg-scroll"
-				:scroll-top="scrollTop"
-				scroll-y="true"
-				:scroll-with-animation="true"
-			>
-			<view class="msgs">
-				<view class="msg-item" v-for="(item,index) in msgs" >
-					<view class="left" v-if="item.type==1">
-						<image class="img" src="https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/be32b8d2ae9f497297d10327656bb43c.png"></image>
-						<view class="msg-content">{{item.content}}</view>
-					</view>
-					<view class="right" v-if="item.type==2">
-						<view class="msg-content">{{item.content}}</view>
-						<image class="img" src="https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/1d7eb0607a074892964dd32e8735e540.jpg"></image>
-					</view>
-					
+			<view class="option-cont" v-if="item!=null">
+				<view class="option-title" >{{item.title}}</view>
+				<view class="options" >
+					<view :class="option.color=='red'?'option-item red':'option-item green'" @click="optionClick(item,option)" v-for="(option,opIndex) in item.options" >{{option.name}}</view>
 				</view>
 			</view>
-			</scroll-view>
-		</view>
-		<view class="option-cont" v-if="item!=null">
-			<view class="option-title" >{{item.title}}</view>
-			<view class="options" >
-				<view :class="option.color=='red'?'option-item red':'option-item green'" @click="optionClick(item,option)" v-for="(option,opIndex) in item.options" >{{option.name}}</view>
-			</view>
-		</view>
+		</view> 
 		<u-modal @cancel="close()" @confirm="confirm()" :show="show" title="温馨提示" :content='content'></u-modal>
-	</view> 
+	</view>
 </template>
 
 <script>
-	
-	import {create,giftCreate} from '@/api/packageOrder.js'
-	export default {
+	import choosePatient from "./components/choosePatient/choosePatient.vue"
+	import {create,giftCreate,getAgreement} from '@/api/packageOrder.js'
+	export default {
+		components: {
+			choosePatient
+		},
 		data() {
 			return {
 				content:null,
@@ -83,9 +89,29 @@
 							{name:"是,我已充分了解",value:1,color:'green'},
 							{name:"否,未阅读",value:0,color:'red'},
 						]
+					},{
+						title:"您之前因以下哪种情况去线下就医,接受过哪些检查?",
+						options:[
+							{name:"慢性病复查,复查了基本指标",value:1,color:'green'},
+							{name:"头晕、头痛,查过血压",value:2,color:'green'},
+							{name:"失眠、记忆力下降,常规检查",value:3,color:'green'},
+							{name:"心悸、胸痛,查过心电图",value:4,color:'green'},
+							{name:"关节疼痛,查过X光片",value:5,color:'green'},
+							{name:"突发不适,常规检查",value:6,color:'green'}
+						]
+					},
+					{
+						title:"您目前已确诊的慢性疾病有哪些?",
+						options:[
+							{name:"高血压",value:1,color:'green'},
+							{name:"糖尿病",value:2,color:'green'},
+							{name:"心脑血管疾病",value:3,color:'green'},
+							{name:"呼吸系统疾病",value:4,color:'green'},
+							{name:"骨关节病",value:5,color:'green'},
+							{name:"肠胃疾病",value:6,color:'green'},
+							{name:"其他",value:7,color:'green'},
+						]
 					}
-					
-					 
 				],
 				msgs:[],
 				index:0,
@@ -101,6 +127,10 @@
 				companyUserId:null,
 				companyId:null,
 				choose: 0, // 1:付邮费领取 2:加粉领取
+				docAvatar:'',
+				avatar: '',
+				paddingTop: 130,
+				agreement: {}
 			};
 		},
 		onLoad(option) {
@@ -117,15 +147,40 @@
 			var that=this;
 			uni.$on('refreshOrderPatient', (res) => {
 				that.patient=res
+				setTimeout(()=>{
+					this.getpaddingTop()
+				},100)
 			})
 			this.item=this.items[0];
 			this.addMsg(1,this.item.title);
-			
+			this.getAgreement()
+			this.avatar = uni.getStorageSync('userInfo')&&JSON.parse(uni.getStorageSync('userInfo')).avatar
 		},
 		onShow() {
-			
+			this.$nextTick(()=>{
+				this.$refs.choosePatient.getPatientList()
+			})
 		},
 		methods:{
+			getpaddingTop() {
+				uni
+				  .createSelectorQuery().in(this)
+				  .select(".patient")
+				  .boundingClientRect((res) => {
+					this.paddingTop = res&&res.height;
+				  })
+				  .exec();
+			},
+			getAgreement() {
+				getAgreement().then(res=>{
+					if(res.code==200) {
+						this.agreement = res.doctor || {}
+						uni.setNavigationBarTitle({
+						  title: this.agreement.doctorName || '问答'
+						});
+					}
+				})
+			},
 			close(){
 				this.show=false;
 			},
@@ -142,18 +197,18 @@
 				var msg={type:type,content:content}
 				this.msgs.push(msg)
 				var that=this;
-				uni
-				  .createSelectorQuery()
-				  .select(".msgs")
-				  .boundingClientRect((res) => {
-				    const scrollH = res.height;
-					that.scrollTop = scrollH;
-					console.log(that.scrollTop)
-				    
-				  })
-				  .exec();
-				 
-				
+				setTimeout(()=>{
+					uni
+					  .createSelectorQuery()
+					  .select(".msgs")
+					  .boundingClientRect((res) => {
+						   if(res) {
+								const scrollH = res.height;
+								that.scrollTop = scrollH;
+						   }
+					  })
+					  .exec();
+				},100)
 			},
 			optionClick(item,option){
 				if(this.patient==null){
@@ -170,7 +225,6 @@
 					return;
 				}
 				item.option=option.name;
-				console.log(item.option);
 				this.addMsg(2,option.name);
 				this.index++;
 				if(this.index<=this.items.length-1){
@@ -194,6 +248,11 @@
 				uni.showLoading({
 					title:"处理中..."
 				})
+				const num = Math.floor(Math.random() * 6);
+				this.items = this.items.map(item=>({
+					...item,
+					option: item.title == "您目前已确诊的慢性疾病有哪些?"&&item.option =='其他' ? item.options[num].name:item.option
+				}))
 				var data={
 					companyId:this.companyId,
 					companyUserId:this.companyUserId,
@@ -282,20 +341,23 @@
 </script>
 
 <style lang="scss">
-	page{
-		height: 100%;
-	}
 	.content{
+		flex: 1;
+		width: 100%;
 		height: 100vh;
+		display: flex;
+		flex-direction: column;
+		overflow: hidden;
+		position: relative;
 		.msg-cont{
-			padding-bottom: 550rpx;
 			width: 100%;
-			height: calc(100vh - 760rpx);
+			flex: 1;
+			overflow: hidden;
 			.msg-scroll{
-				height: calc(100vh - 760rpx);
+				height: 100%;
 				.msgs{
-					overflow: hidden;
 					width: 100%;
+					padding: 6rpx 0;
 					.msg-item{
 						padding: 10rpx 15rpx;
 						display: flex;
@@ -362,9 +424,16 @@
 			
 		}
 		.option-cont{
-			position: fixed;
-			bottom: 0rpx;
-			height: 380rpx;
+			flex-shrink: 0;
+			// position: fixed;
+			// bottom: 0rpx;
+			// #ifndef APP-PLUS
+			max-height: 90vh;
+			overflow-y: auto;
+			// #endif
+			// #ifdef APP-PLUS
+			// height: 380rpx;
+			// #endif
 			width: 100%;
 			background-color: #fff;
 			border-radius: 60rpx 60rpx 0rpx 0rpx;
@@ -391,7 +460,7 @@
 					justify-content: center;
 					width: 100%;
 					border: 1rpx solid #eee;
-					margin-bottom: 30rpx;
+					margin-bottom: 20rpx;
 					padding: 15rpx;
 					border-radius: 5rpx;
 					color: #ffffff;

+ 1 - 0
pages_order/inquiryOrderDetails.vue

@@ -564,6 +564,7 @@
 						font-size: 28upx;
 						font-family: PingFang SC;
 						color: #9a9a9c;
+						border-bottom: none;
 					}
 					.spec{
 						margin-left: 10rpx;

+ 6 - 6
pages_order/inquirySelectType.vue

@@ -61,16 +61,16 @@
 			doInquiryForm(type){
 				this.$isLogin().then(
 					res => {
-						console.log(res)
 						if(res){
-							if(type==1||type==2||type==6||type==5||type==7||type==8||type==9||type==10){
+							if(type==3){
 								uni.navigateTo({
-								 	url: "/pages_order/inquiryForm2_1?inquiryType=2&orderType=2&inquirySubType="+type+"&companyId="+this.companyId+"&companyUserId="+this.companyUserId+"&isShare="+this.isShare,
+								 	url: "/pages_order/inquiryForm2_2?inquiryType=2&orderType=2&inquirySubType="+type+"&companyId="+this.companyId+"&companyUserId="+this.companyUserId+"&isShare="+this.isShare,
 								})
-							}
-							else if(type==3){
+							} else if(type==4) {
+								
+							}else {
 								uni.navigateTo({
-								 	url: "/pages_order/inquiryForm2_2?inquiryType=2&orderType=2&inquirySubType="+type+"&companyId="+this.companyId+"&companyUserId="+this.companyUserId+"&isShare="+this.isShare,
+								 	url: "/pages_order/inquiryForm2_1?inquiryType=2&orderType=2&inquirySubType="+type+"&companyId="+this.companyId+"&companyUserId="+this.companyUserId+"&isShare="+this.isShare,
 								})
 							}
 						}

+ 10 - 8
pages_user/healthRecords/index.vue

@@ -26,21 +26,23 @@
 			</view>
 			<view class="box-title">
 				<text>健康数据</text>
-				<view class="box-title-right">
+				<!-- <view class="box-title-right">
 					<image :src="baseUrl+'/images/healthRecords/edit_add_orange_icon.png'" mode="aspectFill"></image>
 					<text>绑定智能设备</text>
-				</view>
+				</view> -->
 			</view>
 			<view class="cardbox">
-				<view class="cardbox-item bmibox">
-					<view class="cardbox-title">
+				<view class="cardbox-item bmibox" style="height:auto;min-height: auto;">
+					<view class="cardbox-title x-f">
 						<view>
 							<view class="cardbox-maintitle">BMI {{recordInfo.bmi || "--"}}</view>
 							<view class="bmibox-tagbox"><view class="bmibox-tag" v-if="recordInfo.bmi">{{fat}}</view></view>
 						</view>
 						<image :src="baseUrl+'/images/healthRecords//BMI_icon.png'" mode="aspectFill"></image>
 					</view>
-					<view class="bmibox-info" style="margin-top: 46rpx;">
+				</view>
+				<view class="cardbox-item bmibox" style="height:auto;min-height: auto;">
+					<view class="bmibox-info">
 						<text class="bmibox-infolabel">身高</text>
 						<view class="bmibox-infoval">{{recordInfo.height || "--"}}cm</view>
 						<image class="bmibox-edit" :src="baseUrl+'/images/healthRecords/services_edit_icon.png'"
@@ -53,7 +55,7 @@
 							@click="handleEdit('weight')"></image>
 					</view>
 				</view>
-				<view class="cardbox-item" v-for="(item,index) in healthData" :key="index">
+				<!-- <view class="cardbox-item" v-for="(item,index) in healthData" :key="index">
 					<view class="cardbox-title">
 						<view>
 							<view class="cardbox-maintitle">{{item.title}}</view>
@@ -63,7 +65,7 @@
 					</view>
 					<view class="cardbox-res resnum">{{item.data || '--'}}</view>
 					<view class="cardbox-time">{{item.date && item.date.substring(5,16)}}</view>
-				</view>
+				</view> -->
 			</view>
 			<!-- 健康史 -->
 			<view class="box-title">
@@ -252,7 +254,7 @@
 								this.user=res.user;
 								this.defaultHeadimg=this.user.avatar;
 								this.getMyRecord()
-								this.getHealthDataList()
+								// this.getHealthDataList()
 								this.getHealthLife()
 								 
 							}

+ 3 - 0
pages_user/patient.vue

@@ -41,6 +41,9 @@
 				this.getPatientList()
 			})
 		},
+		onUnload() {
+			uni.$off('refreshPatient')
+		},
 		methods: {
 			selectPatient(item){
 				uni.$emit('refreshOrderPatient',item);

BIN
static/images/danmu-off.png


BIN
static/images/danmu-on.png