患者1.2

This commit is contained in:
zoujiandong
2024-01-10 08:57:23 +08:00
parent 49c01e8922
commit 5d865d1bbb
339 changed files with 23720 additions and 267 deletions
+94 -45
View File
@@ -2,6 +2,7 @@
const app = getApp()
import {
doctorDetail,
doctorService,
isReceivepatient,
commentList,
fllowDoctor,
@@ -16,6 +17,7 @@ Page({
img_host:'https://oss.prod.applets.igandanyiyuan.com/applet/patient/static',
showDialog:false,
avatar: '',
currentData:0,
user_name: '',
doctor_title: '',
doctor_id: '',
@@ -28,6 +30,9 @@ Page({
served_patients_num: 0,
number_of_fans: 0,
hospital: null,
canTuwen:false,
canVideo:false,
canDiffcult:false,
brief_introduction:'',
multi_point_status: 0,
multi_point_enable:0,
@@ -42,15 +47,19 @@ Page({
show: false,
isHide: false,
current_inquiry_config: null,
inquiry_type:'',
inquiry_mode:'',
follow: false,
id:'',
expertInquiry_price:'',
recieveStatus:0,
commentList: [],
totalComment:0,
isFinished:false,
isReceivePatient:false //是否可接诊
},
handleThrottle:throttle(function(){
handleThrottle:throttle(function(e){
let {type}=e.currentTarget.dataset;
this.goSelectPatient()
}),
goSelectPatient() {
@@ -75,12 +84,43 @@ Page({
this.handelfllowDoctor()
}
},
notAsk(){
notAsk(e){
let {type}=e.currentTarget.dataset
wx.showToast({
title: '该医生暂不就诊',
title:type==0?'该医生暂不就诊':'该问诊暂未开通',
icon:"none"
})
},
bindchange(e){
const that = this;
console.log(e);
that.setData({
currentData: e.detail.current
})
},
switchTab(e){
let {id}=e. currentTarget.dataset;
this.setData({
currentData:Number(id)
})
if(id==0){
this.setData({
inquiry_type:this.data.current_inquiry_config.inquiry_type,
inquiry_mode:this.data.current_inquiry_config.inquiry_mode
})
}else if(id==1){
this.setData({
inquiry_type:1,
inquiry_mode:2
})
}else {
this.setData({
inquiry_type:1,
inquiry_mode:6
})
}
},
confirm(event) {
let {id}=this.data;
if (event.detail) {
@@ -90,16 +130,16 @@ Page({
}
},
handleIsReceivepatient() {
let {doctor_id}=this.data;
let {doctor_id,inquiry_mode,inquiry_type}=this.data;
isReceivepatient({
inquiry_type: this.data.current_inquiry_config.inquiry_type,
inquiry_mode: 1,
inquiry_type: inquiry_type,
inquiry_mode: inquiry_mode,
doctor_id: doctor_id
}).then(data => {
let recieveStatus=data.status;
if (recieveStatus == 1) {
app.method.navigateTo({
url: '/pages/selectPatient/selectPatient?chat_id='+ this.data.user_id+"&doctor_id="+this.data.doctor_id+"&inquiry_type="+ this.data.current_inquiry_config.inquiry_type
url: '/pages/selectPatient/selectPatient?chat_id='+ this.data.user_id+"&doctor_id="+this.data.doctor_id+"&inquiry_type="+ inquiry_type+"&inquiry_mode="+inquiry_mode
})
} else if (recieveStatus == 2) {
this.setData({
@@ -174,7 +214,7 @@ Page({
let order_inquiry_count=0;
let order_type=type;
for (let i = 0; i < arr.length; i++) {
if(arr[i].inquiry_type==type){
if(arr[i].inquiry_type==type && arr[i].inquiry_mode==1){
recieveStatus=arr[i].work_num_day-arr[i].order_inquiry_count;
inquiry_mode=arr[i].inquiry_mode;
inquiry_price=arr[i].inquiry_price;
@@ -202,6 +242,8 @@ Page({
console.log('2222222222')
console.log(recieveStatus)
this.setData({
inquiry_type:order_type,
inquiry_mode:inquiry_mode,
current_inquiry_config: {
inquiry_type:order_type,
inquiry_mode:inquiry_mode,
@@ -218,9 +260,24 @@ Page({
var a='3';
if(arr){
for (var i = 0; i < arr.length; ++i) {
if(arr[i].is_enable==1 && arr[i].inquiry_type==1){
a='2'
if(arr[i].is_enable==1 && arr[i].inquiry_type==1 && arr[i].inquiry_mode==1){
this.setData({
expertInquiry_price: arr[i].inquiry_price
})
a='2';
};
if(arr[i].is_enable==1 && arr[i].inquiry_type==1 && arr[i].inquiry_mode==2){
this.setData({
canVideo:true,
videoPrice:arr[i].inquiry_price
})
};
if(arr[i].is_enable==1 && arr[i].inquiry_type==1 && arr[i].inquiry_mode==6){
this.setData({
canDiffcult:true,
yinanPrice:arr[i].inquiry_price
})
}
if(arr[i].is_enable==1 && arr[i].inquiry_type==3){
return '1'
};
@@ -238,43 +295,34 @@ Page({
})
}
};
let doctor_inquiry_config = this.data.doctor_inquiry_config;
let inquiryType=this.formatInquiryStatus(doctor_inquiry_config);
console.log("inquiryType:"+inquiryType)
if(inquiryType==1){
this.loopArr(doctor_inquiry_config,3);
}else if(inquiryType==2){
this.loopArr(doctor_inquiry_config,1);
}else{
this.setData({
current_inquiry_config:null
})
}
this.setData({
isFinished:true
})
// if(res.is_img_expert_reception==1 && res.is_img_welfare_reception==1){
// this.loopArr(doctor_inquiry_config,3);
// // 1:专家问诊 2:快速问诊 3:公益问诊 4:问诊购药
// this.setData({
// isHide:true
// })
// }else if(res.is_img_expert_reception==1 && res.is_img_welfare_reception==0){
// this.loopArr(doctor_inquiry_config,1);
// }else if(res.is_img_welfare_reception== 1 && res.is_img_expert_reception==0){
// this.loopArr(doctor_inquiry_config,3);
// }else{
// this.setData({
// current_inquiry_config:null
// })
// }
// this.setData({
// isFinished:true
// })
})
},
getService(id){
doctorService(id).then(res=>{
let doctor_inquiry_config = res;
let inquiryType=this.formatInquiryStatus(res);
console.log("inquiryType:"+inquiryType)
if(inquiryType==1){
this.loopArr(doctor_inquiry_config,3);
this.setData({
canTuwen:true
})
}else if(inquiryType==2){
this.loopArr(doctor_inquiry_config,1);
this.setData({
canTuwen:true
})
}else{
this.setData({
current_inquiry_config:null
})
}
this.setData({
isFinished:true
})
})
},
/**
* 生命周期函数--监听页面加载
*/
@@ -291,6 +339,7 @@ Page({
doctor_id:doctor_id
})
this.getDeatil(doctor_id);
this.getService(doctor_id);
this.getEvaluationList()
},
+171 -34
View File
@@ -9,7 +9,7 @@
<image src="{{avatar}}" class="head" wx:if="{{avatar}}" mode="aspectFill"></image>
<image class="head" src="{{img_host+'/doctor_avatar.png'}}" wx:else></image>
<view class="onlinebox" wx:if="{{is_online==1}}">
<image src="../../assets/images/online.gif" mode="" class="icon" style="top:100rpx" />
<image src="{{img_host+'/online.gif'}}" mode="" class="icon" style="top:100rpx" />
</view>
</view>
<view class="namewraper">
@@ -67,7 +67,168 @@
</view>
</view>
<view class="drbox" wx:if="{{current_inquiry_config}}">
<view class="wz_tabbox">
<view class="titlebox">
<view class="title">医生服务</view>
<viwe class="tag" wx:if="{{filter.formatYear(days)}}">{{filter.formatYear(days)}}内服务过您</viwe>
</view>
<view class="tabs">
<view class="tab " bindtap="switchTab" data-id="0">
<image wx:if="{{currentData==0 && canTuwen}}" src="{{img_host+'/tuwen_on.png'}}" alt="" class="tabbg" ></image>
<image wx:elif="{{currentData==0 && !canTuwen}}" src="{{img_host+'/tuwen_disable_on.png'}}" alt="" class="tabbg" ></image>
<image wx:elif="{{currentData!=0 && canTuwen}}" src="{{img_host+'/tuwen.png'}}" alt="" class="tabbg" ></image>
<image wx:elsesrc="{{img_host+'/tuwen_disable.png'}}" alt="" class="tabbg" ></image>
<view class="typebox" wx:if="{{canTuwen}}">
<view class="name">图文问诊</view>
<view class="price">¥{{current_inquiry_config.inquiry_price}}/次</view>
<view class="jiaprice" wx:if="{{expertInquiry_price && current_inquiry_config.inquiry_type==3}}">¥{{expertInquiry_price}}/次</view>
</view>
<view class="typebox disable" wx:else>
<view class="name">图文问诊</view>
<view class="price">暂未开通</view>
</view>
</view>
<view class="tab " bindtap="switchTab" data-id="1">
<image src="{{img_host+'/video_on.png'}}" wx:if="{{currentData==1 && canVideo}}" alt="" class="tabbg" ></image>
<image wx:elif="{{currentData==1 && !canVideo}}" src="{{img_host+'/video_disable_on.png'}}" alt="" class="tabbg" ></image>
<image wx:elif="{{currentData!=1 && canVideo}}" src="{{img_host+'/video.png'}}" alt="" class="tabbg" ></image>
<image wx:else src="{{img_host+'/video_disable.png'}}" alt="" class="tabbg" ></image>
<view class="typebox" wx:if="{{canVideo}}">
<view class="name">视频问诊</view>
<view class="price">¥{{videoPrice}}/次</view>
</view>
<view class="typebox disable" wx:else>
<view class="name">视频问诊</view>
<view class="price">暂未开通</view>
</view>
</view>
<view class="tab " bindtap="switchTab" data-id="2">
<image wx:if="{{currentData==2 && canDiffcult}}" src="{{img_host+'/yinan_on.png'}}" alt="" class="tabbg" ></image>
<image wx:elif="{{currentData==2 && !canDiffcult}}" src="{{img_host+'/yinan_disable_on.png'}}" alt="" class="tabbg" ></image>
<image wx:elif="{{currentData!=2 && canDiffcult}}" src="{{img_host+'/yinan.png'}}" alt="" class="tabbg" ></image>
<image wx:else src="{{img_host+'/yinan_disable.png'}}" alt="" class="tabbg" ></image>
<view class="typebox" wx:if="{{canDiffcult}}">
<view class="name">疑难问诊</view>
<view class="price">¥{{yinanPrice}}/次</view>
</view>
<view class="typebox disable" wx:else>
<view class="name">疑难问诊</view>
<view class="price">暂未开通</view>
</view>
</view>
</view>
<swiper current="{{currentData}}" class="swiperbox" bindchange="bindchange" style="height:{{currentData==0?'350rpx':currentData==1?'700rpx':'530rpx'}}">
<swiper-item class="">
<view class="swiper-item">
<image src="{{img_host+'/tuwen_bg.png'}}" class="itembg" wx:if="{{canTuwen}}"></image>
<image src="{{img_host+'/tuwen_bg_disable.png'}}" class="itembg" wx:else></image>
<view class="itembox">
<view class="title">通过文字、图片、语音进行咨询</view>
<view class="tipbox {{!canTuwen?'active':''}}">
<view class="tipmsg">
<view class="circle"></view>
<view class="msg">可通过文字、图片、语音等形式和医生进行沟通;</view>
</view>
<view class="tipmsg">
<view class="circle"></view>
<view class="msg">医生接诊后24小时内10个沟通回合;</view>
</view>
<view class="tipmsg">
<view class="circle"></view>
<view class="msg">医生未接诊,平台24小时内自动退款;</view>
</view>
<view class="tipmsg">
<view class="circle"></view>
<view class="msg">医生未回复,可联系平台客服协商进行退款。</view>
</view>
</view>
</view>
</view>
</swiper-item>
<swiper-item>
<view class="swiper-item">
<image src="{{img_host+'/video_bg.png'}}" class="itembg" wx:if="{{canVideo}}"></image>
<image src="{{img_host+'/video_bg_disable.png'}}" class="itembg" wx:else></image>
<view class="itembox">
<view class="title">通过视频面对面进行咨询</view>
<view class="tipbox {{!canVideo?'active':''}}">
<view class="tipmsg">
<view class="circle"></view>
<view class="msg">医生接诊后,主动和就诊人预约视频时间;</view>
</view>
<view class="tipmsg">
<view class="circle"></view>
<view class="msg">若预约时间因故需要改变,可与医生图文协商时间;</view>
</view>
<view class="tipmsg">
<view class="circle"></view>
<view class="msg">视频交流服务时长一般为5-10分钟;</view>
</view>
<view class="tipmsg">
<view class="circle"></view>
<view class="msg">医生接诊后48小时内可以通过文字、图片、语音等形式和医生不限制沟通回合数;</view>
</view>
<view class="tipmsg">
<view class="circle"></view>
<view class="msg">医生未接诊,平台24小时内自动退款;</view>
</view>
<view class="tipmsg">
<view class="circle"></view>
<view class="msg">医生未回复或未进行视频,可联系平台客服协商进行退款;</view>
</view>
<view class="tipmsg">
<view class="circle"></view>
<view class="msg">如因您个人原因(忘记时间、迟到、中途断开未在进入视频等情况),咨询费用可能将无法退回,请准时接收医生视频请求;</view>
</view>
<view class="tipmsg">
<view class="circle"></view>
<view class="msg">视频不支持回放。</view>
</view>
</view>
</view>
</view>
</swiper-item>
<swiper-item>
<view class="swiper-item">
<image src="{{img_host+'/yinan_bg.png'}}" class="itembg" wx:if="{{canDiffcult}}"></image>
<image src="{{img_host+'/video_bg_disable.png'}}" class="itembg" wx:else></image>
<view class="itembox">
<view class="title">通过文字、图片、语音进行咨询</view>
<view class="tipbox {{!canDiffcult?'active':''}}">
<view class="tipmsg">
<view class="circle"></view>
<view class="msg">【医生填写的服务内容】;</view>
</view>
<view class="tipmsg">
<view class="circle"></view>
<view class="msg">【医生填写的服务流程】;</view>
</view>
<view class="tipmsg">
<view class="circle"></view>
<view class="msg">可通过文字、图片、语音等形式和医生进行沟通;</view>
</view>
<view class="tipmsg">
<view class="circle"></view>
<view class="msg">医生接诊后【医生选择的服务周期】内【医生选择的服务次数】沟通回合;</view>
</view>
<view class="tipmsg">
<view class="circle"></view>
<view class="msg">医生未接诊,平台24小时内自动退款;</view>
</view>
<view class="tipmsg">
<view class="circle"></view>
<view class="msg">医生未回复或医生服务不满意,可联系平台客服协商进行退款。</view>
</view>
</view>
</view>
</view>
</swiper-item>
</swiper>
</view>
<!-- <view class="drbox" wx:if="{{current_inquiry_config}}">
<view class="titlebox">
<view class="title">医生服务</view>
<viwe class="tag" wx:if="{{filter.formatYear(days)}}">{{filter.formatYear(days)}}内服务过您</viwe>
@@ -97,37 +258,8 @@
<view class="tipcon" wx:if="{{current_inquiry_config.times_number==0}}"><text>1.适合可以耐心等待医生回复的病情咨询</text><text>2.医生接诊后{{current_inquiry_config.duration/60}}小时内不限次数个回合沟通</text></view>
<view class="tipcon" wx:else><text>1.适合可以耐心等待医生回复的病情咨询</text><text>2.医生接诊后{{current_inquiry_config.duration/60}}小时内{{current_inquiry_config.times_number}}个回合图文沟通</text></view>
</view>
</view>
<!-- <view wx:for="{{doctor_inquiry_config}}" wx:key="inquiry_config_id">
<view class="wentype" wx:if="{{item.inquiry_type==1 && !isHide}}">
<image src="https://img.applets.igandanyiyuan.com/applet/patient/static/dr.png"></image>
<image src="https://img.applets.igandanyiyuan.com/applet/patient/static/gou.png" class="gou"></image>
<view class="rightbox">
<view class="name" wx:if="{{item.inquiry_type==1}}">专家问诊-图文问诊</view>
<view class="price">¥{{item.inquiry_price}}</view>
</view>
</view>
<view class="wentype freewenzhen" wx:elif="{{item.inquiry_type==3}}">
<image src="https://img.applets.igandanyiyuan.com/applet/patient/static/freeicon.png"></image>
<image src="https://img.applets.igandanyiyuan.com/applet/patient/static/huanggou.png" class="gou"></image>
<view class="rightbox">
<view class="name">公益问诊-图文问诊</view>
<view class="pricebox">
<view class="price">¥{{item.inquiry_price}}</view>
<view class="rest">当前剩余名额: {{item.work_num_day-item.order_inquiry_count>=0?(item.work_num_day-item.order_inquiry_count):0}} 个</view>
</view>
</view>
</view>
<view class="tips" wx:if="{{item.duration!=0 && !(item.inquiry_type==1 && isHide)}}">
<image src="https://img.applets.igandanyiyuan.com/applet/patient/static/duihua.png"></image>
<view class="tipcon" wx:if="{{times_number==0}}"><text>1.适合可以耐心等待医生回复的病情咨询</text><text>2.医生接诊后{{item.duration/60}}小时内不限次数个回合沟通</text></view>
<view class="tipcon" wx:else><text>1.适合可以耐心等待医生回复的病情咨询</text><text>2.医生接诊后{{item.duration/60}}小时内{{item.times_number}}个回合图文沟通</text></view>
</view>
</view> -->
</view>
</view> -->
<view class="commentbox" wx:if="{{commentList.length>0}}">
<view class="titlebox">
<view class="title">患者评价<text wx:if="{{commentList.length>0}}"> ({{totalComment}})</text></view>
@@ -143,7 +275,10 @@
<van-rate value="{{item.avg_score}}" size="{{ 18 }}" color="#ed9c00" void-icon="star" void-color="#eee" bind:change="onChange" gutter="2" readonly />
</view>
<view class="commment">{{item.content}}</view>
<view class="datebox">
<view class="sick_name">{{item.disease_class_name}}</view>
<view class="date">{{filter.formatDate(item.created_at)}}</view>
</view>
</view>
</view>
<!-- <view class="nonedata" wx:else>
@@ -152,8 +287,10 @@
</view>
</view>
<!-- <view></view> -->
<view class="ask" wx:if="{{current_inquiry_config && current_inquiry_config.recieveStatus>0}}" bindtap="handleThrottle" hidden="{{!isFinished}}">图文问诊 ¥{{current_inquiry_config.inquiry_price}}</view>
<view class="noask" bindtap="notAsk" wx:else hidden="{{!isFinished}}">暂不接诊</view>
<view class="ask" wx:if="{{(current_inquiry_config && current_inquiry_config.recieveStatus>0) && currentData==0}}" bindtap="handleThrottle" hidden="{{!isFinished}}" data-type="{{currentData}}">立即咨询</view>
<view class="ask" wx:elif="{{canVideo && currentData==1}}" bindtap="handleThrottle" hidden="{{!isFinished}}" data-type="{{currentData}}">立即咨询</view>
<view class="ask" wx:elif="{{canDiffcult && currentData==2}}" bindtap="handleThrottle" hidden="{{!isFinished}}" data-type="{{currentData}}">立即咨询</view>
<view class="noask" bindtap="notAsk" data-type="{{currentData}}" wx:else hidden="{{!isFinished}}">{{currentData==0?'暂不接诊':'暂未开通'}}</view>
</view>
<van-popup show="{{ show }}" round position="bottom" custom-style="height:65%" bind:close="onClose" lock-scroll="true">
<image src="{{img_host+'/closepop.png'}}" class="close" bindtap="onClose"></image>
+141 -1
View File
@@ -437,7 +437,7 @@ background: #dedede;
border-radius: 47rpx;
display: flex;
align-items: center;
color: #000000;
color: #fff;
font-size: 36rpx;
justify-content:center;
@@ -513,4 +513,144 @@ justify-content:center;
position: absolute;
right:20rpx;
top:30rpx;
}
.wz_tabbox{
margin-top: 20rpx;
}
.tabs{
margin-top: 16rpx;
display: flex;
justify-content: space-between;
}
.tabs .tab{
width: 214rpx;
height: 300rpx;
position: relative;
box-shadow: 0rpx 8rpx 20rpx 2rpx rgba(0,0,0,0.04);
}
.tabbg{
top:0rpx;
width: 100%;
z-index:0;
height: 314rpx;
position: absolute;
}
.typebox{
margin-top: 158rpx;
position: relative;
z-index:1;
display: flex;
flex-direction: column;
align-items: center;
}
.typebox .name{
color: #333333;
font-size: 32rpx;
font-weight: 500;
color: #333333;
}
.typebox .price{
margin-top: 12rpx;
font-size: 28rpx;
font-weight: 400;
color: #EF4F20;
}
.jiaprice{
margin-top: 10rpx;
font-size: 20rpx;
font-weight: 400;
color: #999999;
text-decoration: line-through;
}
.swiperbox{
margin-top: 30rpx;
}
.swiper-item{
border-radius: 20rpx;
overflow: hidden;
position: relative;
background-color: #fff;
}
.swiper-item .title{
margin-top: 10rpx;
font-size: 32rpx;
font-weight: 500;
color: rgba(0,0,0,0.85);
}
.tipbox{
margin-top: 20rpx;
}
.tipbox .tipmsg{
display: flex;
line-height: 44rpx;
}
.tipbox .tipmsg .circle{
flex-shrink: 0;
margin-top: 17rpx;
margin-right: 10rpx;
width: 10rpx;
height: 10rpx;
background: #3BB5FE;
border-radius: 50%;
}
.tipbox .tipmsg .msg{
font-size: 28rpx;
color: rgba(0,0,0,0.65);
}
.swiperbox .swiper-item:nth-child(1) .circle{
background: #52C41A;
}
.swiperbox .swiper-item:last-child .circle{
background: #FF9C00;
}
.tipbox.active .tipmsg .msg{
color: rgba(0,0,0,0.35);
}
.swiperbox .tipbox.active .circle{
background-color: rgba(0,0,0,0.35);
}
.itembg{
height:100%;
width:100%;
position: absolute;
z-index:0;
}
.itembox{
position: relative;
z-index:1;
}
.itembox{
overflow: hidden;
padding: 30rpx;
}
/* .swiperbox .swiper-item:last-child{
background-image: linear-gradient(270deg,#fff5e4,#fff);
} */
.typebox.disable .name,.typebox.disable .price{
color: #999999;
}
.itembox.diable .title,.itembox.diable .msg{
color: #999999;
}
.datebox{
display: flex;
justify-content: space-between;
align-items: flex-end;
}
.sick_name{
margin-left: 20rpx;
font-size: 20rpx;
font-weight: 400;
display: flex;
border-radius: 20rpx;
height: 38rpx;
padding:0 15rpx;
border: 1rpx solid #3CC7C0;
align-items: center;
color: #3CC7C0;
}