Bläddra i källkod

1、疗法 问答页面 新增问题修改页面展示
2、医生介绍页面新增荣誉资质、医生风采

XSLu08042 3 veckor sedan
förälder
incheckning
49d2930935

+ 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');
  }

+ 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>

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

@@ -0,0 +1,163 @@
+<template>
+	<view class="patient-container">
+		<view class="patient-box">
+			<view class="patient-head">
+				<view class="patient-title">选择就诊人</view>
+				<view class="x-f" @click="addPatient()"><u-icon name="plus-circle" size="36rpx" color="#222"></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" v-show="current == i">
+						<u-icon name="checkmark" size="28rpx" color="#fff"></u-icon>
+					</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: [],
+			}
+		},
+		mounted() {
+			this.getPatientList()
+		},
+		watch: {
+			patient(newVal) {
+				const index = this.patientList.findIndex(item=>item.patientId == newVal.patientId)
+				this.current = index > -1 ? index : 0
+				setTimeout(()=>{
+					this.scrollIntoView = `patient_${this.current}`
+				},100)
+			}
+		},
+		methods: {
+			getPatientList(){
+				uni.showLoading({
+					title:"正在加载中"
+				})
+				getPatientList().then(
+					res => {
+						uni.hideLoading()
+						if(res.code==200){
+							this.patientList=res.data;
+							const patient = this.patientList&&this.patientList.length> 0 ? this.patientList[this.current] : null
+							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
+				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;
+	}
+	.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%;
+		}
+		&-item {
+			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>

+ 139 - 64
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 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" :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" :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,39 @@
 			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);
-			
+			setTimeout(()=>{
+				this.addMsg(1,this.item.title);
+			},100)
+			this.getAgreement()
 		},
 		onShow() {
 			
 		},
 		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;
 			},
@@ -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,19 +341,28 @@
 </script>
 
 <style lang="scss">
-	page{
-		height: 100%;
+	.patient {
+		position: absolute;
+		width: 100%;
+		z-index: 999;
+		top: 0;
+		left: 0;
 	}
 	.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%;
 					.msg-item{
 						padding: 10rpx 15rpx;
@@ -362,9 +430,16 @@
 			
 		}
 		.option-cont{
-			position: fixed;
-			bottom: 0rpx;
+			flex-shrink: 0;
+			// position: fixed;
+			// bottom: 0rpx;
+			// #ifndef APP-PLUS
+			max-height: 380rpx;
+			overflow-y: auto;
+			// #endif
+			// #ifdef APP-PLUS
 			height: 380rpx;
+			// #endif
 			width: 100%;
 			background-color: #fff;
 			border-radius: 60rpx 60rpx 0rpx 0rpx;

+ 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;