更新小程序仓库

This commit is contained in:
zoujiandong
2023-11-17 09:51:35 +08:00
parent 13f54a26df
commit 4506940c2d
936 changed files with 60022 additions and 0 deletions
+145
View File
@@ -0,0 +1,145 @@
// pages/consultAndBuy.js
const app = getApp()
import {
getConsultTime,
isReceivepatient
} from "../../api/consultExpert"
import {throttle} from "../../utils/util"
Page({
/**
* 页面的初始数据
*/
data: {
currentData: null,
show: false,
id: '',
img_host:'https://oss.prod.applets.igandanyiyuan.com/applet/patient/static',
navName:"快速问诊",
inquiry_type:2
},
handleGetConsultTime() {
let {inquiry_type}=this.data;
getConsultTime({
inquiry_type:inquiry_type,
inquiry_mode: 1,
}).then(data => {
this.setData({
currentData: data
})
})
},
confirm(event) {
let {id}=this.data;
if (event.detail) {
app.method.navigateTo({
url: '/pages/orderDetail/orderDetail?order_inquiry_id=' + id,
})
}
},
handleIsReceivepatient() {
let {inquiry_type}=this.data;
isReceivepatient({
inquiry_type:inquiry_type,
inquiry_mode: 1,
doctor_id: ''
}).then(data => {
if (data.status == 1) {
if(inquiry_type==2){
app.method.navigateTo({
url: '/pages/selectPatient/selectPatient?inquiry_type=2',
})
}else{
app.method.navigateTo({
url: '/pages/applyMedince/applyMedince',
})
}
} else if (data.status == 2) {
this.setData({
show: true,
id: data.data.order_inquiry_id
})
} else if (data.status == 3) {
wx.showToast({
title: data.message,
icon: "none"
})
}
})
},
handleThrottle:throttle(function(){
this.goApplyMedince()
}),
goApplyMedince() {
this.handleIsReceivepatient();
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
if(options.inquiry_type){
this.setData({
inquiry_type:options.inquiry_type,
navName:"问诊购药"
})
wx.setNavigationBarTitle({
title: '问诊购药',
})
}
this.handleGetConsultTime()
},
goBack(){
wx.navigateBack({
delta: 1,
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
this.setData({
img_host:app.hostConfig().imghost
})
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
}
})
+8
View File
@@ -0,0 +1,8 @@
{
"usingComponents": {
"dialog":"../../components/dialog/dialog",
"nav":"../../components/nav/nav"
},
"navigationStyle":"custom",
"navigationBarTitleText": "肝胆相照互联网医院"
}
+150
View File
@@ -0,0 +1,150 @@
<!--pages/consultAndBuy.wxml-->
<nav navName="{{navName}}"></nav>
<!-- <view class="ui-navigatorbar" style="background: #FFFFFF;border-bottom: 1rpx solid #E3E4E5;">
<image class="ui-navigatorbar-back" bindtap="goBack" src="../../assets/images/back.png" />
<view class="ui-title" wx:if="{{inquiry_type}}}">问诊购药</view>
<view class="ui-title" wx:else>快速问诊</view>
</view> -->
<view class="page">
<image src="{{img_host+'/main_bg.jpg'}}" alt="" class="bg" mode='widthFix' wx:if="{{inquiry_type==4}}"></image>
<image src="{{img_host+'/quick_bg.png'}}" alt="" class="bg" mode='widthFix' wx:else></image>
<image src="{{img_host+'/people.gif'}}" alt="" class="people" mode='widthFix' wx:if="{{inquiry_type==4}}"></image>
<view class="timebox" wx:if="{{inquiry_type==4}}">
<view class="time" wx:for="{{currentData.time}}" wx:key="index">
{{item}}
</view>
</view>
<view class="quicktimebox" wx:else>
<view class="time quicktime" wx:for="{{currentData.time}}" wx:key="index" >
{{item}}
</view>
</view>
<view class="board" style="margin-top: 732rpx;" wx:if="{{inquiry_type==4}}">
<view class="title">
<image src="{{img_host+'/juxing.png'}}" alt="" class="juxing" ></image>
<!-- <view class="titlename" wx:if="{{inquiry_type==2}}">快速问诊</view> -->
<view class="titlename">问诊开药</view>
</view>
<view class="rowcell" style="margin-top: 30rpx;">
<image src="{{img_host+'/zjwz.png'}}" class="icon"></image>
<view class="bold">无需等待</view>
<view class="text"><text class="addcolor">5分钟</text>接诊、<text class="addcolor">{{currentData.duration}}分钟<text wx:if="{{currentData.times_number==0}}">不限次</text><text wx:else>{{currentData.times_number}}次</text></text>沟通</view>
</view>
<view class="rowcell">
<image src="{{img_host+'/shandian.png'}}" class="icon"></image>
<view class="bold">服务保障</view>
<view class="text">公立医院主治及以上医生服务</view>
</view>
<view class="rowcell">
<image src="{{img_host+'/serviceicon.png'}}" class="icon"></image>
<view class="bold">服务费用</view>
<view class="text">
<text class="redcolor" wx:if="{{currentData.inquiry_price==0}}">免费</text>
<text class="redcolor" wx:else>¥{{currentData.inquiry_price}}</text>
</view>
</view>
</view>
<view class="board" style="margin-top:672rpx;" wx:else>
<view class="title">
<image src="{{img_host+'/juxing.png'}}" alt="" class="juxing" ></image>
<view class="titlename">快速问诊</view>
</view>
<view class="rowcell" style="margin-top: 30rpx;">
<image src="{{img_host+'/zjwz.png'}}" class="icon"></image>
<view class="bold">无需等待</view>
<view class="text"><text class="addcolor">5分钟</text>接诊、<text class="addcolor">{{currentData.duration}}分钟<text wx:if="{{currentData.times_number==0}}">不限次</text><text wx:else>{{currentData.times_number}}次</text></text>沟通</view>
</view>
<view class="rowcell">
<image src="{{img_host+'/shandian.png'}}" class="icon"></image>
<view class="bold">服务保障</view>
<view class="text" style="color: #000000;">公立医院主治及以上医生服务</view>
</view>
<!-- <view class="rowcell">
<image src="../../assets/images/serviceicon.png" class="icon"></image>
<view class="bold">服务费用</view>
<view class="text"><text class="redcolor">¥5</text></view>
</view> -->
</view>
<view class="board" style="margin-top:20rpx;padding-bottom: 16rpx;box-shadow: 0rpx 4rpx 8rpx 0rpx #1A9D96;" wx:if="{{inquiry_type==4}}">
<view class="title">
<image src="{{img_host+'/juxing.png'}}" alt="" class="juxing" ></image>
<view class="titlename" >服务流程</view>
</view>
<view class="progressbox">
<view class="boxcell">
<view class="imgbox">
<image src="{{img_host+'/p1.png'}}" alt="" class="icon" mode='heightFix' ></image>
</view>
<view class="desc">选择药品</view>
</view>
<view class="boxcell">
<view class="imgbox">
<image src="{{img_host+'/p2.png'}}" alt="" class="icon" mode='heightFix' ></image>
</view>
<view class="desc">填写病情</view>
</view>
<view class="boxcell">
<view class="imgbox">
<image src="{{img_host+'/p3.png'}}" alt="" class="icon" mode='heightFix' ></image>
</view>
<view class="desc">问诊开方</view>
</view>
<view class="boxcell">
<view class="imgbox">
<image src="{{img_host+'/p4.png'}}" alt="" class="icon" mode='heightFix' ></image>
</view>
<view class="desc">送药到家</view>
</view>
<view class="line"></view>
</view>
</view>
<view class="board" style="margin-top:20rpx;padding-bottom: 16rpx;box-shadow: 0rpx 4rpx 8rpx 0rpx #1A9D96;" wx:else>
<view class="title">
<image src="{{img_host+'/juxing.png'}}" alt="" class="juxing" ></image>
<view class="titlename">服务流程</view>
</view>
<view class="progressbox" style="padding:0 111rpx">
<view class="boxcell">
<view class="imgbox">
<image src="{{img_host+'/p2.png'}}" alt="" class="icon" mode='heightFix' ></image>
</view>
<view class="desc">填写病情</view>
</view>
<view class="boxcell">
<view class="imgbox">
<image src="{{img_host+'/p5.png'}}" alt="" class="icon" mode='heightFix' ></image>
</view>
<view class="desc">分配医生</view>
</view>
<view class="boxcell">
<view class="imgbox">
<image src="{{img_host+'/p6.png'}}" alt="" class="icon" mode='heightFix' ></image>
</view>
<view class="desc">等待接诊</view>
</view>
<view class="line" style="right:120rpx;left:120rpx;"></view>
</view>
</view>
<view class="button" bindtap="handleThrottle" wx:if="{{inquiry_type==4}}">
立即问
</view>
<view class="box" wx:else >
<view class="leftbox">
<view class="imgbox">
<image src="../../assets/images/people2.gif" class="person" mode="widthFix"></image>
</view>
<view class="desc">
<view class="name">快速图文问诊</view>
<view class="tips">专业医生实时在线</view>
</view>
</view>
<view class="rightbox">
<view class="free" style="display: none;" wx:if="{{currentData.inquiry_price==0}}">免费</view>
<view class="price" wx:else>¥{{currentData.inquiry_price}}<text class="unit"></text></view>
<view class="btn" bindtap="handleThrottle">立即问</view>
</view>
</view>
</view>
<dialog bind:confirm="confirm" showDialog="{{show}}" message="您有仍在进行中的问诊,是否立即前往继续咨询?" ></dialog>
+252
View File
@@ -0,0 +1,252 @@
/* pages/consultAndBuy.wxss */
.page{
position: relative;
overflow: scroll;
}
.people{
top:508rpx;
position: absolute;
width:274rpx;
height:260rpx;
z-index:9;
}
.board {
display: flex;
position: relative;
z-index:1;
background-color: #fff;
flex-direction: column;
margin: 0rpx 32rpx 0;
padding-bottom: 22rpx;
border-radius: 10rpx;
}
.quicktimebox{
position: absolute;
top:592rpx;
font-size: 36rpx;
font-weight: 600;
color:#fff;
left:40rpx;
right:40rpx;
}
.timebox{
position: absolute;
top:532rpx;
line-height:40rpx;
font-size: 32rpx;
color:#fff;
left:495rpx;
}
.redcolor{
font-size: 44rpx;
font-weight: 600;
color: #F83C3C;
}
.bg{
top:172rpx;
width:100%;
bottom: 0;
position: absolute;
}
.quicktime{
display: inline;
margin-right: 5rpx;
flex-wrap: wrap;
}
.juxing{
margin:0 auto;
width:654rpx;
height:68rpx;
}
.titlename{
position: absolute;
top:50%;
left:50%;
transform: translate(-50%,-50%);
}
.board .title {
position: relative;
font-size: 30rpx;
font-weight: 600;
color: #333333;
margin: 0 auto;
}
.board .icon {
width: 36rpx;
height: 38rpx;
flex-shrink: 0;
}
.rowcell {
margin: 0rpx 10rpx 12rpx;
background: #EEFAF9;
border-radius: 10rpx;
padding: 13rpx 25rpx;
align-items: center;
justify-content: flex-start;
display: flex;
}
.box {
position: relative;
z-index:2;
margin: 40rpx 32rpx 0;
height: 172rpx;
background: #FFF5E0;
display: flex;
align-items: center;
display: flex;
justify-content: space-between;
border-radius: 10rpx;
border: 1rpx solid #ED9C00
}
.leftbox {
display: flex;
align-items: center;
margin-left: 30rpx;
}
.desc{
margin-left: 30rpx;
}
.imgbox{
background: #fff;
border-radius: 10rpx;
width: 120rpx;
display: flex;
justify-content: center;
align-items: center;
height: 128rpx;
}
.person{
width: 100%;
height:100%;
}
.leftbox .name{
font-size: 34rpx;
font-weight: 600;
color: #333333;
}
.leftbox .tips{
margin-top: 20rpx;
font-size: 24rpx;
color: #666666
}
.rightbox {
margin-right:20rpx;
display: flex;
flex-direction: column;
align-items: center;
}
.rightbox .btn{
margin-top: 9rpx;
width: 160rpx;
font-size: 30rpx;
color: #FFFFFF;
display: flex;
align-items: center;
justify-content: center;
height: 60rpx;
background: #3CC7C0;
border-radius: 30rpx;
}
.rightbox .free{
font-size: 30rpx;
font-weight: 400;
color: #EF4F20;
}
.rightbox .price{
font-size: 34rpx;
font-weight: 600;
color: #EF4F20;
}
.rightbox .unit{
font-weight:normal;
font-size: 24rpx;
color:rgba(102, 102, 102, 1);
}
.rowcell .bold{
white-space: nowrap;
margin-left: 20rpx;
font-size: 34rpx;
font-weight: 600;
color: #333333;
line-height: 48r
}
.rowcell .text{
margin-left: 34rpx;
font-size: 28rpx;
color: rgba(102, 102, 102, 1)
}
.rowcell .addcolor{
font-size: 28rpx;
color: #ED9C00;
}
.boxcell{
position: relative;
z-index:2;
display: flex;
flex-direction: column;
align-items: center;
}
.boxcell .imgbox{
width: 80rpx;
height: 80rpx;
display: flex;
align-items: center;
justify-content: center;
background: #FFFFFF;
border: 2rpx solid #3CC7C0;
border-radius: 8rpx;
}
.boxcell .desc{
margin:5rpx auto 0;
text-align: center;
font-size: 24rpx;
font-weight: 400;
color: #00A6A4;
}
.progressbox .line{
top:60rpx;
position: absolute;
left:35rpx;
z-index:0;
right:35rpx;
height:2rpx;
background-color: #3CC7C0;
}
.progressbox{
position: relative;
margin:13rpx 24rpx 0;
padding:0 28rpx;
height: 157rpx;
display: flex;
justify-content: space-between;
align-items: center;
background: #EEFAF9;
border-radius: 10rpx;
}
.button{
position: relative;
z-index:1;
display: flex;
align-items: center;
justify-content: center;
font-size: 44rpx;
font-weight: 600;
color: #3CC7C0;
height: 96rpx;
background: #FFFFFF;
box-shadow: 0rpx 2rpx 4rpx 0rpx #118882;
border-radius: 48rpx;
border: 2rpx solid #3CC7C0;
margin: 60rpx 32rpx 0;
}