This commit is contained in:
zoujiandong
2024-01-22 08:42:14 +08:00
parent 3a2b2cd3b1
commit 4948f35fb3
573 changed files with 640 additions and 24515 deletions
@@ -0,0 +1,66 @@
// patient/components/consultList/consultList.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
@@ -0,0 +1,2 @@
<!--patient/components/consultList/consultList.wxml-->
<text>patient/components/consultList/consultList.wxml</text>
+161
View File
@@ -0,0 +1,161 @@
// pages/address/address.js
const app = getApp();
import {getAddress,delAddress} from "../../../api/address"
import {throttle} from "../../../utils/util"
Page({
/**
* 页面的初始数据
*/
data: {
addressList:[],
address_id:'',
isTriggered:false,
order_prescription_id:'',
message:'',
currentId:'',
show:false,
img_host:'https://oss.prod.applets.igandanyiyuan.com/applet/patient/static'
},
addAddresss:throttle(function(){
app.method.navigateTo({
url: '/patient/pages/editAddress/editAddress?order_prescription_id='+this.data.order_prescription_id,
})
}),
confirm:throttle(function(event){
if(event.detail){
this.handelDelAddress();
}
}),
onCloseAddress(event) {
let id=event.currentTarget.dataset.id;
const {instance } = event.detail;
instance.close();
this.setData({
show:true,
currentId:id,
message:"确定删除该地址?"
})
},
handleRefresher(){
this.handleGetAddress()
},
handleGetAddress(){
getAddress().then(data=>{
this.setData({
isTriggered:false,
addressList:data
})
})
},
goBack(){
wx.navigateBack({
delta: 1,
})
},
handelDelAddress(){
let id=this.data.currentId;
delAddress(id).then(data=>{
wx.showToast({
title: '删除成功',
icon:"none"
});
this.handleGetAddress();
})
},
selectAddress(event){
if(this.data.address_id){
let{id,name,phone,province,city,country,address}=event.currentTarget.dataset
this.setData({
address_id: id,
});
let addressInfo={
name,
phone,
province,
city,
country,
address,
address_id:id
};
let pages = getCurrentPages();
let prevPage = pages[pages.length - 2]; //上上一页
prevPage.setData({
prevData:JSON.stringify(addressInfo)
});
wx.navigateBack({
delta: 1,
})
}
},
goEdit(event){
let id=event.currentTarget.dataset.id
app.method.navigateTo({
url: '/patient/pages/editAddress/editAddress?address_id='+id+"&order_prescription_id="+this.data.order_prescription_id
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
let address_id=options.address_id;
let order_prescription_id=options.order_prescription_id;
if(address_id){
this.setData({
address_id,
order_prescription_id
})
}
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow(options) {
this.handleGetAddress();
this.setData({
img_host:app.hostConfig().imghost
});
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
})
+11
View File
@@ -0,0 +1,11 @@
{
"usingComponents": {
"van-swipe-cell": "@vant/weapp/swipe-cell/index",
"dialog":"../../../components/dialog/dialog",
"van-radio": "@vant/weapp/radio/index",
"van-radio-group": "@vant/weapp/radio-group/index",
"nav":"../../../components/nav/nav"
},
"navigationStyle":"custom",
"navigationBarTitleText": "肝胆相照互联网医院"
}
+51
View File
@@ -0,0 +1,51 @@
<!--pages/address/address.wxml-->
<view class="page">
<nav navName="地址管理"></nav>
<scroll-view scroll-y="true" class="hasdata" bindrefresherrefresh="handleRefresher" refresher-triggered="{{isTriggered}}" refresher-threshold="100" refresher-enabled="true">
<view wx:if="{{addressList.length>0}}">
<van-radio-group value="{{address_id}}" bind:change="onChange">
<van-swipe-cell right-width="{{ 65 }}" wx:for="{{addressList}}" wx:key="address_id" bind:close="onCloseAddress" data-id="{{item.address_id}}" async-close>
<van-cell-group >
<view class="list">
<view class="cell" bindtap="selectAddress" data-id="{{item.address_id}}" data-name="{{item.consignee_name}}" data-phone="{{item.consignee_tel}}"
data-province="{{item.province}}"
data-city="{{item.city}}"
data-country="{{item.county}}"
data-address="{{item.address}}"
>
<van-radio wx:if="{{order_prescription_id}}" right="leftcon" name="{{item.address_id}}" checked-color="#3CC7C0;"></van-radio>
<view class="radiowraper" style="width:100%">
<view class="namebox">
<view class="name">{{item.consignee_name}}</view>
<view class="phone">{{item.consignee_tel_mask}}</view>
<view class="moren" wx:if="{{item.is_default==1}}">默认</view>
<!-- 地址标签(1:家 2:公司 3:学校) -->
<view class="type" wx:if="{{item.tag==1}}">家</view>
<view class="type" wx:elif="{{item.tag==2}}">公司</view>
<view class="type" wx:elif="{{item.tag==3}}">学校</view>
<view class="type"wx:elif="{{item.tag==4}}">其他</view>
</view>
<view class="addbox">
<view class="address">{{item.province}}{{item.city}}{{item.county}} {{item.address}}</view>
<view class="editbox" catchtap="goEdit" data-id="{{item.address_id}}">
<image src="{{img_host+'/bianji-2.png'}}" class="edit" ></image></view>
</view>
</view>
</view>
</view>
</van-cell-group>
<view slot="right" class="van-swipe-cell__right" >删除</view>
</van-swipe-cell>
</van-radio-group>
</view>
<view class="nodata" wx:else>
<image src="{{img_host+'/address.png'}}" class="address"></image>
<view class="tips">暂无收货地址哦~</view>
</view>
</scroll-view>
<view class="btnbox">
<view class="btn" bindtap="addAddresss">添加地址</view>
</view>
</view>
<dialog bind:confirm="confirm" showDialog="{{show}}" message="{{message}}"></dialog>
+160
View File
@@ -0,0 +1,160 @@
/* pages/address/address.wxss */
.page{
display: flex;
flex-direction: column;
}
.nodata {
position: relative;
width: 100vw;
flex:1;
margin-bottom: 222rpx;
display: flex;
justify-content: center;
flex-direction: column;
align-items: center;
}
.nodata .address {
display: flex;
flex-wrap: wrap;
width:206rpx;
height: 138rpx;
}
.nodata .tips {
font-size: 24rpx;
color: #999999
}
.btnbox {
position: fixed;
bottom: 0px;
height: 130rpx;
width: 100%;
background: #FFFFFF;
display: flex;
justify-content: center;
align-items: center;
}
.btn {
height: 80rpx;
background: #3CC7C0;
border-radius: 8rpx;
display: flex;
color: #fff;
justify-content: center;
align-items: center;
width: 100%;
margin: 0 32rpx;
}
.hasdata {
flex:1;
margin-top: 192rpx;
overflow-y: scroll;
-webkit-overflow-scrolling: touch;
padding-bottom: 142rpx;
}
.nodata{
margin-top: 172rpx;
}
.namebox {
display: flex;
align-items: center;
}
.rightcon{
display: flex;
}
.label{
display: flex;
}
.addbox {
width:100%;
flex:1;
margin-top: 18rpx;
display: flex;
justify-content: space-between;
}
.list {
padding: 0rpx 32rpx;
background-color: #fff;
}
.list .cell {
width: 100%;
padding: 30rpx 0;
align-items: center;
display: flex;
border-bottom: 1rpx solid #E3E4E5;
}
.namebox .phone,
.namebox .name {
font-size: 34rpx;
display: flex;
align-items: center;
color: #666666;
}
.namebox .phone {
margin-left: 10rpx;
}
.namebox .moren {
width: 94rpx;
height: 50rpx;
align-items: center;
justify-content: center;
color: #FA541C;
font-size: 24rpx;
margin-left: 20rpx;
background: #FFF2E8;
display: flex;
border-radius: 10rpx;
}
.van-swipe-cell__right {
width:65px;
display: flex;
align-items: center;
justify-content: center;
background: #FA541C;
color: #fff;
}
.namebox .type {
width: 94rpx;
height: 50rpx;
background: #3CC7C0;
border-radius: 10rpx;
color: #FFFFFF;
margin-left: 20rpx;
align-items: center;
display: flex;
justify-content: center;
font-size: 24rpx;
}
.addbox .address {
word-break: break-all;
font-size: 36rpx;
color: #333333;
flex:1;
margin-right: 40rpx;
}
.editbox{
margin-top: 10rpx;
display: flex;
justify-content: flex-end;
width: 45rpx;
}
.edit {
width: 32rpx;
height: 32rpx;
flex-shrink: 0;
}
+78
View File
@@ -0,0 +1,78 @@
// pages/agreeList/agreeList.js
const app = getApp();
import {throttle} from "../../../utils/util"
let urlHost=app.hostConfig().agreehost;
Page({
/**
* 页面的初始数据
*/
data: {
img_host:'https://oss.prod.applets.igandanyiyuan.com/applet/patient/static',
},
goRight:throttle(function(){
app.method.navigateTo({
url:"/patient/pages/linkPage/linkPage?url="+encodeURIComponent(urlHost+'/basic/file/agreement.htm?id=5')
})
}),
goAgreement:throttle(function(){
app.method.navigateTo({
url:"/patient/pages/linkPage/linkPage?url="+encodeURIComponent(urlHost+'/basic/file/agreement.htm?id=4')
})
}),
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
this.setData({
img_host:app.hostConfig().imghost
});
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
})
+7
View File
@@ -0,0 +1,7 @@
{
"usingComponents": {
"nav":"../../../components/nav/nav"
},
"navigationStyle":"custom",
"navigationBarTitleText": "肝胆相照互联网医院"
}
+14
View File
@@ -0,0 +1,14 @@
<!--pages/agreeList/agreeList.wxml-->
<view class="page">
<nav navName="资质协议和患者知情同意书"></nav>
<view class="dcellbox">
<view class="dcell" bindtap="goRight">
<view class="name">资质协议</view>
<image src="{{img_host+'/righticon.png'}}" class="righticon"></image>
</view>
<view class="dcell" bindtap="goAgreement">
<view class="name">患者知情同意书</view>
<image src="{{img_host+'/righticon.png'}}" class="righticon"></image>
</view>
</view>
</view>
+29
View File
@@ -0,0 +1,29 @@
/* pages/agreeList/agreeList.wxss */
.page{
overflow: hidden;
display: flex;
flex-direction: column;
}
.dcellbox{
flex:1;
overflow: scroll;
-webkit-overflow-scrolling: touch;
margin-top: 172rpx;
}
.dcell {
width: 100%;
border-bottom: 1px solid #E3E4E5;
box-sizing: border-box;
padding: 0 37rpx 0 20rpx;
display: flex;
align-items: center;
justify-content: space-between;
height: 112rpx;
background: #FFFFFF;
border-radius: 10rpx;
}
.righticon {
width: 24rpx;
height: 48rpx;
}
+81
View File
@@ -0,0 +1,81 @@
// pages/agreement/agreement.js
import {getProject} from "../../../api/checkSugar"
Page({
/**
* 页面的初始数据
*/
data: {
detection_project_id:1,
nodes:''
},
handelGetProject(){
let {detection_project_id}=this.data;
getProject(
detection_project_id
).then(data=>{
this.setData({
nodes:data.informed_consent_form
})
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
if(options.detection_project_id){
this.setData({
detection_project_id:options.detection_project_id
});
this.handelGetProject();
}
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
})
+8
View File
@@ -0,0 +1,8 @@
{
"usingComponents": {
"nav":"../../../components/nav/nav"
},
"navigationStyle":"custom",
"navigationBarTitleText": "风险告知与知情同意书"
}
+5
View File
@@ -0,0 +1,5 @@
<!--pages/agreement/agreement.wxml-->
<nav navName="风险告知与知情同意书"></nav>
<view class="content">
<rich-text nodes="{{nodes}}" space="nbsp"></rich-text>
</view>
+5
View File
@@ -0,0 +1,5 @@
/* pages/agreement/agreement.wxss */
.content{
margin-top: 192rpx;
padding:0 30rpx;
}
+277
View File
@@ -0,0 +1,277 @@
// pages/allotDoctor/allotDoctor.js
const app = getApp()
import {
assignDoctor
} from "../../../api/consult"
import {
doctorDetail,
fllowDoctor,
notfllowDoctor
} from "../../../api/consultExpert"
import {throttle} from "../../../utils/util"
import {cancelOrder} from "../../../api/consultOrder"
Page({
/**
* 页面的初始数据
*/
data: {
order_inquiry_id: "",
doctor_id: '',
showDialog: false,
order_type: '',
fromType:'',
chat_id: '',
time: 0,
timeData: {},
allotCountDown:300000,
countDown:3000,
isAllot: 1, //1分配 //2 分配成功 //3分配超时
isLock: false,
timer: null,
timer2: null,
countTime: 0,
doctor: {
avatar: '',
user_name: '',
doctor_title_name: '',
department_custom_name: '',
hospital: {},
multi_point_status: null,
multi_point_enable:0,
follow: false
},
img_host:'https://oss.prod.applets.igandanyiyuan.com/applet/patient/static'
},
getDeatil(id) {
doctorDetail(id).then((res) => {
let doctor = this.data.doctor;
for (const key in doctor) {
let item=`doctor.${key}`;
if (res[key]) {
this.setData({
[item]: res[key]
})
}
};
})
},
toggleFllow() {
if (this.data.doctor.follow) {
this.handenotfllowDoctor()
} else {
this.handelfllowDoctor()
}
},
handelCancelOrder(){
let { order_inquiry_id, fromType} = this.data;
cancelOrder(order_inquiry_id).then(data=>{
app.method.navigateTo({
url: '/patient/pages/orderDetail/orderDetail?order_inquiry_id='+order_inquiry_id+"&fromType="+fromType,
})
})
},
handelfllowDoctor() {
let id = this.data.doctor_id
fllowDoctor(id).then(data => {
this.setData({
"doctor.follow": true
})
wx.showToast({
title: '关注成功',
icon: "none"
})
})
},
handenotfllowDoctor() {
let id = this.data.doctor_id;
notfllowDoctor(id).then(data => {
this.setData({
"doctor.follow": false
})
wx.showToast({
title: '已取消关注',
icon: "none"
})
})
},
close(event) {
this.handelCancelOrder();
},
confirm(){
this.setData({
showDialog:false
})
},
goDetail:throttle(function(){
let {
order_inquiry_id,
fromType
} = this.data;
app.method.navigateTo({
url: '/patient/pages/orderDetail/orderDetail?order_inquiry_id='+order_inquiry_id+"&fromType="+fromType
})
}),
finished(){
this.goChat();
},
finishedAllot(){
clearTimeout(this.data.timer);
this.setData({
isAllot: 3
})
},
onChangeCountDown(e){
let time=e.detail;
this.setData({
timeData:time
})
if(time.minutes==3 && time.seconds==0)
this.setData({
showDialog: true
})
},
//计算请求时间
countReqTime() {
var timer2 = setInterval(() => {
let countTime = this.data.countTime;
if (this.data.time >= 180000) {
this.setData({
isAllot: 3
})
};
if (this.data.time >= 300000) {
clearTimeout(this.data.timer);
this.setData({
showDialog: true
})
};
let currentTime = this.data.time + 1000;
this.setData({
time: currentTime
})
this.setData({
countTime: ++countTime
});
}, 1000);
this.setData({
timer2: timer2
})
},
//定时发送请求
reqCount(order_id){
var timer = setInterval(() => {
this.handelAssignDoctor(order_id);
}, 10000);
this.setData({
timer: timer
})
},
handelAssignDoctor(id) {
assignDoctor(id).then(data => {
if (data.user_id) {
this.setData({
chat_id: data.user_id,
doctor_id: data.doctor_id,
isAllot: 2
})
this.getDeatil(data.doctor_id);
let {timer, timer2} = this.data;
clearInterval(timer);
clearInterval(timer2);
}
})
},
handleGochat(){
const countDown = this.selectComponent('.control-count-down');
countDown.pause();
this.goChat();
},
goChat(){
let {
order_inquiry_id,
inquiry_type,
chat_id,
fromType
} = this.data;
app.method.navigateTo({
url: '/TUIService/pages/index?currentConversationID=' + chat_id + "&order_inquiry_id=" + order_inquiry_id + "&inquiry_type=" + inquiry_type+"&fromType="+fromType
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
let order_inquiry_id = options.order_inquiry_id;
let inquiry_type = options.inquiry_type;
let order_id = options.order_id;
if(options.fromType){
this.setData({
fromType:options.fromType
})
}
if (order_inquiry_id) {
this.setData({
order_inquiry_id,
order_id,
inquiry_type
})
this.handelAssignDoctor(order_id);
this.reqCount(order_id);
}
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
this.setData({
img_host:app.hostConfig().imghost
});
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
clearInterval(this.data.timer);
clearInterval(this.data.timer2)
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
})
@@ -0,0 +1,9 @@
{
"usingComponents": {
"dialog":"../../../components/dialog/dialog",
"van-count-down": "@vant/weapp/count-down/index",
"nav":"../../../components/nav/nav"
},
"navigationStyle":"custom",
"navigationBarTitleText": "肝胆相照互联网医院"
}
@@ -0,0 +1,48 @@
<!--pages/allotDoctor/allotDoctor.wxml-->
<nav navName="智能分配"></nav>
<view class="page">
<view class="info" wx:if="{{isAllot==1}}">
<image src="{{img_host+'/fenpei.gif'}}" class="dongtu"></image>
<view class="tips">正在为您智能分配医生中~</view>
</view>
<view class="info" wx:elif="{{isAllot==2}}">
<image src="{{img_host+'/waitSuccess.png'}}" class="dongtu"></image>
<view class="tips">已为您成功分配医生</view>
</view>
<view class="info" wx:elif="{{isAllot==3}}">
<image src="{{img_host+'/waitNone.png'}}" class="dongtu"></image>
<view class="tips">很抱歉,因当前服务排队人较多,暂无空闲医生,请您见谅。</view>
</view>
<view class="counttime" wx:if="{{isAllot==1}}">
<van-count-down time="{{allotCountDown}}" use-slot bind:finish="finishedAllot" format="mm ss" bind:change="onChangeCountDown" >
<text class="item">{{ timeData.minutes}}分</text>
<text class="item">{{ timeData.seconds }}秒</text>
</van-count-down>
</view>
<view class="counttime" wx:if="{{isAllot==2}}"><van-count-down class="control-count-down" time="{{countDown }}" format=" ss 秒" bind:finish="finished" /></view>
<view class="orderDetail" wx:if="{{isAllot==3}}" bindtap="goDetail">订单详情</view>
<view class="infobox" hidden="{{!(isAllot==2)}}" bindtap="handleGochat">
<view class="namebox">
<image src="{{doctor.avatar}}" class="head" wx:if="{{doctor.avatar}}" mode="aspectFill"></image>
<image src="{{img_host+'/doctor_avatar.png'}}" class="head" wx:else></image>
<view class="namewraper">
<view class="row">
<view class="name">{{doctor.user_name}}</view>
<view class="type" wx:if="{{doctor.hospital.hospital_level_name != '未知' && doctor.hospital.hospital_level_name}}">{{doctor.hospital.hospital_level_name}}</view>
<view class="type" wx:if="{{doctor.multi_point_status==1 && doctor.multi_point_enable==1}}">可处方</view>
</view>
<view class="hospital"><text class="doctor_title" wx:if="{{doctor.doctor_title_name}}">{{doctor.doctor_title_name}}</text><text>{{doctor.department_custom_name}}</text></view>
<view class="hospital">{{doctor.hospital.hospital_name}}</view>
</view>
<view class="guanzhu" wx:if="{{!doctor.follow}}" catchtap="toggleFllow">
<image src="{{img_host+'/star.png'}}"></image>
<text decode="true">&nbsp;&nbsp;关注</text>
</view>
<view class="guanzhu" wx:else catchtap="toggleFllow">
<image src="{{img_host+'/star_on.png'}}"></image>
<text decode="true">&nbsp;&nbsp;关注</text>
</view>
</view>
</view>
</view>
<dialog bind:confirm="confirm" bind:cancel="close" canceltext="取消问诊" showDialog="{{showDialog}}" message="当前服务排队人较多,暂无空闲医生进行接诊,是否继续等待" confirmtext="继续等待"></dialog>
+164
View File
@@ -0,0 +1,164 @@
/* pages/allotDoctor/allotDoctor.wxss */
.dongtu {
width: 750rpx;
margin: 172rpx auto 0;
height: 850rpx;
}
.item {
display: inline-block;
color: #333;
text-align: center;
border-radius: 2px;
}
.tips {
width: 420rpx;
text-align: center;
font-size: 28rpx;
font-weight: 400;
color: #333333;
margin: -100rpx auto 0;
}
.counttime {
position: absolute;
top: 202rpx;
right: 30rpx;
padding: 0 20rpx;
font-size: 28rpx;
color: #333333;
height: 48rpx;
background: #F8F8F8;
display: flex;
align-items: center;
justify-content: center;
border-radius: 24rpx;
border: 1rpx solid #CCCCCC;
}
.infobox {
width:100%;
bottom: 0;
position: absolute;
z-index: 1;
box-sizing: border-box;
padding: 40rpx 20rpx 40rpx;
background: #FFF5E0;
border-radius: 10rpx;
}
.namebox .head {
flex-shrink: 0;
width: 120rpx;
height: 120rpx;
border-radius: 50%;
}
.namebox {
display: flex;
}
.namewraper {
flex: 1;
max-width:420rpx;
display: flex;
justify-content: space-between;
flex-direction: column;
margin-left: 20rpx;
}
.namebox .row {
display: flex;
align-items: flex-end;
line-height: 40rpx;
}
.namebox {
display: flex;
align-items:center;
justify-content: space-between;
}
.namewraper .row{
margin-left: 20rpx;
}
.namebox .name {
display: inline-block;
overflow: hidden;
max-width:300rpx;
text-overflow: ellipsis;
white-space: nowrap;
font-weight: 600;
color: #333333;
font-size: 34rpx;
}
.position {
font-size: 30rpx;
white-space: normal;
word-break: break-all;
}
.hospital {
margin-left: 20rpx;
margin-top: 12rpx;
color: #333333;
font-size: 30rpx;
white-space: normal;
word-break: break-all;
}
.doctor_title{
margin-right: 10rpx;
}
.type {
height: 32rpx;
display: flex;
margin-bottom: 6rpx;
line-height: 32rpx;
white-space: nowrap;
align-items: center;
margin-left: 18rpx;
padding: 0rpx 6rpx;
background: #ED9C00;
border-radius: 4rpx;
color: #FFFFFF;
font-size: 24rpx;
}
.namebox .position {
font-weight: normal;
white-space: nowrap;
margin-left: 15rpx;
font-size: 30rpx;
}
.guanzhu {
flex-shrink: 0;
display: flex;
height: 60rpx;
white-space: nowrap;
color: #3CC7C0;
font-size: 30rpx;
font-weight: 600;
justify-content: center;
align-items: center;
font-size: 24rpx;
}
.namebox .guanzhu image {
width: 35rpx;
height: 35rpx;
}
.orderDetail {
bottom: 160rpx;
left: 50%;
transform: translateX(-50%);
position: absolute;
width: 360rpx;
height: 70rpx;
display: flex;
align-items: center;
justify-content: center;
border-radius: 10rpx;
border: 2rpx solid #353535;
font-size: 32rpx;
color: #353535;
}
+292
View File
@@ -0,0 +1,292 @@
// pages/applyMedince/applyMedince.js
const app = getApp()
import {
cart,
editCart,
goodList
} from "../../../api/goodsCar"
import {throttle} from "../../../utils/util"
Page({
/**
* 页面的初始数据
*/
data: {
product_keyword: '',
totalNumber: 0,
isFocus:false,
isLock: false,
show: true,
toggle: false,
hideInput: false,
list: [],
cart: [],
toggle: false,
medinceSearchList: [],
img_host:'https://oss.prod.applets.igandanyiyuan.com/applet/patient/static'
},
HandleGoodList() {
let {
product_keyword
} = this.data;
goodList({
product_keyword: product_keyword
}).then(data => {
this.setData({
list: data
})
})
},
getCart() {
cart().then(data => {
let cart = 0;
for (let i = 0; i < data.length; i++) {
cart = cart + data[i].shopping_cart_num;
};
this.setData({
totalNumber: cart
})
})
},
minusGoods(event) {
if (!this.data.isLock) {
this.setData({
isLock:true
})
let index = event.currentTarget.dataset.id;
let shopping_cart_num = this.data.list[index].shopping_cart_num;
let product_id = this.data.list[index].product_id;
if(shopping_cart_num==0){
this.setData({
isLock:false
})
return false
}
--shopping_cart_num;
this.handleEditCart(product_id, shopping_cart_num, index, 'minus');
}
},
addGoods(event) {
if(!this.data.isLock){
this.setData({
isLock:true
})
let index = event.currentTarget.dataset.id;
let shopping_cart_num = this.data.list[index].shopping_cart_num;
let stock = this.data.list[index].stock;
let product_id = this.data.list[index].product_id;
if(shopping_cart_num>=5){
wx.showToast({
title: '每个药品购买数量不超过5个',
icon: "none"
})
this.setData({
isLock:false
})
return false
}
if (shopping_cart_num == stock) {
this.setData({
isLock:false
})
wx.showToast({
title: '该商品库存已不足',
icon: "none"
})
return false
}
++shopping_cart_num;
this.handleEditCart(product_id, shopping_cart_num, index, 'add');
}
},
goBack(){
wx.navigateBack({
delta: 1,
})
},
changeIpt(event){
this.setData({
product_keyword:event.detail.value
})
},
goSearchByBtn(){
this.handleSearch(this.data.product_keyword)
},
handleEditCart(product_id, shopping_cart_num, index, type) {
let item = `list[${index}].shopping_cart_num`;
editCart({
product_id: product_id,
shopping_cart_num: shopping_cart_num
}).then(data => {
let number = this.data.totalNumber;
if (type == "add") {
++number
} else {
--number
};
this.setData({
[item]: shopping_cart_num,
totalNumber: number,
isLock:false
})
})
},
goSearch(event) {
this.setData({
toggle: true,
product_keyword: event.detail.value
});
this.handleSearch(event.detail.value)
},
handleSearch(value) {
if(!value) {
wx.showToast({
title: '搜索内容不能为空',
icon:"none"
})
return false
}
let serachList = wx.getStorageSync('medinceSearchList');
let serachArr = [];
if (serachList) {
serachArr = JSON.parse(serachList);
};
var index = serachArr.indexOf(value);
if (index != -1) {
serachArr.splice(index, 1);
};
if(serachArr.length>=30){
serachArr.pop();
};
serachArr.unshift(value);
wx.setStorageSync('medinceSearchList', JSON.stringify(serachArr));
this.setData({
medinceSearchList: serachArr,
product_keyword:value
})
this.HandleGoodList();
},
selectHistroy(event) {
let value = event.currentTarget.dataset.id;
this.setData({
product_keyword: value,
toggle: true
});
this.handleSearch(value)
},
delSearch() {
wx.setStorageSync('medinceSearchList', '');
this.getSearchList();
wx.showToast({
title: '搜索历史已清空',
icon: 'none'
})
},
getSearchList() {
let serachList = wx.getStorageSync('medinceSearchList');
let serachArr = [];
if (serachList) {
serachArr = JSON.parse(serachList);
};
this.setData({
medinceSearchList: serachArr
})
},
goMedinceList:throttle(function() {
app.method.navigateTo({
url: '/patient/pages/medinceList/medinceList',
})
}),
handleFcous() {
this.setData({
show: false
});
setTimeout(()=>{
this.setData({
isFocus: true
});
this.HandleGoodList('');
},600)
},
// handleIpt(event) {
// if (event.detail.value) {
// this.setData({
// hideInput: true
// })
// } else {
// this.setData({
// hideInput: false
// })
// }
// },
addNumber() {
this.setData({
totalNumber: ++this.data.totalNumber
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
this.setData({
show:true,
img_host:app.hostConfig().imghost
})
this.getSearchList();
this.getCart();
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
})
@@ -0,0 +1,8 @@
{
"usingComponents": {
"van-transition": "@vant/weapp/transition/index",
"nav":"../../../components/nav/nav"
},
"navigationStyle":"custom",
"navigationBarTitleText": "肝胆相照互联网医院"
}
@@ -0,0 +1,74 @@
<!--pages/applyMedince/applyMedince.wxml-->
<nav navName="申请开药"></nav>
<view class="page {{show?'':'active'}}">
<!-- <van-transition show="{{ show }}" custom-style="width:100%;height:auto;"> -->
<view class="wraper" wx:if="{{show}}">
<view class="searchband">
<view class="brandtitle">
<image src="{{img_host+'/blackss.png'}}" class="ssimg"></image>
<view class="name">添加需购买的药品</view>
</view>
<view class="iptbox">
<view class="tipbox" hidden="{{hideInput}}">
<view class="tips">
<view class="title placeholderIpt">请输入药品名称</view>
<image src="{{img_host+'/ss.png'}}" class="ssimg"></image>
</view>
</view>
<input type="text" class="ipt" value="" disabled="{{true}}" bindtap="handleFcous" placeholder="" placeholder-class="placeholderIpt" />
</view>
</view>
</view>
<!-- </van-transition> -->
<!-- <van-transition show="{{ !show }}" name="slide-right" custom-style="width:100%;height:auto;"> -->
<view class="wrapercon" wx:else>
<view class="searchbox">
<input type="text" value="{{product_keyword}}" bindinput="changeIpt" focus="{{isFocus}}" confirm-type="search" bindconfirm="goSearch" placeholder="请输入药品名称" confirm-type="search" placeholder-class="placeholderIpt" />
<image src="{{img_host+'/greenss.png'}}" bindtap="goSearchByBtn"></image>
</view>
<view class="listbox" wx:if="{{medinceSearchList.length>0}}">
<view class="titlebox">
<view class="name">搜索历史</view>
<image src="{{img_host+'/del.png'}}" class="del" bindtap="delSearch"></image>
</view>
<view class="listUl">
<view class="cell" wx:for="{{medinceSearchList}}" wx:for-index="idx" wx:key="idx" bindtap="selectHistroy" data-id="{{item}}"> {{item}} </view>
</view>
</view>
<view class="medincebox" wx:if="{{list.length>0}}">
<view class="cell" wx:for="{{list}}" wx:key="product_id" wx:for-index="index">
<view class="imgbox">
<image src="{{img_host+'/nomedince.png'}}" class="yaoimg"></image>
<view class="desc">
<view class="tip">处方药品</view>
<view class="tip">依据法规不展示包装</view>
</view>
</view>
<view class="rightinfo">
<view class="name">{{item.product_name}}<text class="namenum" wx:if="{{item.product_spec}}">{{item.packaging_unit}})</text></view>
<view class="yaodian">{{item.manufacturer}}</view>
<view class="own">
<view class="company">¥{{item.product_price}}</view>
<view class="handle">
<view class="addbox min" data-id="{{index}}" bindtap="minusGoods">
<image src="{{img_host+'/jian.png'}}" class="add" hidden="{{item.shopping_cart_num==0}}"></image>
</view>
<view class="number" hidden="{{item.shopping_cart_num==0}}">{{item.shopping_cart_num}}</view>
<view class="addbox" bindtap="addGoods" data-id="{{index}}">
<image src="{{img_host+'/add.png'}}" class="add {{item.shopping_cart_num>=5?'disabled':''}}"></image>
</view>
</view>
</view>
</view>
</view>
</view>
<view wx:elif="{{list.length==0 && toggle}}" class="nonedata">暂无数据!</view>
</view>
<!-- </van-transition> -->
<view class="btnbox">
<view class="btn" bindtap="goMedinceList">查看已添加的药品并复诊开方</view>
<view class="bage" hidden="{{totalNumber==0}}">{{totalNumber}}</view>
</view>
</view>
@@ -0,0 +1,294 @@
/* pages/applyMedince/applyMedince.wxss */
.page {
overflow: hidden;
display: flex;
flex-direction: column;
}
.page.active{
background: #fff;
}
.wraper{
margin-top: 172rpx;
width:100%;
}
.wrapercon{
display: flex;
flex-direction: column;
overflow: hidden;
width:100%;
top:172rpx;
position: absolute;
bottom:160rpx;
background-color: #fff;
}
.searchband{
margin:40rpx 32rpx 0;
padding:30rpx;
border-radius: 10rpx;
background:#fff;
}
.iptbox{
margin-top: 30rpx;
position: relative;
}
.ipt{
width:100%;
text-align: center;
height: 68rpx;
background: #FBFBFB;
border-radius: 34rpx;
border: 1rpx solid #3CC7C0;
}
.iptbox .tips{
position: absolute;
display: flex;
height: 70rpx;
width:100%;
align-items: center;
justify-content: center;
}
.tips .title{
margin-right: 10rpx;
}
.brandtitle{
display: flex;
font-size: 34rpx;
color: #333333;
align-items: center;
}
.ssimg{
margin-right: 20rpx;
width:30rpx;
height:30rpx;
}
.searchbox {
margin: 30rpx 32rpx 0;
height: 68rpx;
background: #FBFBFB;
border-radius: 34rpx;
border: 1rpx solid #3CC7C0;
display: flex;
border-radius: 40rpx;
align-items: center;
}
.searchbox input {
margin-left: 30rpx;
flex: 1;
font-size: 32rpx;
height: 80rpx;
}
.searchbox image {
width: 30rpx;
height: 30rpx;
padding:20rpx;
margin-right:8rpx;
}
.titlebox{
margin:30rpx 32rpx 0;
display: flex;
align-items: center;
justify-content: space-between;
}
.titlebox .del{
width:32rpx;
height:32rpx;
}
.titlebox .name{
font-size: 28rpx;
color: #333333;
}
.listUl{
margin:30rpx 32rpx 0;
display: flex;
flex-wrap: wrap;
}
.listUl .cell{
width: 154rpx;
padding:0 10rpx;
box-sizing: border-box;
margin-right: 23rpx;
margin-bottom: 30rpx;
text-align: center;
line-height: 60rpx;
height: 60rpx;
background: #F4F4F4;
border-radius: 30rpx;
font-size: 28rpx;
color: #666666;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
.listUl .cell:nth-child(4n){
margin-right: 0rpx;
}
.btnbox{
position: fixed;
left:32rpx;
right:32rpx;
bottom:40rpx;
height: 94rpx;
background: #3CC7C0;
border-radius: 47rpx;
}
.btnbox .btn{
width:100%;
height: 94rpx;
display: flex;
justify-content: center;
align-items: center;
font-size: 36rpx;
color: #FFFFFF;
}
.bage {
top:3rpx;
position: absolute;
right:76rpx;
padding: 0 10rpx;
height: 36rpx;
display: flex;
align-items: center;
color: #fff;
line-height: 38rpx;
border-radius: 30rpx;
font-size: 26rpx;
background: #EF4F20;
}
.placeholderIpt{
font-size: 28rpx;
font-weight: 400;
color: #999999;
}
.medincebox {
position: relative;
z-index:22;
flex:1;
overflow-y: scroll;
-webkit-overflow-scrolling: touch;
background-color: #fff;
}
.medincebox .cell {
padding: 30rpx 32rpx;
display: flex;
align-items: center;
border-bottom: 1rpx solid #E3E4E5;
}
.medincebox .add{
width:50rpx;
height:50rpx;
}
.medincebox .add.disabled{
opacity: 0.55;
}
.medincebox .cell:nth-last-child(2){
border-bottom:none;
}
.rightinfo {
margin-left: 30rpx;
flex: 1;
display: flex;
flex-direction: column;
justify-content: center;
}
.medincebox .cell .name {
word-break: break-all;
font-size: 32rpx;
font-weight: bold;
color: #333;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
/* 这里是超出几行省略 */
overflow: hidden;
}
.handle{
height:50rpx;
display: flex;
align-items: center;
font-size: 28rpx;
}
.addbox{
display: flex;
align-items: center;
width: 66rpx;
justify-content: flex-start;
}
.addbox.min{
justify-content: flex-end;
}
.handle .number{
width:20rpx;
text-align: center;
margin:0 8rpx;
}
.imgbox {
border-radius:8rpx;
border:1rpx solid #ccc;
width: 200rpx;
height: 200rpx;
display: flex;
align-items: center;
justify-content: center;
position: relative;
}
.yaoimg {
width: 120rpx;
height: 128rpx;
}
.imgbox .desc {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
position: absolute;
top: 50%;
font-size: 22rpx;
font-weight: 400;
color: #666666;
line-height: 30rpx;
transform: translateY(-50%);
}
.imgbox .desc .tip {
text-align: center;
}
.rightinfo .own {
margin-top: 47rpx;
display: flex;
justify-content: space-between;
align-items: center;
font-size: 28rpx;
font-weight: 400;
color: #333333;
}
.namenum{
font-size: 28rpx;
font-weight: 400;
color: #333333;
}
.yaodian{
margin-top: 25rpx;
color:rgba(51, 51, 51, 1);
font-size: 28rpx;
}
.own .company{
font-size: 34rpx;
font-weight: 600;
color: #EF4F20;
}
+183
View File
@@ -0,0 +1,183 @@
// pages/comment/comment.js
import {
commentList
} from "../../../api/consultExpert"
Page({
data: {
value: 3,
page: 1,
isTriggered:false,
lock: false,
evaluation_type: 1,
allList: [],
goodList: [],
commonList: [],
doctor_id: '',
total_quantity: 0,
good_quantity: 0,
bad_quantity: 0,
scrollTop: 0,
offsetTop: 0,
},
onfresh(doctor_id) {
this.setData({
page: 1,
allList: [],
goodList: [],
commonList: [],
lock: false
})
this.getEvaluationList(doctor_id);
},
onScroll(event) {
wx.createSelectorQuery()
.select('#scroller')
.boundingClientRect((res) => {
this.setData({
scrollTop: event.detail.scrollTop,
offsetTop: res.top,
});
})
.exec();
},
handleRefresher(){
this.setData({
page:1,
lock:false,
commonList:[],
allList:[],
goodList:[],
})
this.getEvaluationList();
},
scrolltolower(e) {
let {
lock
} = this.data;
let addPage = this.data.page + 1;
if (!lock) {
this.setData({
page: addPage
});
this.getEvaluationList();
}
},
getEvaluationList() {
let {
evaluation_type,
page,
doctor_id
} = this.data;
commentList({
doctor_id,
page,
per_page: 10,
evaluation_type: evaluation_type
}).then((res) => {
if (res.data.length == 0) {
this.setData({
lock: true,
isTriggered:false
});
return false;
}
if (evaluation_type == 1) {
this.setData({
isTriggered:false,
allList: this.data.allList.concat(res.data)
})
} else if (evaluation_type == 2) {
this.setData({
isTriggered:false,
goodList: this.data.goodList.concat(res.data)
})
} else {
this.setData({
isTriggered:false,
commonList: this.data.commonList.concat(res.data)
})
}
this.setData({
total_quantity: res.total_quantity,
good_quantity: res.good_quantity,
bad_quantity: res.bad_quantity
})
})
},
onChange(event) {
let currentindex = event.detail.index;
let doctor_id = this.data.doctor_id;
if (currentindex == 0) {
this.setData({
evaluation_type: 1
});
} else if (currentindex == 1) {
this.setData({
evaluation_type: 2
});
} else {
this.setData({
evaluation_type: 3
});
}
this.onfresh(doctor_id);
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.setData({
doctor_id: options.doctor_id
})
this.getEvaluationList(options.doctor_id);
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
})
+11
View File
@@ -0,0 +1,11 @@
{
"usingComponents": {
"van-rate": "@vant/weapp/rate/index",
"van-tab": "@vant/weapp/tab/index",
"van-tabs": "@vant/weapp/tabs/index",
"van-sticky": "@vant/weapp/sticky/index",
"nav":"../../../components/nav/nav"
},
"navigationStyle":"custom",
"navigationBarTitleText": "肝胆相照互联网医院"
}
+64
View File
@@ -0,0 +1,64 @@
<!--pages/comment/comment.wxml-->
<nav navName="患者评价"></nav>
<!--pages/comment/comment.wxml-->
<wxs src="../../../filters/filter.wxs" module="filter" />
<view class="page">
<van-tabs class="tabs" tab-class="tabdiv" wrap-class="tabwrap" custom-class="tabbox" line-width="50rpx" tab-active-class="tabactive" title-inactive-color="#1C2023;" line-height="height: 10rpx;" title-active-color="#3CC7C0" color="#3CC7C0" bind:change="onChange">
<van-tab title="全部({{total_quantity}}" class="vantab">
<scroll-view scroll-y class="scrollwraper" bindrefresherrefresh="handleRefresher" refresher-triggered="{{isTriggered}}" refresher-threshold="100" refresher-enabled="true" style="width: 100%;" lower-threshold="100" bindscrolltolower="scrolltolower">
<view class="titlebox">
<view class="title">患者评价<text> ({{total_quantity}})</text></view>
</view>
<view class="listbox" wx:if="{{allList.length>0}}">
<view class="list" wx:for="{{allList}}" wx:key="evaluation_id">
<view class="namebox">
<view class="name">{{item.name_mask}}</view>
<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="date">{{filter.formatDate(item.created_at)}}</view>
</view>
</view>
</scroll-view>
</van-tab>
<van-tab title=" 好评({{good_quantity}}" class="vantab">
<scroll-view scroll-y class="scrollwraper" bindrefresherrefresh="handleRefresher" refresher-triggered="{{isTriggered}}" refresher-threshold="100" refresher-enabled="true" bindscrolltolower="scrolltolower">
<view class="titlebox">
<view class="title">患者评价<text> ({{good_quantity}})</text></view>
</view>
<view class="listbox" wx:if="{{goodList.length>0}}">
<view class="list" wx:for="{{goodList}}" wx:key="evaluation_id">
<view class="namebox">
<view class="name">{{item.name_mask}}</view>
<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="date">{{filter.formatDate(item.created_at)}}</view>
</view>
</view>
</scroll-view>
</van-tab>
<van-tab title="中/差评({{bad_quantity}}" class="vantab">
<scroll-view scroll-y class="scrollwraper" bindrefresherrefresh="handleRefresher" refresher-triggered="{{isTriggered}}" refresher-threshold="100" refresher-enabled="true" lower-threshold="100" bindscrolltolower="scrolltolower">
<view class="titlebox">
<view class="title">患者评价<text> ({{bad_quantity}})</text></view>
</view>
<view class="listbox" wx:if="{{commonList.length>0}}">
<view class="list" wx:for="{{commonList}}" wx:key="evaluation_id">
<view class="namebox">
<view class="name">{{item.name_mask}}</view>
<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="date">{{filter.formatDate(item.created_at)}}</view>
</view>
</view>
<view class="nonedata" wx:else>
暂无评价!
</view>
</scroll-view>
</van-tab>
</van-tabs>
</view>
+161
View File
@@ -0,0 +1,161 @@
/* pages/comment/comment.wxss */
.page{
display: flex;
overflow: hidden;
flex-direction: column;
}
.tabwraper{
flex:1;
overflow: hidden;
margin-top: 172rpx;
}
.nonedata{
width:auto;
box-sizing: border-box;
margin:0 30rpx;
background-color: #fff;
}
.van-tab__pane{
flex:1;
}
.tabbox{
flex:1;
width:100%;
height:100%;
}
.van-tabs{
width:100%;
}
.tabactive{
font-size: 32rpx!important;
}
.viewcell{
display: flex;
overflow: hidden;
box-sizing: border-box;
padding:40rpx 30rpx 30rpx;
border-radius: 10rpx;
background-color: #fff;
margin:0 32rpx 20rpx;
}
.tabdiv{
height:100%;
}
.scrollwraper{
height:100%;
overflow: scroll;
-webkit-overflow-scrolling: touch;
}
.van-tab__pane{
margin-top: 20rpx;
overflow: hidden;
height:calc(100vh - 285rpx)!important;
}
.tabs{
flex:1;
margin-top: 172rpx;
}
.vantab{
display: flex;
overflow-y: hidden;
position: relative;
height:calc(100% - 300rpx);
}
.scrollwraper{
box-sizing: border-box;
border-radius: 10rpx;
}
.titlebox {
display: flex;
padding: 0 20rpx 0rpx;
align-items: center;
justify-content: space-between;
}
.titlebox .title {
margin:0 20rpx;
font-weight: 600;
color: #333333;
font-size: 36rpx;
}
.scrollwraper .titlebox {
border-bottom: 1rpx solid#E7E7E7;
padding: 0 20rpx 30rpx;
}
.titlebox .tag {
height: 40rpx;
border: 1rpx solid #3CC7C0;
padding: 0 25rpx;
display: flex;
align-items: center;
border-radius: 20rpx;
color: #3CC7C0;
font-size: 24rpx;
}
.more{
display: flex;
align-items: center;
}
.listbox{
background-color: #fff;
margin:0 30rpx;
border-radius: 0 0rpx 10rpx 10rpx;
}
.listbox .list:last-child{
border: none;
}
.more text{
color: #333333;
font-size: 28rpx;
margin-right: 10rpx;
}
.more image{
width: 14rpx;
height: 26rpx;
}
.scrollwraper .titlebox{
border-radius:10rpx 10rpx 0 0;
margin:0 30rpx;
background-color: #fff;
padding: 30rpx 0;
}
.title text{
font-size: 28rpx;
font-weight: normal;
color:#666;
}
.list{
padding-top: 30rpx;
padding-bottom: 30rpx;
border-bottom: 1px solid #E7E7E7;
}
.list .namebox{
justify-content: space-between;
margin:0rpx 20rpx 0rpx;
display: flex;
}
.list .namebox .name{
font-weight: normal;
font-size: 28rpx;
color:#666;
}
.commment{
margin:30rpx 20rpx 20rpx;
color: #333333;
font-size: 30rpx;
word-break: break-all;
line-height: 48rpx;
}
.date{
margin:0rpx 20rpx 0rpx;
display: flex;
color: #666666;
font-size: 24rpx;
}
+128
View File
@@ -0,0 +1,128 @@
// pages/commonSick/commonSick.js
import {sickList,hotSickList} from "../../../api/common"
const app=getApp();
Page({
/**
* 页面的初始数据
*/
data: {
list:[],
showKeyboard:false,
isSearch:false,
commonList:[],
img_host:'https://oss.prod.applets.igandanyiyuan.com/applet/patient/static',
keyWord:''
},
getSick() {
let { keyWord }=this.data;
sickList({
disease_class_name:keyWord
}).then((data) => {
this.setData({
list: data
})
})
},
gethotSickList(){
hotSickList().then(data=>{
this.setData({
commonList:data
})
})
},
onfoucs(){
this.setData({
showKeyboard:true,
})
},
goSearch(event){
this.setData({
keyWord:event.detail.value,
isSearch:true,
})
this.getSick()
},
changeIpt(event){
this.setData({
keyWord:event.detail.value,
})
},
handleSearch(){
console.log(111);
this.setData({
isSearch:true,
})
this.getSick()
},
confirmBack(event){
let {id,name}=event.currentTarget.dataset;
let pages = getCurrentPages();
let prevPage = pages[pages.length - 2]; //上一页
prevPage.setData({
prevData:{
disease_class_name:name,
disease_class_id:id
}
});
wx.navigateBack({
delta: 1,
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.gethotSickList();
//this.getSick()
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
this.setData({
img_host:app.hostConfig().imghost
})
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
})
+7
View File
@@ -0,0 +1,7 @@
{
"usingComponents": {
"nav":"../../../components/nav/nav"
},
"navigationStyle":"custom",
"navigationBarTitleText": "肝胆相照互联网医院"
}
+20
View File
@@ -0,0 +1,20 @@
<!--pages/commonSick/commonSick.wxml-->
<nav navName="选择常见疾病"></nav>
<view class="page">
<view class="searchbox">
<input type="text" value="{{keyWord}}" placeholder="请输入所患疾病名称" bindconfirm="goSearch" placeholder-class="searchIpt" bindinput="changeIpt" bindfocus="onfoucs" confirm-type="search">
<keyboard-accessory >
<cover-view class="keycontainer">
<cover-view class="text">常见疾病:</cover-view>
<cover-view class="cell" bindtap="confirmBack" wx:for="{{commonList}}" wx:key="disease_class_id" data-id="{{item.disease_class_id}}" data-name="{{item.disease_class_name}}">{{item.disease_class_name}}</cover-view>
</cover-view>
</keyboard-accessory>
</input>
<image src="{{img_host+'/greenss.png'}}" bindtap="handleSearch"></image>
</view>
<view class="listbox" wx:if="{{list.length>0}}">
<view class="cell" wx:for="{{list}}" bindtap="confirmBack" wx:key="disease_class_id" data-id="{{item.disease_class_id}}" data-name="{{item.disease_class_name}}">{{item.disease_class_name}}</view>
</view>
<view class="nonedata" wx:elif="{{list.length==0 && isSearch}}">暂无数据!</view>
</view>
+78
View File
@@ -0,0 +1,78 @@
/* pages/commonSick/commonSick.wxss */
.page{
background: #fff;
display: flex;
flex-direction: column;
}
.searchbox {
margin:30rpx 30rpx 0;
height: 72rpx;
display: flex;
border-radius: 40rpx;
align-items: center;
margin-top: 192rpx;
background: #FBFBFB;
border-radius: 36px;
border: 1rpx solid #3CC7C0;
}
.searchIpt{
font-size: 28rpx;
font-weight: 400;
color: #999999;
}
.searchbox input {
margin-left: 30rpx;
flex: 1;
font-size: 32rpx;
height: 80rpx;
}
.searchbox image {
width: 30rpx;
height: 30rpx;
padding:30rpx;
}
.listbox{
flex:1;
overflow: scroll;
color:#333;
-webkit-overflow-scrolling: touch;
margin:30rpx 30rpx 0;
}
.listbox .cell{
text-indent:10rpx;
line-height: 75rpx;
font-size: 28rpx;
border-bottom: 1px solid #E3E4E5;
}
.keycontainer{
display: flex;
flex-wrap: wrap;
}
.keycontainer {
padding: 27rpx 24rpx 27rpx;
display: flex;
align-items: center;
background: #FBFBFB;
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(153,153,153,0.5);
}
.keycontainer .text{
color: #333333;
font-size: 34rpx;
margin-bottom: 18rpx;
}
.keycontainer .cell{
height: 60rpx;
background: #F4F4F4;
padding:0 14rpx;
margin-bottom: 18rpx;
display: flex;
font-size: 28rpx;
color: #666666;
align-items: center;
line-height: 60rpx;
justify-content: center;
border-radius: 30rpx;
margin-left: 14rpx;
}
+273
View File
@@ -0,0 +1,273 @@
// pages/consultOrder/consultOrder.js
const app = getApp()
import {cancelOrder,inquiryList} from "../../../api/consultOrder"
import{family} from "../../../api/familyDoc"
Page({
/**
* 页面的初始数据
*/
data: {
time: 0,
changeStatus:'',
changeId:'',
isLoading:true,
selectstatus:false,
selectfamily:false,
delId:'',
option1: [
{ text: '全部订单', value: 0 },
{ text: '待支付', value: 1 },
{ text: '等待接诊', value: 2 },
{ text: '问诊中', value: 3},
{ text: '完成/取消', value: 4},
],
page:1,
isTriggered:false,
pageNumber:10,
option2: [],
inquiry_status: 0,
family_id:0,
orderList:[],
isLock:false,
img_host:'https://oss.prod.applets.igandanyiyuan.com/applet/patient/static',
fromType:''
},
handleRefresher(){
this.setData({
isLock:false,
page:1,
orderList:[]
})
this.getinquiryList();
},
goBack(flag=true){
let {fromType}=this.data;
if(app.globalData.origion==1){
wx.reLaunch({
url: '/pages/index/index',
})
}else if(app.globalData.origion==2){
wx.reLaunch({
url: '/pages/index/index',
})
}else{
if(fromType){
wx.reLaunch({
url: '/pages/my/my',
})
}else{
if(true){
wx.navigateBack({
delta: 1,
fail:function(){
wx.reLaunch({
url: '/pages/index/index',
})
}
})
}
}
}
},
lower(e) {
if(!this.data.isLock){
this.setData({
page: ++this.data.page
})
this.getinquiryList()
}
},
goExpertList(){
app.method.navigateTo({
url: '/patient/pages/expertConsult/expertConsult',
})
},
changeStatus({ detail }){
this.setData({
isLock:false,
page:1,
selectstatus:true,
inquiry_status:detail,
orderList:[]
})
this.getinquiryList()
},
changeFamily({ detail }){
this.setData({
family_id:detail,
isLock:false,
selectfamily:true,
page:1,
orderList:[]
})
this.getinquiryList()
},
getinquiryList(){
let {inquiry_status,family_id,page,pageNumber}=this.data;
this.setData({
isLoading:true
})
inquiryList({
inquiry_status,
family_id,
page,
per_page:pageNumber
}).then(data=>{
let result=data.data;
this.setData({
isLoading:false
})
if(result.length==0){
this.setData({
isLock:true,
isTriggered:false
})
return false
};
this.setData({
orderList:this.data.orderList.concat(result),
isTriggered:false
})
})
},
handelCancelOrder(id){
cancelOrder(id).then(data=>{
wx.showToast({
title: '订单取消成功',
icon:"none"
})
})
},
getfamily(){
family().then(data=>{
let arr=[];
data.forEach((item,index)=>{
arr[index]={};
let sex="";
switch (item.sex){
case '0':sex="未知";
break;
case '1':sex="男";
break;
case '2':sex="女";
break;
}
let age=item.age;
arr[index].text=item.card_name+""+sex+""+age+"";
arr[index].value=item.family_id;
})
arr=[{text:"全部成员",value:0}].concat(arr);
this.setData({
option2:arr
})
this.getinquiryList();
})
},
goDetail(event){
let id=event.currentTarget.dataset.id;
app.method.navigateTo({
url: '/patient/pages/orderDetail/orderDetail?order_inquiry_id='+id,
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
if(options.fromType){
this.setData({
fromType:options.fromType
})
};
if(options.prevData){
let json=JSON.parse(options.prevData);
this.setData({
changeStatus:json.changeStatus,
changeId:json.changesId
});
}
this.getfamily();
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
this.setData({
img_host:app.hostConfig().imghost
});
//刷新列表
let {delId,orderList,changeStatus,changeId}=this.data;
if(delId){
let list=orderList.filter((item)=>{
return item.order_inquiry_id!=delId
})
this.setData({
orderList:list
})
}else if(changeStatus && changeId){
for (let i = 0; i < orderList.length; i++) {
const item =orderList[i];
if(item.order_inquiry_id==changeId){
let currentitem=`orderList[${i}].inquiry_status`
this.setData({
[currentitem]:changeStatus
})
break;
}
}
}else{
// this.setData({
// isLock:false,
// page:1,
// orderList:[]
// })
// this.getinquiryList();
// this.getfamily();
}
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
// this.goBack(false)
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
})
@@ -0,0 +1,11 @@
{
"usingComponents": {
"van-dropdown-menu": "@vant/weapp/dropdown-menu/index",
"van-dropdown-item": "@vant/weapp/dropdown-item/index",
"van-count-down": "@vant/weapp/count-down/index"
},
"navigationStyle":"custom",
"navigationBarTitleText":"肝胆相照互联网医院"
}
@@ -0,0 +1,109 @@
<!--pages/consultOrder/consultOrder.wxml-->
<wxs src="../../../filters/filter.wxs" module="timeModule"></wxs>
<view class="page">
<view class="ui-navigatorbar" style="border-bottom: 1rpx solid #E3E4E5;background:#fff">
<image class="ui-navigatorbar-back" bindtap="goBack" src="{{img_host+'/back.png'}}" />
<view class="ui-title">问诊订单</view>
</view>
<view class="dropdown">
<view class="bar"></view>
<van-dropdown-menu active-color="#3CC7C0">
<van-dropdown-item value="{{ inquiry_status }}" options="{{ option1 }}" title-class="droptitle {{selectstatus?'active':''}}" bind:change="changeStatus" />
<van-dropdown-item value="{{ family_id }}" title-class="droptitle {{selectfamily?'active':''}}" options="{{ option2 }}" bind:change="changeFamily" />
</van-dropdown-menu>
</view>
<scroll-view scroll-y="true" bindrefresherrefresh="handleRefresher" refresher-triggered="{{isTriggered}}" refresher-threshold="100" refresher-enabled="true" class="hasdata" bindscrolltolower="lower" wx:if="{{orderList.length>0}}">
<view class="databox">
<view class="datacell" bindtap="goDetail" wx:for="{{orderList}}" wx:key="order_inquiry_id" data-id="{{item.order_inquiry_id}}">
<view class="titlebox">
<view class="name" wx:if="{{item.inquiry_type==1}}">专家问诊</view>
<view class="name" wx:elif="{{item.inquiry_type==2}}">快速问诊</view>
<view class="name" wx:elif="{{item.inquiry_type==3}}">公益问诊</view>
<view class="name" wx:elif="{{item.inquiry_type==4}}">问诊购药</view>
<view class="name" wx:elif="{{item.inquiry_type==5}}">报告解读</view>
<view class="status" wx:if="{{item.inquiry_status==1 && item.inquiry_pay_status==1}}">
<view class="waitpay">待支付</view>
<view class="countdown">
<van-count-down time="{{timeModule.countDown(item.created_at)}}" />
</view>
</view>
<view class="status" wx:elif="{{item.inquiry_status==2}}">等待接诊</view>
<view class="status" wx:elif="{{item.inquiry_status==3}}">等待接诊</view>
<view class="status" wx:elif="{{item.inquiry_status==4}}">问诊中</view>
<view class="status" wx:elif="{{item.inquiry_status==5}}">问诊完成</view>
<view class="status" wx:elif="{{item.inquiry_status==6}}">问诊结束 </view>
<view class="status" wx:elif="{{item.inquiry_status==7 && item.inquiry_pay_status!=5}}">问诊取消</view>
<view class="status" wx:elif="{{item.inquiry_status==7 && item.inquiry_pay_status==5}}">
<view class="waitpay">支付超时</view>
</view>
</view>
<view class="infobox">
<image src="{{img_host+'/jiezhening.png'}}" class="headicon" wx:if="{{item.inquiry_status==2}}"></image>
<image src="{{item.user_doctor.avatar}}" class="headicon" wx:elif="{{item.inquiry_status!=2 && item.user_doctor.avatar}}" mode="aspectFill"></image>
<image src="{{img_host+'/doctor_avatar.png'}}" class="headicon" wx:else></image>
<view class="namebox">
<view class="name" wx:if="{{item.user_doctor.user_name}}">{{item.user_doctor.user_name}} <text class="position">{{item.user_doctor.doctor_title}}</text></view>
<view class="name" wx:elif="{{item.inquiry_status==2}}">平台分配医生中</view>
<view class="name" wx:else>接诊医生</view>
<view class="hospital" wx:if="{{item.user_doctor.hospital_name}}">
{{item.user_doctor.hospital_name}}
</view>
</view>
</view>
<view class="row first">
<view class="name"><text>就</text><text>诊</text><text>人</text></view>
<view class="dot"></view>
<view class="desc">{{item.patient_name}}<text wx:if="{{item.patient_sex==0}}">未知</text><text wx:if="{{item.patient_sex==1}}">男</text><text wx:else>女</text>{{item.patient_age}}岁)</view>
</view>
<view class="row rowdesc" wx:if="{{item.inquiry_status!=1 }}">
<view class="name">
<text wx:if="{{item.inquiry_type!=5}}"> 病情描述</text>
<text wx:else>检测项目</text>
</view>
<view class="dot"></view>
<view class="desc">
<text wx:if="{{item.inquiry_type!=5}}">{{item.disease_desc}}</text>
<text wx:else>糖组检测</text>
</view>
</view>
<view class="row rowdesc" wx:else>
<view class="name">下单时间</view>
<view class="dot"></view>
<view class="desc">{{item.created_at}}</view>
</view>
<view class="row last" wx:if="{{item.inquiry_status!=1}}">
<view class="left">
<view class="name">下单时间</view>
<view class="dot"></view>
<view class="desc">{{item.created_at}}</view>
</view>
<view class="right">
<view class="detail">详情</view>
<image src="{{img_host+'/righticon.png'}}" class="righticon"> </image>
</view>
</view>
<view class="row last" wx:else>
<view class="left">
<view class="name">待付金额</view>
<view class="dot"></view>
<view class="desc red">¥{{item.payment_amount_total}}</view>
</view>
<view class="right">
<view class="detail">详情</view>
<image src="{{img_host+'/righticon.png'}}"class="righticon"> </image>
</view>
</view>
</view>
</view>
</scroll-view>
<view class="nodata" wx:elif="{{!isLoading && orderList.length==0}}">
<image src="{{img_host+'/noorder.png'}}" class="noorder"></image>
<view class="tips">暂时没有订单记录</view>
<view class="btn" bindtap="goExpertList">专家问诊</view>
</view>
</view>
@@ -0,0 +1,197 @@
/* pages/consultOrder/consultOrder.wxss */
.page {
display: flex;
flex-direction: column;
}
.dropdown {
position: relative;
height:102rpx;
margin-top: 172rpx;
}
.dropdown .bar {
position: absolute;
height: 40rpx;
width: 1rpx;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
background: #ccc;
opacity: 0.9;
}
.van-dropdown-menu {
box-shadow: none !important;
border-bottom: 1rpx solid #E7E7E7;
}
.btn {
position: absolute;
bottom: 20rpx;
left: 32rpx;
right: 32rpx;
display: flex;
height: 94rpx;
background: #3CC7C0;
border-radius: 47rpx;
justify-content: center;
align-items: center;
color: #fff;
background: #3CC7C0;
}
.nodata {
flex: 1;
display: flex;
flex-direction: column;
align-items: center;
}
.noorder {
margin-top: 150rpx;
width: 286rpx;
height: 276rpx;
}
.tips {
font-size: 28rpx;
font-weight: 400;
color: #666666;
}
.hasdata{
flex: 1;
overflow-y: scroll;
-webkit-overflow-scrolling: touch;
margin-top: 20rpx;
}
.datacell{
background:#fff;
padding-bottom: 20rpx;
margin-bottom:10rpx;
}
.datacell:last-child{
margin-bottom: 0;
}
.status{
color: #333333;
font-size: 28rpx;
}
.titlebox .name{
color: #000;
font-size: 32rpx;
}
.titlebox{
padding:0 32rpx;
height: 112rpx;
border-bottom: 1rpx solid #E3E4E5;
display: flex;
justify-content: space-between;
align-items: center;
}
.waitpay{
text-align: right;
color: #EF4F20
}
.headicon{
width:80rpx;
height:80rpx;
flex-shrink: 0;
border-radius: 50%;
}
.van-count-down {
margin-top: 5rpx;
color: #EF4F20!important;
}
.infobox{
padding:20rpx 32rpx 0;
align-items: center;
display: flex;
}
.infobox .name{
margin-left: 30rpx;
font-weight: 600;
}
.hospital{
margin-left: 30rpx;
font-size: 28rpx;
font-weight: 400;
color: #333333;
}
.infobox .position{
font-weight:normal;
}
.row{
align-items: center;
padding:0 32rpx;
display: flex;
line-height: 52rpx
}
.row.first{
margin-top: 15rpx;
}
.row .name{
white-space: nowrap;
font-size: 28rpx;
color:#333;
font-weight: 600;
width:112rpx;
align-items: baseline;
}
.row.first .name{
display: flex;
justify-content: space-between;
}
.row .dot{
align-items: baseline;
height: 52rpx;
font-weight: 600;
display: flex;
}
.row .desc{
align-items: baseline;
font-size: 28rpx;
color:#333;
}
.row .desc.red{
color:rgba(239, 79, 32, 1);
}
.rowdesc{
align-items: flex-start;
}
.rowdesc .desc{
word-break: break-all;
text-overflow: -o-ellipsis-lastline;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
line-clamp: 2;
-webkit-box-orient: vertical
}
.row .price{
color:#EF4F20;
font-weight: bold;
font-size:34rpx
}
.row.last{
justify-content: space-between;
}
.row .left{
display: flex;
}
.row .right{
display: flex;
}
.righticon{
width:24rpx;
height:48rpx;
}
.right .detail{
margin-right: 10rpx;
color: #666666;
}
+456
View File
@@ -0,0 +1,456 @@
// pages/editAddress/editAddress.js
const app = getApp();
import {editAddress,addAddress,getAddressDetail} from "../../../api/address"
import {getProvince,getCity,getCountry} from "../../../api/consultExpert"
let provinceArr=[];
let cityArr=[];
import {throttle} from "../../../utils/util"
Page({
data: {
show: false,
navName:"添加地址",
address_id:'',
isEdit:false,
consignee_name:'',
hideConsignee_name:false,
consignee_tel:'',
hideConsignee_tel:false,
consignee_zip_code:'',
order_prescription_id:'',
area:"",
is_default:0,
address:'',
hideAddress:false,
province_id:'',
province_name:'',
city_id:'',
city_name:'',
county_id:'',
county_name:'',
tag:"",
img_host:'https://oss.prod.applets.igandanyiyuan.com/applet/patient/static',
columns: [
{
values:[],
className: 'column1',
},
{
values: [],
className: 'column2',
defaultIndex: 1,
},
{
values: [],
className: 'column3',
defaultIndex: 1,
}
]
},
/**
* 页面的初始数据
*/
goBack(){
wx.navigateBack({
delta: 1,
})
},
selectTag(event){
let index=event.currentTarget.dataset.tag;
if(index==this.data.tag){
this.setData({
tag:''
})
}else{
this.setData({
tag:index
})
}
},
onConfirm(event) {
const { picker, value, index } = event.detail;
let currentPosition=''
for (let index = 0; index < value.length; index++) {
currentPosition+=value[index].area_name
if(index===0){
this.setData({
province_id:value[index].area_id,
province_name:value[index].area_name
})
}else if(index==1){
this.setData({
city_id:value[index].area_id,
city_name:value[index].area_name
})
}else{
this.setData({
county_id:value[index].area_id,
county_name:value[index].area_name,
consignee_zip_code:value[index].zip
})
}
}
this.setData({
show:false,
area:currentPosition
})
},
onChangePicker(event) {
const { picker, value, index } = event.detail;
if(index===0){
let currentIndex=picker.getIndexes()[0]
this.cityList(provinceArr[currentIndex].area_id);
}else if(index===1){
let currentIndex=picker.getIndexes()[1]
this.countryList(cityArr[currentIndex].area_id);
}
},
onCancel() {
this.setData({
show:false
})
},
provinceList(){
getProvince().then((res)=>{
provinceArr= res;
let province=[];
for (let i = 0; i < res.length; i++) {
province.push(res[i]);
};
this.setData({
'columns[0].values':province,
})
this.cityList(res[0].area_id);
})
},
cityList(area_id){
getCity({
area_id:area_id
}).then((res)=>{
this.isLoding=true;
cityArr=res;
let city=[];
for (let i = 0; i < res.length; i++) {
city.push(res[i]);
};
this.setData({
'columns[1].values':city
})
this.countryList(res[0].area_id);
})
},
countryList(area_id){
getCountry({
area_id:area_id
}).then((res)=>{
let area=[];
for (let i = 0; i < res.length; i++) {
area.push(res[i]);
};
this.setData({
'columns[2].values':area
})
})
},
handleAddress:throttle(function(){
this.data.isEdit?this.handleEditAddress():this.handleAddAddress()
}),
validate(){
if (!/^[\u4E00-\u9FA5A-Za-z0-9_]{2,10}$/.test(this.data.consignee_name)) {
wx.showToast({
title: `姓名要求在2-10个字符`,
icon: 'none',
});
return false;
};
if(!/^1[3456789]\d{9}$/.test(this.data.consignee_tel)){
wx.showToast({
title: `请输入有效的手机号码!`,
icon: 'none',
});
return false;
}
if(!this.data.area){
wx.showToast({
title: `请选择地区`,
icon: 'none',
});
return false;
}
if(!this.data.address){
wx.showToast({
title: `请输入详细地址`,
icon: 'none',
});
return false;
}
return true
},
handleGetAddressDetail(id){
getAddressDetail(id).then(data=>{
for (const key in this.data){
if(data[key]!=undefined){
this.setData({
[key]:data[key]
})
}
};
this.setData({
area:data.province+data.city+data.county,
province_name:data.province,
city_name:data.city,
county_name:data.county
});
if(data.consignee_name){
this.setData({
"hideConsignee_name":true
})
};
if(data.consignee_tel){
this.setData({
"hideConsignee_tel":true
})
};
if(data.address){
this.setData({
"hideAddress":true
})
}
})
},
handleEditAddress(){
let {consignee_name,consignee_tel,consignee_zip_code,is_default,address,province_id,city_id,county_id,tag,address_id,order_prescription_id,province_name,city_name,county_name}=this.data;
let dataObj={};
if(tag){
dataObj={
consignee_name,
consignee_tel,
province_id,
city_id,
county_id,
tag,
consignee_zip_code,
is_default,
address:address
}
}else{
dataObj={
consignee_name,
consignee_tel,
province_id,
city_id,
county_id,
consignee_zip_code,
is_default,
address:address
}
};
if(this.validate()){
editAddress(address_id,dataObj).then(data=>{
wx.showToast({
title:"地址修改成功",
icon:"none"
});
if(order_prescription_id){
let pages = getCurrentPages();
let prevPage = pages[pages.length - 3]; //上上一页
prevPage.setData({
prevData:JSON.stringify({
name:consignee_name,
phone:consignee_tel,
province:province_name,
city:city_name,
country:county_name,
address,
address_id
})
});
wx.navigateBack({
delta: 2,
})
}else{
wx.navigateBack({
delta: 1,
})
}
})
}
},
inputChange(e){
let value=e.currentTarget.dataset.value;
console.log(value)
if(!e.detail.value){
this.setData({
[value]:false,
})
}else{
this.setData({
[value]:true,
})
}
this.setData({
[e.target.dataset.id]: e.detail.value
})
},
handleAddAddress(){
let {consignee_name,consignee_tel,consignee_zip_code,is_default,address,area,province_id,city_id,county_id,tag,order_prescription_id,province_name,city_name,county_name}=this.data;
let dataObj={};
if(tag){
dataObj={
consignee_name,
consignee_tel,
province_id,
city_id,
county_id,
tag,
consignee_zip_code,
is_default,
address:address
}
}else{
dataObj={
consignee_name,
consignee_tel,
province_id,
city_id,
county_id,
consignee_zip_code,
is_default,
address:address
}
};
if(this.validate()){
addAddress(dataObj).then(data=>{
wx.showToast({
title:"地址添加成功",
icon:"none"
});
if(order_prescription_id){
let pages = getCurrentPages();
let prevPage = pages[pages.length - 3]; //上上一页
prevPage.setData({
prevData:JSON.stringify({
name:consignee_name,
phone:consignee_tel,
province:province_name,
city:city_name,
country:county_name,
address,
address_id:data.address_id
})
});
wx.navigateBack({
delta: 2,
})
}else{
wx.navigateBack({
delta: 1,
})
}
})
}
},
onChange({detail}) {
// 需要手动对 checked 状态进行更新
this.setData({
is_default: detail?1:0
});
},
handleClose() {
this.setData({
show: false
})
},
showArea() {
this.setData({
show: true
})
},
handleConfirm(event) {
let arr = event.detail.values;
let add = '';
for (let i = 0; i < arr.length; i++) {
add += arr[i].name;
};
this.setData({
show: false,
area:add
});
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
let address_id=options.address_id;
if(options.order_prescription_id){
this.setData({
order_prescription_id:options.order_prescription_id
})
}
if(address_id){
wx.setNavigationBarTitle({
title: "编辑地址",
});
this.setData({
isEdit:true,
navName:"编辑地址",
address_id
})
this.handleGetAddressDetail(address_id)
}
this.provinceList();
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
this.setData({
img_host:app.hostConfig().imghost
});
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
})
@@ -0,0 +1,10 @@
{
"usingComponents": {
"van-switch": "@vant/weapp/switch/index",
"van-picker": "@vant/weapp/picker/index",
"van-popup": "@vant/weapp/popup/index",
"nav":"../../../components/nav/nav"
},
"navigationStyle":"custom",
"navigationBarTitleText": "肝胆相照互联网医院"
}
@@ -0,0 +1,90 @@
<!--pages/editAddress/editAddress.wxml-->
<nav navName="{{navName}}"></nav>
<view class="page">
<view class="cellbox">
<view class="cell">
<view class="cellrow">
<view class="name">
收 货 人
</view>
<view class="iptbox">
<input type="text" value="{{consignee_name}}" placeholder="" bindinput="inputChange" data-id="consignee_name" placeholder-class="placeholder" data-value="hideConsignee_name" class="ipt" />
<text class="placeholder" hidden="{{hideConsignee_name}}">请输入收货人姓名</text>
</view>
</view>
</view>
<view class="cell">
<view class="cellrow">
<view class="name">
联系电话
</view>
<view class="iptbox">
<input type="text" placeholder="" value="{{consignee_tel}}" bindinput="inputChange" data-id="consignee_tel" placeholder-class="placeholder" data-value="hideConsignee_tel" class="ipt" />
<text class="placeholder" hidden="{{hideConsignee_tel}}">请输入收货人联系电话</text>
</view>
</view>
</view>
<view class="cell">
<view class="cellrow">
<view class="name">
所在地区
</view>
<view class="iptbox" bindtap="showArea">
<input type="text" placeholder="请选择所在地区" value="{{area}}" placeholder-class="placeholdeript" class="ipt" disabled="true" style="margin-right: 4rpx;"/>
<image src="{{img_host+'/righticon.png'}}" class="righticon"></image>
</view>
</view>
</view>
<view class="cell">
<view class="cellrow">
<view class="name">
详细地址
</view>
<view class="iptbox">
<input type="text" placeholder="" value="{{address}}" bindinput="inputChange" data-id="address" placeholder-class="placeholder" data-value="hideAddress" class="ipt" />
<text class="placeholder" hidden="{{hideAddress}}">请填写乡镇街道、楼牌号等</text>
</view>
</view>
</view>
</view>
<view class="bottombox">
<view class="cell">
<view class="row">
<div class="label">标 签 </div>
<view class="tagbox" >
<view class="tag {{tag==1?'active':''}}" bindtap="selectTag" data-tag="1">家</view>
<view class="tag {{tag==2?'active':''}}" bindtap="selectTag" data-tag="2">公司</view>
<view class="tag {{tag==3?'active':''}}" bindtap="selectTag" data-tag="3">学校</view>
<view class="tag {{tag==4?'active':''}}" bindtap="selectTag" data-tag="4">其他</view>
</view>
</view>
</view>
<view class="cell" style="padding:0 32rpx">
<view class="cellrow" >
<view class="name" style="color: #666666;">
设为默认
</view>
<view class="iptbox">
<van-switch checked="{{is_default==1?true:false}}" active-color="#3CC7C0" inactive-color="#f2f2f2" bind:change="onChange" size="26px" />
</view>
</view></view>
</view>
<view class="btn" bindtap="handleAddress">保存地址</view>
</view>
<van-popup
show="{{ show }}"
round
position="bottom"
custom-style="height: 50%"
bind:close="onClose"
>
<van-picker columns="{{ columns }}" show-toolbar
title="选择地区"
columns="{{ columns }}"
value-key="area_name"
bind:cancel="onCancel"
bind:change="onChangePicker"
bind:confirm="onConfirm"/>
</van-popup>
+132
View File
@@ -0,0 +1,132 @@
/* pages/editAddress/editAddress.wxss */
.page{
overflow: hidden;
display: flex;
flex-direction: column;
}
.cellbox{
margin-top:192rpx;
}
.cellbox .cell{
box-sizing: border-box;
background-color: #fff;
align-items: center;
display: flex;
padding:0 32rpx;
}
.cellrow{
height:105rpx;
width:100%;
justify-content: space-between;
align-items: center;
display: flex;
overflow: hidden;
border-bottom:1rpx solid #E3E4E5;
}
.cell:last-child .cellrow{
border-bottom: none;
}
.iptbox{
display: flex;
flex:1;
position: relative;
align-items: center;
justify-content: flex-end;
}
.righticon{
width:24rpx;
height: 48rpx;
}
.name{
font-weight: 500;
display: flex;
color:#333;
font-size: 30rpx;
align-items: center;
white-space: nowrap;
}
.name .red{
margin-top: 20rpx;
color:#E34D59;
}
.placeholdeript{
color: #C5C8CB;
font-size: 28rpx;
}
.placeholder{
top:50%;
transform:translateY(-50%);
z-index:0;
position: absolute;
text-align: right;
height:80rpx!important;
line-height: 80rpx;
font-size: 28rpx;
font-weight: 400;
color: #C5C8CB;
}
.ipt{
position: relative;
z-index:2;
width:100%;
height:40rpx!important;
line-height:40rpx!important;
text-align: right;
color: #666666;
font-size: 28rpx;
}
.bottombox{
margin-top: 20rpx;
flex:1;
background-color: #fff;
}
.row{
display: flex;
padding:68rpx 32rpx 22rpx;
border-bottom: 1rpx solid #E3E4E5;
}
.tagbox{
display: flex;
margin-left: 10rpx;
}
.label{
margin-top: 14rpx;
color: #333333;
font-size: 30rpx;
}
.tag{
width: 114rpx;
height: 58rpx;
background: #fff;
border-radius: 29rpx;
color: #999999;
font-size: 28rpx;
margin-left: 20rpx;
display: flex;
align-items: center;
border: 1rpx solid #999999;
justify-content: center;
}
.tag.active{
background: #3CC7C0;
border: 1rpx solid #3CC7C0;
color:#fff;
}
.btn{
position: absolute;
bottom:20rpx;
left:32rpx;
right:32rpx;
display: flex;
justify-content: center;
align-items: center;
color:#fff;
height: 80rpx;
background: #3CC7C0;
border-radius: 8rpx;
}
@@ -0,0 +1,392 @@
// pages/expertConsult/expertConsult.js
const app = getApp()
import {doctorList,getProvince,getCity,getCountry} from "../../../api/consultExpert"
import {sickType} from "../../../api/common"
let provinceArr=[{area_id:'', area_name: "全国"}];
let cityArr=[];
import {throttle} from "../../../utils/util"
Page({
/**
* 页面的初始数据
*/
data: {
page:1,
pageNumber:10,
isTriggered:false,
show:false,
expertise_id:'',
province_id:'',
city_id:'',
keyword:'',
lock:false,
is_online:0,
sort_order:1,
inquiry_type:0,
inquiry_mode:0,
navName:"专家问诊",
scrollHeight:300,
sickList:[],
img_host:'https://oss.prod.applets.igandanyiyuan.com/applet/patient/static',
option: [
{ text: '综合', value: 1 },
{ text: '响应时间快', value: 2 },
{ text: '价格从低到高', value: 3 },
{ text: '价格从高到低', value: 4 },
{ text: '服务数从多到少', value: 5},
],
overlay:true,
selectkind:false,
selectkarea:false,
position:"全国",
doctorList: [],
triggered: false,
scrollTop: 0,
offsetTop: 0,
columns: [
{
values:[],
className: 'column1',
},
{
values: [],
className: 'column2',
defaultIndex: 1,
}
],
isLoding:false,
tabId:-1
},
goBack(){
wx.navigateBack({
delta: 1,
})
},
toggleOnline(){
this.setData({
is_online:this.data.is_online==0?1:0
})
this.onfresh();
},
onScroll(event) {
wx.createSelectorQuery().select('#scroller')
.boundingClientRect((res) => {
// console.log(event.detail.scrollTop)
let H=0;
if(event.detail.scrollTop>350){
H=0;
}else{
H=300
}
this.setData({
//scrollTop: event.detail.scrollTop,
// offsetTop: res.top,
scrollHeight:H
});
}).exec();
},
transforpage(arr) {
const pages = [];
let L= Math.ceil(arr.length / 2);
arr.forEach((item, index) => {
const page = Math.floor(index / L)
if (!pages[page]) {
pages[page] = []
}
pages[page].push(item)
});
return pages
},
goSearch:throttle(function(){
wx.hideKeyboard();
app.method.navigateTo({
url: '/patient/pages/search/search',
})
}),
switchTab(event){
this.setData({
tabId:event.target.dataset.id,
expertise_id:event.target.dataset.id
})
this.onfresh();
},
changeSorder({ detail }){
this.setData({
sort_order: detail,
selectkind:true
});
this.onfresh();
},
getIptvalue(event){
this.setData({
keyword:event.detail.value
})
this.onfresh();
},
goExpertDetail:throttle(function(event){
app.method.navigateTo({
url: '/patient/pages/expertDetail/expertDetail?doctor_id='+event.currentTarget.dataset.doctorid
})
}),
openCity(){
this.setData({
show:true,
overlay:false
})
},
closeCity(){
this.setData({
show:false,
overlay:true
})
},
onChange(event) {
const { picker, value, index } = event.detail;
if(index===0){
let currentIndex=picker.getIndexes()[0];
if(provinceArr[currentIndex].area_id){
this.cityList(provinceArr[currentIndex].area_id);
}else{
this.setData({
'columns[1].values':[]
})
}
}
},
onConfirm(event) {
const { picker, value, index } = event.detail;
let currentPosition=''
for (let index = 0; index < value.length; index++) {
if(!value[0].area_id){
currentPosition="全国";
this.setData({
province_id:'',
city_id:''
})
}else{
currentPosition+=value[index].area_name;
if(index===0){
this.setData({
province_id:value[index].area_id
})
}else if(index==1){
this.setData({
city_id:value[index].area_id
})
}
}
}
this.setData({
show:false,
selectarea:true,
position:currentPosition
})
this.selectComponent('#item').toggle();
this.onfresh();
},
onCancel() {
this.setData({
show:false
})
this.selectComponent('#item').toggle(false);
},
/**
* 生命周期函数--监听页面加载
*/
getSickType(){
sickType().then((res)=>{
this.setData({
sickList:this.transforpage(res)
})
})
},
handleRefresher(){
this.setData({
lock:false,
page:1,
scrollHeight:300,
doctorList:[]
});
this.getDoctorList()
},
getDoctorList(){
let {expertise_id,province_id, city_id,sort_order,keyword,page,pageNumber,is_online,inquiry_type,inquiry_mode}=this.data;
doctorList({
expertise_id:expertise_id,
province_id:province_id,
city_id:city_id,
sort_order: sort_order,
is_first_online:is_online,
keyword:keyword,
inquiry_type,
inquiry_mode,
page:page,
per_page:pageNumber
}).then((res)=>{
let {doctorList}=this.data;
if(res.data.length==0){
this.setData({
lock:true,
isTriggered:false
});
return false;
}else{
this.setData({
isTriggered:false,
doctorList:doctorList.concat(res.data)
})
}
})
},
provinceList(){
getProvince().then((res)=>{
provinceArr= provinceArr.concat(res);
let province=[{area_id:'', area_name: "全国"}];//
for (let i = 0; i < res.length; i++) {
province.push(res[i]);
};
this.setData({
'columns[0].values':province
})
//this.cityList(province[0].area_id);
})
},
cityList(area_id){
getCity({
area_id:area_id
}).then((res)=>{
cityArr=res;
let city=[];
for (let i = 0; i < res.length; i++) {
city.push(res[i]);
};
this.setData({
'columns[1].values':city,
})
//this.countryList(res[0].area_id);
})
},
countryList(area_id){
getCountry({
area_id:area_id
}).then((res)=>{
let area=[];
for (let i = 0; i < res.length; i++) {
area.push(res[i]);
};
this.setData({
'columns[2].values':area,
isLoding:false
})
})
},
onfresh(){
this.setData({
page:1,
doctorList:[],
lock:false
})
this.getDoctorList();
},
lower(e) {
let {lock}=this.data;
let addPage=this.data.page+1;
if(!lock){
this.setData({
page:addPage
});
this.getDoctorList();
}
},
onLoad(options) {
if(options.type=="free"){
wx.setNavigationBarTitle({
title: "公益问诊"
});
this.setData({
navName:"公益问诊",
inquiry_type:3
})
}
this.getSickType();
this.getDoctorList();
this.provinceList();
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
onRefresh() {
if (this._freshing) return
this._freshing = true
setTimeout(() => {
this.setData({
triggered: false,
})
this._freshing = false
}, 3000)
},
onRestore(e) {
console.log('onRestore:', e)
},
onAbort(e) {
console.log('onAbort', e)
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
this.setData({
img_host:app.hostConfig().imghost
});
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
})
@@ -0,0 +1,13 @@
{
"usingComponents": {
"van-dropdown-menu": "@vant/weapp/dropdown-menu/index",
"van-dropdown-item": "@vant/weapp/dropdown-item/index",
"van-picker": "@vant/weapp/picker/index",
"van-popup": "@vant/weapp/popup/index",
"van-sticky": "@vant/weapp/sticky/index",
"nav":"../../../components/nav/nav"
},
"navigationStyle":"custom",
"disableScroll":true,
"navigationBarTitleText": "肝胆相照互联网医院"
}
@@ -0,0 +1,115 @@
<!--pages/expertConsult/expertConsult.wxml-->
<nav navName="{{navName}}"></nav>
<wxs src="../../../filters/filter.wxs" module="moduleFilter"></wxs>
<view class="wraper">
<view class="containexpert" style="height:{{scrollHeight}}rpx">
<view class="searchbox">
<input type="text" placeholder="输入姓名或医院查找医生" disabled="{{true}}" bindtap="goSearch" bindconfirm="getIptvalue"/>
<image src="{{img_host+'/ss.png'}}"></image>
</view>
<view class="page-section-spacing" >
<scroll-view class="scroll-view_H" scroll-x="true" style="width: 100%">
<view class="row" wx:for="{{sickList}}" wx:for-index="idx" wx:for-item="itemName" wx:key="idx">
<view class="scroll-view-item_H {{tabId==item.expertise_id?'active':''}}" wx:for="{{itemName}}" wx:key="expertise_id" data-id="{{item.expertise_id}}" bindtap="switchTab" >{{item.expertise_name}}</view>
</view>
</scroll-view>
</view>
</view>
<view class="dropdown">
<van-dropdown-menu active-color="#3CC7C0" overlay="{{overlay}}" style="width:66.66%;position: relative;">
<view class="bar"></view>
<van-dropdown-item title-class="droptitle {{selectarea?'active':''}}" title="{{position}}" bind:open="openCity" bind:close="closeCity" id="item" popup-style="itemPop" > </van-dropdown-item>
<view class="dropbar"></view>
<van-dropdown-item title-class="droptitle {{selectkind?'active':''}}" value="{{ sort_order }}" options="{{ option }}" bind:change="changeSorder" />
</van-dropdown-menu>
<view class="dropOnline {{is_online==1?'active':''}}" bindtap="toggleOnline">优先在线</view>
</view>
<view class="scrollwraper">
<scroll-view scroll-y style="width: 100%;height:100%" bindrefresherrefresh="handleRefresher" refresher-triggered="{{isTriggered}}" refresher-threshold="100" refresher-enabled="true" bindscrolltolower="lower" bind:scroll="onScroll" id="scroller" bounces="false">
<view wx:if="{{doctorList.length>0}}">
<view class="viewcell" bindtap="goExpertDetail" wx:for="{{doctorList}}" wx:key="doctor_id" data-doctorid="{{item.doctor_id}}">
<view class="left">
<image src="{{item.avatar}}" wx:if="{{item.avatar}}" mode="aspectFill"></image>
<image src="{{img_host+'/octor_avatar.png'}}" wx:else></image>
<view class="onlinebox" wx:if="{{item.user.is_online==1}}">
<image src="{{img_host+'/online.gif'}}" mode="" class="icon"/>
</view>
</view>
<view class="right">
<view class="namebox">
<view class="name">{{item.user_name}}</view>
<!-- <view class="position" >{{item.doctor_title_name}}</view> -->
<view class="type" wx:if="{{item.hospital.hospital_level_name != '未知'&& item.hospital.hospital_level_name}}">{{item.hospital.hospital_level_name}}</view>
<view class="type" wx:if="{{item.multi_point_status == 1 && moduleFilter.formatChufang(item.doctor_inquiry_config)}}">可处方</view>
</view>
<view class="hospital"><text class="hospital_name" wx:if="{{item.doctor_title_name}}">{{item.doctor_title_name}}</text> <text wx:if="{{item.department_custom_name}}">{{item.department_custom_name}}</text></view>
<view class="hospital"><text class="hospital_name" >{{item.hospital.hospital_name}}</text></view>
<view class="goodjob" wx:if="{{item.be_good_at}}">擅长:{{item.be_good_at}}</view>
<view class="diseaseType" wx:for="{{item.doctor_expertise}}" wx:for-item="cell" wx:key="index">{{cell.expertise_name}}</view>
<view class="detail" wx:if="{{item.is_display_score}}">
<view>评分: <text wx:if="{{item.praise_rate>0}}">{{item.praise_rate}} </text><text wx:else>暂无</text></view>
<view>问诊量: <text wx:if="{{item.served_patients_num>0}}">{{item.served_patients_num}}</text><text wx:else>暂无</text></view>
<view>平均回复: <text wx:if="{{item.avg_response_time>0}}"> {{moduleFilter.formatReply(item.avg_response_time)}}h</text><text wx:else>暂无</text></view>
</view>
<view class="consultbox">
<view class="price" wx:for="{{item.doctor_inquiry_config}}" wx:for-item="itemName" wx:if="{{((itemName.inquiry_type==1 && !(moduleFilter.hasFree(item.doctor_inquiry_config) && itemName.inquiry_mode==1 ) && (itemName.inquiry_mode==1 || itemName.inquiry_mode==2) ) || itemName.inquiry_type==3 && itemName.is_enable==1)}}">
<view class="pricecell" wx:if="{{itemName.inquiry_type==3 }}">图文问诊:<text>¥{{itemName.inquiry_price}}</text><text wx:if="{{moduleFilter.formatPrice(item.doctor_inquiry_config)}}" class="expert_prcie">¥{{moduleFilter.formatPrice(item.doctor_inquiry_config)}}</text></view>
<view class="pricecell" wx:elif="{{itemName.inquiry_type==1 && !(moduleFilter.hasFree(item.doctor_inquiry_config) && itemName.inquiry_mode==1) && (itemName.inquiry_mode==1 || itemName.inquiry_mode==2) }}" > {{itemName.inquiry_mode==1?'图文问诊':itemName.inquiry_mode==2?'视频问诊':'其他问诊'}}<text class="{{(itemName.is_enable==0 && itemName.inquiry_mode==2)?'priceactive':'' }}">¥{{itemName.inquiry_price}}</text></view>
</view>
</view>
</view>
</view>
</view>
<view class="nonedata" wx:else>暂无数据!</view>
<!-- <view class="viewcell">
<view class="left">
<image src="https://img.applets.igandanyiyuan.com/applet/patient/static/home.png"></image>
</view>
<view class="right">
<view class="namebox">
<view class="name">魏胜昭</view>
<view class="position"> 教授</view>
<view class="type">三甲</view>
<view class="type">可处方</view>
</view>
<view class="hospital">首都医科大学佑安医院 <text decode="true">&nbsp;耳鼻科</text></view>
<view class="goodjob">擅长:治疗耳鼻喉疑难病。比如: 人工关节置换、传导性耳聋、人工晶体植入、肾移···</view>
<view class="diseaseType">中西医结合</view>
<view class="detail">
<view>好评率: <text>5 </text> </view>
<view>服务患者数: <text>100</text></view>
<view>平均回复: <text> 0.5h </text></view>
</view>
<view class="consultbox">
<view class="price">公益问诊:<text>¥100</text></view>
<view class="consult">立即咨询</view>
</view>
</view>
</view> -->
</scroll-view>
</view>
</view>
<van-popup
show="{{ show }}"
round
position="bottom"
custom-style="height: 50%"
bind:close="onClose"
>
<van-picker columns="{{ columns }}" loading="{{isLoding}}" show-toolbar
title="选择城市"
columns="{{ columns }}"
value-key="area_name"
bind:cancel="onCancel"
bind:change="onChange"
bind:confirm="onConfirm"/>
</van-popup>
@@ -0,0 +1,281 @@
/* pages/expertConsult/expertConsult.wxss */
.wraper{
height: 100%;
}
.containexpert{
margin-top: 172rpx;
padding: 0 30rpx 0rpx;
overflow: hidden;
position: relative;
transform: all 0.3s ease;
}
.droptitle,.van-ellipsis{
font-size: 30rpx!important;
}
.namebox .name{
max-width:400rpx;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.droptitle.active{
color:#3CC7C0;
}
.searchbox {
width: 100%;
height: 72rpx;
display: flex;
border-radius: 40rpx;
align-items: center;
margin-top: 20rpx;
background: #FBFBFB;
border-radius: 36px;
border: 1rpx solid #CCCCCC;
}
.searchbox input {
margin-left: 30rpx;
flex: 1;
font-size: 32rpx;
height: 80rpx;
}
.searchbox image {
width: 30rpx;
height: 30rpx;
margin-right: 28rpx;
}
.scroll-view_H {
height:195rpx;
white-space: nowrap;
vertical-align: top;
}
.scroll-view-item_H{
/* width: 154rpx; */
padding:0 15rpx;
background: #F4F4F4;
border-radius: 30rpx;
font-size: 28rpx;
color: #666666;
margin-left: 36rpx;
border: 1rpx solid #F4F4F4;
height: 58rpx;
display: inline-block;
text-align: center;
line-height: 58rpx;
}
.page-section-spacing .row{
margin-top: 40rpx;
margin-bottom: 30rpx;
}
.page-section-spacing .row:last-child{
margin-top: 30rpx;
margin-bottom: 10rpx;
}
.scroll-view_H .scroll-view-item_H:first-child{
margin-left: 0rpx;
}
.scroll-view-item_H.active {
background: #E2FFFE;
color: #3CC7C0;
border: 1rpx solid #3CC7C0;
}
.van-dropdown-menu{
box-shadow: none!important;
}
.viewcell{
display: flex;
overflow: hidden;
box-sizing: border-box;
padding:40rpx 30rpx 30rpx;
width:100%;
border-radius: 10rpx;
background-color: #fff;
border-bottom: 1rpx solid #E7E7E7;
}
.viewcell:last-child{
border-bottom: none;
}
.viewcell .type{
height: 32rpx;
margin-bottom: 6rpx;
line-height: 32rpx;
display: flex;
white-space: nowrap;
align-items: center;
margin-left: 18rpx;
padding:0rpx 6rpx;
background: #ED9C00;
border-radius: 4rpx;
color: #FFFFFF;
font-size: 24rpx;
}
.viewcell .hospital{
margin-top: 12rpx;
color: #333333;
display: flex;
font-size: 30rpx;
word-wrap: break-word;
}
.hospital_name{
word-wrap: break-word;
margin-right: 10rpx;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.goodjob{
color: #666666;
margin-top: 28rpx;
line-height: 42rpx;
font-size: 28rpx;
word-break: break-all;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2; /* 这里是超出几行省略 */
overflow: hidden;
}
.price{
font-size: 28rpx;
}
.price text{
margin-left: 5rpx;
font-size: 34rpx;
color:#EF4F20;
}
.viewcell .right{
flex:1;
margin-left: 20rpx;
}
.viewcell image{
width:80rpx;
height:80rpx;
border-radius:50%;
}
.namebox{
display: flex;
font-size: 34rpx;
font-weight: 600;
color:#333;
align-items: flex-end;
}
.namebox .position{
font-weight: normal;
margin-left: 15rpx;
font-size: 30rpx;
}
.dropOnline.active{
color: #3CC7C0;
}
.diseaseType{
height: 40rpx;
background: #E2FFFE;
border-radius: 20rpx;
margin-right: 20rpx;
border: 1rpx solid #3CC7C0;
color: #3CC7C0;
font-size: 24rpx;
display: inline-flex;
text-align: center;
padding:0 15rpx;
align-items: center;
justify-content: center;
margin-top: 20rpx;
white-space: nowrap;
}
.detail{
margin-top: 20rpx;
display: flex;
font-size: 24rpx;
}
.detail view{
margin-right:40rpx;
}
.detail view text{
font-size: 28rpx;
color:#3CC7C0;
}
.consultbox{
height: 60rpx;
margin-top: 28rpx;
display: flex;
align-items: center;
justify-content: space-between;
}
.consult{
height: 60rpx;
background: #3CC7C0;
border-radius: 30rpx;
color: #FFFFFF;
display: flex;
align-items: center;
padding:0 20rpx;
font-size: 30rpx;
}
.wraper{
display: flex;
flex-direction: column;
}
.scrollwraper{
flex: 1;
overflow-y: scroll;
-webkit-overflow-scrolling: touch;
}
.dropdown{
width:100%;
position: relative;
justify-content:center;
align-items: center;
border-bottom: 1rpx solid #E7E7E7;
display: flex;
}
.dropdown .bar{
height:40rpx;
width:1rpx;
left: 50%;
top:50%;
transform: translate(-50%,-50%);
position: absolute;
background:#ccc;
opacity: 0.9;
}
.dropbar{
background:#ccc;
opacity: 0.9;
height:40rpx;
width:1rpx;
position: static;
margin-top: 30rpx;
}
.dropOnline{
display: flex;
justify-content: center;
align-items: center;
width:33.33%;
}
.viewcell .left{
position: relative;
}
.price .expert_prcie{
text-decoration: line-through;
color:#999;
}
.price .expert_prcie .priceactive{
color:#999;
}
.pricecell{
display: flex;
align-items: center;
white-space: nowrap;
}
+409
View File
@@ -0,0 +1,409 @@
// pages/expertDetail/expertDetail.js
const app = getApp()
import {
doctorDetail,
doctorService,
isReceivepatient,
commentList,
fllowDoctor,
notfllowDoctor
} from "../../../api/consultExpert"
import {throttle} from "../../../utils/util"
Page({
/**
* 页面的初始数据
*/
data: {
img_host:'https://oss.prod.applets.igandanyiyuan.com/applet/patient/static',
showDialog:false,
avatar: '',
currentData:0,
user_name: '',
doctor_title: '',
doctor_id: '',
doctor_title_name:'',
user_id:'',
is_online:'0',
avg_response_time: 0,
be_good_at: '',
department_custom_name: '',
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,
iden_auth_status:0,
is_img_expert_reception: 0,
is_img_welfare_reception: 0,
days: 0,
praise_rate: 0,
doctor_inquiry_config: [],
doctor_expertise: [],
value: 3,
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(e){
let {type}=e.currentTarget.dataset;
this.goSelectPatient()
}),
goSelectPatient() {
//判断是否能接诊
this.handleIsReceivepatient();
},
showPop() {
this.setData({
show: true
})
},
goBack(){
wx.navigateBack({
delta: 1,
})
},
toggleFllow(){
if(this.data.follow){
this.handenotfllowDoctor()
}else{
this.handelfllowDoctor()
}
},
notAsk(e){
let {type}=e.currentTarget.dataset
wx.showToast({
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) {
app.method.navigateTo({
url: '/patient/pages/orderDetail/orderDetail?order_inquiry_id=' + id,
})
}
},
handleIsReceivepatient() {
let {doctor_id,inquiry_mode,inquiry_type}=this.data;
isReceivepatient({
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: '/patient/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({
showDialog: true,
id: data.data.order_inquiry_id
})
} else if (recieveStatus == 3) {
wx.showToast({
title: '当前不可问诊',
icon: "none"
})
}
})
},
handelfllowDoctor(){
let id=this.data.doctor_id
fllowDoctor(id).then(data=>{
this.setData({
follow:true
})
wx.showToast({
title: '关注成功',
icon:"none"
})
})
},
handenotfllowDoctor(){
let id=this.data.doctor_id;
notfllowDoctor(id).then(data=>{
this.setData({
follow:false
})
wx.showToast({
title: '已取消关注',
icon:"none"
})
})
},
goComment() {
app.method.navigateTo({
url: '/patient/pages/comment/comment?doctor_id=' + this.data.doctor_id,
})
},
onClose() {
this.setData({
show: false
})
},
getEvaluationList() {
let {doctor_id}=this.data;
commentList({
doctor_id,
evaluation_type:1,
page: 1,
per_page: 3
}).then((res) => {
this.setData({
commentList: res.data,
totalComment:res.total_quantity
})
})
},
loopArr(arr,type){
let inquiry_mode='';
let inquiry_price='';
let recieveStatus='';
let duration='';
let work_num_day=0;
let times_number=0;
let order_inquiry_count=0;
let order_type=type;
for (let i = 0; i < arr.length; i++) {
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;
duration=arr[i].duration;
work_num_day=arr[i].work_num_day;
times_number=arr[i].times_number;
order_inquiry_count=arr[i].order_inquiry_count;
}
}
//如果公益问诊 次数为0 则去看是否有专家问诊
if(type==3 && recieveStatus==0){
for (let i = 0; i < arr.length; i++) {
if(arr[i].inquiry_type==1){
order_type=1;
recieveStatus=arr[i].work_num_day-arr[i].order_inquiry_count;
inquiry_mode=arr[i].inquiry_mode;
inquiry_price=arr[i].inquiry_price;
duration=arr[i].duration;
work_num_day=arr[i].work_num_day;
times_number=arr[i].times_number;
order_inquiry_count=arr[i].order_inquiry_count;
}
}
}
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,
inquiry_price:inquiry_price,
recieveStatus:recieveStatus,
duration,
work_num_day,
times_number,
order_inquiry_count
}
})
},
formatInquiryStatus(arr){
var a='3';
if(arr){
for (var i = 0; i < arr.length; ++i) {
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'
};
}
}
return a
},
getDeatil(id) {
doctorDetail(id).then((res) => {
for (const key in this.data) {
if (res[key]) {
this.setData({
[key]: res[key]
})
}
};
})
},
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
})
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
const scene = options.scene?decodeURIComponent(options.scene):'';
let doctor_id='';
if(scene){
doctor_id=scene.split('=')[1]
}else{
doctor_id=options.doctor_id
};
console.log(options)
this.setData({
doctor_id:doctor_id
})
this.getDeatil(doctor_id);
this.getService(doctor_id);
this.getEvaluationList()
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
this.setData({
img_host:app.hostConfig().imghost
});
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
// onShareTimeline(){
// const {user_name,doctor_title_name,hospital,avatar,img_host,doctor_id}=this.data;
// return {
// title: '【'+ user_name +'】 '+ doctor_title_name+' '+hospital.hospital_name,
// imageUrl:avatar?avatar:img_host+'/doctor_avatar.png',
// query:'doctor_id='+doctor_id
// }
// },
onShareAppMessage() {
const {user_name,doctor_title_name,hospital}=this.data;
return {
title: '【'+ user_name +'】 '+ doctor_title_name+' '+hospital.hospital_name
}
}
/**
* 用户点击右上角分享
*/
})
@@ -0,0 +1,11 @@
{
"usingComponents": {
"van-rate": "@vant/weapp/rate/index",
"van-popup": "@vant/weapp/popup/index",
"dialog":"../../../components/dialog/dialog",
"nav":"../../../components/nav/nav"
},
"navigationStyle":"custom",
"disableScroll":true,
"navigationBarTitleText": "肝胆相照互联网医院"
}
@@ -0,0 +1,348 @@
<wxs src="../../../filters/filter.wxs" module="filter" />
<nav navName="专家详情"></nav>
<view class="contain">
<view class="boxwraper">
<view class="infobox">
<view class="namebox">
<view class="left">
<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="{{img_host+'/online.gif'}}" mode="" class="icon" style="top:100rpx" />
</view>
</view>
<view class="namewraper">
<view class="row">
<view class="name">{{user_name}}</view>
<view class="type" wx:if="{{hospital.hospital_level_name != '未知'&& hospital.hospital_level_name}}">{{hospital.hospital_level_name}}</view>
<view class="type" wx:if="{{multi_point_status == 1 && multi_point_enable==1}}">可处方</view>
</view>
<view class="hospital" ><text wx:if="{{doctor_title_name}}" class="doctor_title">{{doctor_title_name}}</text><text>{{department_custom_name}}</text></view>
<view class="hospital">{{hospital.hospital_name}}</view>
</view>
<view class="guanzhu" wx:if="{{!follow}}" bindtap="toggleFllow">
<image src="{{img_host+'/star.png'}}" ></image>
<text decode="true">&nbsp;&nbsp;关注</text>
</view>
<view class="guanzhu" wx:else bindtap="toggleFllow">
<image src="{{img_host+'/star_on.png'}}" ></image>
<text decode="true">&nbsp;&nbsp;关注</text>
</view>
</view>
<view class="descbox">
<view class="cell">
<view class="number" wx:if="{{praise_rate>0}}">{{praise_rate}}</view>
<view class="nodata" wx:else>暂无</view>
<view class="name">评分</view>
</view>
<view class="cell">
<view class="number" wx:if="{{served_patients_num>0}}">{{served_patients_num}}</view>
<view class="nodata" wx:else>暂无</view>
<view class="name">问诊量</view>
</view>
<view class="cell">
<view class="number" wx:if="{{avg_response_time>0}}">{{filter.formatReply(avg_response_time)}}h</view>
<view class="nodata" wx:else>暂无</view>
<view class="name">平均回复</view>
</view>
<view class="cell">
<view class="number" wx:if="{{number_of_fans>0}}">{{number_of_fans}}</view>
<view class="nodata" wx:else>暂无</view>
<view class="name">关注数</view>
</view>
</view>
<view class="goodjob ellipsis">
{{brief_introduction}}
</view>
<view class="renzhenbox">
<view class="renzhen {{iden_auth_status==1?'active':''}}">
<image src="{{img_host+'/renzheng.png'}}" ></image>
<text>医生信息已认证</text>
</view>
<view class="intro" bindtap="showPop">
<text> 医生简介</text>
<image src="{{img_host+'/jjarrow.png'}}"></image>
</view>
</view>
</view>
<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>
</view>
<view wx:if="{{current_inquiry_config}}">
<view class="wentype" wx:if="{{current_inquiry_config.inquiry_type==1}}">
<image src="{{img_host+'/dr.png'}}"></image>
<image src="{{img_host+'/gou.png'}}" class="gou"></image>
<view class="rightbox">
<view class="name" wx:if="{{current_inquiry_config.inquiry_type==1}}">专家问诊-图文问诊</view>
<view class="price">¥{{current_inquiry_config.inquiry_price}}</view>
</view>
</view>
<view class="wentype freewenzhen" wx:elif="{{current_inquiry_config.inquiry_type==3}}">
<image src="{{img_host+'/freeicon.png'}}" ></image>
<image src="{{img_host+'/huanggou.png'}}" class="gou"></image>
<view class="rightbox">
<view class="name">公益问诊-图文问诊</view>
<view class="pricebox">
<view class="price">¥{{current_inquiry_config.inquiry_price}}</view>
<view class="rest">当前剩余名额: {{current_inquiry_config.work_num_day-current_inquiry_config.order_inquiry_count>0?(current_inquiry_config.work_num_day-current_inquiry_config.order_inquiry_count):0}} 个</view>
</view>
</view>
</view>
<view class="tips" wx:if="{{current_inquiry_config.duration!=0}}">
<image src="{{img_host+'/duihua.png'}}" ></image>
<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> -->
<view class="commentbox" wx:if="{{commentList.length>0}}">
<view class="titlebox">
<view class="title">患者评价<text wx:if="{{commentList.length>0}}"> ({{totalComment}})</text></view>
<view class="more" bindtap="goComment" hidden="{{commentList.length<=0}}">
<text> 查看更多</text>
<image src="{{img_host+'/right.png'}}"></image>
</view>
</view>
<view class="listbox" wx:if="{{commentList.length>0}}">
<view class="list" wx:for="{{commentList}}" wx:key="evaluation_id">
<view class="namebox">
<view class="name">{{item.name_mask}}</view>
<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>
暂无评价!
</view> -->
</view>
</view>
<!-- <view></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>
<view class="popwrper">
<view class="infobox" style="padding: 0rpx 52rpx 0rpx;margin-top: 32rpx;margin-bottom: 0rpx;padding-bottom: 0;">
<view class="namebox" style="justify-content: flex-start;">
<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="namewraper">
<view class="row">
<view class="name">{{user_name}}</view>
<view class="type" wx:if="{{hospital.hospital_level_name != '未知'&& hospital.hospital_level_name}}">{{hospital.hospital_level_name}}</view>
<view class="type" wx:if="{{multi_point_status == 1}}">可处方</view>
</view>
<view class="hospital" ><text wx:if="{{doctor_title_name}}" class="doctor_title">{{doctor_title_name}}</text><text>{{department_custom_name}}</text></view>
<view class="hospital">{{hospital.hospital_name}}</view>
</view>
</view>
<view class="borderbox">
<view class="rowintro">
<image src="{{img_host+'/jianjie.png'}}"></image>
<text>医生简介</text>
</view>
<view class="goodjob" style="margin-top: 0rpx;">
{{brief_introduction}}
</view>
<view class="line"></view>
</view>
<view class="borderbox" hidden="{{doctor_expertise.length<=0}}">
<view class="rowintro">
<image src="{{img_host+'/zhuanchang.png'}}"></image>
<text>医生专长</text>
</view>
<view class="goodat" style="margin-top: 30rpx;">
<scroll-view class="scroll-view_H" scroll-x="true" style="width: 100%">
<view class="cell" wx:for="{{doctor_expertise}}" wx:key="expertise_name">{{item.expertise_name}}</view>
</scroll-view>
</view>
<view class="line"></view>
</view>
<view class="borderbox" wx:if="{{doctor_expertise.length>0}}">
<view class="rowintro">
<image src="{{img_host+'/shanchang.png'}}" ></image>
<text>医生擅长</text>
</view>
<view class="goodjob" style="margin-top:20rpx">{{be_good_at}}</view>
<view class="line"></view>
</view>
</view>
</view>
</van-popup>
<dialog bind:confirm="confirm" showDialog="{{showDialog}}" message="当前存在有未完成的订单,是否前往该订单?"></dialog>
@@ -0,0 +1,656 @@
/* pages/expertDetail/expertDetail.wxss */
.namebox {
display: flex;
}
.namebox .left{
position: relative;
}
.contain {
position: relative;
background: #F2F2F2;
display: flex;
flex-direction: column;
}
.boxwraper{
margin-top: 172rpx;
flex:1;
margin-bottom: 20rpx;
overflow-y:scroll;
-webkit-overflow-scrolling: touch;
}
.tipcon{
display: flex;
justify-content: center;
flex-direction: column;
align-items: flex-start;
}
.tipcon text{
width:100%;
}
.tips .count{
display: inline;
}
.content {
z-index: 0;
left: 0;
position: absolute;
width: 100%;
overflow: hidden;
height: 490rpx;
background: linear-gradient(180deg, #3CC7C0 0%, rgba(255, 255, 255, 0) 100%)
}
.infobox {
position: relative;
z-index: 1;
margin-top: 40rpx;
padding: 22rpx 20rpx 40rpx;
background: #FFFFFF;
border-radius: 10rpx;
}
.namebox .head {
width: 120rpx;
height: 120rpx;
flex-shrink: 0;
border-radius: 50%;
}
.namebox {
display: flex;
}
.namewraper {
flex:1;
min-height: 120rpx;
display: flex;
justify-content: space-between;
flex-direction: column;
margin-left: 20rpx;
}
.namebox .row {
max-width:380rpx;
display: flex;
align-items: flex-end;
width:100%;
}
.namebox {
display: flex;
align-items: center;
justify-content: space-between;
}
.namebox .name {
white-space: nowrap;
font-weight: 600;
color: #333333;
overflow: hidden;
text-overflow: ellipsis;
font-size: 34rpx;
}
.position {
font-size: 30rpx;
white-space: normal;
word-break: break-all;
}
.hospital {
color: #333333;
font-size: 28rpx;
white-space: normal;
word-break: break-all;
}
.type {
height: 32rpx;
display: flex;
margin-bottom: 6rpx;
line-height: 32rpx;
white-space: nowrap;
align-items: center;
margin-left: 18rpx;
padding: 0rpx 6rpx;
background: #ED9C00;
border-radius: 4rpx;
color: #FFFFFF;
font-size: 24rpx;
}
.namebox .position {
font-weight: normal;
white-space: nowrap;
margin-left: 15rpx;
font-size: 30rpx;
}
.guanzhu {
flex-shrink: 0;
display: flex;
height: 60rpx;
white-space: nowrap;
color: #3CC7C0;
font-size: 30rpx;
font-weight: 600;
justify-content: center;
align-items: center;
font-size: 24rpx;
}
.namebox .guanzhu image {
width: 35rpx;
height: 32rpx;
}
.cell .nodata{
color: #999999;
font-size: 32rpx;
font-weight: normal;
}
.descbox {
padding: 0 15rpx;
margin-top: 20rpx;
display: flex;
text-align: center;
justify-content: space-between;
}
.descbox .cell{
display: flex;
flex-direction: column;
justify-content: space-between;
}
.descbox .number {
color: #333333;
font-size: 40rpx;
font-weight: bold;
}
.descbox .name {
margin-top: 15rpx;
color: #999999;
font-size: 24rpx;
}
.goodjob {
color: #666666;
margin-top: 38rpx;
line-height: 42rpx;
font-size: 28rpx;
white-space: pre-line;
word-break: break-all;
}
.renzhenbox {
margin-top: 18rpx;
width: 100%;
display: flex;
justify-content: space-between;
}
.goodat .cell{
height: 60rpx;
display: inline-flex;
border-radius: 30rpx;
align-items: center;
justify-content: center;
font-size: 28rpx;
white-space: nowrap;
color:#333;
margin-left: 20rpx;
padding:0 38rpx;
border: 1rpx solid #CCCCCC;
}
.goodat .cell:first-child{
margin-left: 0;
}
.renzhenbox view {
display: flex;
align-items: center;
}
.renzhenbox .renzhen{
visibility: hidden;
}
.renzhenbox .renzhen.active{
visibility: visible;
}
.renzhen image {
width: 20rpx;
height: 20rpx;
}
.renzhen text {
font-weight: 600;
color: #3CC7C0;
font-size: 24rpx;
margin-left: 10rpx;
}
.intro image {
width: 10rpx;
height: 18rpx;
}
.intro text {
color: #333333;
margin-right: 10rpx;
font-size: 24rpx;
}
.titlebox {
display: flex;
padding: 0 20rpx 0rpx;
align-items: center;
justify-content: space-between;
}
.titlebox .title {
font-weight: 600;
color: #333333;
font-size: 36rpx;
}
.commentbox .titlebox {
border-bottom: 1rpx solid#E7E7E7;
padding: 0 20rpx 30rpx;
}
.titlebox .tag {
transform: rotateZ(360deg);
height: 40rpx;
border: 1rpx solid #3CC7C0;
padding: 0 25rpx;
display: flex;
align-items: center;
border-radius: 20rpx;
color: #3CC7C0;
font-size: 24rpx;
}
.drbox {
border-radius: 10rpx;
margin-top: 20rpx;
padding: 40rpx 0 30rpx;
background-color: #fff;
}
.wentype {
position: relative;
align-items: center;
box-sizing: border-box;
margin: 0 20rpx;
margin-top: 38rpx;
display: flex;
height: 176rpx;
border-radius: 10rpx;
border: 1rpx solid #3CC7C0;
}
.freewenzhen{
border: 1rpx solid #ED9C00
}
.freewenzhen .pricebox{
display: flex;
align-items: center;
}
.pricebox .rest{
margin-left: 30rpx;
font-size: 28rpx;
color:#333;
}
.wentype image{
width:88rpx;
height:94rpx;
margin-left: 52rpx;
}
.freewenzhen image{
margin-left: 20rpx;
width:160rpx;
height:160rpx;
}
.wentype .rightbox{
height:94rpx;
margin-left: 52rpx;
display: flex;
justify-content: space-between;
flex-direction: column;
}
.freewenzhen .rightbox{
margin-left: 22rpx;
}
.rightbox .name{
color: #333333;
font-size: 34rpx;
}
.rightbox .price{
color: #EF4F20;
font-size: 34rpx;
font-weight: 600;
}
.wentype .gou{
position: absolute;
width:97rpx;
height:80rpx;
right:0rpx;
bottom:-1rpx;
}
.tips{
position: relative;
margin:17rpx 20rpx 0;
height:129rpx;
border-radius: 10rpx;
}
.tips view{
z-index:1;
display: flex;
align-items: center;
position: absolute;
left:20rpx;
margin-top: 12rpx;
right:20rpx;
height:129rpx;
line-height: 40rpx;
color: #333333;
font-size: 24rpx;
}
.tips image{
z-index:0;
position: absolute;
width:100%;
height:129rpx;
}
.more{
display: flex;
align-items: center;
}
.commentbox{
margin-top: 20rpx;
padding: 40rpx 0 0;
background-color: #fff;
border-radius: 10rpx;
}
.more text{
color: #333333;
font-size: 28rpx;
margin-right: 10rpx;
}
.more image{
width: 14rpx;
height: 26rpx;
}
.commentbox .titlebox{
padding-bottom: 30rpx;
}
.title text{
font-size: 28rpx;
font-weight: normal;
color:#666;
}
.list{
padding-top: 30rpx;
padding-bottom: 30rpx;
border-bottom: 1px solid #E7E7E7;
}
.list:last-child{
border: none;
}
.list .namebox{
margin:0rpx 20rpx 0rpx;
display: flex;
}
.list .namebox .name{
font-weight: normal;
font-size: 28rpx;
color:#666;
}
.commment{
margin:30rpx 20rpx 20rpx;
color: #333333;
font-size: 30rpx;
word-break: break-all;
line-height: 48rpx;
}
.date{
margin:0rpx 20rpx 0rpx;
display: flex;
color: #666666;
font-size: 24rpx;
}
.ask{
margin-bottom: 20rpx;
height: 94rpx;
background: #3CC7C0;
border-radius: 47rpx;
display: flex;
align-items: center;
color: #FFFFFF;
font-size: 36rpx;
justify-content:center;
}
.noask{
margin-bottom: 20rpx;
height: 94rpx;
background: #dedede;
border-radius: 47rpx;
display: flex;
align-items: center;
color: #fff;
font-size: 36rpx;
justify-content:center;
}
.van-icon-cross{
color:#333;
}
.van-popup__close-icon{
position: absolute!important;
}
.van-popup--bottom
.rowintro{
margin-top: 30rpx;
display: flex;
color: #333333;
font-size: 34rpx;
align-items: center;
}
.rowintro image{
width: 32rpx;
height:35rpx;
}
.rowintro text{
margin-left: 16rpx;
}
.borderbox{
position: relative;
padding-bottom: 30rpx;
}
.borderbox .line{
position: absolute;
left:-52rpx;
right:-52rpx;
height: 1rpx;
bottom:0rpx;
background:#E7E7E7;
}
.borderbox:last-child .line{
display: none;
}
.ellipsis{
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden
}
.goodat{
display: flex;
white-space: nowrap;
}
.scroll-view_H{
display: flex;
}
.popwrper{
position: absolute;
width:100%;
top:0px;
overflow-y: scroll;
-webkit-overflow-scrolling: touch;
bottom:0px;
}
.doctor_title{
margin-right: 10rpx;
}
.close{
z-index:9;
width: 32rpx;
height:32rpx;
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;
}
@@ -0,0 +1,88 @@
// pages/expressMsgList/expressMsgList.js
const app = getApp()
import {logistics} from "../../../api/medinceOrder"
Page({
/**
* 页面的初始数据
*/
data: {
express:null,
logistics_no:'',
img_host:'https://oss.prod.applets.igandanyiyuan.com/applet/patient/static'
},
copy(event){
let text=event.target.dataset.text;
wx.setClipboardData({
data:text
})
},
getLogistics(){
let {logistics_no}=this.data;
logistics(logistics_no).then(data=>{
this.setData({
express:data
})
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
if(options.logistics_no){
this.setData({
logistics_no:options.logistics_no
})
}
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
this.setData({
img_host:app.hostConfig().imghost
});
this.getLogistics();
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
})
@@ -0,0 +1,8 @@
{
"usingComponents": {
"nav":"../../../components/nav/nav",
"van-steps": "@vant/weapp/steps/index"
},
"navigationStyle":"custom",
"navigationBarTitleText": "肝胆相照互联网医院"
}
@@ -0,0 +1,48 @@
<nav navName="物流信息"></nav>
<wxs src="../../../filters/filter.wxs" module="filter"></wxs>
<view class="page">
<view class="expresscon">
<view class="titlebox">
<view class="row">
<view class="name">信息来源:</view>
<view class="desc">{{express.logistics.company_name}}</view>
</view>
<view class="row">
<view class="name">运单编号:</view>
<view class="desc">{{express.logistics.logistics_no}}</view>
<view class="copy" bindtap="copy" data-text="{{express.logistics.logistics_no}}" wx:if="{{express.logistics.logistics_no}}">复制</view>
</view>
</view>
<view class="box">
<view class="expressdesc" wx:if="{{express.logistics.logistics_content.length>0}}">
<view class="line" wx:if="{{express.logistics.logistics_content.length>0}}"></view>
<view class="cell" wx:for="{{express.logistics.logistics_content}}" wx:key="time">
<image src="{{img_host+'/step.png'}}" class="step" wx:if="{{express.logistics.logistics_status==3 && index==0}}"></image>
<view class="circle" wx:else></view>
<view class="date {{index==0?'active':''}}">
<view class="day">{{filter.transforDay(item.ftime,'day')}}</view>
<view class="time">{{filter.transforDay(item.ftime,'HM')}}</view>
</view>
<view class="desc {{index==0?'active':''}}">{{item.context}}</view>
</view>
<!-- <view class="cell">
<image src="../../assets/images/step.png" class="step"></image>
<view class="circle"></view>
<view class="date">
<view class="day">11-07</view>
<view class="time">00:23 </view>
</view>
<view class="desc"> [北京市丰台区马家堡公司】已收入
</view>
</view> -->
</view>
<view class="expressdesc" wx:else>
<view class="tips" style="margin-bottom:40rpx;">
<view class="tip">未查询到物流信息 </view>
<view class="tips">您可以到官网查询详细物流信息</view>
</view>
</view>
</view>
</view>
</view>
@@ -0,0 +1,129 @@
.page{
display: flex;
flex-direction: column;
}
.titlebox{
background-color: #fff;
padding:30rpx 30rpx;
border-bottom:2rpx solid #E3E4E5
}
.expresscon{
flex:1;
margin-top: 192rpx;
overflow: scroll;
-webkit-overflow-scrolling: touch;
}
.row{
display: flex;
align-items: center;
}
.row:first-child{
margin-bottom:20rpx;
}
.copy{
width: 80rpx;
height: 40rpx;
background: #FFFFFF;
border-radius: 20rpx;
border: 1rpx solid #CCCCCC;
display: flex;
justify-content: center;
align-items: center;
font-size: 28rpx;
font-weight: 400;
color: #666666;
margin-left: 20rpx;
}
.box{
background-color: #fff;
overflow: hidden;
}
.expressdesc{
position: relative;
padding:0rpx 30rpx 20rpx;
margin:64rpx 0 0rpx
}
.cell{
position: relative;
display: flex;
min-height:140rpx;
}
.step{
width:38rpx;
height:38rpx;
top:0rpx;
left:95rpx;
position: absolute;
}
.circle{
width:20rpx;
position: absolute;
top:11rpx;
background: #DCDEE0;
left:105rpx;
height:20rpx;
border-radius: 50%;
}
.expressdesc .date{
margin-top: 5rpx;
color: #999999;
}
.expressdesc .date.active{
color: #323233;
}
.expressdesc .day{
white-space: nowrap;
font-size: 30rpx;
}
.line{
top:0;
width: 4rpx;
left:142rpx;
background: #DCDEE0;
bottom:0;
position: absolute;
}
.cell .date{
display: flex;
flex-direction: column;
text-align: right;
justify-content: flex-start;
}
.expressdesc .time{
margin-top: 10rpx;
font-size: 24rpx;
white-space: nowrap;
}
.expressdesc .desc{
margin-left: 80rpx;
font-size: 30rpx;
color:#999;
line-height: 40rpx;
margin-bottom: 40rpx;
}
.expressdesc .desc.active{
color: #323233;
}
.tips {
font-size: 28rpx;
color: #666666;
text-align: center;
}
.tips .tip:first-child{
margin-bottom:25rpx;
}
.go{
margin:30rpx auto;
width: 261rpx;
height: 86rpx;
background: #FFFFFF;
display: flex;
justify-content: center;
align-items: center;
border-radius: 8rpx;
border: 1rpx solid #979797;
}
+98
View File
@@ -0,0 +1,98 @@
// pages/familyDoc/familyDoc.js
const app = getApp()
import {family} from "../../../api/familyDoc"
import {throttle} from "../../../utils/util"
Page({
/**
* 页面的初始数据
*/
data: {
isTriggered:false,
img_host:'https://oss.prod.applets.igandanyiyuan.com/applet/patient/static',
list:[]
},
handleRefresher(){
this.handleFamily();
},
handleFamily(){
family().then(data=>{
this.setData({
isTriggered:false,
list:data
})
})
},
goBack(){
wx.navigateBack({
delta: 1,
})
},
goInfo:throttle(function(){
app.method.navigateTo({
url: '/patient/pages/memberDetail/memberDetail',
})
}),
goMember:throttle(function(event){
let id=event.currentTarget.dataset.id;
app.method.navigateTo({
url: '/patient/pages/memberDetail/memberDetail?family_id='+id,
})
}),
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
this.setData({
img_host:app.hostConfig().imghost
});
this.handleFamily();
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
})
+7
View File
@@ -0,0 +1,7 @@
{
"usingComponents": {
"nav":"../../../components/nav/nav"
},
"navigationStyle":"custom",
"navigationBarTitleText": "肝胆相照互联网医院"
}
+26
View File
@@ -0,0 +1,26 @@
<!--pages/familyDoc/familyDoc.wxml-->
<nav navName="家庭成员"></nav>
<view class="page">
<view class="hasdata">
<scroll-view scroll-y="true" bindrefresherrefresh="handleRefresher" class="scrollbox" refresher-triggered="{{isTriggered}}" refresher-threshold="100" refresher-enabled="true" class="namebox" wx:if="{{list.length>0}}">
<view class="namecell" bindtap="goMember" wx:for="{{list}}" wx:key="family_id" data-id="{{item.family_id}}">
<view class="name">{{item.card_name}}(<text wx:if="{{item.sex==1}}">男</text><text wx:elif="{{item.sex==2}}">女</text><text wx:else>未知</text>{{item.age}}岁)</view>
<image src="{{img_host+'/righticon.png'}}" class="righticon"></image>
</view>
</scroll-view>
<view class="nodata" wx:else>
<image src="{{img_host+'/member.png'}}" class="memberimg"></image>
<view class="tips">当前暂未添加任何家庭成员哦~</view>
<view class="btnbox add nobtn">
<view class="btn" bindtap="goInfo">立即添加</view>
</view>
</view>
<view class="btnbox add" wx:if="{{list.length>0}}">
<view class="btn" bindtap="goInfo">+添加家庭成员</view>
</view>
</view>
</view>
+93
View File
@@ -0,0 +1,93 @@
/* pages/familyDoc/familyDoc.wxss */
.noimg {
width: 206rpx;
height: 100rpx;
}
.scrollbox{
flex:1;
}
.tips {
font-size: 24rpx;
color: #999999;
}
.page{
display: flex;
flex-direction: column;
}
.nodata {
margin-top: 172rpx;
width: 100%;
height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.nodata .btnbox,.hasdata .btnbox{
width:100%;
}
.nodata .btn,.hasdata .btn{
display: flex;
margin: 40rpx 32rpx 0;
box-sizing: border-box;
align-items: center;
height: 80rpx;
background: #3CC7C0;
color: #fff;
font-size: 30rpx;
justify-content: center;
border-radius: 8rpx;
}
.namecell{
display: flex;
margin:0 32rpx;
height: 142rpx;
align-items: center;
padding:0 20rpx 0 30rpx;
background: #FFFFFF;
border-radius: 10rpx;
justify-content: space-between;
}
.hasdata{
flex:1;
margin-top: 172rpx;
overflow: hidden;
position: relative;
display: flex;
flex-direction: column;
}
.namebox{
width:100%;
margin-top: 20rpx;
flex:1;
overflow-y: scroll;
-webkit-overflow-scrolling: touch;
}
.namecell {
margin-bottom: 10rpx;
}
.namecll .name{
font-size: 34rpx;
color: #333333;
}
.righticon{
width:20rpx;
height:40rpx;
}
.add{
background-color: #fff;
margin-bottom: 20rpx;
}
.memberimg{
width:206rpx;
height:100rpx;
}
.nodata .tips{
font-size: 24rpx;
color: #999999;
}
.nobtn{
background-color: transparent;
}
+147
View File
@@ -0,0 +1,147 @@
// pages/fuliMsgList/fuliMsgList.js
const app = getApp()
import { hasRead,getMsg} from "../../../api/msg"
import {throttle} from "../../../utils/util"
Page({
/**
* 页面的初始数据
*/
data: {
list:[],
isLock:false,
isTriggered:false,
page:1,
img_host:'https://oss.prod.applets.igandanyiyuan.com/applet/patient/static',
pageNumber:10
},
handleGo:throttle(function(event){
let link_type=event.currentTarget.dataset.type;
let index=event.currentTarget.dataset.index;
let link_params=event.currentTarget.dataset.params;
let id=event.currentTarget.dataset.id;
let status=event.currentTarget.dataset.status;
hasRead(id).then(data=>{
let currentItem=`list[${index}].read_status`
if(status==0){
this.setData({
[currentItem]:1
})
}
this.goOther(link_type,link_params);
})
}),
goBack(){
wx.navigateBack({
delta: 1,
})
},
lower(){
if(!this.data.isLock){
this.setData({
page:++this.data.page
})
this.handleGetMsg();
}
},
handleRefresher(){
this.setData({
page:1,
list:[],
isLock:false,
})
this.handleGetMsg();
},
handleGetMsg(){
let {page,pageNumber}=this.data;
getMsg({
page:page,
per_page:pageNumber,
notice_system_type:2
}).then(data=>{
let result=data.data;
if(result.length==0){
this.setData({
isLock:true
})
};
this.setData({
isTriggered:false,
list:this.data.list.concat(result)
})
})
},
goOther(link_type,link_params){
let url='';
if(link_type==1){
url= '/TUIService/pages/index?currentConversationID='+link_params.doctor_user_id+'&order_inquiry_id='+link_params.order_inquiry_id+'&inquiry_type='+link_params.inquiry_type;
}else if(link_type==7){
url='/patient/pages/myWelfare/myWelfare'
}else if(link_type==8){
url='/patient/pages/medinceOrder/medinceOrder'
}else if(link_type==9){
url='/patient/pages/medinceOrder/medinceOrder'
}else if(link_type==10){
url='/patient/pages/orderDetail/orderDetail?order_inquiry_id='+link_params.order_inquiry_id
}else if(link_type==12){
}else if(link_type==13){
url='/patient/pages/prescriptDetail/prescriptDetail?order_prescription_id='+link_params.order_prescription_id
};
app.method.navigateTo({
url: url,
})
},
onLoad(options) {
this.handleGetMsg()
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
this.setData({
img_host:app.hostConfig().imghost
});
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
})
@@ -0,0 +1,8 @@
{
"usingComponents": {
"nav":"../../../components/nav/nav"
},
"navigationStyle":"custom",
"navigationBarTitleText": "肝胆相照互联网医院"
}
@@ -0,0 +1,26 @@
<!--pages/fuliMsgList/fuliMsgList.wxml-->
<!-- <view class="ui-navigatorbar" style="background: #FFFFFF;border-bottom: 1rpx solid #E3E4E5;">
<image class="ui-navigatorbar-back" bindtap="goBack" src="{{img_host+'/back.png'}}" />
<view class="ui-title">福利消息</view>
</view> -->
<nav navName="福利消息"></nav>
<view class="page">
<scroll-view scroll-y="true" bindscrolltolower="lower" bindrefresherrefresh="handleRefresher" refresher-triggered="{{isTriggered}}" refresher-threshold="100" refresher-enabled="true" class="cellbox" bindscrolltolower="lower" wx:if="{{list.length>0}}">
<view class="cell" wx:for="{{list}}" data-index="{{index}}" data-id="{{item.notice_id}}" wx:key="notice_id" bindtap="handleGo" data-type="{{item.link_type}}" data-params="{{item.link_params}}" data-status="{{item.read_status}}">
<view class="date">{{item.notice_send_time}}</view>
<view class="board">
<view class="titlebox">
<image src="{{img_host+'/youhuiquan.png'}}" class="icon"></image>
<view class="name">{{item.notice_title}}</view>
<view class="circle" wx:if="{{item.read_status==0}}"></view>
</view>
<view class="detail">{{item.notice_content}}</view>
<view class="bottom">
<view class="look">点击查看</view>
<image src="{{img_host+'/ricon.png'}}" class="righticon"></image>
</view>
</view>
</view>
</scroll-view>
<view class="nonedata" wx:else>暂无数据!</view>
</view>
@@ -0,0 +1,92 @@
/* pages/fuliMsgList/fuliMsgList.wxss */
.page{
display: flex;
flex-direction: column;
overflow: scroll;
-webkit-overflow-scrolling: touch;
}
.cellbox{
flex:1;
overflow-y: scroll;
-webkit-overflow-scrolling: touch;
margin-top: 172rpx;
margin-bottom: 20rpx;
}
.nonedata{
margin-top: 172rpx;
}
.cell{
margin: 30rpx 32rpx 0;
display: flex;
flex-direction: column;
align-items: center;
}
.cell .date{
display: flex;
align-items: center;
height: 40rpx;
font-size: 28rpx;
font-weight: 400;
color: #333333;
padding:0 20rpx;
background: #E1E1E1;
}
.titlebox .icon{
margin-top: 8rpx;
width:60rpx;
height:46rpx;
}
.titlebox{
position: relative;
padding:20rpx;
display: flex;
align-items:flex-start;
border-bottom: 1rpx solid #E7E7E7;
}
.circle{
top:5rpx;
right:10rpx;
width:20rpx;
position: absolute;
height:20rpx;
border-radius: 50%;
background-color: rgba(239, 79, 32, 1);
}
.board{
padding-top:20rpx;
margin-top: 36rpx;
width:100%;
padding-bottom: 30rpx;
background-color: #fff;
border-radius: 10rpx;
}
.board .name{
margin-left: 10rpx;
font-size: 34rpx;
color: #333333;
}
.board .detail{
font-size: 28rpx;
padding:20rpx;
color: #666666;
line-height: 42rpx;
}
.board .bottom{
padding:0 20rpx;
display: flex;
font-size: 28rpx;
font-weight: 400;
color: #333333;
justify-content: space-between;
}
.bottom .righticon{
width:16rpx;
height:32rpx;
}
.nonedata{
min-height:600rpx;
}
.board .titlebox{
align-items: center;
}
+76
View File
@@ -0,0 +1,76 @@
// pages/imgPreview/imgpreview.js
Page({
/**
* 页面的初始数据
*/
data: {
url:''
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
if(options.url){
this.setData({
url:decodeURIComponent(options.url)
});
}
if(options.name){
wx.setNavigationBarTitle({
title: decodeURIComponent(options.name),
})
}
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
// onShareAppMessage() {
// }
})
+3
View File
@@ -0,0 +1,3 @@
{
"usingComponents": {}
}
+2
View File
@@ -0,0 +1,2 @@
<!--pages/imgPreview/imgpreview.wxml-->
<image src="{{url}}" mode="widthFix" class="dcimg" lazy-load/>
+4
View File
@@ -0,0 +1,4 @@
/* pages/imgPreview/imgpreview.wxss */
.dcimg{
width:750rpx;
}
+688
View File
@@ -0,0 +1,688 @@
// pages/inquiryForm/inquiryForm.js
const app = getApp()
import {nation,job} from "../../../api/common"
import {sendFields} from "../../../api/sickRecord"
import {throttle} from "../../../utils/util"
Page({
/**
* 页面的初始数据
*/
data: {
showDialog:false,
obj:{
height:'身高',
weight:'体重',
marital_status:'婚姻状态',
nation_id:'民族',
job_id:'职业',
allergy_history:'是否有过敏史?',
family_history:'是否有家族病史?',
is_pregnant:'是否处于备孕、妊娠、哺乳期?',
is_operation:'是否做过手术?',
drink_wine_status:'是否有饮酒史?',
smoke_status:'是否有吸烟史?',
chemical_compound_status:'是否有接触过化学物?',
diagnosis_hospital:'确诊医院是?',
is_take_medicine:'服用药品是?'
},
showNation:false,
showJob:false,
showMarital:false,
nationname:'',
order_inquiry_id:'',
jobname:'',
hideGuomin:false,
hideFamilysick:false,
hidePregnant:false,
hideOperation:false,
hideChemical:false,
hideHospital:false,
hideDrug:false,
personInfo:{},
showBtn:true,
maritalColumn: [{
text: '未婚',
value: 0
}, {
text: '已婚 ',
value: 1
}, {
text: '离异 ',
value: 2
}],
nationcolumns:[],
jobcolumns:[],
list1:[],
list2:[],
startIndex1:1,
showList:[{
isHas:false,
index:1
},{
isHas:false,
index:2
},{
isHas:false,
index:3
},{
isHas:false,
index:4
},{
isHas:false,
index:5
},{
isHas:false,
index:6
},{
isHas:false,
index:7
},{
isHas:false,
index:8
},{
isHas:false,
index:9
}]
},
handleIpt(e){
let key = e.target.dataset.id;
let obj="personInfo."+key;
if(key=='height' || key=="weight"){
this.setData({
[obj]:e.detail.value
})
}else{
this.setData({
[obj]: e.detail.value
})
}
},
confirmDialog:throttle(function(event){
if(event.detail){
this.handleSend();
}
}),
handleSend(){
const {order_inquiry_id,personInfo,obj}=this.data;
let dataObj={};
for (const key in obj) {
if(personInfo[key] || personInfo[key]==0){
dataObj[key]=personInfo[key];
}
}
let res=Object.assign({},dataObj,personInfo);
sendFields({
order_inquiry_id,
fields:res,
}).then(data=>{
wx.showToast({
title: '发送成功',
icon:'none'
}),
wx.navigateBack()
thi.setData({
showDialog:false
})
})
},
handleSendFields(){
const {order_inquiry_id,personInfo,list1,list2,marital_name,jobname,nationname,obj}=this.data;
console.log(personInfo)
const fields=[];
for (let i = 0; i <list1.length; i++) {
if(list1[i]=='height' && !personInfo.height){
wx.showToast({
title: '请填写身高',
icon:'none'
})
return false
}
if (list1[i]=='height' && personInfo.height) {
if (!/^3[5-9](\.\d+)?$|^[4-9][0-9](\.\d+)?$|^1[0-9][0-9](\.\d+)?$|^2[0-4][0-9](\.\d+)?$|250/.test(personInfo.height)) {
wx.showToast({
title: `请输入范围内身高!`,
icon: 'none',
});
return false;
}
};
if(list1[i]=='weight' && !personInfo.weight){
wx.showToast({
title: '请填写体重',
icon:'none'
})
return false
}
if (list1[i]=='weight' && personInfo.weight) {
if (!/^[2-9](\.\d+)?$|^[1-9][0-9](\.\d+)?$|^1[0-9]{1,2}(\.\d+)?$|200/.test(personInfo.weight)) {
wx.showToast({
title: `请输入范围内体重!`,
icon: 'none',
});
return false;
}
}
if(list1[i]=='marital_status' && !marital_name){
wx.showToast({
title: '请选择婚姻状态',
icon:'none'
})
return false
}
if(list1[i]=='nation_id' && !nationname){
wx.showToast({
title: '请选择民族',
icon:'none'
})
return false
}
if(list1[i]=='job_id' && !jobname){
wx.showToast({
title: '请选择职业',
icon:'none'
})
return false
}
}
for (let i = 0; i < list2.length; i++) {
if( list2[i]=="is_allergy_history"){
if(!personInfo.is_allergy_history && personInfo.is_allergy_history!=0){
wx.showToast({
title: '请选择是否有过敏史',
icon:'none'
})
return false
}
if(personInfo.is_allergy_history==1 && !personInfo.allergy_history){
wx.showToast({
title: '请填写过敏源',
icon:'none'
})
return false
}
}else if(list2[i]=="is_family_history"){
if(!personInfo.is_family_history && personInfo.is_family_history!=0){
wx.showToast({
title: '请选择是否有家族病史',
icon:'none'
})
return false
}
if(personInfo.is_family_history==1 && !personInfo.family_history){
wx.showToast({
title: '请填写家族病史',
icon:'none'
})
return false
}
}else if(list2[i]=="is_pregnant"){
if(!personInfo.is_pregnant && personInfo.is_pregnant!=0){
wx.showToast({
title: '请选择是否处于备孕、妊娠、哺乳期',
icon:'none'
})
return false
}
if(personInfo.is_pregnant==1 && !personInfo.is_pregnant){
wx.showToast({
title: '请填写请描述您目前所处阶段,如备孕中、哺乳期中、妊娠月份',
icon:'none'
})
return false
}
}else if(list2[i]=="is_operation"){
if(!personInfo.is_operation && personInfo.is_operation!=0){
wx.showToast({
title: '请选择是否做过手术',
icon:'none'
})
return false
}
if(personInfo.is_operation==1 && !personInfo.operation){
wx.showToast({
title: '请描述具体手术名称和做手术医院',
icon:'none'
})
return false
}
}else if(list2[i]=="drink_wine_status"){
if(!personInfo.drink_wine_status){
wx.showToast({
title: '请选择是否有饮酒史',
icon:'none'
})
return false
}
}else if(list2[i]=="smoke_status"){
if(!personInfo.smoke_status){
wx.showToast({
title: '请选择是否有吸烟史',
icon:'none'
})
return false
}
}else if(list2[i]=="chemical_compound_status"){
if(!personInfo.chemical_compound_status){
wx.showToast({
title: '是否有接触过化学物',
icon:'none'
})
return false
}
if(personInfo.chemical_compound_status && personInfo.chemical_compound_status!=1 && !personInfo.chemical_compound_describe){
wx.showToast({
title: '请详细填写接触过的相关化学物',
icon:'none'
})
return false
}
}else if(list2[i]=="diagnosis_hospital"){
if(!personInfo.diagnosis_hospital){
wx.showToast({
title: '请填写确诊医院名称',
icon:'none'
})
return false
}
}else if(list2[i]=="is_take_medicine"){
if(!personInfo.is_take_medicine && personInfo.is_take_medicine!=0){
wx.showToast({
title: '请填写是否正在服药',
icon:'none'
})
return false
}
if(personInfo.is_take_medicine==1 && !personInfo.drugs_name){
wx.showToast({
title: '请填服药名称',
icon:'none'
})
return false
}
}
}
this.setData({
showDialog:true
})
},
openMaritalPicker() {
wx.hideKeyboard();
if(this.data.showBtn){
this.setData({
showMarital: true
})
}
},
closeMaritalPicker() {
this.setData({
showMarital: false
})
},
onConfirmMaritalPicker(event) {
const {
value
} = event.detail;
this.setData({
showMarital: false,
marital_name:value.text,
'personInfo.marital_status':value.value
})
},
onChangeRadio(event) {
let key = event.target.dataset.id;
let obj= "personInfo."+key;
this.setData({
[obj]:Number(event.detail)
});
if(key=="chemical_compound_status" && event.detail==1){
this.setData({
"personInfo.chemical_compound_describe":''
})
}else if(event.detail==0){
if(key=="is_allergy_history"){
this.setData({
"personInfo.allergy_history":'',
hideGuomin:false
})
};
if(key=="is_pregnant"){
this.setData({
"personInfo.pregnant":'',
hidePregnant:false
})
}
if(key=="is_family_history"){
this.setData({
"personInfo.family_history":'',
hideFamilysick:false
})
}
if(key=="is_take_medicine"){
this.setData({
"personInfo.drugs_name":'',
hideDrug:false
})
}
}
},
handelFocus(e) {
let key = e.target.dataset.id;
let value = e.target.dataset.value;
let obj="personInfo."+value;
if (!e.detail.value) {
this.setData({
[key]: false,
[obj]: e.detail.value
})
} else {
this.setData({
[key]: true,
[obj]: e.detail.value
})
}
},
onConfirmNation(event) {
const {
value
} = event.detail;
this.setData({
"nationname": `${value.nation_name}`,
"personInfo.nation_id": `${value.nation_id}`,
showNation: false
})
},
showNation() {
wx.hideKeyboard();
if(this.data.showBtn){
this.setData({
showNation: true
})
}
},
onCancelNation() {
this.setData({
showNation: false
})
},
onConfirmJob(event) {
const {
value
} = event.detail;
this.setData({
"jobname": `${value.job_name}`,
"personInfo.job_id": `${value.job_id}`,
showJob: false
})
},
showJob() {
wx.hideKeyboard();
if(this.data.showBtn){
this.setData({
showJob: true
})
}
},
onCancelJob() {
this.setData({
showJob: false
})
},
commonMethods(arr1,arr2){
this.setData({
list1:arr1,
list2:arr2
});
let count=0;
arr2.forEach((item)=>{
if(item=="allergy_history"){
count++;
this.setData({
'showList[0].isHas':true,
'showList[0].index':1
})
}else if(item=="family_history"){
count++;
this.setData({
'showList[1].isHas':true,
'showList[1].index':count
})
}else if(item=="is_pregnant"){
count++;
this.setData({
'showList[2].isHas':true,
'showList[2].index':count
})
}else if(item=="is_operation"){
count++;
this.setData({
'showList[3].isHas':true,
'showList[3].index':count
})
}else if(item=="drink_wine_status"){
count++;
this.setData({
'showList[4].isHas':true,
'showList[4].index':count
})
}else if(item=="smoke_status"){
count++;
this.setData({
'showList[5].isHas':true,
'showList[5].index':count
})
}else if(item=="chemical_compound_status"){
count++;
this.setData({
'showList[6].isHas':true,
'showList[6].index':count
})
}else if(item=="diagnosis_hospital"){
count++;
this.setData({
'showList[7].isHas':true,
'showList[7].index':count
})
}else if(item=="is_take_medicine"){
count++;
this.setData({
'showList[8].isHas':true,
'showList[8].index':count
})
}
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.getNation();
this.getJob();
if(options.order_inquiry_id){
this.setData({
order_inquiry_id:options.order_inquiry_id
})
}
if(options.case_filled_fields){
let data=JSON.parse(options.case_filled_fields);
let arr1=[];
let arr2=[];
this.setData({
personInfo:data,
showBtn:false
});
if(data.is_allergy_history==1){
this.setData({
hideGuomin:true
})
}
if(data.is_family_history==1){
this.setData({
hideFamilysick:true
})
}
if(data.is_operation==1){
this.setData({
hideOperation:true
})
}
if(data.is_pregnant==1){
this.setData({
hidePregnant:true
})
}
if(data.chemical_compound_status && data.chemical_compound_status!=1){
this.setData({
hideChemical:true
})
}
if(data.diagnosis_hospital){
this.setData({
hideHospital:true
})
}
if(data.is_take_medicine==1){
this.setData({
hideDrug:true
})
}
let {maritalColumn,jobcolumns,nationcolumns}=this.data;
if(data.marital_status==0 || data.marital_status){
let select=maritalColumn.filter(item=>{return item.value==data.marital_status});
this.setData({
'marital_name':select[0].text
})
};
Object.keys(data).forEach(function(key){
if(key=="weight" || key=="height" || key=="marital_status" || key=="nation_id" || key=="job_id"){
arr1.push(key);
}else{
arr2.push(key);
}
})
this.commonMethods(arr1,arr2);
}
if(options.params){
let data=JSON.parse(options.params);
let {obj}=this.data;
let arr1=[];
let arr2=[];
data.forEach(item => {
if(item=="weight" || item=="height" || item=="marital_status" || item=="nation_id" || item=="job_id"){
arr1.push(item);
}else{
arr2.push(item);
}
})
this.commonMethods(arr1,arr2);
}
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
getNation(){
nation().then(data=>{
this.setData({
nationcolumns:data
})
let {personInfo}=this.data;
if(personInfo.nation_id || personInfo.nation_id==0){
let select=data.filter(item=>{return item.nation_id==personInfo.nation_id});
this.setData({
'nationname':select[0].nation_name
})
}
})
},
getJob(){
job().then(data=>{
this.setData({
jobcolumns:data
})
let {personInfo}=this.data;
if(personInfo.job_id || personInfo.job_id==0){
let select=data.filter(item=>{return item.job_id==personInfo.job_id});
this.setData({
'jobname':select[0].job_name
})
}
})
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
this.setData({
img_host:app.hostConfig().imghost
});
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
@@ -0,0 +1,14 @@
{
"usingComponents": {
"van-picker": "@vant/weapp/picker/index",
"van-radio": "@vant/weapp/radio/index",
"van-datetime-picker": "@vant/weapp/datetime-picker/index",
"van-popup": "@vant/weapp/popup/index",
"van-radio-group": "@vant/weapp/radio-group/index",
"dialog":"../../../components/dialog/dialog",
"nav":"../../../components/nav/nav"
},
"navigationStyle":"custom",
"disableScroll": true,
"navigationBarTitleText": "问诊表"
}
+253
View File
@@ -0,0 +1,253 @@
<!--pages/inquiryForm/inquiryForm.wxml-->
<wxs src="../../../filters/filter.wxs" module="filter"></wxs>
<nav navName="问诊表"></nav>
<view class="page">
<view class="pagecon">
<view class="questionbox">
<view class="cellbox" wx:if="{{list1.length>0}}">
<view class="basictitle">基本信息</view>
<view class="cell" wx:if="{{filter.formatwenzhenList(list1,'height').ISHAS}}">
<view class="cellrow">
<view class="name">
{{filter.formatwenzhenList(list1,'height').NUMBER}}、身高(CM
</view>
<view class="iptbox">
<input type="text" value="{{personInfo.height}}" bindinput="handleIpt" data-id="height" placeholder="请输入身高" placeholder-class="placeholder" class="ipt" disabled="{{!showBtn}}" />
</view>
</view>
</view>
<view class="cell" wx:if="{{filter.formatwenzhenList(list1,'weight').ISHAS}}">
<view class="cellrow">
<view class="name">
{{filter.formatwenzhenList(list1,'weight').NUMBER}}、体重(KG
</view>
<view class="iptbox">
<input type="text" value="{{personInfo.weight}}" bindinput="handleIpt" data-id="weight" placeholder="请请输入体重" placeholder-class="placeholder" class="ipt" disabled="{{!showBtn}}" />
</view>
</view>
</view>
<view class="cell" wx:if="{{filter.formatwenzhenList(list1,'marital_status').ISHAS}}" bindtap="openMaritalPicker">
<view class="cellrow">
<view class="name">
{{filter.formatwenzhenList(list1,'marital_status').NUMBER}}、婚姻状况
</view>
<view class="iptbox">
<input type="text" value="{{marital_name}}" bindinput="handleIpt" data-id="name" placeholder="请选择婚姻状况" placeholder-class="placeholder" class="ipt" disabled="{{true}}" />
<image src="{{img_host+'/righticon.png'}}" class="righticon"></image>
</view>
</view>
</view>
<view class="cell" wx:if="{{filter.formatwenzhenList(list1,'nation_id').ISHAS}}" bindtap="showNation">
<view class="cellrow">
<view class="name">
{{filter.formatwenzhenList(list1,'nation_id').NUMBER}}、民族
</view>
<view class="iptbox">
<input type="text" value="{{nationname}}" bindinput="handleIpt" data-id="name" placeholder="请选择民族" placeholder-class="placeholder" class="ipt" disabled="{{true}}" />
<image src="{{img_host+'/righticon.png'}}" class="righticon"></image>
</view>
</view>
</view>
<view class="cell" wx:if="{{filter.formatwenzhenList(list1,'job_id').ISHAS}}" bindtap="showJob">
<view class="cellrow">
<view class="name">
{{filter.formatwenzhenList(list1,'job_id').NUMBER}}、职业
</view>
<view class="iptbox">
<input type="text" value="{{jobname}}" bindinput="handleIpt" data-id="name" placeholder="请请选择职业" placeholder-class="placeholder" class="ipt" disabled="{{true}}" />
<image src="{{img_host+'/righticon.png'}}" class="righticon"></image>
</view>
</view>
</view>
</view>
<view class="cellbox" wx:if="{{list2.length>0}}">
<view class="basictitle">个人情况</view>
<view class="sickHis">
<view class="list">
<view class="qa" wx:if="{{showList[0].isHas}}">
<view class="num">{{showList[0].index}}、</view>
<view class="titlebox">
<view class="title">您是否有过敏史?</view>
<view class="radio" >
<van-radio-group disabled="{{!showBtn}}" value="{{ filter.numberTOstring(personInfo.is_allergy_history) }}" class="singlegroup" data-id="is_allergy_history" bind:change="onChangeRadio" direction="horizontal">
<van-radio name="1" checked-color="#3cc7c0">是</van-radio>
<van-radio name="0" checked-color="#3cc7c0">否</van-radio>
</van-radio-group>
</view>
<!-- hidden="{{checkGuomin!=1}}" -->
<view class="radiotip" hidden="{{personInfo.is_allergy_history!=1}}">
<textarea placeholder=" " show-confirm-bar="{{false}}" cursor-spacing="70" confirm-type="done" bindinput="handelFocus" disabled="{{!showBtn}}" value="{{personInfo.allergy_history}}" data-id="hideGuomin" data-value="allergy_history"></textarea>
<view class="textbox" hidden="{{hideGuomin}}">
<view class="desc"><text>过敏史:</text>请填写过敏源,如药物,请写出药名;如食物,请写具体如鸡蛋、牛奶等(限制50个字)</view>
</view>
</view>
</view>
</view>
<view class="qa" wx:if="{{showList[1].isHas}}">
<view class="num">{{showList[1].index}}、</view>
<view class="titlebox">
<view class="title">您是否有家族病史?</view>
<view class="radio">
<van-radio-group disabled="{{!showBtn}}" class="singlegroup" value="{{filter.numberTOstring(personInfo.is_family_history)}}" data-id="is_family_history" bind:change="onChangeRadio" direction="horizontal">
<van-radio name="1" checked-color="#3cc7c0">是</van-radio>
<van-radio name="0" checked-color="#3cc7c0">否</van-radio>
</van-radio-group>
</view>
<view class="radiotip" hidden="{{personInfo.is_family_history!=1}}">
<textarea placeholder=" " disabled="{{!showBtn}}" show-confirm-bar="{{false}}" cursor-spacing="70" confirm-type="done" bindinput="handelFocus" value="{{personInfo.family_history}}" data-id="hideFamilysick" data-value="family_history"></textarea>
<view class="textbox" hidden="{{hideFamilysick}}">
<view class="desc"><text>家族病史:</text>请详细填写相关家族病史(限制50个字)</view>
</view>
</view>
</view>
</view>
<view class="qa" wx:if="{{showList[2].isHas}}">
<view class="num">{{showList[2].index}}、</view>
<view class="titlebox">
<view class="title">您是否处于备孕、妊娠、哺乳期?</view>
<view class="radio">
<van-radio-group disabled="{{!showBtn}}" value="{{ filter.numberTOstring(personInfo.is_pregnant) }}" bind:change="onChangeRadio" data-id="is_pregnant" direction="horizontal" class="singlegroup">
<van-radio name="1" checked-color="#3cc7c0">是</van-radio>
<van-radio name="0" checked-color="#3cc7c0">否</van-radio>
</van-radio-group>
</view>
<view class="radiotip" hidden="{{personInfo.is_pregnant!=1}}">
<textarea placeholder=" " disabled="{{!showBtn}}" show-confirm-bar="{{false}}" cursor-spacing="70" confirm-type="done" bindinput="handelFocus" value="{{personInfo.pregnant}}" data-id="hidePregnant" data-value="pregnant"></textarea>
<view class="textbox" hidden="{{hidePregnant}}">
<view class="desc">请描述您目前所处阶段,如备孕中、哺乳期中、妊娠月份。(限制50个字)</view>
</view>
</view>
</view>
</view>
<view class="qa" wx:if="{{showList[3].isHas}}">
<view class="num">{{showList[3].index}}、</view>
<view class="titlebox">
<view class="title">是否做过手术</view>
<view class="radio">
<van-radio-group disabled="{{!showBtn}}" value="{{ filter.numberTOstring(personInfo.is_operation) }}" data-id="is_operation" bind:change="onChangeRadio" direction="horizontal" class="singlegroup">
<van-radio name="1" checked-color="#3cc7c0">是</van-radio>
<van-radio name="0" checked-color="#3cc7c0">否</van-radio>
</van-radio-group>
</view>
<view class="radiotip" hidden="{{personInfo.is_operation !=1}}">
<textarea placeholder=" " disabled="{{!showBtn}}" show-confirm-bar="{{false}}" cursor-spacing="70" confirm-type="done" bindinput="handelFocus" value="{{personInfo.operation}}" data-id="hideOperation" data-value="operation"></textarea>
<view class="textbox" hidden="{{hideOperation}}">
<view class="desc">请描述具体手术名称和做手术医院</view>
</view>
</view>
</view>
</view>
<view class="qa" wx:if="{{showList[4].isHas}}">
<view class="num">{{showList[4].index}}、</view>
<view class="titlebox">
<view class="title">是否有饮酒史</view>
<view class="radio">
<van-radio-group disabled="{{!showBtn}}" value="{{ filter.numberTOstring(personInfo.drink_wine_status) }}" data-id="drink_wine_status" bind:change="onChangeRadio" direction="horizontal" class="group">
<van-radio name="1" checked-color="#3cc7c0">从不</van-radio>
<van-radio name="2" checked-color="#3cc7c0">偶尔</van-radio>
<van-radio name="3" checked-color="#3cc7c0">经常</van-radio>
<van-radio name="4" checked-color="#3cc7c0">每天</van-radio>
<van-radio name="5" checked-color="#3cc7c0">已戒酒</van-radio>
</van-radio-group>
</view>
</view>
</view>
<view class="qa" wx:if="{{showList[5].isHas}}">
<view class="num">{{showList[5].index}}、</view>
<view class="titlebox">
<view class="title">是否有吸烟史</view>
<view class="radio">
<van-radio-group disabled="{{!showBtn}}" value="{{ filter.numberTOstring(personInfo.smoke_status) }}" data-id="smoke_status" bind:change="onChangeRadio" direction="horizontal" class="group">
<van-radio name="1" checked-color="#3cc7c0">从不</van-radio>
<van-radio name="2" checked-color="#3cc7c0">偶尔</van-radio>
<van-radio name="3" checked-color="#3cc7c0">经常</van-radio>
<van-radio name="4" checked-color="#3cc7c0">每天</van-radio>
<van-radio name="5" checked-color="#3cc7c0">已戒烟</van-radio>
</van-radio-group>
</view>
</view>
</view>
<view class="qa" wx:if="{{showList[6].isHas}}">
<view class="num">{{showList[6].index}}、</view>
<view class="titlebox">
<view class="title">是否有接触过化学物</view>
<view class="radio">
<van-radio-group disabled="{{!showBtn}}" value="{{filter.numberTOstring(personInfo.chemical_compound_status)}}" data-id="chemical_compound_status" bind:change="onChangeRadio" direction="horizontal" class="group">
<van-radio name="1" checked-color="#3cc7c0">从不</van-radio>
<van-radio name="2" checked-color="#3cc7c0">偶尔</van-radio>
<van-radio name="3" checked-color="#3cc7c0">经常</van-radio>
<van-radio name="4" checked-color="#3cc7c0">每天</van-radio>
</van-radio-group>
</view>
<view class="radiotip" wx:if="{{(personInfo.chemical_compound_status!=1 && personInfo.chemical_compound_status)}}">
<textarea placeholder=" " disabled="{{!showBtn}}" show-confirm-bar="{{false}}" cursor-spacing="70" confirm-type="done" value="{{personInfo.chemical_compound_describe}}" bindinput="handelFocus" data-id="hideChemical" data-value="chemical_compound_describe"></textarea>
<view class="textbox" hidden="{{hideChemical}}">
<view class="desc"><text>化学物:</text>请详细填写接触过的相关化学物(限制50个字)</view>
</view>
</view>
</view>
</view>
<view class="qa" wx:if="{{showList[7].isHas}}">
<view class="num">{{showList[7].index}}、</view>
<view class="titlebox">
<view class="title">确诊医院是?</view>
<view class="radiotip" >
<textarea placeholder=" " disabled="{{!showBtn}}" show-confirm-bar="{{false}}" cursor-spacing="70" confirm-type="done" bindinput="handelFocus" value="{{personInfo.diagnosis_hospital}}" data-id="hideHospital" data-value="diagnosis_hospital"></textarea>
<view class="textbox" hidden="{{hideHospital}}">
<view class="desc"><text></text>请填写确诊医院名称</view>
</view>
</view>
</view>
</view>
<view class="qa" wx:if="{{showList[8].isHas}}">
<view class="num">{{showList[8].index}}、</view>
<view class="titlebox">
<view class="title">是否正在服药?</view>
<view class="radio">
<van-radio-group disabled="{{!showBtn}}" value="{{ filter.numberTOstring(personInfo.is_take_medicine) }}" data-id="is_take_medicine" bind:change="onChangeRadio" direction="horizontal" class="singlegroup">
<van-radio name="1" checked-color="#3cc7c0">是</van-radio>
<van-radio name="0" checked-color="#3cc7c0">否</van-radio>
</van-radio-group>
</view>
<view class="radiotip" hidden="{{personInfo.is_take_medicine !=1}}">
<textarea placeholder=" " disabled="{{!showBtn}}" show-confirm-bar="{{false}}" cursor-spacing="70" confirm-type="done" bindinput="handelFocus" value="{{personInfo.drugs_name}}" data-id="hideDrug" data-value="drugs_name"></textarea>
<view class="textbox" hidden="{{hideDrug}}">
<view class="desc"><text></text>请详细填写所服药物(限制50个字)</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<view class="bottom" wx:if="{{showBtn}}">
<view class="btn" bindtap="handleSendFields">发送给医生</view>
</view>
</view>
</view>
<van-popup show="{{ showMarital }}" round position="bottom" custom-style="height:auto" bind:close="closeMaritalPicker">
<van-picker show-toolbar title="请选择婚姻状况" columns="{{ maritalColumn }}" bind:cancel="closeMaritalPicker" bind:confirm="onConfirmMaritalPicker" />
</van-popup>
<van-popup show="{{ showSick }}" position="bottom" custom-style="height: auto">
<van-picker show-toolbar title="选择所患疾病" columns="{{ sickcolumns }}" value-key="disease_class_name" bind:cancel="onCancelSick" bind:confirm="onConfirmSick" />
</van-popup>
<!-- <van-popup show="{{ showNation }}" position="bottom" custom-style="height: auto">
<van-picker show-toolbar title="选择民族" columns="{{ nationcolumns }}" value-key="nation_name" bind:cancel="onCancelSick" bind:confirm="onConfirmNation" />
</van-popup> -->
<van-popup show="{{ showNation }}" position="bottom" custom-style="height: auto">
<van-picker show-toolbar title="选择民族" columns="{{ nationcolumns }}" value-key="nation_name" bind:cancel="onCancelNation" bind:confirm="onConfirmNation" />
</van-popup>
<van-popup show="{{ showJob }}" position="bottom" custom-style="height: auto">
<van-picker show-toolbar title="选择职业" columns="{{ jobcolumns }}" value-key="job_name" bind:cancel="onCancelJob" bind:confirm="onConfirmJob" />
</van-popup>
<dialog bind:confirm="confirmDialog" showDialog="{{showDialog}}" message="是否发送问诊表给问诊医生?"></dialog>
+183
View File
@@ -0,0 +1,183 @@
/* pages/inquiryForm/inquiryForm.wxss */
.page {
display: flex;
flex-direction: column;
overflow: hidden;
}
.pagecon{
height:100%;
display: flex;
flex-direction: column;
}
.cellbox{
background-color: #fff;
}
.questionbox{
overflow-y: scroll;
-webkit-overflow-scrolling: touch;
margin-top: 172rpx;
flex:1;
}
.cellbox .cell{
background-color: #fff;
align-items: center;
display: flex;
padding:0 32rpx;
}
.cellrow{
height:105rpx;
width:100%;
justify-content: space-between;
align-items: center;
display: flex;
border-bottom:1rpx solid #E3E4E5;
}
.cell:last-child .cellrow{
border-bottom: none;
}
.iptbox{
display: flex;
flex:1;
margin-top:4rpx;
justify-content: flex-end;
}
.righticon{
width:24rpx;
height: 48rpx;
}
.name{
display: flex;
align-items: center;
}
.name .red{
margin-top: 20rpx;
color:#E34D59;
}
.placeholder{
text-align: right;
font-size: 28rpx;
font-weight: 400;
color: #C5C8CB;
}
.ipt{
width:100%;
text-align: right;
color: #666666;
line-height: 48rpx;
margin-left: 160rpx;
font-size: 28rpx;
}
.basictitle{
margin-top: 30rpx;
font-size: 34rpx;
padding:30rpx 32rpx 10rpx;
font-family: PingFangSC, PingFang SC;
font-weight: 500;
color: #1C2023;
}
.sickHis{
background-color: #fff;
/* margin-top: 20rpx; */
padding:1rpx 52rpx 40rpx;
}
.list .qa{
display: flex;
margin-top: 30rpx;
border-bottom:1rpx solid #E3E4E5;
}
.titlebox{
flex:1;
}
textarea{
position: relative;
z-index:1;
width:100%;
color:#333;
height:132rpx;
}
.radio{
margin: 30rpx 0rpx 30rpx 0;
}
.group .van-radio--horizontal{
margin-right: 11rpx;
}
.singlegroup .van-radio--horizontal{
margin-right:44rpx;
}
.singlegroup .van-radio--horizontal:nth-child(2n){
margin-right: 0rpx;
}
.group .van-radio--horizontal:nth-child(3n){
margin-right: 0;
}
.radiotip{
position: relative;
padding:24rpx 20rpx;
justify-content: center;
margin-top: 20rpx;
line-height: 42rpx;
background: #F2F2F2;
border-radius: 10rpx;
font-size: 28rpx;
color:#999;
margin-bottom: 20rpx;
}
.radiotip .textbox{
top:20rpx;
left:20rpx;
margin-top: 0;
width:auto;
height: 100rpx;
font-weight: normal;
z-index: 0;
position: absolute;
right:20rpx;
}
.radiotip text{
white-space: nowrap;
color:#333;
}
.van-radio__label{
padding-right:40rpx!important;
}
/* .van-radio__label:nth-child(3){
padding-right:0rpx!important;
} */
.van-radio{
margin-bottom: 10rpx!important;
}
.bottom{
width:100%;
height:160rpx;
background-color: #fff;
}
.bottom .btn{
font-size: 30rpx;
color: #FFFFFF;
height:80rpx;
display: flex;
justify-content: center;
align-items: center;
background: #3CC7C0;
border-radius: 8rpx;
margin:50rpx 32rpx;
}
.van-radio__icon--disabled{
background-color: #fff!important;
}
.van-radio__icon--disabled.van-radio__icon--checked{
color:#fff!important;
background-color: #3cc7c0!important;
border-color:#3cc7c0 ;
}
.van-radio__label--disabled{
color:#000!important;
}
+68
View File
@@ -0,0 +1,68 @@
// pages/linkPage/linkPage.js
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
url:''
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
if(options.url){
this.setData({
url:decodeURIComponent(options.url)
});
}
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
})
+3
View File
@@ -0,0 +1,3 @@
{
"usingComponents": {}
}
+2
View File
@@ -0,0 +1,2 @@
<!--pages/linkPage/linkPage.wxml-->
<web-view src="{{url}}" ></web-view>
+1
View File
@@ -0,0 +1 @@
/* pages/linkPage/linkPage.wxss */
+229
View File
@@ -0,0 +1,229 @@
// pages/login/login.js
const app = getApp()
import {
wechatMobileLogin
} from "../../../api/login.js"
import {auth} from "../../../api/index.js"
import {throttle} from "../../../utils/util"
let urlHost=app.hostConfig().agreehost;
Page({
/**
* 页面的初始数据
*/
data: {
check: 0,
beforeClose(action){
return new Promise((resolve) => {
if (action === 'confirm') {
resolve(true);
} else {
// 拦截取消操作
resolve(false);
}
})
},
showEntryTip:false,
showEntryTip_second:false,
redirecUrl:'',
img_host:'https://oss.prod.applets.igandanyiyuan.com/applet/patient/static'
},
handleAgree(){
if(!this.data.check){
wx.showToast({
title: '请同意《肝胆相照用户服务协议》!',
icon:'none'
})
return false
};
},
onConfirmEntry(){
this.setData({
showEntryTip:false
})
//wx.setStorageSync('hasEntry', true);
},
onCloseEntry(){
this.setData({
showEntryTip:true,
showEntryTip_second:true
})
},
onConfirmEntry_second(){
this.setData({
showEntryTip_second:false,
});
//wx.setStorageSync('hasEntry', true);
},
onCloseEntry_second(){
wx.exitMiniProgram({success: (res) => {}})
this.setData({
showEntryTip_second:false,
showEntryTip:false,
});
},
getPhoneNumber:throttle(function(e) {
if (e.detail.errMsg == 'getPhoneNumber:ok'){
// if(!e.detail.code){
// wx.showToast({
// title: '当前微信版本过低,可能部分功能受影响',
// icon:'none'
// })
// return false
// };
auth().then(res => {
wechatMobileLogin({
phone_code: e.detail.code,
user_type: 1,
wx_code: res
}).then((data)=>{
 wx.setStorageSync('AUTH_TOKEN', data.token);
 wx.setStorageSync('CLIENT_USER_ID',data.client_user_id);
 wx.setStorageSync('USER_ID',data.user_id);
let url=this.data.redirectUrl?this.data.redirectUrl:'/pages/index/index';
let handleGo=null;
if(url.indexOf('login')!=-1 || url.indexOf('mobileLogin')!=-1){
handleGo=function(){
wx.reLaunch({
url:'/pages/index/index'
})
}
}else{
wx.reLaunch({
url:url
})
}
app.imLogin({path:'pages/login/login'},handleGo);
})
});
}else if(e.detail.errMsg == 'getPhoneNumber:fail user deny'){
console.log('您拒绝手机号授权')
}else{
wx.showToast({
title: '手机号授权失败',
icon:'none'
})
}
}),
goMobile(){
let url='/patient/pages/mobileLogin/mobileLogin';
let redirectUrl=this.data.redirectUrl?this.data.redirectUrl:'/pages/index/index';
// console.log('222222');
// console.log(redirectUrl)
app.method.navigateTo({
url: url+"?redirectUrl="+encodeURIComponent(redirectUrl)
})
},
goAgreement:throttle(function(event){
let id=event.currentTarget.dataset.id;
app.method.navigateTo({
url:"/patient/pages/linkPage/linkPage?url="+encodeURIComponent(urlHost+'/basic/file/agreement.htm?id='+id)
})
}),
checkboxChange(e) {
this.setData({
check: e.detail.value.length
})
},
getRedirect(urlParams){
let url=decodeURIComponent(urlParams);
let index=url.indexOf("redirectUrl=");
let cur_url=''
if(index!=-1){
cur_url=url.substring(index+12,index.length);
// console.log(cur_url)
this.getRedirect(cur_url);
}else{
cur_url=url;
}
return decodeURIComponent(cur_url);
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.setData({
beforeClose: this.data.beforeClose.bind(this),
})
if(options.redirectUrl){
this.setData({
redirectUrl:"/"+this.getRedirect(options.redirectUrl)
})
}
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
this.setData({
img_host:app.hostConfig().imghost
});
wx.getPrivacySetting({
success: res => {
console.log(res) // 返回结果为: res = { needAuthorization: true/false, privacyContractName: '《xxx隐私保护指引》' }
if (res.needAuthorization) {
// 需要弹出隐私协议
this.setData({
showEntryTip:true
})
} else {
this.setData({
showEntryTip:false
})
// 用户已经同意过隐私协议,所以不需要再弹出隐私协议,也能调用已声明过的隐私
}
},
fail: () => {},
complete: () => {}
})
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
})
+7
View File
@@ -0,0 +1,7 @@
{
"usingComponents": {
"van-overlay": "@vant/weapp/overlay/index",
"van-dialog": "@vant/weapp/dialog/index"
},
"navigationBarTitleText": "登录"
}
+90
View File
@@ -0,0 +1,90 @@
<!--pages/login/login.wxml-->
<view class="contain">
<view class="logobox">
<image src="https://img.applets.igandanyiyuan.com/applet/patient/static/logo.png"></image>
<text class="desc">你好!欢迎登录肝胆相照互联网医院</text>
</view>
<view class="btnbox_shouquan">
<button type="primary" bindtap="handleAgree" wx:if="{{check==0}}">手机号快捷登录</button>
<button type="primary" open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber" wx:else>手机号快捷登录</button>
<view class="checkbox">
<view>
<checkbox-group bindchange="checkboxChange">
<checkbox class="check" ></checkbox>
</checkbox-group>
<image src="{{img_host+'/checkbox.png'}}" wx:if="{{check == 0}}"></image>
<image src="{{img_host+'/checkboxon.png'}}" wx:else></image>
</view>
<text>我已阅读并同意协议<text class="navigator" bindtap="goAgreement" data-id="3">《肝胆相照用户注册及服务协议》、</text><text class="navigator" bindtap="goAgreement" data-id="2">《隐私协议》、</text><text class="navigator" bindtap="goAgreement" data-id="1">《风险告知书》</text></text>
</view>
</view>
<view class="footer" bindtap="goMobile">输入手机号登录/注册</view>
</view>
<van-overlay show="{{ showEntryTip }}" zIndex="9999">
<view class="wrapper">
<view class="privacyBox">
<view class="title">温馨提示</view>
<view class="entrymsg">
<view> 亲爱的用户,感谢您信任并使用肝胆相照互联网医院!我们依据最新法律法规的要求,制定了<text class="navigator" bindtap="goAgreement" data-id="2">《隐私协议》</text>。请您仔细阅《隐私协议》,并确认了解我们对您的个人信息处理原则。</view>
<view>如您同意《隐私协议》,请点击“同意”开始使用我们的产品和服务。</view>
</view>
<view class="btnbox">
<view class="cancel" bindtap="onCloseEntry">不同意</view>
<button id="agree-btn"
plain
class="confirm"
open-type="agreePrivacyAuthorization" bindagreeprivacyauthorization="onConfirmEntry">同意并继续</button>
</view>
</view>
</view>
</van-overlay>
<!-- <van-dialog
use-slot
title="温馨提示"
show="{{ showEntryTip }}"
show-cancel-button
confirm-button-text="同意并继续"
cancel-button-text="不同意"
confirm-button-color="#3CC7C0"
bind:confirm="onConfirmEntry"
bind:cancel="onCloseEntry"
before-close="{{beforeClose}}"
confirm-button-open-type="agreePrivacyAuthorization"
>
<view class="entrymsg" >
<view> 亲爱的用户,感谢您信任并使用肝胆相照互联网医院!我们依据最新法律法规的要求,制定了<text class="navigator" bindtap="goAgreement" data-id="2">《隐私协议》</text>。请您仔细阅《隐私协议》,并确认了解我们对您的个人信息处理原则。</view>
<view>如您同意《隐私协议》,请点击“同意”开始使用我们的产品和服务。</view>
</view>
</van-dialog> -->
<van-overlay show="{{ showEntryTip_second }}" zIndex="99999">
<view class="wrapper">
<view class="privacyBox">
<view class="title">温馨提示</view>
<view class="entrymsg" >
<view> 很抱歉,如您不同意《隐私协议》,可能无法继续正常使用我们的服务,请您先同意哦~</view>
</view>
<view class="btnbox">
<view class="cancel" bindtap="onCloseEntry_second">不同意</view>
<button id="agree-btn"
plain
class="confirm"
bindtap="onConfirmEntry_second">好的</button>
</view>
</view>
</view>
</van-overlay>
<!-- <van-dialog
title="温馨提示"
show="{{ showEntryTip_second }}"
message="很抱歉,如您不同意《隐私协议》,可能无法继续正常使用我们的服务,请您先同意哦~"
show-cancel-button
confirm-button-text="好的"
cancel-button-text="不同意"
confirm-button-color="#3CC7C0"
bind:confirm="onConfirmEntry_second"
bind:cancel="onCloseEntry_second"
>
</van-dialog> -->
+93
View File
@@ -0,0 +1,93 @@
/* pages/login/login.wxss */
.logobox{display: flex;flex-direction: column;margin-top: 122rpx;}
.logobox image{width: 275rpx;height:56rpx}
.logobox .desc{font-size: 40rpx;margin-top: 42rpx;}
.btnbox_shouquan{width:100%;margin-top: 280rpx;}
.btnbox_shouquan button{display:flex;width:100%;font-size:36rpx;height: 94rpx;background: #09BB07;border-radius: 47rpx;color: #FFFFFF;align-items: center;justify-content: center;font-weight: normal;}
.checkbox{display: flex;margin-top: 40rpx;font-size: 28rpx;align-items: flex-start;height:40rpx;}
.checkbox view{width: 40rpx;height:40rpx;margin-right:14rpx;border-radius: 50%;display: flex;align-items: center;position: relative;}
.checkbox .check{width: 40rpx;height:40rpx;opacity: 0;}
.checkbox image{
left:5rpx;
top:4rpx;
position: absolute;
width: 40rpx;
height: 40rpx;
z-index:-1;
}
.navigator{color: #4384FE;white-space:pre-wrap;word-break: break-all;background-color: none;font-size: 28rpx;}
.footer{
height: 60rpx;
line-height: 60rpx;
width:600rpx;
position: absolute;
bottom:60rpx;
text-align: center;
left:50%;
transform: translateX(-50%);
font-size: 30rpx;
font-weight: 400;
color: #333333}
.entrymsg{
-webkit-overflow-scrolling: touch;
font-size: 28rpx;
line-height: 40rpx;
max-height: 60vh;
overflow-y: auto;
padding: 48rpx;
text-align: left;
}
.navigator{
color:#3CC7C0
}
.wrapper {
display: flex;
align-items: center;
justify-content: center;
height: 100%;
}
.privacyBox {
width:90%;
background-color: #fff;
border-radius: 30rpx;
}
.privacyBox .title{
margin: 0;
text-align: center;
font-weight: 500;
line-height:24px;
padding-top:24px;
text-align: center;
font-size:16px;
}
.privacyBox .btnbox{
display: flex;
align-items: center;
border-top:1rpx solid #efefef;
width:100%;
font-size: 17px;
}
.privacyBox .btnbox .cancel{
flex:1;
height: 50px;
display: flex;
justify-content: center;
align-items: center;
}
.privacyBox .btnbox .confirm{
margin: 0;
height: 50px;
padding: 0;
color: #3CC7C0;
flex:1;
font-size: 17px;
border: none!important;
border-left:1rpx solid #efefef!important;
display: flex;
background-color: none!important;
justify-content: center;
align-items: center;
}
+490
View File
@@ -0,0 +1,490 @@
// pages/medinceList/medinceList.js
const app = getApp()
import {
family,
addfamily
} from "../../../api/familyDoc";
import {
cart,
editCart
} from "../../../api/goodsCar"
import {throttle} from "../../../utils/util"
Page({
/**
* 页面的初始数据
*/
data: {
img_host:'https://oss.prod.applets.igandanyiyuan.com/applet/patient/static',
show: false,
isLock: false,
showAdd: false,
sex: null,
delId:'',
height:970,
delIndex:-1,
showDialog:false,
currentFamilyId: '',
showPicker: false,
realName: '',
idCard: '', //'',
phoneNumber: '',
relation: "",
relationId:"",
family: [],
list: [],
translist:[],
pageData:[],
columns: [{
text: "本人",
value: 1
},
{
text: "父母",
value: 2
},
{
text: "爱人",
value: 3
},
{
text: "子女",
value: 4
},
{
text: "亲戚",
value: 5
},
{
text: "其他 ",
value: 6
}
]
},
getCart() {
cart().then(data => {
this.setData({
list: data
})
})
},
confirm(event){
let {delId,delIndex}=this.data;
if(event.detail){
this.handleEditCart(delId,0,delIndex, 'minus');
}
},
onCloseDel(event){
let index = event.currentTarget.dataset.id;
//let shopping_cart_num = this.data.list[index].shopping_cart_num;
let product_id = this.data.list[index].product_id;
this.setData({
showDialog:true,
delId:product_id,
delIndex:index
})
},
goBack(){
wx.navigateBack({
delta: 1,
})
},
minusGoods(event) {
if (!this.data.isLock) {
this.setData({
isLock: true
})
let index = event.currentTarget.dataset.id;
let shopping_cart_num = this.data.list[index].shopping_cart_num;
let product_id = this.data.list[index].product_id;
if (shopping_cart_num == 1) {
this.setData({
isLock:false,
showDialog:true,
delId:product_id,
delIndex:index
})
return false
}
--shopping_cart_num;
this.handleEditCart(product_id, shopping_cart_num, index, 'minus');
}
},
addGoods(event) {
if (!this.data.isLock) {
this.setData({
isLock: true
})
let index = event.currentTarget.dataset.id;
let shopping_cart_num = this.data.list[index].shopping_cart_num;
let stock = this.data.list[index].stock;
let product_id = this.data.list[index].product_id;
if(shopping_cart_num>=5){
wx.showToast({
title: '每个药品购买数量不超过5个',
icon: "none"
})
this.setData({
isLock:false
})
return false
}
if (shopping_cart_num == stock) {
this.setData({
isLock:false
})
wx.showToast({
title: '该商品库存已不足',
icon: "none"
})
return false
}
++shopping_cart_num;
this.handleEditCart(product_id, shopping_cart_num, index, 'add');
}
},
handleEditCart(product_id, shopping_cart_num, index, type) {
let item = `list[${index}].shopping_cart_num`;
editCart({
product_id: product_id,
shopping_cart_num: shopping_cart_num
}).then(data => {
let number = this.data.totalNumber;
if (type == "add") {
++number
} else {
--number
};
this.setData({
[item]: shopping_cart_num,
totalNumber: number,
isLock: false
});
if(shopping_cart_num==0){
this.getCart();
}
})
},
showPopup() {
this.setData({
show: true
});
},
onClose() {
this.setData({
show: false
});
},
goPatientList() {
if(this.data.list.length==0){
wx.showToast({
title: '请先选择药品',
icon: "none"
})
return false
}
if (this.data.list.length > 5) {
wx.showToast({
title: '最多选择5种药',
icon: "none"
})
return false
}
this.setData({
show: true
})
},
onCloseAdd() {
this.setData({
showAdd: false
});
},
onConfirmPicker(event) {
const {value} = event.detail;
this.setData({
relationId: `${value.value}`,
relation: `${value.text}`,
showPicker: false
});
},
openPicker() {
this.setData({
showPicker: true
})
},
closePicker() {
this.setData({
showPicker: false
})
},
inputChange(e) {
this.setData({
[e.target.dataset.id]: e.detail.value
})
},
addFamily() {
let {
realName,
idCard,
phoneNumber,
relationId,
sex
} = this.data;
addfamily({
card_name: realName,
type: 1,
id_number: idCard,
mobile: phoneNumber,
is_default: 0,
relation: relationId
}).then((data) => {
this.getFamily();
this.setData({
currentFamilyId:data.family_id,
realName:'',
idCard:'',
phoneNumber:'',
relationId:'',
relation:'',
showAdd:false
})
})
},
addPatient() {
this.setData({
showAdd: true,
currentFamilyId: '',
sex: ''
})
},
selectPatient(e) {
let currentFamilyId=e.currentTarget.dataset.familyid;
let sex=e.currentTarget.dataset.sex;
let name=e.currentTarget.dataset.name;
let age=e.currentTarget.dataset.age;
this.setData({
currentFamilyId:currentFamilyId,
sex:sex
})
},
getFamily() {
family().then((data) => {
this.setData({
family: this.transforpage(data)
})
})
},
transforpage(arr) {
const pages = []
let newArr = arr.concat([{
type: "add"
}])
newArr.forEach((item, index) => {
const page = Math.floor(index / 2)
if (!pages[page]) {
pages[page] = []
}
pages[page].push(item)
});
return pages
},
confirmNext() {
if (!/^[\u4e00-\u9fa5]+(·[\u4e00-\u9fa5]+)*$/.test(this.data.realName)) {
wx.showToast({
title: `姓名要求在2-10个字符`,
icon: 'none',
});
return false;
};
if (!/(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/.test(this.data.idCard)) {
wx.showToast({
title: `请输入有效的身份证号`,
icon: 'none',
});
return false;
};
if (!/^1[3456789]\d{9}$/.test(this.data.phoneNumber)) {
wx.showToast({
title: `请输入有效的手机号码!`,
icon: 'none',
});
return false;
}
},
goNext:throttle(function() {
let {list}=this.data;
let arr=[];
for (let i = 0; i < list.length; i++) {
arr[i]={};
arr[i].product_id=list[i].product_id;
arr[i].product_num=list[i].shopping_cart_num;
arr[i].product_name=list[i].product_name;
arr[i].product_spec=list[i].product_spec;
};
this.setData({
translist:arr,
show:false
})
let {
currentFamilyId,
sex,
translist
} = this.data;
app.method.navigateTo({
url: '/patient/pages/writeSick/writeSick?family_id='+currentFamilyId+"&inquiry_type=4&product="+JSON.stringify(translist)+"&sex="+sex
})
}),
goSick:throttle(function() {
if (!/^([\u4e00-\u9fa5\·]{2,10})$/.test(this.data.realName)) {
wx.showToast({
title: `姓名要求在2-10个汉字`,
icon: 'none',
});
return false;
};
if (!/(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/.test(this.data.idCard)) {
wx.showToast({
title: `请输入有效的身份证号`,
icon: 'none',
});
return false;
};
if (this.data.phoneNumber) {
if (!/^1[3456789]\d{9}$/.test(this.data.phoneNumber)) {
wx.showToast({
title: `请输入有效的手机号码!`,
icon: 'none',
});
return false;
}
};
let idInfo = this.getIdInfo(this.data.idCard);
if (idInfo.age < 6) {
wx.showToast({
title: `六岁以下儿童不支持线上问诊`,
icon: 'none',
});
return false;
}
this.setData({
sex:idInfo.sex
})
this.addFamily()
}),
//获取身份证号信息
getIdInfo(IdCard) {
var reg = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/;
if (reg.test(IdCard)) {
let sex
if (parseInt(IdCard.substr(16, 1)) % 2 === 1) {
sex = '1'
} else {
sex = '2'
}
var ageDate = new Date()
var month = ageDate.getMonth() + 1
var day = ageDate.getDate()
var age = ageDate.getFullYear() - IdCard.substring(6, 10) - 1
if (IdCard.substring(10, 12) < month || (IdCard.substring(10, 12) === month && IdCard.substring(12, 14) <= day)) {
age++
}
if (age <= 0) {
age = 1
}
return {
sex,
age
}
} else {
return false;
}
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
let medinceInfo = options.product;
if (medinceInfo){
var info = JSON.parse(medinceInfo);
info.forEach((item)=>{
item.shopping_cart_num=item.amount;
});
this.setData({
list: info,
pageData:info
})
}else{
this.getCart();
}
this.getFamily();
},
onfocus(event){
this.setData({
height:970+event.height+120
})
},
onblur(event){
this.setData({
height:970
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
this.setData({
img_host:app.hostConfig().imghost
});
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
})
@@ -0,0 +1,12 @@
{
"usingComponents": {
"van-swipe-cell": "@vant/weapp/swipe-cell/index",
"van-popup": "@vant/weapp/popup/index",
"van-picker": "@vant/weapp/picker/index",
"dialog":"../../../components/dialog/dialog",
"nav":"../../../components/nav/nav"
},
"navigationStyle":"custom",
"disableScroll": true,
"navigationBarTitleText": "肝胆相照互联网医院"
}
+122
View File
@@ -0,0 +1,122 @@
<!--pages/medinceList/medinceList.wxml-->
<!-- <view class="ui-navigatorbar" style="background: #FFFFFF;border-bottom: 1rpx solid #E3E4E5;">
<image class="ui-navigatorbar-back" bindtap="goBack" src="{{img_host+'/back.png'}}" />
<view class="ui-title">药品清单</view>
</view> -->
<nav navName="药品清单"></nav>
<view class="page">
<view class="medincebox">
<view class="bbox" wx:if="{{list.length>0}}">
<van-swipe-cell right-width="{{ 50 }}" class="swipecell" wx:for="{{list}}" wx:key="product_id" >
<van-cell-group style="flex:1">
<view class="cell">
<view class="imgbox">
<image src="{{img_host+'/nomedince.png'}}" class="yaoimg"></image>
<view class="desc">
<view class="tip">处方药品</view>
<view class="tip">依据法规不展示包装</view>
</view>
</view>
<view class="rightinfo">
<view class="name">{{item.product_name}}<text class="namenum">{{item.product_spec}}</text></view>
<view class="yaodian">{{item.manufacturer}}</view>
<view class="own">
<view class="company">
<text wx:if="{{pageData.length==0}}">¥{{item.product_price}}</text>
</view>
<view class="num" wx:if="{{pageData.length==0}}">
<view class="minus" bindtap="minusGoods" data-id="{{index}}">-</view>
<view class="currentnum">{{item.shopping_cart_num}}</view>
<view class="add {{item.shopping_cart_num>=5?'disabled':''}}" bindtap="addGoods" data-id="{{index}}">+</view>
</view>
<view class="num" wx:else><text decode="true">数量&nbsp;</text>{{item.amount}}</view>
</view>
</view>
</view>
</van-cell-group>
<view slot="right" class="delslot" data-id="{{index}}" catchtap="onCloseDel">删除</view>
</van-swipe-cell>
</view>
<view class="nonedata" wx:else="">
购物车为空!
</view>
<view class="btnbox">
<button class="btn" bindtap="goPatientList" plain="true" disabled="{{false}}">选择患者</button>
</view>
</view>
</view>
<van-popup show="{{ show }}" bind:close="onClose" closeable
position="bottom" round
custom-style="min-height: 60%">
<view class="titlepop">选择用药人</view>
<view class="personbox">
<view class="row" wx:for-item="itemName" wx:for="{{family}}" wx:key="*this">
<view class="cell" wx:for-item="item" wx:for="{{itemName}}" wx:key="family_id">
<view class="cellinner" wx:if="{{!item.type}}" bindtap="selectPatient" data-familyId="{{item.family_id}}" data-sex="{{item.sex}}">
<view class="person">
<view class="name">{{item.card_name}}</view>
<view class="tag" wx:if="{{item.relation==1}}">本人</view>
<view class="tag" wx:elif="{{item.relation==2}}">父母</view>
<view class="tag" wx:elif="{{item.relation==3}}">爱人</view>
<view class="tag" wx:elif="{{item.relation==4}}">子女</view>
<view class="tag" wx:elif="{{item.relation==5}}">亲戚</view>
<view class="tag" wx:elif="{{item.relation==6}}">其他</view>
</view>
<view class="desc">
<view class="sex" wx:if="{{item.sex===0}}">性别未知</view>
<view class="sex" wx:elif="{{item.sex==1}}">男</view>
<view class="sex" wx:else>女</view>
<view class="age">{{item.age}}岁</view>
</view>
<image src="{{img_host+'/gou.png'}}" class="gou" wx:if="{{item.family_id==currentFamilyId}}"></image>
</view>
<view class="celladd" bindtap="addPatient" wx:elif="{{item.type}}">
+新建患者
</view>
</view>
</view>
</view>
<view class="btnbox">
<button class="btn" plain="true" disabled="{{currentFamilyId?false:true}}" bindtap="goNext">下一步</button>
</view>
</van-popup>
<van-popup show="{{showAdd}}" round closeable z-index="999" position="bottom" custom-style="height:{{height}}rpx" bind:close="onCloseAdd">
<view class="infobox">
<view class="title">新建患者</view>
<view class="info">
<view class="name">真实姓名<text>*</text></view>
<input value="{{realName}}" type="text" bindinput="inputChange" placeholder="请输入真实姓名" data-id="realName"/>
</view>
<view class="info">
<view class="name">身份证号<text>*</text></view>
<input value="{{idCard}}" type="idcard" bindinput="inputChange" placeholder="请输入真实身份证号" data-id="idCard"/>
</view>
<view class="info">
<view class="name">联系电话</view>
<input value="{{phoneNumber}}" type="number" bindblur="onblur" bindfocus="onfocus" cursor-spacing="100" bindinput="inputChange" bindinput="inputChange" placeholder="请输入联系电话" data-id="phoneNumber"/>
</view>
<view class="info" bindtap="openPicker">
<view class="name">患者关系</view>
<input type="text" value="{{relation}}" placeholder="请选择与患者的关系" disabled="true" />
</view>
<view class="tip">
<view class="warntitle">温馨提示:</view>
<view class="warn">
<view>1、根据国家卫健委要求,就医实行实名制,请如实填写患者信息。</view>
<view>2、信息受隐私保护,仅接诊医生可见。
</view>
<view>3、6岁以下儿童不支持线上问诊,请到线下就诊。
</view>
</view>
</view>
<view class="next" bindtap="goSick">
确定
</view>
</view>
</van-popup>
<van-popup show="{{ showPicker }}" round position="bottom" z-index="99999" custom-style="height:auto" bind:close="closePicker">
<van-picker show-toolbar title="选择与患者之间的关系" columns="{{ columns }}" bind:cancel="closePicker" bind:confirm="onConfirmPicker" />
</van-popup>
<dialog bind:confirm="confirm" showDialog="{{showDialog}}" message="是否在购物车中删除该商品?"></dialog>
+373
View File
@@ -0,0 +1,373 @@
/* pages/medinceList/medinceList.wxss */
.page {
background-color: #fff;
display: flex;
flex-direction: column;
overflow: hidden;
}
.swipecell {
display: flex;
}
.celladd{
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
height: 120rpx;
}
.delslot {
font-size: 28rpx;
font-weight: 400;
color: #FFFFFF;
padding: 0 14px;
height: 100%;
display: flex;
color: #fff;
background: #EF4F20;
align-items: center;
justify-content: center;
}
.medincebox {
flex:1;
overflow-y: scroll;
-webkit-overflow-scrolling: touch;
margin-top: 172rpx;
background-color: #fff;
padding-bottom: 144rpx;
}
.medincebox .cell {
padding: 30rpx 32rpx;
width:100vw;
box-sizing: border-box;
display: flex;
align-items: center;
border-bottom: 1rpx solid #E3E4E5;
}
.rightinfo {
margin-left: 30rpx;
flex: 1;
display: flex;
flex-direction: column;
justify-content: center;
}
.medincebox .cell .name {
word-break: break-all;
font-size: 32rpx;
font-weight: bold;
color: #333;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
/* 这里是超出几行省略 */
overflow: hidden;
}
.imgbox {
border-radius:8rpx;
border:1rpx solid #ccc;
width: 200rpx;
height: 200rpx;
display: flex;
align-items: center;
justify-content: center;
position: relative;
}
.yaoimg {
width: 120rpx;
height: 128rpx;
}
.imgbox .desc {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
position: absolute;
top: 50%;
font-size: 22rpx;
font-weight: 400;
color: #666666;
line-height: 30rpx;
transform: translateY(-50%);
}
.imgbox .desc .tip {
text-align: center;
}
.rightinfo .own {
margin-top: 47rpx;
display: flex;
justify-content: space-between;
align-items: center;
font-size: 28rpx;
font-weight: 400;
color: #333333;
}
.namenum {
font-size: 28rpx;
font-weight: 400;
color: #333333;
}
.yaodian {
margin-top: 25rpx;
color: rgba(51, 51, 51, 1);
font-size: 28rpx;
}
.own .company {
font-size: 34rpx;
font-weight: 600;
color: #EF4F20;
}
.own .num {
display: flex;
align-items: center;
}
.own .currentnum {
font-size: 24rpx;
color: rgba(0, 0, 0, 0.9);
margin: 0 10rpx;
height: 48rpx;
width:48rpx;
display: flex;
align-items: center;
justify-content: center;
background: #E7E7E7;
border-radius: 4rpx;
}
.own .add,
.own .minus {
width: 48rpx;
height: 48rpx;
font-weight: bold;
font-size: 30rpx;
background: #E7E7E7;
display: flex;
align-items: center;
justify-content: center;
border-radius: 4rpx
}
.btnbox{
position: fixed;
width:100%;
bottom:0rpx;
height: 134rpx;
background:#fff;
}
.btnbox .btn{
border-radius: 47rpx;
border:none;
background: #3CC7C0!important;
margin:0 32rpx;
height: 94rpx;
display: flex;
justify-content: center;
align-items: center;
font-size: 36rpx;
color: #FFFFFF!important;
}
.btnbox .btn[disabled]{
color: #000000!important;
background:rgba(0,0,0,0.1)!important;
}
.personbox {
border-radius: 10rpx;
background-color: #fff;
padding: 40rpx 20rpx 144rpx;
overflow-y: scroll;
}
.personbox .row {
margin-top: 30rpx;
display: flex;
justify-content: space-between;
}
.personbox .row:first-child {
margin-top: 0;
}
.personbox .row .cell {
position: relative;
width: 47%;
height: 120rpx;
display: flex;
flex-direction: column;
justify-content: center;
margin-left: 30rpx;
border-radius: 10rpx;
border: 1px solid #CCCCCC;
}
.personbox .row .cell:first-child {
margin-left: 0rpx;
}
.personbox .person {
display: flex;
margin: 0 25rpx;
align-items: center;
}
.personbox .tag {
margin-left: 32rpx;
font-size: 24rpx;
display: flex;
align-items: center;
line-height: 24rpx;
justify-content: center;
color: #666666;
width: 80rpx;
height: 32rpx;
border-radius: 4rpx;
transform: rotateZ(360deg);
border: 1rpx solid #979797;
}
.personbox .desc {
display: flex;
margin: 0 25rpx;
font-size: 28rpx;
color: #666;
margin-top: 3px;
}
.personbox .name {
white-space: nowrap;
overflow: hidden;
max-width: 200rpx;
text-overflow: ellipsis;
font-size: 34rpx;
color: #333;
}
.personbox .age {
margin-left: 12rpx;
}
.personbox .cell .gou {
position: absolute;
bottom: -1rpx;
right: 0rpx;
width: 66rpx;
height: 53.7rpx;
}
.personbox .add {
justify-content: center;
align-items: center;
font-size: 34rpx;
color: #333;
}
.own .add.disabled{
color: #999;
}
.titlepop{
font-size: 34rpx;
font-weight: 400;
color: #333333;
padding:40rpx 0;
text-align: center;
width:100%;
border-bottom:1rpx solid #E7E7E7;
}
.van-icon-cross {
color: #333;
font-size: 40rpx !important;
}
.infobox {
margin-top: 40rpx;
}
.info {
border-bottom: 1rpx solid #E7E7E7;
display: flex;
align-items: center;
height: 112rpx;
color: #333333;
}
.infobox .title {
border-bottom: 1rpx solid #E7E7E7;
text-align: center;
font-size: 34rpx;
padding-bottom: 35rpx;
}
.info .name {
white-space: nowrap;
width: 180rpx;
display: flex;
align-items: center;
margin-left: 52rpx;
color: #333333;
font-size: 34rpx;
}
.info text {
margin-top: 20rpx;
color:#E34D59;
display: flex;
align-items: center;
}
.info input {
margin-left: 15rpx;
margin-right: 52rpx;
flex: 1;
}
.input-placeholder {
color: #999999;
font-size: 28rpx;
}
.tip{
padding:30rpx 52rpx 20rpx;
}
.warntitle{
color: #E34D59;
font-size: 28rpx;
}
.warn{
margin-top: 20rpx;
font-size: 24rpx;
line-height: 36rpx;
color: #666666;
}
.next{
display: flex;
align-items: center;
justify-content: center;
height: 94rpx;
font-size: 36rpx;
left: 30rpx;
right: 30rpx;
margin:0 52rpx;
border-radius: 47rpx;
color: #fff;
margin-bottom: 40rpx;
background: #3CC7C0;
}
+257
View File
@@ -0,0 +1,257 @@
// pages/medinceOrder/medinceOrder.js
const app = getApp()
import{family} from "../../../api/familyDoc"
import {product} from "../../../api/medinceOrder"
import {throttle} from "../../../utils/util"
Page({
data: {
page:1,
delId:'',
isTriggered:false,
changeStatus:'',
changeId:'',
orderList:[],
selectstatus:false,
selectfamily:false,
fromType:'',
option1: [
{ text: '全部', value: 0 },
{ text: '待支付', value: 1 },
{ text: '待发货', value: 2 },
{ text: '已发货', value: 3},
{ text: '已收货', value: 4},
{ text: '已取消', value: 5}
],
isLock:false,
option2: [],
order_product_status: 0,
family_id:0,
img_host:'https://oss.prod.applets.igandanyiyuan.com/applet/patient/static'
},
getProduct(){
let {order_product_status,family_id,page}=this.data;
product({
order_product_status,
family_id,
page,
per_page:10
}).then(data=>{
let result=data.data;
if(result.length==0){
this.setData({
isTriggered:false,
isLock:true
})
return false
}
this.setData({
isTriggered:false,
orderList:this.data.orderList.concat(result)
})
})
},
handleRefresher(){
this.setData({
page:1,
isLock:false,
orderList:[],
})
this.getProduct();
},
goBack(){
let {fromType}=this.data;
if(app.globalData.origion==1){
wx.reLaunch({
url: '/pages/index/index',
})
}else if(app.globalData.origion==2){
wx.reLaunch({
url: '/pages/index/index',
})
}else{
if(fromType){
wx.reLaunch({
url: '/pages/my/my',
})
}else{
wx.navigateBack({
delta: 1,
fail:function(){
wx.reLaunch({
url: '/pages/index/index',
})
}
})
}
}
},
goBuyandConsult(){
app.method.navigateTo({
url: '/patient/pages/quickConsult/quickConsult?inquiry_type=4'
})
},
getfamily(){
family().then(data=>{
let arr=[];
data.forEach((item,index)=>{
arr[index]={};
let sex="";
switch (item.sex){
case "0":sex="未知";
break;
case "1":sex="男";
break;
case "2":sex="女";
break;
}
let age=item.age;
arr[index].text=item.card_name+""+sex+""+age+"";
arr[index].value=item.family_id;
})
arr=[{text:"全部成员",value:0}].concat(arr);
this.setData({
option2:arr
})
this.getProduct();
})
},
changeStatus({ detail }){
this.setData({
isLock:false,
page:1,
selectstatus:true,
order_product_status:detail,
orderList:[]
})
this.getProduct()
},
changeFamily({ detail }){
this.setData({
family_id:detail,
isLock:false,
selectfamily:true,
page:1,
orderList:[]
})
this.getProduct()
},
goMedinceOrderDetail(event){
let id=event.currentTarget.dataset.id
app.method.navigateTo({
url: '/patient/pages/medinceOrderDetail/medinceOrderDetail?order_product_id='+id,
})
},
goExpress:throttle(function(event){
let id=event.currentTarget.dataset.id;
app.method.navigateTo({
url: '/patient/pages/expressDetail/expressDetail?logistics_no='+id,
})
}),
lower(){
if(!this.data.isLock){
this.setData({
page: ++this.data.page
})
this.getProduct();
}
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
if(options.fromType){
this.setData({
fromType:options.fromType
})
}
if(options.prevData){
let json=JSON.parse(options.prevData);
this.setData({
changeStatus:json.changeStatus,
changeId:json.changesId
});
}
this.getfamily();
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
let {delId,orderList,changeStatus,changeId}=this.data;
this.setData({
img_host:app.hostConfig().imghost
});
if(delId){
let list=orderList.filter((item)=>{
return item.order_product_id!=delId
})
this.setData({
orderList:list
})
}else if(changeStatus && changeId){
for (let i = 0; i < orderList.length; i++) {
const item =orderList[i];
if(item.order_product_id==changeId){
let currentitem=`orderList[${i}].order_product_status`
this.setData({
[currentitem]:changeStatus
})
break;
}
}
}else{
//刷新页面
// this.setData({
// page:1,
// orderList:[],
// isLock:false,
// });
// this.getfamily();
// this.getProduct();
}
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
})
@@ -0,0 +1,8 @@
{
"usingComponents": {
"van-dropdown-menu": "@vant/weapp/dropdown-menu/index",
"van-dropdown-item": "@vant/weapp/dropdown-item/index"
},
"navigationStyle":"custom",
"navigationBarTitleText": "肝胆相照互联网医院"
}
@@ -0,0 +1,60 @@
<!--pages/medinceOrder/medinceOrder.wxml-->
<view class="page">
<view class="ui-navigatorbar" style="border-bottom: 1rpx solid #E3E4E5;background-color: #fff;">
<image class="ui-navigatorbar-back" bindtap="goBack" src="{{img_host+'/back.png'}}" />
<view class="ui-title">药品订单</view>
</view>
<view class="dropdown">
<view class="bar"></view>
<van-dropdown-menu active-color="#3CC7C0">
<van-dropdown-item value="{{ order_product_status }}" title-class="droptitle {{selectstatus?'active':''}}" options="{{ option1 }}" bind:change="changeStatus" />
<van-dropdown-item value="{{ family_id }}" title-class="droptitle {{selectfamily?'active':''}}" options="{{ option2 }}" bind:change="changeFamily" />
</van-dropdown-menu>
</view>
<scroll-view scroll-y="true" bindscrolltolower="lower" bindrefresherrefresh="handleRefresher" refresher-triggered="{{isTriggered}}" refresher-threshold="100" refresher-enabled="true" class="infobox" wx:if="{{orderList.length>0}}">
<view class="unitbox" wx:for="{{orderList}}" wx:key="order_product_id">
<view class="title">
<view>共{{item.order_product_item.length}}个药品</view>
<!-- 订单状态(1:待支付 2:待发货 3:已发货 4:已签收 5:已取消) -->
<view class="status wait" wx:if="{{item.order_product_status==1}}">待支付</view>
<view class="status" wx:elif="{{item.order_product_status==2}}">待发货</view>
<view class="status" wx:elif="{{item.order_product_status==3}}">已发货</view>
<view class="status" wx:elif="{{item.order_product_status==4}}">已收货</view>
<view class="status" wx:elif="{{item.order_product_status==5 && item.pay_status!=5}}">取消订单</view>
<view class="status" wx:elif="{{item.order_product_status==5 && item.pay_status==5}}">支付超时</view>
</view>
<view class="medincebox">
<view class="cell" wx:for="{{item.order_product_item}}" wx:key="product_item_id" wx:for-item="itemName">
<view class="imgbox">
<image src="{{img_host+'/nomedince.png'}}" class="yaoimg"></image>
<view class="desc">
<view class="tip">处方药品</view>
<view class="tip">依据法规不展示包装</view>
</view>
</view>
<view class="rightinfo">
<view class="name">{{itemName.product_name}}<text class="namenum">{{itemName.product_spec}}</text></view>
<view class="own">
<view class="company">{{itemName.manufacturer}}</view>
<view class="num">数量:{{itemName.amount}}</view>
</view>
</view>
</view>
<view class="btnbox">
<view class="btn express" bindtap="goExpress" data-id="{{item.order_product_id}}" wx:if="{{item.order_product_status==4 || item.order_product_status==3 || (item.logistics_no && item.order_product_status==5)}}">查看物流</view>
<view class="btn orderDetail" bindtap="goMedinceOrderDetail" data-id="{{item.order_product_id}}">订单详情</view>
</view>
</view>
</view>
</scroll-view>
<view class="nodata" wx:else>
<view class="nobox">
<image src="{{img_host+'/nomedinceorder.png'}}" class="nomedinceorder"></image>
<view class="tip">暂时没有药品记录</view>
</view>
<view class="buymedince" bindtap="goBuyandConsult">
问诊购药
</view>
</view>
</view>
@@ -0,0 +1,205 @@
/* pages/medinceOrder/medinceOrder.wxss */
.page{
display: flex;
flex-direction: column;
overflow: hidden;
}
.unitbox{
margin-bottom: 20rpx;
}
.unitbox:last-child{
margin-bottom: 0;
}
.infobox {
margin-top: 20rpx;
flex:1;
overflow-y: scroll;
-webkit-overflow-scrolling: touch;
}
.infobox .status{
font-size: 28rpx;
font-weight: 400;
color: #333333;
}
.infobox .status.wait{
color: #EF4F20;
}
.infobox .status.timeout{
color: #EF4F20;
}
.infobox .title {
padding: 0 32rpx;
background-color: #fff;
font-size: 32rpx;
height: 112rpx;
align-items: center;
display: flex;
justify-content: space-between;
border-bottom: 1rpx solid #E3E4E5;
}
.imgbox {
border-radius:8rpx;
border:1rpx solid #ccc;
width: 200rpx;
height: 200rpx;
display: flex;
align-items: center;
justify-content: center;
position: relative;
}
.yaoimg {
width: 120rpx;
height: 128rpx;
}
.imgbox .desc {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
position: absolute;
top: 50%;
font-size: 22rpx;
font-weight: 400;
color: #666666;
line-height: 30rpx;
transform: translateY(-50%);
}
.imgbox .desc .tip {
text-align: center;
}
.medincebox {
background-color: #fff;
}
.medincebox .cell {
padding: 30rpx 32rpx;
display: flex;
align-items: center;
border-bottom: 1rpx solid #E3E4E5;
}
.medincebox .cell:nth-last-child(2){
border-bottom:none;
}
.rightinfo {
margin-left: 30rpx;
flex: 1;
display: flex;
flex-direction: column;
justify-content: center;
}
.medincebox .cell .name {
word-break: break-all;
font-size: 32rpx;
font-weight: bold;
color: #333;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
/* 这里是超出几行省略 */
overflow: hidden;
}
.rightinfo .own {
margin-top: 47rpx;
display: flex;
justify-content: space-between;
align-items: center;
font-size: 28rpx;
font-weight: 400;
color: #333333;
}
.btnbox{
display: flex;
padding:0 32rpx;
font-size: 30rpx;
padding-bottom: 30rpx;
justify-content: flex-end;
}
.btnbox .btn{
display: flex;
justify-content: space-between;
align-items: center;
padding: 0 20rpx;
height:58rpx;
background: #FFFFFF;
border-radius: 30rpx;
margin-left: 20px;
}
.btnbox .btn:first-child{
margin-left: 0;
}
.btnbox .express{
color: #333333;
border: 1rpx solid #999999;
}
.btnbox .orderDetail{
background: #3CC7C0;
color:#fff;
border: 1rpx solid #3CC7C0;
}
.nodata{
flex:1;
position: relative;
}
.nodata .tip{
color: #666666;
font-size: 28rpx;
}
.nodata .buymedince{
position: absolute;
left:32rpx;
right:32rpx;
display: flex;
justify-content: center;
align-items: center;
height: 94rpx;
bottom:20rpx;
color:#fff;
font-size: 36rpx;
background: #3CC7C0;
border-radius: 47rpx
}
.nodata .nobox{
display: flex;
justify-content: center;
flex-direction: column;
align-items: center;
}
.nomedinceorder{
margin-top: 150rpx;
width:286rpx;
height:276rpx;
}
.namenum{
font-size: 28rpx;
font-weight: 400;
color: #333333;
}
.dropdown{
margin-top: 172rpx;
position: relative;
}
.dropdown .bar{
position: absolute;
height:40rpx;
width:1rpx;
left: 50%;
top:50%;
transform: translate(-50%,-50%);
background:#ccc;
opacity: 0.9;
}
@@ -0,0 +1,265 @@
// pages/medinceOrderDetail/medinceOrderDetail.js
const app = getApp()
import {productDetail,cancelPayProduct,delProduct} from "../../../api/medinceOrder"
import {fllowDoctor,notfllowDoctor} from "../../../api/consultExpert"
import {throttle} from "../../../utils/util"
Page({
/**
* 页面的初始数据
*/
data: {
time: 30 * 60 * 60 * 1000,
order_product_id:'',
showDialog:false,
message:'',
fromType:'',
order_product:{},
order_product_item:{},
user_doctor:{},
patient_family_data:'',
img_host:'https://oss.prod.applets.igandanyiyuan.com/applet/patient/static'
},
goBack(){
let {fromType}=this.data;
if(app.globalData.origion==1){
wx.reLaunch({
url: '/pages/index/index',
})
}else if(app.globalData.origion==2){
wx.reLaunch({
url: '/pages/index/index',
})
}else{
if(fromType){
let url=decodeURIComponent(fromType);
let goUrl='';
if(url.indexOf('?')!=-1){
goUrl='/'+url+"&fromType="+url;
}else{
goUrl='/'+url+"?fromType="+url;
}
//处理聊天收到消息不及时;
if(url.indexOf("TUIService/pages/index")!=-1){
app.method.navigateTo({
url:goUrl
})
}else{
wx.redirectTo({
url: goUrl
})
}
}else{
wx.navigateBack({
delta: 1,
fail:function(){
wx.reLaunch({
url: '/pages/index/index',
})
}
})
}
}
},
goExpress:throttle(function(event){
let id=event.currentTarget.dataset.id;
app.method.navigateTo({
url: '/pages/expressDetail/expressDetail?logistics_no='+id,
})
}),
goExpert:throttle(function(){
let id=this.data.user_doctor.doctor_id;
app.method.navigateTo({
url: '/pages/expertDetail/expertDetail?doctor_id='+id,
})
}),
handleProductDetail(flag=false){
let id =this.data.order_product_id;
productDetail(id).then(data=>{
if(flag){
let pages = getCurrentPages();
let prevPage = pages[pages.length - 2]; //上一页
this.setData({
prevData:JSON.stringify({
changeStatus: data.inquiry_status,
changeId:id
})
});
prevPage.setData({
changeStatus:data.order_product.order_product_status,
changeId:id
});
};
this.setData({
order_product:data.order_product,
order_product_item:data.order_product_item,
user_doctor:data.user_doctor
});
})
},
confirmDelOrder(){
this.setData({
showDialog:true,
message:"您确定是要删除订单记录么?"
})
},
confirmCancelPay(){
this.setData({
showDialog:true,
message:"您确定取消支付么?"
})
},
confirm:throttle(function(event){
if(event.detail && this.data.message=="您确定是要删除订单记录么?"){
this.handelDelProduct();
}else{
this.handelCancelPayProduct();
}
}),
handelCancelPayProduct(){
let id =this.data.order_product_id;
cancelPayProduct(id).then(data=>{
wx.showToast({
title: '取消支付成功',
icon:"none"
})
this.handleProductDetail();
})
},
copy(event){
let text=event.target.dataset.text;
wx.setClipboardData({
data:text
})
},
goPay:throttle(function(){
let {order_product_id,order_product_no}=this.data.order_product;
app.method.navigateTo({
url: '/patient/pages/payOrder/payOrder?inquiry_no='+ order_product_no +"&order_product_id="+order_product_id+"&order_type=2&fromType="+encodeURIComponent('pages/medinceOrder/medinceOrder')
})
}),
handelDelProduct(){
let id =this.data.order_product_id;
delProduct(id).then(data=>{
let pages = getCurrentPages();
//获取所需页面
let prevPage = pages[pages.length - 2]; //上一页
prevPage.setData({
delId: id//需要传过去的数据
});
wx.navigateBack({
delta: 1,
})
wx.showToast({
title: '订单删除成功',
icon:"none"
});
})
},
goPrescriptionDetail:throttle(function(event){
let id=event.currentTarget.dataset.id;
app.method.navigateTo({
url: '/patient/pages/prescriptDetail/prescriptDetail?order_prescription_id='+id,
})
}),
handelfllowDoctor(){
let id=this.data.user_doctor.doctor_id
fllowDoctor(id).then(data=>{
this.setData({
"user_doctor.follow":true
})
wx.showToast({
title: '关注成功',
icon:"none"
})
})
},
handenotfllowDoctor(){
let id=this.data.user_doctor.doctor_id;
notfllowDoctor(id).then(data=>{
this.setData({
"user_doctor.follow":false
})
wx.showToast({
title: '已取消关注',
icon:"none"
})
})
},
toggleFllow(){
if(this.data.order.user_doctor.follow){
this.handenotfllowDoctor()
}else{
this.handelfllowDoctor()
}
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
if(options.fromType){
this.setData({
fromType:options.fromType
})
}
let order_product_id=options.order_product_id;
if(order_product_id){
this.setData({
order_product_id
});
this.handleProductDetail();
}
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
this.setData({
img_host:app.hostConfig().imghost
});
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
})
@@ -0,0 +1,10 @@
{
"usingComponents": {
"van-count-down": "@vant/weapp/count-down/index",
"dialog":"../../../components/dialog/dialog",
"van-dialog": "@vant/weapp/dialog/index"
},
"navigationStyle":"custom",
"disableScroll":true,
"navigationBarTitleText": "肝胆相照互联网医院"
}
@@ -0,0 +1,224 @@
<!--pages/medinceOrderDetail/medinceOrderDetail.wxml-->
<wxs src="../../../filters/filter.wxs" module="filter"></wxs>
<view class="ui-navigatorbar" style="border-bottom: 1rpx solid #E3E4E5;background:#fff;">
<image class="ui-navigatorbar-back" bindtap="goBack" src="{{img_host+'/back.png'}}" />
<view class="ui-title">药品订单详情</view>
</view>
<view class="page">
<view class="outwraper {{order_product.order_product_status==1?'active':''}}">
<view class="addressbox">
<view class="left">
<image src="{{img_host+'/addressicon.png'}}" class="icon"></image>
<view class="info">
<view class="name">{{order_product.consignee_name}} {{order_product.consignee_tel}}</view>
<view class="address">{{order_product.province}}{{order_product.city}}{{order_product.county}}{{order_product.address}}</view>
</view>
</view>
</view>
<view class="rowbox">
<view class="titlebox">
<view class="name">订单信息</view>
<!-- 订单状态(1:待支付 2:待发货 3:已发货 4:已签收 5:已取消) -->
<!-- 支付状态(1:未支付 2:已支付 3:支付中 4:支付失败 5:支付超时 6:支付关闭 7:已撤销 8:转入退款) -->
<view class="status" wx:if="{{order_product.order_product_status==1}}">
<view class="waitpay">待支付</view>
<view class="countdown">
<van-count-down time="{{filter.countDown(order_product.created_at)}}" />
</view>
</view>
<view class="status" wx:elif="{{order_product.order_product_status==2}}">待发货</view>
<view class="status" wx:elif="{{order_product.order_product_status==3}}">已发货</view>
<view class="status" wx:elif="{{order_product.order_product_status==4}}">已收货</view>
<view class="status" wx:elif="{{order_product.order_product_status==5 && order_product.pay_status!=5}}">取消订单</view>
<view class="status" wx:elif="{{order_product.order_product_status==5 && order_product.pay_status==5}}">支付超时</view>
</view>
<view class="row first">
<view class="name">订单编号</view>
<view class="dot"></view>
<view class="desc">{{order_product.order_product_no}}</view>
<view class="copy" bindtap="copy" data-text="{{order_product.order_product_no}}">复制</view>
</view>
<view class="row">
<view class="name">下单时间</view>
<view class="dot"></view>
<view class="desc">{{order_product.created_at}}</view>
</view>
<view class="row" wx:if="{{order_product.delivery_time && order_product.order_product_status==4}}">
<view class="name">完成时间</view>
<view class="dot"></view>
<view class="desc">{{order_product.delivery_time}}</view>
</view>
<!-- <view class="row">
<view class="name">问诊类型:</view>
<view class="desc">极速问诊/专家问诊/公益问诊/问诊购药;</view>
</view> -->
<view class="row">
<view class="name">药品金额</view>
<view class="dot"></view>
<view class="desc price">¥{{order_product.amount_total}}</view>
</view>
<view class="row">
<view class="name"><view class="textyou"><view >优</view><view>惠</view><view>券</view></view></view>
<view class="dot"></view>
<view class="desc">
<text wx:if="{{filter.formatMoney(order_product.coupon_amount_total)>0}}">- ¥{{filter.formatMoney(order_product.coupon_amount_total)}}</text>
<text wx:else>无</text>
</view>
</view>
<view class="row">
<view class="name"><text>邮</text><text>费</text></view>
<view class="dot"></view>
<view class="desc price">¥{{order_product.logistics_fee}}</view>
</view>
<view class="row">
<view class="name">支付金额</view>
<view class="dot"></view>
<view class="desc price">¥{{order_product.payment_amount_total}}</view>
</view>
<view class="row beizhu" wx:if="{{order_product.cancel_reason}}">
<view class="name"><text>备</text><text>注</text></view>
<view class="dot"></view>
<!-- 1:主动取消 2:复核失败/库存不足 3:支付超时 4:客服取消 -->
<view class="desc" wx:if="{{order_product.cancel_reason==1}}">主动取消 </view>
<view class="desc" wx:elif="{{order_product.cancel_reason==2}}">复核失败/库存不足 </view>
<view class="desc" wx:elif="{{order_product.cancel_reason==3}}">支付超时</view>
<view class="desc" wx:elif="{{order_product.cancel_reason==4}}"> 客服取消</view>
</view>
<!-- 商品订单退款状态(0:无退款 1:申请退款 2:退款中 3:退款成功 4:拒绝退款 5:退款关闭) -->
<view class="row" wx:if="{{order_product.order_product_status==5 && order_product.pay_status==2}}">
<view class="name">退款进度</view>
<view class="dot"></view>
<view class="desc" wx:if="{{order_product.refund_status==0}}">
无退款
</view>
<view class="desc" wx:elif="{{order_product.refund_status==1}}">
申请退款
</view>
<view class="desc" wx:elif="{{order_product.refund_status==2}}">
退款中
</view>
<view class="desc" wx:elif="{{order_product.refund_status==3}}">
退款成功
</view>
<view class="desc" wx:elif="{{order_product.refund_status==4}}">
拒绝退款
</view>
<view class="desc" wx:elif="{{order_product.refund_status==5}}">
退款关闭
</view>
</view>
<!-- <view class="orderrow" wx:if="{{order_product.order_product_status==4 || order_product.order_product_status==5}}">
<view class="express" bindtap="confirmDelOrder" >删除订单</view>
</view> -->
</view>
<view class="rowbox" wx:if="{{order_product.logistics_no}}">
<view class="titlebox">
<view class="name">物流信息</view>
<view class="status">
<view class="express" bindtap="goExpress" data-id="{{order_product.order_product_id}}">物流详情</view>
</view>
</view>
<view class="row first" >
<view class="name">物流编号</view>
<view class="dot"></view>
<view class="desc">{{order_product.logistics_no}}</view>
<view class="copy" bindtap="copy" data-text="{{order_product.logistics_no}}">复制</view>
</view>
<view class="row wuliu">
<image src="{{img_host+'/wuliucar.png'}}" class="wuliucar"></image>
<view class="desc">
<view class="dizhi">{{order_product.province+order_product.city+order_product.county+order_product.address}}</view>
<view class="date">{{order_product.updated_at}}</view>
</view>
</view>
</view>
<view class="infobox" >
<view class="title">
<view>共{{order_product_item.length}}个药品</view>
</view>
<view class="medincebox">
<view class="cell" wx:for="{{order_product_item}}" wx:key="product_item_id">
<view class="imgbox">
<image src="{{img_host+'/nomedince.png'}}" class="yaoimg"></image>
<view class="desc">
<view class="tip">处方药品</view>
<view class="tip">依据法规不展示包装</view>
</view>
</view>
<view class="rightinfo">
<view class="name">{{item.product_name}}<text class="namenum">{{item.product_spec}}</text></view>
<view class="own">
<view class="company">{{item.manufacturer}}</view>
<view class="num">数量:{{item.amount}}</view>
</view>
</view>
</view>
<view class="btnbox">
<view class="btn orderDetail" bindtap="goPrescriptionDetail" data-id="{{order_product.order_prescription_id}}">查看处方</view>
</view>
</view>
</view>
<view class="titlebox personinfo" wx:if="user_doctor && user_doctor.doctor_id">
<view class="name">问诊医生</view>
</view>
<view class="personinfobox" bindtap="goExpert">
<view class="namebox" style="justify-content: flex-start;">
<image src="{{user_doctor.avatar}}" class="head" wx:if="{{user_doctor.avatar}}" mode="aspectFill"></image>
<image src="{{img_host+'/doctor_avatar.png'}}" class="head" wx:else></image>
<view class="namewraper">
<view class="row">
<view class="name">{{user_doctor.user_name}}</view>
<!--
<view class="position" wx:elif="{{user_doctor.doctor_title==1}}">主任中医师</view>
<view class="position" wx:elif="{{user_doctor.doctor_title==2}}">主任医师</view>
<view class="position" wx:elif="{{user_doctor.doctor_title==3}}">副主任中医师</view>
<view class="position" wx:elif="{{user_doctor.doctor_title==4}}">副主任医师</view>
<view class="position" wx:elif="{{user_doctor.doctor_title==5}}">主治医师</view>
<view class="position" wx:elif="{{user_doctor.doctor_title==6}}">住院医师</view> -->
<view class="type" wx:if="{{user_doctor.hospital.hospital_level_name != '未知'&& item.hospital.hospital_level_name}}">{{user_doctor.hospital.hospital_level_name}}</view>
<view class="type" wx:if="{{user_doctor.multi_point_status == 1 && user_doctor.multi_point_enable==1}}">可处方</view>
</view>
<view class="hospital">
<!-- 1主任医师、2主任中医师、3副主任医师、4副主任中医师、5主治医师、8住院医师 -->
<text class="doctor_title" wx:if="{{user_doctor.doctor_title==1}}">主任医师</text>
<text class="doctor_title" wx:elif="{{user_doctor.doctor_title==2}}">主任中医师</text>
<text class="doctor_title" wx:elif="{{user_doctor.doctor_title==3}}">副主任医师</text>
<text class="doctor_title" wx:elif="{{user_doctor.doctor_title==4}}">副主任中医师</text>
<text class="doctor_title" wx:elif="{{user_doctor.doctor_title==5}}">主治医师</text>
<text class="doctor_title" wx:elif="{{user_doctor.doctor_title==6}}">住院医师</text>
<text>{{user_doctor.department_custom_name}}</text>
</view>
<view class="hospital">{{user_doctor.hospital.hospital_name}}</view>
</view>
<!-- <view class="guanzhu" wx:if="{{!user_doctor.follow}}" catchtap="toggleFllow">
<image src="{{img_host+'/star.png'}}" ></image>
<text decode="true">&nbsp;&nbsp;关注</text>
</view>
<view class="guanzhu" wx:else catchtap="toggleFllow">
<image src="{{img_host+'/star_on.png'}}" ></image>
<text decode="true">&nbsp;&nbsp;关注</text>
</view> -->
</view>
<view class="borderbox">
<view class="goodjob" style="margin-top: 30rpx;">
擅长:{{user_doctor.be_good_at}}
</view>
</view>
</view>
</view>
</view>
<view class="paybox" wx:if="{{order_product.order_product_status==1}}">
<view class="left" bindtap="confirmCancelPay">取消支付</view>
<view class="right" bindtap="goPay">立即支付:¥{{order_product.payment_amount_total}}</view>
</view>
<dialog bind:confirm="confirm" showDialog="{{showDialog}}" message="{{message}}"></dialog>
<van-dialog id="van-dialog" confirm-button-color="#3CC7C0" />
@@ -0,0 +1,520 @@
/* pages/medinceOrderDetail/medinceOrderDetail.wxss */
.page{
position: relative;
display: flex;
flex-direction: column;
margin-bottom:0rpx;
}
.outwraper{
flex:1;
overflow-y: scroll;
-webkit-overflow-scrolling: touch;
}
.outwraper.active{
padding-bottom: 104rpx;
}
.add {
width: 100%;
display: flex;
justify-content: center;
align-items: center;
height: 120rpx;
background: #FFFFFF;
font-weight: 600;
color: #ED9C00;
font-size: 32rpx;
}
.addicon{
width: 40rpx;
height:40rpx;
flex-shrink: 0;
}
.addressbox {
margin-top:172rpx;
align-items: center;
display: flex;
justify-content: space-between;
padding: 32rpx 32rpx;
background-color: #fff;
}
.addressbox .left {
display: flex;
align-items: center;
}
.addressbox .icon {
width: 40rpx;
flex-shrink: 0;
height: 47rpx;
}
.addressbox .info {
margin-left: 30rpx;
}
.addressbox .ricon {
width: 24rpx;
height: 48rpx;
}
.info .name {
font-size: 28rpx;
font-weight: 600;
color: #333333
}
.info .address {
margin-top: 10rpx;
color: #333333;
font-size: 28rpx;
}
.row {
align-items: center;
padding: 0 32rpx;
display: flex;
line-height: 52rpx
}
.row.first {
margin-top: 34rpx;
}
.rowbox .row .name {
white-space: nowrap;
font-size: 28rpx;
color: #333;
font-weight: 600;
display: flex;
width:114rpx;
align-items: baseline;
justify-content: space-between;
}
.row .dot{
font-weight: 600;
display: flex;
align-items: baseline;
}
.row .desc {
align-items: baseline;
font-size: 28rpx;
color: #333;
}
.rowdesc {
align-items: flex-start;
}
.rowdesc .desc {
text-overflow: -o-ellipsis-lastline;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
line-clamp: 2;
-webkit-box-orient: vertical
}
.row .price {
color: #EF4F20;
font-weight: bold;
font-size: 34rpx
}
.row.last {
justify-content: space-between;
}
.copy {
width: 80rpx;
height: 40rpx;
color: #FFFFFF;
font-size: 24rpx;
display: flex;
margin-left: 20rpx;
align-items: center;
justify-content: center;
background: #3CC7C0;
border-radius: 6rpx;
}
.row .left {
display: flex;
}
.row .right {
display: flex;
}
.titlebox .name {
color: #000;
font-size: 34rpx;
}
.rowbox{
margin-top: 20rpx;
background-color: #fff;
padding-bottom: 30rpx;
}
.titlebox {
padding: 0 32rpx;
height: 112rpx;
border-bottom: 1rpx solid #E3E4E5;
display: flex;
justify-content: space-between;
align-items: center;
}
.titlebox .status{
font-size: 28rpx
}
.waitpay {
text-align: right;
color: #EF4F20
}
.headicon {
width: 80rpx;
height: 80rpx;
border-radius: 50%;
}
.van-count-down {
margin-top: 5rpx;
color: #EF4F20 !important;
}
.infobox {
margin-top: 20rpx;
background:#fff;
}
.infobox .status{
font-size: 28rpx;
font-weight: 400;
color: #333333;
}
.infobox .status.wait{
color: #EF4F20;
}
.infobox .status.timeout{
color: #EF4F20;
}
.infobox .title {
padding: 0 32rpx;
background-color: #fff;
font-size: 34rpx;
height: 112rpx;
align-items: center;
display: flex;
justify-content: space-between;
border-bottom: 1rpx solid #E3E4E5;
}
.imgbox {
border-radius:8rpx;
border:1rpx solid #ccc;
width: 200rpx;
height: 200rpx;
display: flex;
align-items: center;
justify-content: center;
position: relative;
}
.yaoimg {
width: 120rpx;
height: 128rpx;
}
.imgbox .desc {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
position: absolute;
top: 50%;
font-size: 22rpx;
font-weight: 400;
color: #666666;
line-height: 30rpx;
transform: translateY(-50%);
}
.imgbox .desc .tip {
text-align: center;
}
.medincebox .cell {
padding: 30rpx 32rpx;
display: flex;
align-items: center;
border-bottom: 1rpx solid #E3E4E5;
}
.medincebox .cell:nth-last-child(2){
border-bottom:none;
}
.rightinfo {
margin-left: 30rpx;
flex: 1;
display: flex;
flex-direction: column;
justify-content: center;
}
.medincebox .cell .name {
word-break: break-all;
font-size: 32rpx;
font-weight: bold;
color: #333;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
}
.row.beizhu{
align-items: flex-start;
}
.rightinfo .own {
margin-top: 47rpx;
display: flex;
justify-content: space-between;
align-items: center;
font-size: 28rpx;
font-weight: 400;
color: #333333;
}
.btnbox{
display: flex;
padding:0 32rpx;
font-size: 30rpx;
padding-bottom: 30rpx;
justify-content: flex-end;
}
.btnbox .btn{
display: flex;
justify-content: space-between;
align-items: center;
padding: 0 20rpx;
height:58rpx;
background: #FFFFFF;
border-radius: 30rpx;
margin-left: 20px;
}
.btnbox .orderDetail{
background: #3CC7C0;
color:#fff;
border: 1rpx solid #3CC7C0;
}
.personinfo{
margin-top: 20rpx;
background: #fff;
}
.personinfobox {
padding: 30rpx 32rpx 40rpx;
background: #fff;
margin-bottom:10rpx;
}
.personinfobox .title {
background-color: #fff;
font-size: 32rpx;
height: 112rpx;
align-items: center;
display: flex;
justify-content: space-between;
border-bottom: 1rpx solid #E3E4E5;
}
.personinfobox .namebox .head {
width: 80rpx;
height:80rpx;
border-radius: 50%;
}
.personinfobox .namebox .guanzhu image {
width: 28rpx;
height: 26rpx;
}
.personinfobox .namewraper {
flex:1;
display: flex;
justify-content: space-between;
flex-direction: column;
margin-left: 20rpx;
}
.personinfobox .type {
height: 32rpx;
display: flex;
margin-bottom: 6rpx;
line-height: 32rpx;
white-space: nowrap;
align-items: center;
margin-left: 18rpx;
padding: 0rpx 6rpx;
background: #ED9C00;
border-radius: 4rpx;
color: #FFFFFF;
font-size: 24rpx;
}
.personinfobox .namebox .row {
display: flex;
padding:0;
align-items: flex-end;
}
.personinfobox .namebox {
display: flex;
align-items:stretch;
justify-content: space-between;
}
.personinfobox .namebox .name {
display: inline-block;
overflow: hidden;
max-width:400rpx;
text-overflow: ellipsis;
white-space: nowrap;
font-weight: 600;
color: #333333;
font-size: 34rpx;
}
.personinfobox .position {
font-size: 30rpx;
white-space: normal;
word-break: break-all;
}
.doctor_title{
margin-right: 10rpx;
}
.personinfobox .namebox .row{
line-height: 40rpx;
align-items: flex-end;
}
.personinfobox .hospital {
margin-top: 12rpx;
color: #333333;
font-size: 28rpx;
white-space: normal;
word-break: break-all;
}
.personinfobox .namebox .position {
font-weight: normal;
white-space: nowrap;
margin-left: 15rpx;
font-size: 30rpx;
}
.personinfobox .goodjob {
color: #666666;
margin-top: 38rpx;
line-height: 42rpx;
margin-left: 100rpx;
font-size: 28rpx;
word-break: break-all;
}
.paybox{
bottom:0px;
background: #FFFFFF;
position: absolute;
display: flex;
z-index:9;
width:100%;
}
.paybox .left{
flex:1;
font-size: 28rpx;
font-weight: 600;
color: #999999;
height:104rpx;
display: flex;
align-items: center;
justify-content: center;
}
.orderrow{
display: flex;
margin:10rpx 32rpx 0;
justify-content: flex-end;
}
.paybox .right{
font-size: 28rpx;
color: #FFFFFF;
font-weight: 600;
display: flex;
align-items: center;
justify-content: center;
background: #3CC7C0;
height:104rpx;
flex:2;
}
.express{
width: 158rpx;
height: 60rpx;
display: flex;
justify-content: center;
align-items: center;
background: #F8F8F8;
font-size: 26rpx;
font-weight: 400;
color: #353535;
border-radius: 6rpx;
border: 1rpx solid rgba(5,5,5,0.1);
}
.namenum{
font-size: 28rpx;
font-weight: 400;
color: #333333;
}
.row.wuliu{
margin-top: 20rpx;
align-items: flex-start;
}
.row.wuliu .desc{
margin-left: 20rpx;
}
.desc .dizhi{
font-size: 28rpx;
font-weight: 400;
color: #333333;
line-height: 28rpx;
}
.wuliucar{
width:40rpx;
height:33rpx;
flex-shrink: 0;
}
.row.wuliu .date{
font-size: 24rpx;
font-weight: 400;
color: #666666;
}
.guanzhu {
flex-shrink: 0;
display: flex;
white-space: nowrap;
color: #3CC7C0;
font-size: 30rpx;
font-weight: 600;
justify-content: center;
align-items: center;
font-size: 24rpx;
}
.namebox .guanzhu image {
width: 35rpx;
height: 32rpx;
}
.textyou{
width:112rpx;
display: flex;
justify-content: space-between;
}
@@ -0,0 +1,268 @@
// pages/medinceRecord/medinceRecord.js
const app = getApp()
import {
medinceRecord,
family
} from "../../../api/familyDoc"
import {throttle} from "../../../utils/util"
import {isReceivepatient} from "../../../api/consultExpert"
Page({
/**
* 页面的初始数据
*/
data: {
img_host:'https://oss.prod.applets.igandanyiyuan.com/applet/patient/static',
show: false,
showDialogConsult:false,
isTriggered:false,
showdialog: false,
message: '',
id:'',
page: 1,
pageNumber: 10,
currentName: "全部就诊人",
family_id: 0,
currentFamilyId: '',
currentIndex: 0,
list: [],
sex: "",
option2: [],
product: "",
isLock: false
},
isChangePeople(){
this.setData({
showdialog: true
})
},
handleSeeDr:throttle(function(event) {
let {id,familyid,sex}= event.currentTarget.dataset
let info = (this.data.list)[id].order_product_item;
info.forEach(item=>{
item.product_num=item.amount;
})
this.setData({
currentFamilyId: familyid,
product:JSON.stringify(info),//JSON.stringify(medinceInfo)
sex:sex
})
this.handleIsReceivepatient(this.isChangePeople)
}),
confirmConsult:throttle(function(event) {
let {id}=this.data;
if (event.detail) {
app.method.navigateTo({
url: '/patient/pages/orderDetail/orderDetail?order_inquiry_id=' + id,
})
}
}),
goBack(){
wx.navigateBack({
delta: 1,
})
},
lower(e) {
if (!this.data.isLock) {
this.setData({
page: ++this.data.page
});
this.handleMedinceRecord()
}
},
handleIsReceivepatient(callback) {
isReceivepatient({
inquiry_type:4,
inquiry_mode: 1,
doctor_id: ''
}).then(data => {
if (data.status == 1) {
callback();
} else if (data.status == 2) {
this.setData({
showDialogConsult: true,
id: data.data.order_inquiry_id
})
} else if (data.status == 3) {
wx.showToast({
title: data.message,
icon: "none"
})
}
})
},
getfamily() {
family().then(data => {
let arr = [];
data.forEach((item, index) => {
arr[index] = {};
let sex = "";
switch (item.sex) {
case '0':
sex = "未知";
break;
case '1':
sex = "男";
break;
case '2':
sex = "女";
break;
}
let age = item.age;
arr[index].text = item.card_name + "" + sex + "" + age + "岁)";
arr[index].value = item.family_id;
})
arr = [{
text: "全部就诊人",
value: 0
}].concat(arr);
this.setData({
option2: arr
})
})
},
handleRefresher(){
this.onFresh()
},
handleMedinceRecord() {
let {
family_id,
page,
pageNumber
} = this.data;
medinceRecord({
family_id,
page,
per_page: pageNumber
}).then(data => {
let result = data.data;
if (result.length == 0) {
this.setData({
isLock: true,
isTriggered:false
})
return false
}
this.setData({
isTriggered:false,
list: this.data.list.concat(result)
})
})
},
onFresh() {
this.setData({
page: 1,
list: [],
isLock: false
})
this.handleMedinceRecord();
},
showPicker() {
this.setData({
show: true
})
},
onConfirm(event) {
const {
value
} = event.detail;
this.setData({
show: false,
currentName: `${value.text}`,
family_id: `${value.value}`,
})
this.onFresh()
},
onCancel() {
this.setData({
show: false
})
},
onConfirmDialog:throttle(function() {
let {
product
} = this.data;
this.setData({
showdialog: false
});
app.method.navigateTo({
url: "/patient/pages/medinceList/medinceList?product="+product
})
}),
onCloseDialog:throttle(function() {
let {
currentFamilyId,
product,
sex
} = this.data;
this.setData({
showdialog: false
});
console.log(currentFamilyId);
app.method.navigateTo({
url: '/patient/pages/writeSick/writeSick?family_id='+currentFamilyId +"&inquiry_type=4"+"&product="+product+"&sex="+sex
})
}),
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
this.setData({
img_host:app.hostConfig().imghost
});
this.onFresh();
this.getfamily();
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
})
@@ -0,0 +1,11 @@
{
"usingComponents": {
"van-picker": "@vant/weapp/picker/index",
"van-popup": "@vant/weapp/popup/index",
"van-dialog": "@vant/weapp/dialog/index",
"dialog":"../../../components/dialog/dialog",
"nav":"../../../components/nav/nav"
},
"navigationStyle":"custom",
"navigationBarTitleText": "肝胆相照互联网医院"
}
@@ -0,0 +1,47 @@
<!--pages/medinceRecord/medinceRecord.wxml-->
<wxs src="../../../filters/filter.wxs" module="moduleFilter"></wxs>
<nav navName="用药记录"></nav>
<view class="page">
<view class="conbox" wx:if="{{option2.length>0}}">
<view class="recordtitle" bindtap="showPicker">
<view class="name">{{currentName}}</view>
<image src="{{img_host+'/xia.png'}}" class="xia {{show?'active':''}}"></image>
</view>
<scroll-view scroll-y="true" bindrefresherrefresh="handleRefresher" class="recordwrper scrollbox" refresher-triggered="{{isTriggered}}" refresher-threshold="100" refresher-enabled="true" bindscrolltolower="lower" wx:if="{{list.length>0}}">
<view class="recordcell" wx:for="{{list}}" wx:key="family_id" wx:for-index="idx">
<view class="namebox">
<view class="name">{{item.patient_family.card_name_mask}}<text wx:if="{{item.patient_family.sex==1}}">男</text><text wx:elif="{{item.patient_family.sex==2}}">女</text><text wx:else>未知</text>{{item.patient_family.age}}岁)</view>
<view class="date">{{moduleFilter.transforDay(item.created_at,'date')}}</view>
</view>
<view class="desc" wx:if="{{item.order_prescription_icd.length>0}}">
<text class="sickname" wx:for="{{item.order_prescription_icd}}" wx:key="prescription_icd_id" wx:for-item="itemName">{{itemName.icd_name}}</text>
</view>
<view class="box" wx:if="{{item.order_product_item.length>0}}">
<view class="recorddes" wx:for="{{item.order_product_item}}" wx:for-item="itemUnit">
<text class="text">{{itemUnit.product_name}}{{itemUnit.product_spec}}(数量{{itemUnit.amount}}</text>
</view>
</view>
<view class="btnbox">
<view class="btn" data-id="{{idx}}" data-familyid="{{item.patient_family.family_id}}" data-sex="{{item.patient_family.sex}}" bindtap="handleSeeDr" data-age="{{item.patient_family.age}}" data-name="{{tem.patient_family.card_name}}">续方复诊</view>
</view>
</view>
</scroll-view>
<view wx:else class="nonedata">暂无数据!</view>
</view>
</view>
<van-popup show="{{ show }}" round position="bottom" bind:close="onClose">
<van-picker title="全部就诊人" show-toolbar columns="{{ option2 }}" bind:cancel="onCancel" bind:confirm="onConfirm"></van-picker>
</van-popup>
<van-dialog
title="温馨提示"
message="是否更换就诊人?"
show="{{ showdialog }}"
show-cancel-button
cancelButtonText="否"
confirmButtonText="是"
confirm-button-color="#3CC7C0" bind:confirm="onConfirmDialog" bind:cancel="onCloseDialog"
>
</van-dialog>
<dialog bind:confirm="confirmConsult" showDialog="{{showDialogConsult}}" message="您有仍在进行中的问诊,是否立即前往继续咨询?" ></dialog>
@@ -0,0 +1,110 @@
/* pages/medinceRecord/medinceRecord.wxss */
.page{
display: flex;
flex-direction: column;
}
.conbox{
flex:1;
display: flex;
flex-direction: column;
}
.recordwrper{
flex:1;
overflow-y: scroll;
-webkit-overflow-scrolling: touch;
border: 1px solid transparent;
}
.conbox{
margin-top: 172rpx;
}
.recordtitle{
margin:36rpx 32rpx 0;
height: 105rpx;
/* padding-bottom: 20rpx; */
background: #3CC7C0;
border-radius: 10rpx;
display: flex;
align-items: center;
color:#fff;
}
.recordtitle .name{
margin-left: 22rpx;
font-size: 40rpx;
}
.xia{
width:28rpx;
margin-left: 10rpx;
height:28rpx;
transition: all 0.5s linear;
}
.xia.active{
transform: rotate(180deg);
}
.recordcell{
padding:20rpx;
margin:0 32rpx 20rpx;
background: #FFFFFF;
border-radius: 10rpx
}
.namebox{
display: flex;
justify-content: space-between;
align-items: center;
height: 92rpx;
border-bottom: 1rpx solid #E3E4E5;
}
.namebox .name{
color: #333333;
font-size: 34rpx;
}
.namebox .date{
font-size: 28rpx;
color: #999999;
}
.desc{
word-wrap: break-word;
font-size: 30rpx;
color: #666666;
margin-top: 20rpx;
}
.desc .sickname::after{
content:""
}
.desc .sickname:last-child::after{
content:""
}
.recorddes{
font-size: 28rpx;
margin-top: 20rpx;
color: #666666;
padding:10rpx;
background: #FAFAFA;
border-radius: 10rpx;
line-height: 48rpx;
word-wrap: break-word;
}
.recorddes .text::after{
content: "";
}
.recorddes .text:last-child::after{
content: "";
}
.btnbox{
margin-top: 20rpx;
display: flex;
justify-content: flex-end;
}
.btn{
width: 168rpx;
display: flex;
justify-content: center;
align-items: center;
height: 60rpx;
font-size: 28rpx;
color: #FFFFFF;
background: linear-gradient(129deg, #13DFD5 0%, #31C9C1 100%);
border-radius: 29rpx;
}
.nonedata{
min-height:600rpx;
}
@@ -0,0 +1,280 @@
// pages/applyMedince/applyMedince.js
const app = getApp()
import {
cart,
editCart,
goodList
} from "../../../api/goodsCar"
import {throttle} from "../../../utils/util"
Page({
/**
* 页面的初始数据
*/
data: {
product_keyword: '',
totalNumber: 0,
isFocus:false,
isLock: false,
show: true,
toggle: false,
hideInput: false,
list: [],
img_host:'https://oss.prod.applets.igandanyiyuan.com/applet/patient/static',
cart: [],
toggle: false,
medinceSearchList: [],
},
HandleGoodList() {
let {
product_keyword
} = this.data;
goodList({
product_keyword: product_keyword
}).then(data => {
this.setData({
list: data
})
})
},
getCart() {
cart().then(data => {
let cart = 0;
for (let i = 0; i < data.length; i++) {
cart = cart + data[i].shopping_cart_num;
};
this.setData({
totalNumber: cart
})
})
},
minusGoods(event) {
if (!this.data.isLock) {
this.setData({
isLock:true
})
let index = event.currentTarget.dataset.id;
let shopping_cart_num = this.data.list[index].shopping_cart_num;
let product_id = this.data.list[index].product_id;
if(shopping_cart_num==0){
this.setData({
isLock:false
})
return false
}
--shopping_cart_num;
this.handleEditCart(product_id, shopping_cart_num, index, 'minus');
}
},
addGoods(event) {
if(!this.data.isLock){
this.setData({
isLock:true
})
let index = event.currentTarget.dataset.id;
let shopping_cart_num = this.data.list[index].shopping_cart_num;
let stock = this.data.list[index].stock;
let product_id = this.data.list[index].product_id;
if(shopping_cart_num>=5){
wx.showToast({
title: '每个药品购买数量不超过5个',
icon: "none"
})
this.setData({
isLock:false
})
return false
}
if (shopping_cart_num == stock) {
this.setData({
isLock:false
})
wx.showToast({
title: '该商品库存已不足',
icon: "none"
})
return false
}
++shopping_cart_num;
this.handleEditCart(product_id, shopping_cart_num, index, 'add');
}
},
goBack(){
wx.navigateBack({
delta: 1,
})
},
handleEditCart(product_id, shopping_cart_num, index, type) {
let item = `list[${index}].shopping_cart_num`;
editCart({
product_id: product_id,
shopping_cart_num: shopping_cart_num
}).then(data => {
let number = this.data.totalNumber;
if (type == "add") {
++number
} else {
--number
};
this.setData({
[item]: shopping_cart_num,
totalNumber: number,
isLock:false
})
})
},
goSearch(event) {
this.setData({
product_keyword: event.detail.value,
toggle: true
});
this.handleSearch(event.detail.value)
},
handleSearch(value) {
if(!value) return false
let serachList = wx.getStorageSync('medinceSearchList');
let serachArr = [];
if (serachList) {
serachArr = JSON.parse(serachList);
};
var index = serachArr.indexOf(value);
if (index != -1) {
serachArr.splice(index, 1);
};
if(serachArr.length>=30){
serachArr.pop();
};
serachArr.unshift(value);
wx.setStorageSync('medinceSearchList', JSON.stringify(serachArr));
this.setData({
medinceSearchList: serachArr,
product_keyword:value
})
this.HandleGoodList();
},
selectHistroy(event) {
let value = event.currentTarget.dataset.id;
this.setData({
product_keyword: value,
toggle: true
});
this.handleSearch(value)
},
delSearch() {
wx.setStorageSync('medinceSearchList', '');
this.getSearchList();
wx.showToast({
title: '搜索历史已清空',
icon: 'none'
})
},
getSearchList() {
let serachList = wx.getStorageSync('medinceSearchList');
let serachArr = [];
if (serachList) {
serachArr = JSON.parse(serachList);
};
this.setData({
medinceSearchList: serachArr
})
},
goMedinceList:throttle(function() {
app.method.navigateTo({
url: '/patient/pages/medinceList/medinceList',
})
}),
handleFcous() {
this.setData({
show: false
});
this.HandleGoodList();
setTimeout(()=>{
this.setData({
isFocus: true
});
},600)
},
// handleIpt(event) {
// if (event.detail.value) {
// this.setData({
// hideInput: true
// })
// } else {
// this.setData({
// hideInput: false
// })
// }
// },
addNumber() {
this.setData({
totalNumber: ++this.data.totalNumber
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
this.setData({
show:true,
img_host:app.hostConfig().imghost
})
this.getSearchList();
this.getCart();
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
})
@@ -0,0 +1,8 @@
{
"usingComponents": {
"van-transition": "@vant/weapp/transition/index",
"nav":"../../../components/nav/nav"
},
"navigationStyle":"custom",
"navigationBarTitleText": "肝胆相照互联网医院"
}
@@ -0,0 +1,92 @@
<nav navName="申请开药"></nav>
<view class="page {{show?'':'active'}}">
<van-transition show="{{ show }}" custom-style="width:100%;height:auto;">
<view class="wraper">
<view class="searchband">
<view class="brandtitle">
<image src="{{img_host+'/blackss.png'}}" class="ssimg"></image>
<view class="name">添加需购买的药品</view>
</view>
<view class="iptbox">
<view class="tipbox" hidden="{{hideInput}}">
<view class="tips">
<view class="title placeholderIpt">请输入药品名称</view>
<image src="{{img_host+'/ss.png'}}" class="ssimg"></image>
</view>
</view>
<input type="text" class="ipt" value="" disabled="{{true}}" bindtap="handleFcous" placeholder="" placeholder-class="placeholderIpt" />
</view>
</view>
</view>
</van-transition>
<van-transition show="{{ !show }}" name="slide-right" custom-style="width:100%;height:auto;">
<view class="wrapercon">
<view class="searchbox">
<input type="text" value="{{product_keyword}}" focus="{{isFocus}}" confirm-type="search" bindconfirm="goSearch" placeholder="请输入药品名称" confirm-type="search" placeholder-class="placeholderIpt" />
<image src="{{img_host+'/greenss.png'}}" ></image>
</view>
<view class="listbox" wx:if="{{medinceSearchList.length>0}}">
<view class="titlebox">
<view class="name">搜索历史</view>
<image src="{{img_host+'/del.png'}}" class="del" bindtap="delSearch"></image>
</view>
<view class="listUl">
<view class="cell" wx:for="{{medinceSearchList}}" wx:for-index="idx" wx:key="idx" bindtap="selectHistroy" data-id="{{item}}"> {{item}} </view>
</view>
</view>
<view class="medincebox">
{{list.length}}
<view class="cell" wx:for="{{list}}" wx:key="product_id">
<view class="imgbox">
<image src="{{img_host+'/nomedince.png'}}" class="yaoimg"></image>
<view class="desc">
<view class="tip">处方药品</view>
<view class="tip">依据法规不展示包装</view>
</view>
</view>
<view class="rightinfo">
<view class="name">复方乌鸡口服液补气血,益肝,主治气血两虚<text class="namenum">6g*10袋</text></view>
<view class="own">
<view class="company">¥34</view>
<image src="{{img_host+'/add.png'}}" class="add"></image>
</view>
</view>
</view>
<!-- <view class="cell" wx:for="{{list}}" wx:key="product_id" wx:for-index="index">
<view>{{item.product_id}}</view>
<view class="imgbox">
<image src="{{img_host+'/nomedince.png'}}" class="yaoimg"></image>
<view class="desc">
<view class="tip">处方药品</view>
<view class="tip">依据法规不展示包装</view>
</view>
</view>
<view class="rightinfo">
<view class="name">{{item.product_name}}<text class="namenum" wx:if="{{item.product_spec}}">{{item.product_spec}}{{item.packaging_unit}}</text></view>
<view class="yaodian">{{item.manufacturer}}</view>
<view class="own">
<view class="company">¥{{item.product_price}}</view>
<view class="handle">
<view class="addbox min" data-id="{{index}}" bindtap="minusGoods">
<image src="https://img.applets.igandanyiyuan.com/applet/patient/static/jian.png" class="add" hidden="{{item.shopping_cart_num==0}}"></image>
</view>
<view class="number" hidden="{{item.shopping_cart_num==0}}">{{item.shopping_cart_num}}</view>
<view class="addbox" bindtap="addGoods" data-id="{{index}}">
<image src="https://img.applets.igandanyiyuan.com/applet/patient/static/add.png" class="add {{item.shopping_cart_num>=5?'disabled':''}}"></image>
</view>
</view>
</view>
</view>
</view> -->
</view>
<!-- <view wx:elif="{{list.length==0 && toggle}}" class="nonedata">暂无数据!</view> -->
</view>
</van-transition>
<view class="btnbox">
<view class="btn" bindtap="goMedinceList">查看已添加的药品并开具处方</view>
<view class="bage" hidden="{{totalNumber==0}}">{{totalNumber}}</view>
</view>
</view>
@@ -0,0 +1,294 @@
/* pages/medinceSearch/medinceSearch.wxss *//* pages/applyMedince/applyMedince.wxss */
.page {
overflow: hidden;
display: flex;
flex-direction: column;
}
.page.active{
background: #fff;
}
.wraper{
margin-top: 212rpx;
width:100%;
}
.wrapercon{
display: flex;
flex-direction: column;
overflow: hidden;
width:100%;
top:172rpx;
position: absolute;
bottom:160rpx;
background-color: #fff;
}
.searchband{
margin:40rpx 32rpx 0;
padding:30rpx;
border-radius: 10rpx;
background:#fff;
}
.iptbox{
margin-top: 30rpx;
position: relative;
}
.ipt{
width:100%;
text-align: center;
height: 68rpx;
background: #FBFBFB;
border-radius: 34rpx;
border: 1rpx solid #3CC7C0;
}
.iptbox .tips{
position: absolute;
display: flex;
height: 70rpx;
width:100%;
align-items: center;
justify-content: center;
}
.tips .title{
margin-right: 10rpx;
}
.brandtitle{
display: flex;
font-size: 34rpx;
color: #333333;
align-items: center;
}
.ssimg{
margin-right: 20rpx;
width:30rpx;
height:30rpx;
}
.searchbox {
margin: 30rpx 32rpx 0;
height: 68rpx;
background: #FBFBFB;
border-radius: 34rpx;
border: 1rpx solid #3CC7C0;
display: flex;
border-radius: 40rpx;
align-items: center;
}
.searchbox input {
margin-left: 30rpx;
flex: 1;
font-size: 32rpx;
height: 80rpx;
}
.searchbox image {
width: 30rpx;
height: 30rpx;
margin-right: 28rpx;
}
.titlebox{
margin:30rpx 32rpx 0;
display: flex;
align-items: center;
justify-content: space-between;
}
.titlebox .del{
width:32rpx;
height:32rpx;
}
.titlebox .name{
font-size: 28rpx;
color: #333333;
}
.listUl{
margin:30rpx 32rpx 0;
display: flex;
flex-wrap: wrap;
}
.listUl .cell{
width: 154rpx;
padding:0 10rpx;
box-sizing: border-box;
margin-right: 23rpx;
margin-bottom: 30rpx;
text-align: center;
line-height: 60rpx;
height: 60rpx;
background: #F4F4F4;
border-radius: 30rpx;
font-size: 28rpx;
color: #666666;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
.listUl .cell:nth-child(4n){
margin-right: 0rpx;
}
.btnbox{
position: fixed;
left:32rpx;
right:32rpx;
bottom:40rpx;
height: 94rpx;
background: #3CC7C0;
border-radius: 47rpx;
}
.btnbox .btn{
width:100%;
height: 94rpx;
display: flex;
justify-content: center;
align-items: center;
font-size: 36rpx;
color: #FFFFFF;
}
.bage {
top:3rpx;
position: absolute;
right:76rpx;
padding: 0 10rpx;
height: 36rpx;
display: flex;
align-items: center;
color: #fff;
line-height: 38rpx;
border-radius: 30rpx;
font-size: 26rpx;
background: #EF4F20;
}
.placeholderIpt{
font-size: 28rpx;
font-weight: 400;
color: #999999;
}
.medincebox {
position: relative;
z-index:22;
background-color: red;
flex:1;
overflow-y: scroll;
-webkit-overflow-scrolling: touch;
/* background-color: #fff; */
}
.medincebox .cell {
padding: 30rpx 32rpx;
display: flex;
align-items: center;
border-bottom: 1rpx solid #E3E4E5;
}
.medincebox .add{
width:44rpx;
height:44rpx;
}
.medincebox .add.disabled{
opacity: 0.55;
}
.medincebox .cell:nth-last-child(2){
border-bottom:none;
}
.rightinfo {
margin-left: 30rpx;
flex: 1;
display: flex;
flex-direction: column;
justify-content: center;
}
.medincebox .cell .name {
word-break: break-all;
font-size: 32rpx;
font-weight: bold;
color: #333;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
/* 这里是超出几行省略 */
overflow: hidden;
}
.handle{
height:50rpx;
display: flex;
align-items: center;
font-size: 28rpx;
}
.addbox{
display: flex;
align-items: center;
width: 66rpx;
justify-content: flex-start;
}
.addbox.min{
justify-content: flex-end;
}
.handle .number{
width:20rpx;
text-align: center;
margin:0 8rpx;
}
.imgbox {
border-radius:8rpx;
border:1rpx solid #ccc;
width: 200rpx;
height: 200rpx;
display: flex;
align-items: center;
justify-content: center;
position: relative;
}
.yaoimg {
width: 120rpx;
height: 128rpx;
}
.imgbox .desc {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
position: absolute;
top: 50%;
font-size: 22rpx;
font-weight: 400;
color: #666666;
line-height: 30rpx;
transform: translateY(-50%);
}
.imgbox .desc .tip {
text-align: center;
}
.rightinfo .own {
margin-top: 47rpx;
display: flex;
justify-content: space-between;
align-items: center;
font-size: 28rpx;
font-weight: 400;
color: #333333;
}
.namenum{
font-size: 28rpx;
font-weight: 400;
color: #333333;
}
.yaodian{
margin-top: 25rpx;
color:rgba(51, 51, 51, 1);
font-size: 28rpx;
}
.own .company{
font-size: 34rpx;
font-weight: 600;
color: #EF4F20;
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,13 @@
{
"usingComponents": {
"van-switch": "@vant/weapp/switch/index",
"van-radio": "@vant/weapp/radio/index",
"van-radio-group": "@vant/weapp/radio-group/index",
"van-datetime-picker": "@vant/weapp/datetime-picker/index",
"van-popup": "@vant/weapp/popup/index",
"van-picker": "@vant/weapp/picker/index",
"nav":"../../../components/nav/nav"
},
"navigationStyle":"custom",
"navigationBarTitleText": "肝胆相照互联网医院"
}
@@ -0,0 +1,399 @@
<!--pages/memberDetail/memberDetail.wxml-->
<wxs src="../../../filters/filter.wxs" module="filter"></wxs>
<nav navName="家庭成员详情"></nav>
<view class="page">
<!--<view class="ui-navigatorbar" style="background: #FFFFFF;border-bottom: 1rpx solid #E3E4E5;">
<image class="ui-navigatorbar-back" bindtap="goBack" src="{{img_host+'/back.png'}}" />
<view class="ui-title">家庭成员详情</view>
</view> -->
<view class="progressbox" hidden="{{!(tab==1)}}">
<view class="progess" >
<view class="circle active">1</view>
<!-- <view class="circle finished">✓</view> -->
<div class="line "></div>
<view class="circle">2</view>
<div class="line"></div>
<view class="circle">3</view>
</view>
<view class="textbox">
<view class="textcell active">基本信息</view>
<view class="textcell">个人情况</view>
<view class="textcell">健康情况</view>
</view>
</view>
<view class="progressbox" hidden="{{!(tab==2)}}">
<view class="progess" >
<view class="circle finished">
<image src="{{img_host+'/complete_info.png'}}" class="img"></image>
</view>
<div class="line active"></div>
<view class="circle active">2</view>
<div class="line"></div>
<view class="circle">3</view>
</view>
<view class="textbox">
<view class="textcell active">基本信息</view>
<view class="textcell">个人情况</view>
<view class="textcell">健康情况</view>
</view>
</view>
<view class="progressbox" hidden="{{!(tab==3)}}">
<view class="progess" >
<view class="circle finished">
<image src="{{img_host+'/complete_info.png'}}" class="img"></image>
</view>
<div class="line active"></div>
<view class="circle finished">
<image src="{{img_host+'/complete_info.png'}}" class="img"></image>
</view>
<div class="line active"></div>
<view class="circle active">3</view>
</view>
<view class="textbox">
<view class="textcell active">基本信息</view>
<view class="textcell">个人情况</view>
<view class="textcell">健康情况</view>
</view>
</view>
<view class="cellbox {{notallowEdit?'active':''}}">
<view class="step1" hidden="{{!(tab==1)}}">
<view class="cell" bindtap="openTips">
<view class="cellrow">
<view class="name">
姓名 <text class="red">*</text>
</view>
<view class="iptbox">
<input type="text" value="{{user_info.name}}" bindinput="handleIpt" data-id="name" placeholder="请填写患者真实姓名" placeholder-class="placeholder" class="ipt" disabled="{{notallowEdit || family_id?true:false}}" />
</view>
</view>
</view>
<view class="cell" bindtap="openTips">
<view class="cellrow">
<view class="name">
身份证号 <text class="red">*</text>
</view>
<view class="iptbox">
<input type="text" placeholder="请填写患者真实身份证号" value="{{user_info.id_number}}" bindinput="handleIpt" data-id="id_number" placeholder-class="placeholder" class="ipt" disabled="{{notallowEdit || family_id?true:false }}" />
</view>
</view>
</view>
<view class="cell" bindtap="onOpenCity">
<view class="cellrow">
<view class="name">
所在城市
</view>
<view class="iptbox">
<input type="text" placeholder="请选择患者所在城市" value="{{(user_info.province +user_info.city+user_info.county)?(user_info.province +user_info.city+user_info.county):'' }}" placeholder-class="placeholder" class="ipt" disabled="{{true}}" />
<image src="{{img_host+'/righticon.png'}}" class="righticon"></image>
</view>
</view>
</view>
<view class="cell" bindtap="openPicker">
<view class="cellrow">
<view class="name">
患者关系
</view>
<view class="iptbox">
<input type="text" placeholder="请选择与患者关系" value="{{relation_name}}" placeholder-class="placeholder" class="ipt" disabled="{{true}}" />
<image src="{{img_host+'/righticon.png'}}" class="righticon"></image>
</view>
</view>
</view>
<view class="cell">
<view class="cellrow">
<view class="name">
联系电话
</view>
<view class="iptbox">
<input type="text" placeholder="请输入联系电话" bindinput="handleIpt" data-id="mobile" value="{{user_info.mobile}}" placeholder-class="placeholder" class="ipt" disabled="{{notallowEdit}}" />
</view>
</view>
</view>
<view class="cell">
<view class="cellrow">
<view class="name">
身高(cm)
</view>
<view class="iptbox">
<input type="digit" placeholder="请输入身高(35cm-250cm)" value="{{user_info.height}}" bindinput="handleIpt" data-id="height" placeholder-class="placeholder" class="ipt" disabled="{{notallowEdit}}" />
</view>
</view>
</view>
<view class="cell">
<view class="cellrow">
<view class="name">
体重(kg)
</view>
<view class="iptbox">
<input type="digit" placeholder="请输入体重(2kg-200kg" value="{{user_info.weight}}" bindinput="handleIpt" data-id="weight" placeholder-class="placeholder" class="ipt" disabled="{{notallowEdit}}" />
</view>
</view>
</view>
<view class="cell" bindtap="openMaritalPicker">
<view class="cellrow">
<view class="name">
婚姻状况
</view>
<view class="iptbox">
<input type="text" placeholder="请选择婚姻状况" value="{{marital_name}}" placeholder-class="placeholder" class="ipt" disabled="{{true}}" />
<image src="{{img_host+'/righticon.png'}}" class="righticon"></image>
</view>
</view>
</view>
<view class="cell" bindtap="showNation">
<view class="cellrow">
<view class="name">
民族
</view>
<view class="iptbox">
<input type="text" placeholder="请选择民族" value="{{user_info.nation_name}}" placeholder-class="placeholder" class="ipt" disabled="{{true}}" />
<image src="{{img_host+'/righticon.png'}}" class="righticon"></image>
</view>
</view>
</view>
<view class="cell" bindtap="showJob">
<view class="cellrow">
<view class="name">
职业
</view>
<view class="iptbox">
<input type="text" placeholder="请选择职业" value="{{user_info.job_name}}" placeholder-class="placeholder" class="ipt" disabled="{{true}}" />
<image src="{{img_host+'/righticon.png'}}" class="righticon"></image>
</view>
</view>
</view>
<view class="cell">
<view class="cellrow">
<view class="name">
默认就诊人
</view>
<view class="iptbox">
<van-switch checked="{{user_info.is_default==1?true:false}}" active-color="#3CC7C0" inactive-color="#f2f2f2" bind:change="onChange" size="26px" disabled="{{notallowEdit}}"/>
</view>
</view>
</view>
</view>
<view class="step2" hidden="{{!(tab==2)}}">
<view class="sickHis">
<view class="list">
<view class="qa">
<view class="num">1、</view>
<view class="titlebox">
<view class="title">您是否有过敏史?</view>
<view class="radio" >
<van-radio-group value="{{ filter.numberTOstring(personInfo.is_allergy_history) }}" class="singlegroup" data-id="is_allergy_history" bind:change="onChangeRadio" direction="horizontal">
<van-radio name="1" checked-color="#3cc7c0">是</van-radio>
<van-radio name="0" checked-color="#3cc7c0">否</van-radio>
</van-radio-group>
</view>
<!-- hidden="{{checkGuomin!=1}}" -->
<view class="radiotip" hidden="{{personInfo.is_allergy_history!=1}}">
<textarea placeholder=" " show-confirm-bar="{{false}}" cursor-spacing="70" confirm-type="done" bindinput="handelFocus" value="{{personInfo.allergy_history}}" data-id="hideGuomin" data-value="allergy_history"></textarea>
<view class="textbox" hidden="{{hideGuomin}}">
<view class="desc"><text>过敏史:</text>请填写过敏源,如药物,请写出药名;如食物,请写具体如鸡蛋、牛奶等(限制50个字)</view>
</view>
</view>
</view>
</view>
<view class="qa">
<view class="num">2、</view>
<view class="titlebox">
<view class="title">您是否有家族病史?</view>
<view class="radio">
<van-radio-group class="singlegroup" value="{{filter.numberTOstring(personInfo.is_family_history)}}" data-id="is_family_history" bind:change="onChangeRadio" direction="horizontal">
<van-radio name="1" checked-color="#3cc7c0">是</van-radio>
<van-radio name="0" checked-color="#3cc7c0">否</van-radio>
</van-radio-group>
</view>
<view class="radiotip" hidden="{{personInfo.is_family_history!=1}}">
<textarea placeholder=" " show-confirm-bar="{{false}}" cursor-spacing="70" confirm-type="done" bindinput="handelFocus" value="{{personInfo.family_history}}" data-id="hideFamilysick" data-value="family_history"></textarea>
<view class="textbox" hidden="{{hideFamilysick}}">
<view class="desc"><text>家族病史:</text>请详细填写相关家族病史(限制50个字)</view>
</view>
</view>
</view>
</view>
<view class="qa" wx:if="{{sex==2}}">
<view class="num">{{startIndex}}、</view>
<view class="titlebox">
<view class="title">您是否处于备孕、妊娠、哺乳期?</view>
<view class="radio">
<van-radio-group value="{{ filter.numberTOstring(personInfo.is_pregnant) }}" bind:change="onChangeRadio" data-id="is_pregnant" direction="horizontal" class="singlegroup">
<van-radio name="1" checked-color="#3cc7c0">是</van-radio>
<van-radio name="0" checked-color="#3cc7c0">否</van-radio>
</van-radio-group>
</view>
<view class="radiotip" hidden="{{personInfo.is_pregnant!=1}}">
<textarea placeholder=" " show-confirm-bar="{{false}}" cursor-spacing="70" confirm-type="done" bindinput="handelFocus" value="{{personInfo.pregnant}}" data-id="hidePregnant" data-value="pregnant"></textarea>
<view class="textbox" hidden="{{hidePregnant}}">
<view class="desc">请描述您目前所处阶段,如备孕中、哺乳期中、妊娠月份。(限制50个字)</view>
</view>
</view>
</view>
</view>
<view class="qa">
<view class="num">{{startIndex+1}}、</view>
<view class="titlebox">
<view class="title">是否做过手术</view>
<view class="radio">
<van-radio-group value="{{ filter.numberTOstring(personInfo.is_operation) }}" data-id="is_operation" bind:change="onChangeRadio" direction="horizontal" class="singlegroup">
<van-radio name="1" checked-color="#3cc7c0">是</van-radio>
<van-radio name="0" checked-color="#3cc7c0">否</van-radio>
</van-radio-group>
</view>
<view class="radiotip" hidden="{{personInfo.is_operation !=1}}">
<textarea placeholder=" " show-confirm-bar="{{false}}" cursor-spacing="70" confirm-type="done" bindinput="handelFocus" value="{{personInfo.operation}}" data-id="hideOperation" data-value="operation"></textarea>
<view class="textbox" hidden="{{hideOperation}}">
<view class="desc">请描述具体手术名称和做手术医院</view>
</view>
</view>
</view>
</view>
<view class="qa">
<view class="num">{{startIndex+2}}、</view>
<view class="titlebox">
<view class="title">是否有饮酒史</view>
<view class="radio">
<van-radio-group value="{{ filter.numberTOstring(personInfo.drink_wine_status) }}" data-id="drink_wine_status" bind:change="onChangeRadio" direction="horizontal" class="group">
<van-radio name="1" checked-color="#3cc7c0">从不</van-radio>
<van-radio name="2" checked-color="#3cc7c0">偶尔</van-radio>
<van-radio name="3" checked-color="#3cc7c0">经常</van-radio>
<van-radio name="4" checked-color="#3cc7c0">每天</van-radio>
<van-radio name="5" checked-color="#3cc7c0">已戒酒</van-radio>
</van-radio-group>
</view>
</view>
</view>
<view class="qa">
<view class="num">{{startIndex+3}}、</view>
<view class="titlebox">
<view class="title">是否有吸烟史</view>
<view class="radio">
<van-radio-group value="{{ filter.numberTOstring(personInfo.smoke_status) }}" data-id="smoke_status" bind:change="onChangeRadio" direction="horizontal" class="group">
<van-radio name="1" checked-color="#3cc7c0">从不</van-radio>
<van-radio name="2" checked-color="#3cc7c0">偶尔</van-radio>
<van-radio name="3" checked-color="#3cc7c0">经常</van-radio>
<van-radio name="4" checked-color="#3cc7c0">每天</van-radio>
<van-radio name="5" checked-color="#3cc7c0">已戒烟</van-radio>
</van-radio-group>
</view>
</view>
</view>
<view class="qa">
<view class="num">{{startIndex+4}}、</view>
<view class="titlebox">
<view class="title">是否有接触过化学物</view>
<view class="radio">
<van-radio-group value="{{filter.numberTOstring(personInfo.chemical_compound_status)}}" data-id="chemical_compound_status" bind:change="onChangeRadio" direction="horizontal" class="group">
<van-radio name="1" checked-color="#3cc7c0">从不</van-radio>
<van-radio name="2" checked-color="#3cc7c0">偶尔</van-radio>
<van-radio name="3" checked-color="#3cc7c0">经常</van-radio>
<van-radio name="4" checked-color="#3cc7c0">每天</van-radio>
</van-radio-group>
</view>
<view class="radiotip" wx:if="{{(personInfo.chemical_compound_status!=1 && personInfo.chemical_compound_status)}}">
<textarea placeholder=" " show-confirm-bar="{{false}}" cursor-spacing="70" confirm-type="done" value="{{personInfo.chemical_compound_describe}}" bindinput="handelFocus" data-id="hideChemical" data-value="chemical_compound_describe"></textarea>
<view class="textbox" hidden="{{hideChemical}}">
<view class="desc"><text>化学物:</text>请详细填写接触过的相关化学物(限制50个字)</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<view class="step3" hidden="{{!(tab==3)}}">
<view class="cell" bindtap="showSick">
<view class="cellrow">
<view class="name">
所患疾病
</view>
<view class="iptbox">
<input type="text" placeholder="请填写所患疾病名称" value="{{healthyInfo.disease_class_name}}" placeholder-class="placeholder" class="ipt" disabled="true"/>
</view>
</view>
</view>
<view class="cell" bindtap="openPop">
<view class="cellrow">
<view class="name">
确诊日期
</view>
<view class="iptbox">
<input type="text" value="{{healthyInfo.diagnosis_date}}" placeholder="请选择日期(年月日)" placeholder-class="placeholder" class="ipt" disabled="{{true}}" />
<image src="{{img_host+'/righticon.png'}}" class="righticon"></image>
</view>
</view>
</view>
<view class="cell">
<view class="cellrow">
<view class="name">
确诊医院
</view>
<view class="iptbox">
<input type="text" placeholder="请填写确诊医院名称" value="{{healthyInfo.diagnosis_hospital}}" bindinput="handelHealthyIpt" data-id="diagnosis_hospital" placeholder-class="placeholder" data-value="diagnosis_hospital" class="ipt" />
</view>
</view>
</view>
<view class="sickHis" style="margin-top: 0;padding:1rpx 32rpx 0rpx;">
<view class="list" style="border-bottom:none">
<view class="qa" style="border-bottom: 0;">
<view class="titlebox">
<view class="title">正在服药?</view>
<view class="radio" >
<van-radio-group value="{{filter.numberTOstring(healthyInfo.is_take_medicine)}}" data-id="is_take_medicine" bind:change="onChangeHealthyRadio" direction="horizontal">
<van-radio name="1" checked-color="#3cc7c0">是</van-radio>
<van-radio name="0" checked-color="#3cc7c0">否</van-radio>
</van-radio-group>
</view>
<view class="radiotip" hidden="{{healthyInfo.is_take_medicine!=1}}">
<textarea placeholder=" " show-confirm-bar="{{false}}" cursor-spacing="70" confirm-type="done" value="{{healthyInfo.drugs_name}}" bindinput="handelHealthyIpt" data-id="hideDrug" data-value="drugs_name"></textarea>
<view class="textbox" hidden="{{hideDrug}}">
<view class="desc"><text>正在服药:</text>请详细填写所服药物(限制50个字)</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<button class="btn next stepbtn1" wx:if="{{!notallowEdit && tab==1}}" bindtap="handleBasicInfo" disabled="{{isloading}}">下一步</button>
<button class="btn next stepbtn2" wx:if="{{!notallowEdit && tab==2}}" bindtap="handlePersonInfo" disabled="{{isloading}}">下一步</button>
<button class="btn next" wx:if="{{!notallowEdit && tab==3}}" bindtap="handleHealthyInfo" disabled="{{isloading}}">完成</button>
</view>
<van-popup show="{{ show }}" position="bottom" custom-style="height: auto">
<van-datetime-picker title="选择确诊日期" min-date="{{ minDate }}" toolbar-class="dateTitle" type="date" value="{{ currentDate }}" bind:cancel="handleClose" bind:confirm="handleConfirm" max-date="{{ maxDate }}" formatter="{{ formatter }}" />
</van-popup>
<van-popup show="{{ showPicker }}" round position="bottom" custom-style="height:auto" bind:close="closePicker">
<van-picker show-toolbar title="选择与患者之间的关系" columns="{{ pickercolumns }}" bind:cancel="closePicker" bind:confirm="onConfirmPicker" />
</van-popup>
<van-popup show="{{ showMarital }}" round position="bottom" custom-style="height:auto" bind:close="closeMaritalPicker">
<van-picker show-toolbar title="请选择婚姻状况" columns="{{ maritalColumn }}" bind:cancel="closeMaritalPicker" bind:confirm="onConfirmMaritalPicker" />
</van-popup>
<van-popup show="{{ showCity}}" round position="bottom" custom-style="height: 50%" bind:close="onClose">
<van-picker columns="{{ columns }}" show-toolbar title="选择地区" columns="{{ columns }}" value-key="area_name" bind:cancel="onCancel" bind:change="onChangePicker" bind:confirm="onConfirm" />
</van-popup>
<van-popup show="{{ showSick }}" position="bottom" custom-style="height: auto">
<van-picker show-toolbar title="选择所患疾病" columns="{{ sickcolumns }}" value-key="disease_class_name" bind:cancel="onCancelSick" bind:confirm="onConfirmSick" />
</van-popup>
<!-- <van-popup show="{{ showNation }}" position="bottom" custom-style="height: auto">
<van-picker show-toolbar title="选择民族" columns="{{ nationcolumns }}" value-key="nation_name" bind:cancel="onCancelSick" bind:confirm="onConfirmNation" />
</van-popup> -->
<van-popup show="{{ showNation }}" position="bottom" custom-style="height: auto">
<van-picker show-toolbar title="选择民族" columns="{{ nationcolumns }}" value-key="nation_name" bind:cancel="onCancelNation" bind:confirm="onConfirmNation" />
</van-popup>
<van-popup show="{{ showJob }}" position="bottom" custom-style="height: auto">
<van-picker show-toolbar title="选择职业" columns="{{ jobcolumns }}" value-key="job_name" bind:cancel="onCancelJob" bind:confirm="onConfirmJob" />
</van-popup>
@@ -0,0 +1,222 @@
/* pages/memberDetail/memberDetail.wxss */
.progess{
display: flex;
align-items: center;
}
.progess .line{
height: 2rpx;
width: 186rpx;
background: #C5C5C5;
}
.progess .line.active{
background: #3CC7C0;
}
.progess .circle{
width: 48rpx;
height: 48rpx;
font-size: 32rpx;
display: flex;
justify-content: center;
align-items: center;
font-weight: 400;
color: #C5C5C5;
background: #FFFFFF;
border: 1rpx solid #C5C5C5;
border-radius: 50%;
}
.progess .circle.active{
background: #3CC7C0;
border: 1rpx solid #3CC7C0;
color:#fff;
}
.progess .circle.finished{
background: #fff;
color:#3CC7C0;
}
.progess .circle .img{
width:48rpx;
height:48rpx;
}
.page{
overflow: hidden;
}
.progressbox{
margin-top: 172rpx;
padding: 20rpx 0 12rpx;
display: flex;
flex-direction: column;
background-color: #fff;
align-items: center;
}
.textbox{
margin-top: 16rpx;
font-size: 28rpx;
font-weight: 600;
color: #BDBDBD;
width:600rpx;
display: flex;
justify-content: space-between;
}
.textbox .active{
color: #3CC7C0;
}
.cellbox{
overflow: hidden;
margin-bottom: 120rpx;
margin-top: 20rpx;
flex:1;
overflow-y: scroll;
-webkit-overflow-scrolling: touch;
}
.step1,.step2{
overflow: hidden;
}
.cellbox.active{
margin-bottom: 0rpx;
}
.page{
display: flex;
flex-direction: column;
}
.cellbox .cell{
background-color: #fff;
align-items: center;
display: flex;
padding:0 32rpx;
}
.cellrow{
height:105rpx;
width:100%;
justify-content: space-between;
align-items: center;
display: flex;
border-bottom:1rpx solid #E3E4E5;
}
.cell:last-child .cellrow{
border-bottom: none;
}
.iptbox{
display: flex;
flex:1;
justify-content: flex-end;
}
.righticon{
width:24rpx;
height: 48rpx;
}
.name{
display: flex;
align-items: center;
}
.name .red{
margin-top: 20rpx;
color:#E34D59;
}
.placeholder{
text-align: right;
font-size: 28rpx;
font-weight: 400;
color: #C5C8CB;
}
.ipt{
width:100%;
text-align: right;
color: #666666;
font-size: 28rpx;
}
.next{
position: absolute;
bottom:20rpx;
left:32rpx;
right:32rpx;
display: flex;
justify-content: center;
align-items: center;
color:#fff;
height: 80rpx;
background: #3CC7C0;
border-radius: 8rpx;
}
.next.complete{
background: #D3D3D3;
}
.sickHis{
background-color: #fff;
/* margin-top: 20rpx; */
padding:1rpx 52rpx 40rpx;
}
.list .qa{
display: flex;
margin-top: 30rpx;
border-bottom:1rpx solid #E3E4E5;
}
.titlebox{
flex:1;
}
textarea{
position: relative;
z-index:1;
width:100%;
color:#333;
height:132rpx;
}
.radio{
margin: 30rpx 0rpx 30rpx 0;
}
.group .van-radio--horizontal{
margin-right: 11rpx;
}
.singlegroup .van-radio--horizontal{
margin-right:44rpx;
}
.singlegroup .van-radio--horizontal:nth-child(2n){
margin-right: 0rpx;
}
.group .van-radio--horizontal:nth-child(3n){
margin-right: 0;
}
.radiotip{
position: relative;
padding:24rpx 20rpx;
justify-content: center;
margin-top: 20rpx;
line-height: 42rpx;
background: #F2F2F2;
border-radius: 10rpx;
font-size: 28rpx;
color:#999;
margin-bottom: 20rpx;
}
.radiotip .textbox{
top:20rpx;
left:20rpx;
margin-top: 0;
width:auto;
height: 100rpx;
font-weight: normal;
z-index: 0;
position: absolute;
right:20rpx;
}
.radiotip text{
white-space: nowrap;
color:#333;
}
.van-radio__label{
padding-right:40rpx!important;
}
/* .van-radio__label:nth-child(3){
padding-right:0rpx!important;
} */
.van-radio{
margin-bottom: 10rpx!important;
}
+241
View File
@@ -0,0 +1,241 @@
// pages/mobileLogin/mobileLogin.js
import { mobileLogin, phoneCode} from "../../../api/login.js"
const app = getApp();
import {
auth
} from "../../../api/index.js"
import {throttle} from "../../../utils/util"
let urlHost=app.hostConfig().agreehost;
Page({
/**
* 页面的初始数据
*/
data: {
show: false,
check:0,
code:'',
disabled:true,
isActive:false,
codeActive:true,
phone:'',
redirecUrl:'',
timer:null,
time:59,
msg:'获取验证码',
img_host:'https://oss.prod.applets.igandanyiyuan.com/applet/patient/static'
},
checkboxChange(e) {
this.setData({
check:e.detail.value.length
})
},
getUserInfo(event) {
this.handlelogin();
},
onClose() {
this.setData({ show: false });
},
handleThrottle:throttle(function(){
this.getCode()
}),
getCode(){
if(!/^1[3456789]\d{9}$/.test(this.data.phone)){
wx.showToast({
title: `请输入有效的手机号码!`,
icon: 'none',
});
return false;
};
phoneCode({
phone:this.data.phone,
scene:1
}).then((res)=>{
let timer=setInterval(() => {
if (this.data.time == 0) {
clearInterval(this.data.timer);
this.setData({
time:59,
msg:'重新获取验证码',
isActive:false,
codeActive:true,
})
} else {
let msg= this.data.time + " s 后重新发送";
this.setData({
isActive:true,
msg:msg,
codeActive:false,
})
let time=this.data.time--;
this.setData({
msg:time + " s 后重新发送"
})
}
}, 1000);
this.setData({
timer:timer
})
});
},
goLogin(){
let THIS=this;
if(!this.data.check){
wx.showToast({
title: '请同意《肝胆相照用户服务协议》!',
icon:'none'
})
return false
};
if(!/^1[3456789]\d{9}$/.test(this.data.phone)){
wx.showToast({
title: `请输入有效的手机号码!`,
icon: 'none',
});
return false;
};
if(!this.data.code){
wx.showToast({
title: `请输入验证码!`,
icon: 'none',
});
return false;
}
wx.getSetting({
success(res) {
// 判断它是否为true
if (res.authSetting["scope.userInfo"]) {
THIS.handlelogin();
} else {
THIS.setData({
show:true
})
}
}
});
},
handlelogin:throttle(function(){
let {code,phone }=this.data;
auth().then(res => {
mobileLogin({
code:code,
phone:phone,
user_type:1,
wx_code:res
}).then((data)=>{
 wx.setStorageSync('AUTH_TOKEN', data.token);
 wx.setStorageSync('CLIENT_USER_ID',data.client_user_id);
 wx.setStorageSync('USER_ID',data.user_id);
let url=this.data.redirectUrl?this.data.redirectUrl:'/pages/index/index';
let handleGO=null;
if(url.indexOf('login')!=-1 || url.indexOf('mobileLogin')!=-1 ){
handleGO=function(){
wx.reLaunch({
url:'/pages/index/index'
})
}
}else{
handleGO=function(){
wx.reLaunch({
url:url
})
}
}
app.imLogin({path:'pages/mobileLogin/mobileLogin'},1,handleGO);
})
});
}),
goAgreement:throttle(function(event){
let id=event.currentTarget.dataset.id;
app.method.navigateTo({
url:"/patient/pages/linkPage/linkPage?url="+encodeURIComponent(urlHost+'/basic/file/agreement.htm?id='+id)
})
}),
inputChange(e){
this.setData({
[e.target.dataset.id]: e.detail.value
});
if(e.target.dataset.id=="code"){
if(e.detail.value.trim()){
this.setData({
disabled: false
});
}else{
this.setData({
disabled: true
});
}
}
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
// console.log("redirectUrl-----------");
//console.log(options.redirectUrl)
if(options.redirectUrl){
this.setData({
redirectUrl:decodeURIComponent(options.redirectUrl)
})
};
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
this.setData({
img_host:app.hostConfig().imghost
});
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
clearInterval(this.data.timer);
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
})
@@ -0,0 +1,7 @@
{
"usingComponents": {
"van-dialog": "@vant/weapp/dialog/index",
"nav":"../../../components/nav/nav"
},
"navigationBarTitleText": "手机号登录"
}

Some files were not shown because too many files have changed in this diff Show More