更新小程序仓库
This commit is contained in:
@@ -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: '/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: '/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() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
|
||||
})
|
||||
@@ -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": "肝胆相照互联网医院"
|
||||
}
|
||||
@@ -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>
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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:"/pages/linkPage/linkPage?url="+encodeURIComponent(urlHost+'/basic/file/agreement.htm?id=5')
|
||||
})
|
||||
}),
|
||||
goAgreement:throttle(function(){
|
||||
app.method.navigateTo({
|
||||
url:"/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() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
|
||||
})
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"usingComponents": {
|
||||
"nav":"../../components/nav/nav"
|
||||
},
|
||||
"navigationStyle":"custom",
|
||||
"navigationBarTitleText": "肝胆相照互联网医院"
|
||||
}
|
||||
@@ -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>
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
|
||||
})
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"usingComponents": {
|
||||
"nav":"../../components/nav/nav"
|
||||
},
|
||||
"navigationStyle":"custom",
|
||||
"navigationBarTitleText": "风险告知与知情同意书"
|
||||
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
<!--pages/agreement/agreement.wxml-->
|
||||
<nav navName="风险告知与知情同意书"></nav>
|
||||
<view class="content">
|
||||
<rich-text nodes="{{nodes}}" space="nbsp"></rich-text>
|
||||
</view>
|
||||
@@ -0,0 +1,5 @@
|
||||
/* pages/agreement/agreement.wxss */
|
||||
.content{
|
||||
margin-top: 192rpx;
|
||||
padding:0 30rpx;
|
||||
}
|
||||
@@ -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: '/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: '/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"> 关注</text>
|
||||
</view>
|
||||
<view class="guanzhu" wx:else catchtap="toggleFllow">
|
||||
<image src="{{img_host+'/star_on.png'}}"></image>
|
||||
<text decode="true"> 关注</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<dialog bind:confirm="confirm" bind:cancel="close" canceltext="取消问诊" showDialog="{{showDialog}}" message="当前服务排队人较多,暂无空闲医生进行接诊,是否继续等待" confirmtext="继续等待"></dialog>
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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: '/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;
|
||||
}
|
||||
@@ -0,0 +1,274 @@
|
||||
// pages/consultOrder/consultOrder.js
|
||||
const app = getApp()
|
||||
import {detectionList} from "../../api/checkSugar"
|
||||
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},
|
||||
{text:'已取消',value:5}
|
||||
|
||||
],
|
||||
page:1,
|
||||
isTriggered:false,
|
||||
pageNumber:10,
|
||||
option2: [],
|
||||
detection_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.getDetectionList();
|
||||
},
|
||||
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.getDetectionList()
|
||||
}
|
||||
},
|
||||
goExpertList(){
|
||||
app.method.navigateTo({
|
||||
url: '/pages/checkOrderDetail/checkOrderDetail' //'/pages/expertConsult/expertConsult',
|
||||
})
|
||||
},
|
||||
changeStatus({ detail }){
|
||||
this.setData({
|
||||
isLock:false,
|
||||
page:1,
|
||||
selectstatus:true,
|
||||
detection_status:detail,
|
||||
orderList:[]
|
||||
})
|
||||
this.getDetectionList()
|
||||
},
|
||||
changeFamily({ detail }){
|
||||
this.setData({
|
||||
family_id:detail,
|
||||
isLock:false,
|
||||
selectfamily:true,
|
||||
page:1,
|
||||
orderList:[]
|
||||
})
|
||||
this.getDetectionList()
|
||||
},
|
||||
getDetectionList(){
|
||||
let {detection_status,family_id,page,pageNumber}=this.data;
|
||||
this.setData({
|
||||
isLoading:true
|
||||
})
|
||||
detectionList({
|
||||
detection_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.getDetectionList();
|
||||
})
|
||||
|
||||
},
|
||||
goDetail(event){
|
||||
let id=event.currentTarget.dataset.id;
|
||||
app.method.navigateTo({
|
||||
url: '/pages/checkOrderDetail/checkOrderDetail?order_detection_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_detection_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_detection_id==changeId){
|
||||
let currentitem=`orderList[${i}].detection_status`
|
||||
this.setData({
|
||||
[currentitem]:changeStatus
|
||||
})
|
||||
break;
|
||||
}
|
||||
}
|
||||
}else{
|
||||
// this.setData({
|
||||
// isLock:false,
|
||||
// page:1,
|
||||
// orderList:[]
|
||||
// })
|
||||
// this.getDetectionList();
|
||||
// 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,107 @@
|
||||
<!--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="../../assets/images/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="{{ detection_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_detection_id" data-id="{{item.detection_no}}">
|
||||
<view class="titlebox">
|
||||
<view class="name" >糖组检测</view>
|
||||
|
||||
<view class="status" wx:if="{{item.detection_status==1 && item.detection_pay_status==1}}">
|
||||
<view class="waitpay">待支付</view>
|
||||
<view class="countdown">
|
||||
<van-count-down time="{{timeModule.countDown(item.created_at)}}" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="status waitpay" wx:elif="{{item.detection_status==2}}">待绑定</view>
|
||||
<view class="status waitpay" wx:elif="{{item.detection_status==3}}">检测中</view>
|
||||
<view class="status" wx:elif="{{item.detection_status==4}}" style="color:#3CC7C0">已开具报告</view>
|
||||
<view class="status" wx:elif="{{item.detection_status==5 && item.detection_pay_status!=5 }}">已取消</view>
|
||||
<view class="status" wx:elif="{{item.detection_status==5 && item.detection_pay_status==5}}">
|
||||
<view class="waitpay">支付超时</view>
|
||||
</view>
|
||||
|
||||
|
||||
</view>
|
||||
<view class="infobox">
|
||||
|
||||
<image src="{{item.user_doctor.avatar}}" class="headicon" wx:if="{{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.detection_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">
|
||||
<view class="namedesc">
|
||||
{{item.patient_name}}(<text wx:if="{{item.patient_sex==0}}">未知</text><text wx:if="{{item.patient_sex==1}}">男</text><text wx:else>女</text><text decode="true" class="agebar"></text><text>{{item.patient_age}}岁)</text></view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="row rowdesc" wx:if="{{item.detection_status!=1}}">
|
||||
<view class="name">病情描述</view>
|
||||
<view class="dot">:</view>
|
||||
<view class="desc">{{item.disease_desc}}</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.detection_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 rowdesc" wx:if="{{item.detection_status==1}}">
|
||||
<view class="name">下单时间</view>
|
||||
<view class="dot">:</view>
|
||||
<view class="desc">{{item.created_at}}</view>
|
||||
</view>
|
||||
<view class="row last" wx:if="{{item.detection_status==1}}">
|
||||
<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="../../assets/images/nocheck.png" class="noorder"></image>
|
||||
<view class="tips">暂无检测订单</view>
|
||||
<!-- <view class="btn" bindtap="goExpertList">专家问诊</view> -->
|
||||
</view>
|
||||
|
||||
</view>
|
||||
@@ -0,0 +1,208 @@
|
||||
/* 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: 518rpx;
|
||||
height: 325rpx;
|
||||
}
|
||||
.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;
|
||||
line-height: 52rpx;
|
||||
color:#333;
|
||||
}
|
||||
.row .desc.red{
|
||||
color:rgba(239, 79, 32, 1);
|
||||
}
|
||||
.rowdesc{
|
||||
align-items: flex-start;
|
||||
}
|
||||
.namedesc{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.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;
|
||||
}
|
||||
.row .left{
|
||||
display: flex;
|
||||
}
|
||||
.row .right{
|
||||
display: flex;
|
||||
}
|
||||
.righticon{
|
||||
width:24rpx;
|
||||
height:48rpx;
|
||||
}
|
||||
.right .detail{
|
||||
margin-right: 10rpx;
|
||||
color: #666666;
|
||||
}
|
||||
.agebar{
|
||||
display: inline-block;
|
||||
width:2rpx;
|
||||
background: #333;
|
||||
height:26rpx;
|
||||
margin: 0rpx 10rpx 0;
|
||||
}
|
||||
@@ -0,0 +1,643 @@
|
||||
// pages/medinceOrderDetail/medinceOrderDetail.js
|
||||
const app = getApp()
|
||||
import {detectionDetail,bindCheck,cancelCheckPay,delCheckOrder,cancelCheckOrder,checkInquiry} from "../../api/checkSugar.js"
|
||||
import {cancelPay} from "../../api/consultOrder"
|
||||
import {cancelOrder} from "../../api/consultOrder"
|
||||
import {fllowDoctor,notfllowDoctor} from "../../api/consultExpert"
|
||||
import {throttle} from "../../utils/util"
|
||||
import {getSign} from "../../api/common"
|
||||
import Dialog from '@vant/weapp/dialog/dialog';
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
time: 30 * 60 * 60 * 1000,
|
||||
showCover:true,
|
||||
isWait:true,
|
||||
cancelBtn:false,
|
||||
order:{},
|
||||
showError:false,
|
||||
pay_money:0,
|
||||
fileList:[],
|
||||
checkSatus:1,
|
||||
showCheckDialog:false,
|
||||
checkmessage:'',
|
||||
detection_bar_code:'',
|
||||
detection_code:'',
|
||||
order_detection_id:'',
|
||||
showDialog:false,
|
||||
message:'',
|
||||
fromType:'',
|
||||
user_doctor:{},
|
||||
order:{},
|
||||
patient_family_data:'',
|
||||
img_host:'https://oss.prod.applets.igandanyiyuan.com/applet/patient/static'
|
||||
},
|
||||
onClickHide() {
|
||||
this.setData({ showCover: false });
|
||||
wx.setStorageSync("showCover",true);
|
||||
},
|
||||
closeError(){
|
||||
this.setData({ showError: false });
|
||||
},
|
||||
delImg(event) {
|
||||
let id = event.currentTarget.dataset.id;
|
||||
this.data.fileList.splice(id, 1);
|
||||
this.setData({
|
||||
fileList: this.data.fileList
|
||||
})
|
||||
},
|
||||
previewImage(event) {
|
||||
let id = event.currentTarget.dataset.id;
|
||||
let urls = this.data.fileList;
|
||||
wx.previewImage({
|
||||
current: urls[id], // 当前显示图片的http链接
|
||||
urls: urls // 需要预览的图片http链接列表
|
||||
})
|
||||
},
|
||||
uploadFile(File) {
|
||||
wx.showLoading({
|
||||
title: '图片上传中...',
|
||||
mask: true
|
||||
})
|
||||
let THIS = this;
|
||||
getSign({
|
||||
user_type: 1,
|
||||
scene: 4
|
||||
}).then((resdata) => {
|
||||
let {
|
||||
accessid,
|
||||
dir,
|
||||
policy,
|
||||
signature,
|
||||
host
|
||||
} = resdata;
|
||||
let index = File.lastIndexOf("/");
|
||||
let filename = File.substring(index + 1, File.length);
|
||||
return new Promise((resolve, reject) => {
|
||||
wx.uploadFile({
|
||||
url: host, // 仅为示例,非真实的接口地址
|
||||
filePath: File,
|
||||
name: 'file',
|
||||
formData: {
|
||||
OSSAccessKeyId: accessid,
|
||||
policy,
|
||||
key: dir + filename,
|
||||
signature
|
||||
},
|
||||
success(res) {
|
||||
if (res.statusCode === 204) {
|
||||
let url = host + '/' + dir + filename;
|
||||
THIS.setData({
|
||||
fileList: THIS.data.fileList.concat([url])
|
||||
})
|
||||
}
|
||||
},
|
||||
fail: err => {
|
||||
console.log(err);
|
||||
}
|
||||
});
|
||||
})
|
||||
})
|
||||
},
|
||||
upload() {
|
||||
if(this.data.fileList.length>=3){
|
||||
wx.showToast({
|
||||
title: '检测管照片最多上传3张',
|
||||
icon:"none"
|
||||
})
|
||||
return false
|
||||
};
|
||||
let THIS = this;
|
||||
wx.chooseMedia({
|
||||
count: 3-this.data.fileList.length,
|
||||
mediaType: ['image'],
|
||||
sourceType: ['album', 'camera'],
|
||||
success(res) {
|
||||
var imgList = res.tempFiles;
|
||||
var promiseFun = [];
|
||||
for (let i = 0; i < imgList.length; i++) {
|
||||
var file = imgList[i].tempFilePath;
|
||||
promiseFun.push(
|
||||
THIS.uploadFile(file)
|
||||
)
|
||||
};
|
||||
Promise.all(promiseFun).then((res) => {
|
||||
wx.showToast({
|
||||
title: '图片上传成功',
|
||||
icon: "none"
|
||||
})
|
||||
wx.hideLoading();
|
||||
});
|
||||
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
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',
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
bluript(event){
|
||||
const {value}=event.detail;
|
||||
const reg=/^SDB[A-Z](?:2[3-9]|2[0-2])[SP](?:1688[6-9]|1689\d|169\d\d|1[7-9]\d\d\d|[2-9][0-9]{4}|99999)$/;
|
||||
let detection_status=this.data.order.detection_status;
|
||||
if(detection_status!=3){
|
||||
if(reg.test(value)){
|
||||
this.setData({
|
||||
showError:false
|
||||
})
|
||||
}else{
|
||||
this.setData({
|
||||
showError:true
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
chnageIpt(event){
|
||||
const {value}=event.detail;
|
||||
this.setData({
|
||||
detection_bar_code:value
|
||||
})
|
||||
},
|
||||
handleCancelInquiryPay(){
|
||||
let {order_inquiry_id} = this.data;
|
||||
cancelPay(order_inquiry_id).then(data=>{
|
||||
wx.showToast({
|
||||
title: '取消支付成功',
|
||||
icon:'none'
|
||||
})
|
||||
this.handleCheckInquiry();
|
||||
})
|
||||
},
|
||||
handelCancelInquiryOrder(){
|
||||
let id=this.data.order_inquiry_id;
|
||||
cancelOrder(id).then(data=>{
|
||||
wx.showToast({
|
||||
title: '订单取消成功',
|
||||
icon:"none"
|
||||
});
|
||||
this.handleCheckInquiry();
|
||||
// this.goChat()
|
||||
})
|
||||
},
|
||||
handleCheckInquiry:throttle(function(){
|
||||
let id=this.data.order.order_detection_id;
|
||||
checkInquiry(id).then(data=>{
|
||||
console.log(data);
|
||||
if(data.status==1){
|
||||
this.setData({
|
||||
order_inquiry_id:data.data,
|
||||
})
|
||||
this.goChat();
|
||||
}else if(data.status==2){
|
||||
this.setData({
|
||||
showCheckDialog:true,
|
||||
order_inquiry_id:data.data,
|
||||
checkSatus:2,
|
||||
checkmessage:'当前医生有您待支付的订单,点击“继续”将为您取消订单直接进入报告解读服务。'
|
||||
})
|
||||
}else if(data.status==3){
|
||||
this.setData({
|
||||
checkSatus:3,
|
||||
showCheckDialog:true,
|
||||
order_inquiry_id:data.data,
|
||||
checkmessage:'当前医生有您待接诊的订单,点击“继续”将为您取消订单直接进入报告解读服务。'
|
||||
})
|
||||
}else if(data.status==4){
|
||||
this.setData({
|
||||
showCheckDialog:true,
|
||||
checkSatus:4,
|
||||
order_inquiry_id:data.data,
|
||||
checkmessage:'当前医生有您接诊中的订单,点击“继续”将为您直接进入报告解读服务。'
|
||||
})
|
||||
}
|
||||
})
|
||||
},1000),
|
||||
goReport:throttle(function(){
|
||||
wx.showLoading({
|
||||
mask:true,
|
||||
title: '正在打开文件...',
|
||||
});
|
||||
let url=this.data.order.detection_result_pdf;
|
||||
const randfile = new Date().getTime() + '检测报告';
|
||||
const newPath = `${wx.env.USER_DATA_PATH}/${randfile}`;
|
||||
wx.downloadFile({
|
||||
// 示例 url,并非真实存在
|
||||
url:url,
|
||||
filePath: newPath,
|
||||
success: function (res) {
|
||||
//const filePath = res.tempFilePath
|
||||
wx.openDocument({
|
||||
fileType:"pdf",
|
||||
showMenu:true,
|
||||
filePath: newPath,
|
||||
success: function (res) {
|
||||
wx.hideLoading()
|
||||
console.log('打开文档成功')
|
||||
},
|
||||
fail:function(error){
|
||||
wx.hideLoading()
|
||||
wx.showToast({
|
||||
title:res,
|
||||
icon:"none"
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
fail:function(error){
|
||||
wx.showToast({
|
||||
title:error,
|
||||
icon:"none"
|
||||
})
|
||||
}
|
||||
|
||||
})
|
||||
// app.method.navigateTo({
|
||||
// url:"/pages/linkPage/linkPage?url="+encodeURIComponent(url)
|
||||
// })
|
||||
}),
|
||||
handleBindCheck:throttle(function(){
|
||||
let id=this.data.order.order_detection_id;
|
||||
let detection_status=this.data.order.detection_status;
|
||||
if(detection_status==3){
|
||||
wx.showToast({
|
||||
title: '您已提交,请等待结果',
|
||||
icon:"none"
|
||||
})
|
||||
return false
|
||||
}
|
||||
const {detection_bar_code,fileList}=this.data;
|
||||
const reg=/^SDB[A-Z](?:2[3-9]|2[0-2])[SP](?:1688[6-9]|1689\d|169\d\d|1[7-9]\d\d\d|[2-9][0-9]{4}|99999)$/;
|
||||
if(!reg.test(detection_bar_code)){
|
||||
wx.showToast({
|
||||
title: '检测码格式不正确',
|
||||
icon:"none"
|
||||
})
|
||||
this.setData({
|
||||
showError:true
|
||||
})
|
||||
return false
|
||||
}
|
||||
bindCheck(id,{
|
||||
detection_bar_code,
|
||||
detection_pic:fileList
|
||||
}).then(data=>{
|
||||
this.handleDetectionDetail();
|
||||
wx.showToast({
|
||||
title: '提交成功',
|
||||
icon:"none"
|
||||
})
|
||||
})
|
||||
}),
|
||||
goChat:throttle(function(){
|
||||
let {user_id}=this.data.user_doctor;
|
||||
let order_inquiry_id=this.data.order.order_inquiry_id;
|
||||
let anther_order_inquiry_id=this.data.order_inquiry_id;
|
||||
let id='';
|
||||
if(!order_inquiry_id && !anther_order_inquiry_id){
|
||||
wx.showToast({
|
||||
title: '服务器错误',
|
||||
icon:'none'
|
||||
});
|
||||
return false
|
||||
};
|
||||
if(order_inquiry_id){
|
||||
id=order_inquiry_id
|
||||
}else if(anther_order_inquiry_id){
|
||||
id=anther_order_inquiry_id
|
||||
}
|
||||
app.method.navigateTo({
|
||||
url: '/TUIService/pages/index?currentConversationID=' + user_id + "&order_inquiry_id=" + id+ "&inquiry_type=5"
|
||||
})
|
||||
}),
|
||||
orderMsg(){
|
||||
wx.requestSubscribeMessage({
|
||||
tmplIds: ['82rKSdbKkbFK_tHmIMnHyfyRJq9ujvmAsTjRHdxmCdE'],
|
||||
success (res) {
|
||||
Dialog.confirm({
|
||||
title: '温馨提示',
|
||||
confirmButtonOpenType:'contact',
|
||||
message: '立即联系客服',
|
||||
}).then(() => {
|
||||
// on confirm
|
||||
}).catch(()=>{
|
||||
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
goSugar:throttle(function(){
|
||||
app.method.navigateTo({
|
||||
url: '/pages/sugarDetail/sugarDetail',
|
||||
})
|
||||
}),
|
||||
goExpert:throttle(function(){
|
||||
let id=this.data.user_doctor.doctor_id;
|
||||
app.method.navigateTo({
|
||||
url: '/pages/expertDetail/expertDetail?doctor_id='+id,
|
||||
})
|
||||
}),
|
||||
handleDetectionDetail(flag=false){
|
||||
let id =this.data.order_detection_id;
|
||||
detectionDetail(id).then(data=>{
|
||||
if(flag){
|
||||
let pages = getCurrentPages();
|
||||
let prevPage = pages[pages.length - 2]; //上一页
|
||||
prevPage.setData({
|
||||
changeStatus:data.detection_status,
|
||||
changeId:id
|
||||
});
|
||||
};
|
||||
let pay_money=(Number(data.amount_total)-Number(data.coupon_amount_total)).toFixed(2);
|
||||
this.setData({
|
||||
order:data,
|
||||
detection_bar_code:data.detection_bar_code,
|
||||
user_doctor:data.user_doctor,
|
||||
pay_money
|
||||
});
|
||||
|
||||
|
||||
if(data.detection_pic && data.detection_pic.length>0){
|
||||
this.setData({
|
||||
fileList:data.detection_pic
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
goScan:throttle(function(){
|
||||
let that=this;
|
||||
wx.scanCode({
|
||||
onlyFromCamera: true,
|
||||
scanType:['qrCode','barCode','datamatrix','pdf417'],
|
||||
success (res) {
|
||||
const reg=/^SDB[A-Z](?:2[3-9]|2[0-2])[SP](?:1688[6-9]|1689\d|169\d\d|1[7-9]\d\d\d|[2-9][0-9]{4}|99999)$/;
|
||||
console.log(res.result);
|
||||
if(reg.test(res.result)){
|
||||
that.setData({
|
||||
detection_bar_code:res.result,
|
||||
showCode:true,
|
||||
showError:false
|
||||
})
|
||||
}else{
|
||||
that.setData({
|
||||
showDialog:true,
|
||||
cancelBtn:false,
|
||||
message:'无法识别,请手动输入检测码'
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
}),
|
||||
confirmCancelOrder(){
|
||||
this.setData({
|
||||
showDialog:true,
|
||||
cancelBtn:true,
|
||||
message:"是否确定要取消检测?"
|
||||
})
|
||||
},
|
||||
confirmDelOrder(){
|
||||
this.setData({
|
||||
showDialog:true,
|
||||
cancelBtn:true,
|
||||
message:"您确定是要删除订单记录么?"
|
||||
})
|
||||
},
|
||||
confirmCancelPay(){
|
||||
this.setData({
|
||||
showDialog:true,
|
||||
cancelBtn:true,
|
||||
message:"您确定取消支付么?"
|
||||
})
|
||||
},
|
||||
confirm:throttle(function(event){
|
||||
if(event.detail && this.data.message=="您确定是要删除订单记录么?"){
|
||||
this.handelDelProduct();
|
||||
}else if(event.detail && this.data.message=="您确定取消支付么?"){
|
||||
this.handelCancelPayProduct();
|
||||
}else if(event.detail && this.data.message=="是否确定要取消检测?"){
|
||||
this.handelCancelCheckOrder();
|
||||
}
|
||||
}),
|
||||
//未支付2 //待接诊需要重新请求检测订单3
|
||||
confirmCheck:throttle(function(){
|
||||
if(this.data.checkSatus==2){
|
||||
this.handleCancelInquiryPay();
|
||||
}else if(this.data.checkSatus==3){
|
||||
this.handelCancelInquiryOrder();
|
||||
}else if(this.data.checkSatus==4){
|
||||
this.goChat();
|
||||
}
|
||||
}),
|
||||
handelCancelCheckOrder(flag=true){
|
||||
let id =this.data.order.order_detection_id;
|
||||
cancelCheckOrder(id).then(data=>{
|
||||
wx.showToast({
|
||||
title: '取消成功',
|
||||
icon:"none"
|
||||
})
|
||||
if(!flag){
|
||||
this.goChat();
|
||||
}
|
||||
this.handleDetectionDetail();
|
||||
})
|
||||
},
|
||||
handelCancelPayProduct(flag=true){
|
||||
let id =this.data.order.order_detection_id;
|
||||
cancelCheckPay(id).then(data=>{
|
||||
wx.showToast({
|
||||
title: '取消支付成功',
|
||||
icon:"none"
|
||||
})
|
||||
if(!flag){
|
||||
this.handleCheckInquiry();
|
||||
}
|
||||
this.handleDetectionDetail();
|
||||
})
|
||||
},
|
||||
copy(event){
|
||||
let text=event.target.dataset.text;
|
||||
wx.setClipboardData({
|
||||
data:text
|
||||
})
|
||||
},
|
||||
goPay:throttle(function(){
|
||||
let {order_detection_id,detection_no}=this.data.order;
|
||||
app.method.navigateTo({
|
||||
url: '/pages/payOrder/payOrder?inquiry_no='+ detection_no +"&order_detection_id="+order_detection_id+"&order_type=3&fromType="+encodeURIComponent('pages/checkOrder/checkOrder')
|
||||
})
|
||||
}),
|
||||
handelDelProduct(){
|
||||
let id =this.data.order.order_detection_id;
|
||||
delCheckOrder(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: '/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) {
|
||||
const cover=wx.getStorageSync('showCover');
|
||||
if(cover){
|
||||
this.setData({
|
||||
showCover:false
|
||||
})
|
||||
}
|
||||
if(options.fromType){
|
||||
this.setData({
|
||||
fromType:options.fromType
|
||||
})
|
||||
}
|
||||
let order_detection_id=options.order_detection_id;
|
||||
console.log(order_detection_id)
|
||||
if(order_detection_id){
|
||||
this.setData({
|
||||
order_detection_id
|
||||
});
|
||||
this.handleDetectionDetail();
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
this.setData({
|
||||
img_host:app.hostConfig().imghost
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
|
||||
})
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"usingComponents": {
|
||||
"van-count-down": "@vant/weapp/count-down/index",
|
||||
"dialog":"../../components/dialog/dialog",
|
||||
"van-dialog": "@vant/weapp/dialog/index",
|
||||
"van-icon": "@vant/weapp/icon/index",
|
||||
"van-overlay": "@vant/weapp/overlay/index"
|
||||
},
|
||||
"navigationStyle":"custom",
|
||||
"disableScroll":true,
|
||||
"navigationBarTitleText": "肝胆相照互联网医院"
|
||||
}
|
||||
@@ -0,0 +1,258 @@
|
||||
<!--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="../../assets/images/back.png" />
|
||||
<view class="ui-title">订单详情</view>
|
||||
</view>
|
||||
<view class="page">
|
||||
|
||||
<view class="outwraper {{order.detection_status==2?'active':''}}">
|
||||
<view class="patientbox">
|
||||
<view class="patient_name">
|
||||
就诊人信息
|
||||
</view>
|
||||
<view class="rightcon">
|
||||
{{order.patient_name}}(<text wx:if="{{order.patient_sex==1}}">男</text><text wx:elif="{{order.patient_sex==2}}">女</text><text wx:else>未知</text>|{{order.patient_age}}岁)
|
||||
</view>
|
||||
</view>
|
||||
<view class="bindbox" wx:if="{{order.detection_status==2 || order.detection_status==3 || order.detection_status==4}}">
|
||||
<view class="tiptitle" wx:if="{{!showError}}">
|
||||
<view class="tipleft">
|
||||
绑定检测码
|
||||
</view>
|
||||
<!-- <view class="tipright">
|
||||
查看手册
|
||||
</view> -->
|
||||
</view>
|
||||
<view class="errorbox" wx:else="{{showError}}">
|
||||
<view class="errorleft">
|
||||
<image src="../../assets/images/check_error.png" class="checkerror" mode=""/>
|
||||
<text>检测码有误,请重新输入</text>
|
||||
</view>
|
||||
<image src="../../assets/images/check_close.png" class="checkclose" mode="" bindtap="closeError"/>
|
||||
</view>
|
||||
<view class="iptbox {{showError?'active':''}}" >
|
||||
<input type="text" value="{{detection_bar_code}}" class="ipt" placeholder="请输入检测码或扫描条形码绑定" bindinput="chnageIpt" bindblur="bluript" disabled="{{order.detection_status==3 || order.detection_status==4}}"/>
|
||||
<view class="mybar" wx:if="{{order.detection_status==2}}"></view>
|
||||
<image src="../../assets/images/scancode.png" class="scan" mode="" bindtap="goScan" wx:if="{{order.detection_status==2}}"/>
|
||||
</view>
|
||||
<view class="tiptitle" hidden="{{(order.detection_status==3 && fileList.length==0)|| (order.detection_status==4 && fileList.length==0)}}">
|
||||
<view class="tipleft">
|
||||
检测管照片
|
||||
</view>
|
||||
</view>
|
||||
<view class="uploadbox">
|
||||
<image wx:for="{{fileList}}" src="{{item}}" mode="aspectFill" class="upload" bindtap="previewImage" data-id="{{idx}}" wx:for-index="idx" wx:key="idx">
|
||||
<image src="{{img_host+'/xiaoclose.png'}}" class="close" catchtap="delImg" data-id="{{idx}}"></image>
|
||||
</image>
|
||||
<view class="upload" bindtap="upload" wx:if="{{order.detection_status==2}}">
|
||||
<van-icon name="plus" />
|
||||
<view class="text">
|
||||
上传
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="finish" wx:if="{{order.detection_status==3 || order.detection_status==4 }}">
|
||||
<view class="left">预计检测完成时间</view>
|
||||
<view class="right">{{order.detection_success_time}}</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.detection_status==1}}">
|
||||
<view class="waitpay">待支付</view>
|
||||
<view class="countdown">
|
||||
<van-count-down time="{{filter.countDown(order.created_at)}}" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="status waitpay" wx:elif="{{order.detection_status==2}}">待绑定</view>
|
||||
<view class="status waitpay" wx:elif="{{order.detection_status==3}}">检测中</view>
|
||||
<view class="status" wx:elif="{{order.detection_status==4}}" style="color:#3CC7C0">检测完成</view>
|
||||
<view class="status" wx:elif="{{order.detection_status==5 && order.detection_pay_status!=5 }}">取消检测</view>
|
||||
<view class="status waitpay" wx:elif="{{order.detection_status==5 && order.detection_pay_status==5}}">支付超时</view>
|
||||
</view>
|
||||
<view class="row first">
|
||||
<view class="namebox">
|
||||
<view class="name">订单编号</view>
|
||||
<view class="dot">:</view>
|
||||
</view>
|
||||
<view class="rightbox">
|
||||
<view class="desc">{{order.detection_no}}</view>
|
||||
<view class="bar">
|
||||
|
|
||||
</view>
|
||||
<view class="copy" bindtap="copy" data-text="{{order.detection_no}}">复制</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="row">
|
||||
<view class="namebox">
|
||||
<view class="name">下单时间</view>
|
||||
<view class="dot">:</view>
|
||||
</view>
|
||||
<view class="desc rightbox">{{order.created_at}}</view>
|
||||
</view>
|
||||
<view class="row">
|
||||
<view class="namebox">
|
||||
<view class="name">问诊类型</view>
|
||||
<view class="dot">:</view></view>
|
||||
<view class="desc">糖组检测</view>
|
||||
</view>
|
||||
<view class="row">
|
||||
<view class="namebox">
|
||||
<view class="name">订单金额</view>
|
||||
<view class="dot">:</view>
|
||||
</view>
|
||||
<view class="desc rightbox">¥{{order.amount_total}}</view>
|
||||
</view>
|
||||
<view class="row">
|
||||
<view class="namebox">
|
||||
<view class="name"><text>优</text><text>惠</text><text>券</text></view>
|
||||
<view class="dot">:</view>
|
||||
</view>
|
||||
<view class="desc rightbox" wx:if="{{order.coupon_amount_total>0}}">¥{{order.coupon_amount_total}}</view>
|
||||
<view class="desc rightbox" wx:else>无</view>
|
||||
</view>
|
||||
<view class="row">
|
||||
<view class="namebox">
|
||||
<view class="name">支付金额</view>
|
||||
<view class="dot">:</view>
|
||||
</view>
|
||||
<view class="desc price rightbox">
|
||||
¥{{pay_money}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="row beizhu" wx:if="{{order.cancel_reason}}">
|
||||
<view class="namebox">
|
||||
<view class="name"><text>备</text><text>注</text></view>
|
||||
<view class="dot">:</view>
|
||||
</view>
|
||||
<!-- 取消订单原因(1:主动取消 2:客服取消 3:支付超时) -->
|
||||
<view class="desc rightbox" wx:if="{{order.cancel_reason==1}}">主动取消 </view>
|
||||
<view class="desc rightbox" wx:elif="{{order.cancel_reason==2}}">客服取消</view>
|
||||
<view class="desc rightbox" wx:elif="{{order.cancel_reason==3}}">支付超时</view>
|
||||
</view>
|
||||
<!-- 商品订单退款状态(0:无退款 1:申请退款 2:退款中 3:退款成功 4:拒绝退款 5:退款关闭) -->
|
||||
<view class="row" wx:if="{{order.cancel_reason==2}}">
|
||||
<view class="namebox">
|
||||
<view class="name">退款进度</view>
|
||||
<view class="dot">:</view>
|
||||
</view>
|
||||
<view class="desc rightbox" wx:if="{{order.detection_refund_status==0}}">
|
||||
无退款
|
||||
</view>
|
||||
<view class="desc rightbox" wx:elif="{{order.detection_refund_status==1}}">
|
||||
申请退款
|
||||
</view>
|
||||
<view class="desc rightbox" wx:elif="{{order.detection_refund_status==2}}">
|
||||
退款中
|
||||
</view>
|
||||
<view class="desc rightbox" wx:elif="{{order.detection_refund_status==3}}">
|
||||
退款成功
|
||||
</view>
|
||||
<view class="desc rightbox" wx:elif="{{order.detection_refund_status==4}}">
|
||||
拒绝退款
|
||||
</view>
|
||||
<view class="desc rightbox" wx:elif="{{order.detection_refund_status==5}}">
|
||||
退款关闭
|
||||
</view>
|
||||
</view>
|
||||
<!-- 检测订单状态(1:待支付 2:待绑定 3:检测中 4:检测完成 5:已取消) -->
|
||||
<view class="contactbox" wx:if="{{order.detection_status==3 || order.detection_status==4}}" bindtap="orderMsg">
|
||||
<image src="../../assets/images/kefu.png" class="kefu" mode=""/>
|
||||
<text>联系客服</text>
|
||||
</view>
|
||||
<view class="contactbox" wx:if="{{order.detection_status==2}}" bindtap="confirmCancelOrder">
|
||||
<text>取消检测</text>
|
||||
</view>
|
||||
<view class="contactbox" wx:if="{{order.detection_status==5}}" bindtap="confirmDelOrder">
|
||||
<text>删除订单</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<view class="personinfobox" bindtap="goExpert" wx:if="user_doctor && user_doctor.doctor_id">
|
||||
|
||||
<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="type" wx:if="{{user_doctor.hospital_level_name}}">{{user_doctor.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}}">{{user_doctor.doctor_title}}</text>
|
||||
<text class="doctor_title" wx:elif="{{user_doctor.doctor_title==2}}">主任中医师</text>
|
||||
<text>{{user_doctor.department_custom_name}}</text>
|
||||
</view>
|
||||
<view class="hospital">{{user_doctor.hospital_name}}</view>
|
||||
</view>
|
||||
<view class="guanzhu" wx:if="{{!user_doctor.follow}}" catchtap="toggleFllow">
|
||||
<image src="{{img_host+'/star.png'}}" ></image>
|
||||
<text decode="true"> 关注</text>
|
||||
</view>
|
||||
<view class="guanzhu" wx:else catchtap="toggleFllow">
|
||||
<image src="{{img_host+'/star_on.png'}}" ></image>
|
||||
<text decode="true"> 关注</text>
|
||||
</view>
|
||||
|
||||
|
||||
</view>
|
||||
<!-- <view class="borderbox">
|
||||
<view class="goodjob" style="margin-top: 30rpx;">
|
||||
擅长:{{user_doctor.be_good_at}}
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
<view class="contactbox" style="border:none;" wx:if="{{order.detection_status==2}}" bindtap="orderMsg">
|
||||
<image src="../../assets/images/kefu.png" class="kefu" mode=""/>
|
||||
<text>联系客服</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<!-- 检测订单状态(1:待支付 2:待绑定 3:检测中 4:检测完成 5:已取消) -->
|
||||
|
||||
<view class="paybox" wx:if="{{order.detection_pay_status==1}}">
|
||||
<view class="left" bindtap="confirmCancelPay">取消支付</view>
|
||||
<view class="right" bindtap="goPay">
|
||||
立即支付
|
||||
|
||||
<!-- :¥{{order.payment_amount_total}} -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="paybox" wx:if="{{order.detection_status==2 || order.detection_status==3}}">
|
||||
<view class="submitbtn {{order.detection_status==3?'active':''}}" bindtap="handleBindCheck">提交</view>
|
||||
</view>
|
||||
<view class="paybox" wx:if="{{order.detection_status==4}}">
|
||||
<view class="left" bindtap="goReport">查看报告</view>
|
||||
<view class="right" bindtap="handleCheckInquiry">
|
||||
<text>报告解读</text>
|
||||
<image src="../../assets/images/freetalk.png" class="freetalk" alt=""/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="paybox" wx:if="{{order.detection_status==5}}">
|
||||
<view class="submitbtn" bindtap="goSugar">重新检测</view>
|
||||
</view>
|
||||
|
||||
<dialog bind:confirm="confirm" cancelBtn="{{cancelBtn}}" showDialog="{{showDialog}}" message="{{message}}"></dialog>
|
||||
<van-dialog id="van-dialog" confirm-button-color="#3CC7C0" />
|
||||
<van-overlay show="{{ showCover }}" wx:if="{{order.detection_status==2}}">
|
||||
<view class="wrapper">
|
||||
<image src="../../assets/images/mask_check1.png" mode="widthFix" class="timg1" lazy-load/>
|
||||
<image src="../../assets/images/mask_check2.png" mode="widthFix" class="timg2" lazy-load/>
|
||||
<view class="button" bindtap="onClickHide">
|
||||
知道了
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</van-overlay>
|
||||
<van-dialog id="van-dialog" confirm-button-color="#3CC7C0" />
|
||||
<dialog bind:confirm="confirmCheck" cancelBtn="{{true}}" showDialog="{{showCheckDialog}}" message="{{checkmessage}}" confirmtext="继续"></dialog>
|
||||
@@ -0,0 +1,763 @@
|
||||
/* 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;
|
||||
padding-bottom: 200rpx;
|
||||
}
|
||||
.outwraper.active{
|
||||
padding-bottom: 220rpx;
|
||||
}
|
||||
.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 {
|
||||
|
||||
height: 40rpx;
|
||||
color: #000;
|
||||
font-size: 24rpx;
|
||||
display: flex;
|
||||
margin-left: 20rpx;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
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-top: 20rpx;
|
||||
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;
|
||||
height: 186rpx;
|
||||
background: #FFFFFF;
|
||||
position: absolute;
|
||||
display: flex;
|
||||
z-index:1;
|
||||
width:100%;
|
||||
}
|
||||
.submitbtn{
|
||||
width:100%;
|
||||
margin:16px 32rpx 0;
|
||||
height: 94rpx;
|
||||
background: #3CC7C0;
|
||||
border-radius: 47rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
font-size: 36rpx;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
.submitbtn.active{
|
||||
color: #000000;
|
||||
background: rgba(0,0,0,0.1);
|
||||
}
|
||||
.paybox .left{
|
||||
height: 94rpx;
|
||||
border-radius: 47rpx;
|
||||
font-size: 36rpx;
|
||||
color: rgba(0,0,0,0.85);
|
||||
border: 1rpx solid rgba(0,0,0,0.65);
|
||||
margin-left: 32rpx;
|
||||
flex:1;
|
||||
font-size: 28rpx;
|
||||
margin-top: 16rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
}
|
||||
.orderrow{
|
||||
display: flex;
|
||||
margin:10rpx 32rpx 0;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
.freetalk{
|
||||
position: absolute;
|
||||
width:403rpx;
|
||||
height:79rpx;
|
||||
top: -53rpx;
|
||||
left:25rpx;
|
||||
}
|
||||
.paybox .right{
|
||||
position: relative;
|
||||
margin-right: 32rpx;
|
||||
margin-top: 16rpx;
|
||||
color: #FFFFFF;
|
||||
display: flex;
|
||||
margin-left: 24rpx;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: #3CC7C0;
|
||||
height: 94rpx;
|
||||
font-size: 36rpx;
|
||||
color: #FFFFFF;
|
||||
background: #3CC7C0;
|
||||
border-radius: 47rpx;
|
||||
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;
|
||||
}
|
||||
.patientbox{
|
||||
margin-top: 172rpx;
|
||||
width:100%;
|
||||
box-sizing: border-box;
|
||||
padding:0 32rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
height: 109rpx;
|
||||
background: #FFFFFF;
|
||||
}
|
||||
.patient_name{
|
||||
font-size: 32rpx;
|
||||
font-weight: 400;
|
||||
color: rgba(0,0,0,0.85)
|
||||
}
|
||||
.patientbox .rightcon{
|
||||
font-size: 28rpx;
|
||||
font-weight: 400;
|
||||
color: rgba(0,0,0,0.65)
|
||||
}
|
||||
.namebox{
|
||||
display: flex;
|
||||
}
|
||||
.rowbox .row{
|
||||
justify-content: space-between;
|
||||
}
|
||||
.bar{
|
||||
margin-left: 30rpx;
|
||||
color: rgba(0,0,0,0.45);
|
||||
height: 40rpx;
|
||||
margin-bottom: 5rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.rightbox{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.bindbox{
|
||||
overflow: hidden;
|
||||
padding:0 32rpx 10rpx;
|
||||
margin:20rpx 0rpx;
|
||||
background: #FFFFFF;
|
||||
}
|
||||
.errorbox{
|
||||
margin-top: 10rpx;
|
||||
display: flex;
|
||||
height: 80rpx;
|
||||
background: #FFF1F0;
|
||||
border-radius: 8rpx;
|
||||
padding:0 20rpx;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.tiptitle{
|
||||
height: 80rpx;
|
||||
align-items: center;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
.tipleft{
|
||||
font-size: 32rpx;
|
||||
color: rgba(0,0,0,0.85);
|
||||
}
|
||||
.tipright{
|
||||
color:#4096FF;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
.iptbox{
|
||||
margin-top: 24rpx;
|
||||
width:100%;
|
||||
height: 78rpx;
|
||||
border-radius: 6rpx;
|
||||
border: 2rpx solid #3CC7C0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.iptbox.active{
|
||||
border: 2rpx solid #FF4D4F;
|
||||
}
|
||||
.mybar{
|
||||
height:38rpx;
|
||||
margin:0 30rpx;
|
||||
width:2rpx;
|
||||
background:#3CC7C0 ;
|
||||
}
|
||||
.ipt{
|
||||
margin-left: 20rpx;
|
||||
flex:1;
|
||||
}
|
||||
.scan{
|
||||
margin-right: 20rpx;
|
||||
width:40rpx;
|
||||
height:40rpx;
|
||||
}
|
||||
.uploadbox{
|
||||
|
||||
margin:24rpx 0rpx 0;
|
||||
display: flex;
|
||||
flex-wrap: wrap ;
|
||||
}
|
||||
.uploadbox .close{
|
||||
z-index:9;
|
||||
top:5rpx;
|
||||
right:5rpx;
|
||||
position: absolute;
|
||||
width:30rpx;
|
||||
height:30rpx;
|
||||
}
|
||||
.uploadbox .upload{
|
||||
position: relative;
|
||||
object-fit: cover;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin: 5px 19rpx 5px 0;
|
||||
}
|
||||
.uploadbox .upload:nth-child(4n){
|
||||
margin-right: 0;
|
||||
}
|
||||
.van-icon-plus{
|
||||
color:#333;
|
||||
font-size: 80rpx!important;
|
||||
}
|
||||
.upload{
|
||||
width: 148rpx;
|
||||
height:148rpx;
|
||||
display: flex;
|
||||
justify-content:center ;
|
||||
align-items: center;
|
||||
background: #F2F2F2;
|
||||
border-radius: 4rpx
|
||||
}
|
||||
.uploadbox view:first-child{
|
||||
margin-left: 0!important;
|
||||
}
|
||||
.upload .text{
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.errorleft{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.checkerror{
|
||||
margin-right: 10rpx;
|
||||
width:40rpx;
|
||||
height:40rpx;
|
||||
}
|
||||
.checkclose{
|
||||
width:32rpx;
|
||||
height:32rpx;
|
||||
}
|
||||
.wrapper{
|
||||
width:100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
margin:285rpx auto;
|
||||
}
|
||||
.timg1{
|
||||
width:694rpx;
|
||||
}
|
||||
.timg2{
|
||||
width:506rpx;
|
||||
}
|
||||
.button{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 224rpx;
|
||||
font-size: 32rpx;
|
||||
height: 83rpx;
|
||||
font-weight: 500;
|
||||
margin-top: 72rpx;
|
||||
color: #FFFFFF;
|
||||
border-radius: 47rpx;
|
||||
border: 1rpx solid #FFFFFF;
|
||||
}
|
||||
.contactbox{
|
||||
width: 320rpx;
|
||||
margin:20rpx auto 0rpx;
|
||||
height: 72rpx;
|
||||
border-radius: 39rpx;
|
||||
border: 2rpx solid rgba(0,0,0,0.15);
|
||||
align-items: center;
|
||||
color: rgba(0,0,0,0.85);
|
||||
font-size: 28rpx;
|
||||
justify-content: center;
|
||||
display: flex;
|
||||
}
|
||||
.kefu{
|
||||
width: 32rpx;
|
||||
margin-right: 10rpx;
|
||||
height: 32rpx;
|
||||
}
|
||||
.finish{
|
||||
margin-top: 20rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 20rpx;
|
||||
align-items: center;
|
||||
}
|
||||
.finish .left{
|
||||
font-size: 32rpx;
|
||||
font-weight: 400;
|
||||
color: rgba(0,0,0,0.85);
|
||||
}
|
||||
.finish .right{
|
||||
font-size: 28rpx;
|
||||
font-weight: 400;
|
||||
color: rgba(0,0,0,0.45);
|
||||
}
|
||||
@@ -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() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
|
||||
})
|
||||
@@ -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": "肝胆相照互联网医院"
|
||||
}
|
||||
@@ -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>
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
|
||||
})
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"usingComponents": {
|
||||
"nav":"../../components/nav/nav"
|
||||
},
|
||||
"navigationStyle":"custom",
|
||||
"navigationBarTitleText": "肝胆相照互联网医院"
|
||||
}
|
||||
@@ -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>
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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: '/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: '/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="../../assets/images/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;
|
||||
}
|
||||
@@ -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>
|
||||
@@ -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,382 @@
|
||||
// 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,
|
||||
sort_order:1,
|
||||
navName:"专家问诊",
|
||||
scrollHeight:300,
|
||||
is_search_welfare_reception:0,
|
||||
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,
|
||||
})
|
||||
},
|
||||
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: '/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: '/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_search_welfare_reception}=this.data;
|
||||
doctorList({
|
||||
expertise_id:expertise_id,
|
||||
province_id:province_id,
|
||||
city_id:city_id,
|
||||
sort_order: sort_order,
|
||||
keyword:keyword,
|
||||
is_search_welfare_reception: is_search_welfare_reception,
|
||||
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:"公益问诊",
|
||||
is_search_welfare_reception:1
|
||||
})
|
||||
}
|
||||
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,111 @@
|
||||
<!--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">
|
||||
<view class="bar"></view>
|
||||
<van-dropdown-menu active-color="#3CC7C0" overlay="{{overlay}}" >
|
||||
<van-dropdown-item title-class="droptitle {{selectarea?'active':''}}" title="{{position}}" bind:open="openCity" bind:close="closeCity" id="item" popup-style="itemPop" > </van-dropdown-item>
|
||||
<van-dropdown-item title-class="droptitle {{selectkind?'active':''}}" value="{{ sort_order }}" options="{{ option }}" bind:change="changeSorder" />
|
||||
</van-dropdown-menu>
|
||||
</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>
|
||||
<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:if="{{item.is_img_welfare_reception==1}}">公益问诊:<text>¥{{item.free_clinic_price}}</text></view>
|
||||
<view class="price" wx:elif="{{item.is_img_expert_reception==1}}">专家问诊:<text>¥{{item.price}}</text></view>
|
||||
<view class="price" wx:else></view> -->
|
||||
<view class="price" wx:if="{{moduleFilter.formatInquiryType(item.doctor_inquiry_config)==1}}">公益问诊:<text>¥{{item.free_clinic_price}}</text></view>
|
||||
<view class="price" wx:elif="{{moduleFilter.formatInquiryType(item.doctor_inquiry_config)==2}}">专家问诊:<text>¥{{item.price}}</text></view>
|
||||
<view class="price" wx:else></view>
|
||||
<view class="consult" doctorId="{{item.doctor_id}}">立即咨询</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"> 耳鼻科</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,240 @@
|
||||
/* 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;
|
||||
border-bottom: 1rpx solid #E7E7E7;
|
||||
}
|
||||
.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;
|
||||
}
|
||||
.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{
|
||||
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,359 @@
|
||||
// pages/expertDetail/expertDetail.js
|
||||
const app = getApp()
|
||||
import {
|
||||
doctorDetail,
|
||||
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: '',
|
||||
user_name: '',
|
||||
doctor_title: '',
|
||||
doctor_id: '',
|
||||
doctor_title_name:'',
|
||||
user_id:'',
|
||||
avg_response_time: 0,
|
||||
be_good_at: '',
|
||||
department_custom_name: '',
|
||||
served_patients_num: 0,
|
||||
number_of_fans: 0,
|
||||
hospital: null,
|
||||
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,
|
||||
follow: false,
|
||||
id:'',
|
||||
recieveStatus:0,
|
||||
commentList: [],
|
||||
totalComment:0,
|
||||
isFinished:false,
|
||||
isReceivePatient:false //是否可接诊
|
||||
},
|
||||
handleThrottle:throttle(function(){
|
||||
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(){
|
||||
wx.showToast({
|
||||
title: '该医生暂不就诊',
|
||||
icon:"none"
|
||||
})
|
||||
},
|
||||
confirm(event) {
|
||||
let {id}=this.data;
|
||||
if (event.detail) {
|
||||
app.method.navigateTo({
|
||||
url: '/pages/orderDetail/orderDetail?order_inquiry_id=' + id,
|
||||
})
|
||||
}
|
||||
},
|
||||
handleIsReceivepatient() {
|
||||
let {doctor_id}=this.data;
|
||||
isReceivepatient({
|
||||
inquiry_type: this.data.current_inquiry_config.inquiry_type,
|
||||
inquiry_mode: 1,
|
||||
doctor_id: doctor_id
|
||||
}).then(data => {
|
||||
let recieveStatus=data.status;
|
||||
if (recieveStatus == 1) {
|
||||
app.method.navigateTo({
|
||||
url: '/pages/selectPatient/selectPatient?chat_id='+ this.data.user_id+"&doctor_id="+this.data.doctor_id+"&inquiry_type="+ this.data.current_inquiry_config.inquiry_type
|
||||
})
|
||||
} 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: '/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){
|
||||
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({
|
||||
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){
|
||||
a='2'
|
||||
};
|
||||
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]
|
||||
})
|
||||
}
|
||||
};
|
||||
let doctor_inquiry_config = this.data.doctor_inquiry_config;
|
||||
let inquiryType=this.formatInquiryStatus(doctor_inquiry_config);
|
||||
console.log("inquiryType:"+inquiryType)
|
||||
if(inquiryType==1){
|
||||
this.loopArr(doctor_inquiry_config,3);
|
||||
}else if(inquiryType==2){
|
||||
this.loopArr(doctor_inquiry_config,1);
|
||||
}else{
|
||||
this.setData({
|
||||
current_inquiry_config:null
|
||||
})
|
||||
}
|
||||
this.setData({
|
||||
isFinished:true
|
||||
})
|
||||
// if(res.is_img_expert_reception==1 && res.is_img_welfare_reception==1){
|
||||
// this.loopArr(doctor_inquiry_config,3);
|
||||
// // 1:专家问诊 2:快速问诊 3:公益问诊 4:问诊购药
|
||||
// this.setData({
|
||||
// isHide:true
|
||||
// })
|
||||
// }else if(res.is_img_expert_reception==1 && res.is_img_welfare_reception==0){
|
||||
// this.loopArr(doctor_inquiry_config,1);
|
||||
|
||||
// }else if(res.is_img_welfare_reception== 1 && res.is_img_expert_reception==0){
|
||||
// this.loopArr(doctor_inquiry_config,3);
|
||||
// }else{
|
||||
// this.setData({
|
||||
// current_inquiry_config:null
|
||||
// })
|
||||
// }
|
||||
// this.setData({
|
||||
// isFinished:true
|
||||
// })
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
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.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,206 @@
|
||||
<wxs src="./../../filters/filter.wxs" module="filter" />
|
||||
<nav navName="专家详情"></nav>
|
||||
<view class="contain">
|
||||
|
||||
<view class="boxwraper">
|
||||
<view class="infobox">
|
||||
<view class="namebox">
|
||||
<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 && 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"> 关注</text>
|
||||
</view>
|
||||
<view class="guanzhu" wx:else bindtap="toggleFllow">
|
||||
<image src="{{img_host+'/star_on.png'}}" ></image>
|
||||
<text decode="true"> 关注</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="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 wx:for="{{doctor_inquiry_config}}" wx:key="inquiry_config_id">
|
||||
<view class="wentype" wx:if="{{item.inquiry_type==1 && !isHide}}">
|
||||
<image src="https://img.applets.igandanyiyuan.com/applet/patient/static/dr.png"></image>
|
||||
<image src="https://img.applets.igandanyiyuan.com/applet/patient/static/gou.png" class="gou"></image>
|
||||
<view class="rightbox">
|
||||
<view class="name" wx:if="{{item.inquiry_type==1}}">专家问诊-图文问诊</view>
|
||||
<view class="price">¥{{item.inquiry_price}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="wentype freewenzhen" wx:elif="{{item.inquiry_type==3}}">
|
||||
<image src="https://img.applets.igandanyiyuan.com/applet/patient/static/freeicon.png"></image>
|
||||
<image src="https://img.applets.igandanyiyuan.com/applet/patient/static/huanggou.png" class="gou"></image>
|
||||
<view class="rightbox">
|
||||
<view class="name">公益问诊-图文问诊</view>
|
||||
<view class="pricebox">
|
||||
<view class="price">¥{{item.inquiry_price}}</view>
|
||||
<view class="rest">当前剩余名额: {{item.work_num_day-item.order_inquiry_count>=0?(item.work_num_day-item.order_inquiry_count):0}} 个</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="tips" wx:if="{{item.duration!=0 && !(item.inquiry_type==1 && isHide)}}">
|
||||
<image src="https://img.applets.igandanyiyuan.com/applet/patient/static/duihua.png"></image>
|
||||
<view class="tipcon" wx:if="{{times_number==0}}"><text>1.适合可以耐心等待医生回复的病情咨询</text><text>2.医生接诊后{{item.duration/60}}小时内不限次数个回合沟通</text></view>
|
||||
<view class="tipcon" wx:else><text>1.适合可以耐心等待医生回复的病情咨询</text><text>2.医生接诊后{{item.duration/60}}小时内{{item.times_number}}个回合图文沟通</text></view>
|
||||
</view>
|
||||
|
||||
</view> -->
|
||||
|
||||
</view>
|
||||
<view 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="date">{{filter.formatDate(item.created_at)}}</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}}" bindtap="handleThrottle" hidden="{{!isFinished}}">图文问诊 ¥{{current_inquiry_config.inquiry_price}}</view>
|
||||
<view class="noask" bindtap="notAsk" wx:else hidden="{{!isFinished}}">暂不接诊</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,514 @@
|
||||
/* pages/expertDetail/expertDetail.wxss */
|
||||
.namebox {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.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: #000000;
|
||||
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;
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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: '/pages/memberDetail/memberDetail',
|
||||
})
|
||||
}),
|
||||
goMember:throttle(function(event){
|
||||
let id=event.currentTarget.dataset.id;
|
||||
app.method.navigateTo({
|
||||
url: '/pages/memberDetail/memberDetail?family_id='+id,
|
||||
})
|
||||
}),
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
this.setData({
|
||||
img_host:app.hostConfig().imghost
|
||||
});
|
||||
this.handleFamily();
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
|
||||
})
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"usingComponents": {
|
||||
"nav":"../../components/nav/nav"
|
||||
},
|
||||
"navigationStyle":"custom",
|
||||
"navigationBarTitleText": "肝胆相照互联网医院"
|
||||
}
|
||||
@@ -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>
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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='/pages/myWelfare/myWelfare'
|
||||
}else if(link_type==8){
|
||||
url='/pages/medinceOrder/medinceOrder'
|
||||
}else if(link_type==9){
|
||||
url='/pages/medinceOrder/medinceOrder'
|
||||
}else if(link_type==10){
|
||||
url='/pages/orderDetail/orderDetail?order_inquiry_id='+link_params.order_inquiry_id
|
||||
}else if(link_type==12){
|
||||
|
||||
}else if(link_type==13){
|
||||
url='/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="../../assets/images/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;
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
// pages/gandansecretary/gandansecretary.js
|
||||
const app = getApp()
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
|
||||
})
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"usingComponents": {},
|
||||
"navigationBarTitleText": "肝胆小秘书"
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
<!--pages/gandansecretary/gandansecretary.wxml-->
|
||||
<view class="page">
|
||||
<view class="cellbox">
|
||||
<view class="cell">
|
||||
<view class="top">
|
||||
<image src="https://img.applets.igandanyiyuan.com/applet/patient/static/kefu.png" class="icon"></image>
|
||||
<view class="right">
|
||||
<view class="name">肝胆小秘书</view>
|
||||
<view class="date">2022-09-26 12:30:50</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bottom">您好,您咨询 XXX 医生的未接诊,您可以进入订单详情查看退款详情。</view>
|
||||
<view class="btnbox">
|
||||
<view class="btn">订单详情</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -0,0 +1,53 @@
|
||||
/* pages/gandansecretary/gandansecretary.wxss */
|
||||
.page{
|
||||
overflow: auto;
|
||||
}
|
||||
.cell{
|
||||
margin:30rpx 32rpx 0;
|
||||
background-color: #fff;
|
||||
border-radius: 10rpx;
|
||||
padding:30rpx 20rpx;
|
||||
}
|
||||
.cell .icon{
|
||||
width:72rpx;
|
||||
height:74rpx;
|
||||
}
|
||||
.cell .top{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.cell .right{
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
.top .name{
|
||||
font-size: 34rpx;
|
||||
color: #333333;
|
||||
}
|
||||
.top .date{
|
||||
font-size: 28rpx;
|
||||
margin-top: 20rpx;
|
||||
color: #666666;
|
||||
}
|
||||
.cell .bottom{
|
||||
margin-top: 30rpx;
|
||||
font-size: 28rpx;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
line-height: 42rpx;
|
||||
}
|
||||
.cell .btnbox{
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
.btnbox .btn{
|
||||
margin-top: 5px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 160rpx;
|
||||
font-size: 30rpx;
|
||||
color: #FFFFFF;
|
||||
height: 60rpx;
|
||||
background: #3CC7C0;
|
||||
border-radius: 30rpx;
|
||||
}
|
||||
@@ -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() {
|
||||
|
||||
// }
|
||||
})
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
<!--pages/imgPreview/imgpreview.wxml-->
|
||||
<image src="{{url}}" mode="widthFix" class="dcimg" lazy-load/>
|
||||
@@ -0,0 +1,4 @@
|
||||
/* pages/imgPreview/imgpreview.wxss */
|
||||
.dcimg{
|
||||
width:750rpx;
|
||||
}
|
||||
@@ -0,0 +1,396 @@
|
||||
// index.js
|
||||
// 获取应用实例
|
||||
const app = getApp();
|
||||
import {homeData} from "../../api/index.js"
|
||||
import{delDoctor} from "../../api/familyDoc"
|
||||
import {popup} from "../../api/common"
|
||||
import {setBarData,throttle} from "../../utils/util"
|
||||
let urlHost=app.hostConfig().agreehost;
|
||||
Page({
|
||||
data: {
|
||||
show:false,
|
||||
showCode:false,
|
||||
isOld:false,
|
||||
codeMsg:'',
|
||||
showEntryTip:false,
|
||||
showEntryTip_second:false,
|
||||
beforeClose(action){
|
||||
return new Promise((resolve) => {
|
||||
if (action === 'confirm') {
|
||||
resolve(true);
|
||||
} else {
|
||||
// 拦截取消操作
|
||||
resolve(false);
|
||||
}
|
||||
})
|
||||
},
|
||||
showAlert:false,
|
||||
showIntro:false,
|
||||
banner:[],
|
||||
recommend_doctor:[],
|
||||
my_doctor:[],
|
||||
module:[],
|
||||
delId:'',
|
||||
img_host:'https://oss.prod.applets.igandanyiyuan.com/applet/patient/static',
|
||||
popupData:null
|
||||
|
||||
},
|
||||
confirm:throttle(function(event){
|
||||
if(event.detail){
|
||||
this.handelDelDoctor();
|
||||
}
|
||||
}),
|
||||
goH5:throttle(function(event){
|
||||
let {url,name}=event.currentTarget.dataset;
|
||||
if(url.indexOf("http")!=-1){
|
||||
let urlName=(decodeURIComponent(url))
|
||||
if(this.verifySuffix(urlName)){
|
||||
wx.navigateTo({
|
||||
url:'/'+url+'&name='+encodeURIComponent(name)
|
||||
})
|
||||
}else{
|
||||
app.method.navigateTo({
|
||||
url:"/pages/linkPage/linkPage?url="+encodeURIComponent(url)
|
||||
})
|
||||
}
|
||||
|
||||
}else{
|
||||
wx.navigateToMiniProgram({
|
||||
appId: 'wxdee7006582529713',
|
||||
path:url,
|
||||
envVersion: 'release',
|
||||
success(res) {
|
||||
// 打开成功
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
}),
|
||||
verifySuffix(fileName) {
|
||||
let suffix = `(bmp|jpg|png|tif|gif|pcx|tga|exif|fpx|svg|psd|cdr|pcd|dxf|ufo|eps|ai|raw|WMF|webp|jpeg)`
|
||||
let regular = new RegExp(`.*\.${suffix}`)
|
||||
return regular.test(fileName)
|
||||
},
|
||||
handlePopup(){
|
||||
popup({
|
||||
popup_type:2
|
||||
}).then(data=>{
|
||||
if(data.length!=0){
|
||||
this.setData({
|
||||
popupData:data[0].popup_content
|
||||
});
|
||||
if(data[0].popup_content.hasOwnProperty("inquiry_type")){
|
||||
this.setData({
|
||||
isOld:false
|
||||
})
|
||||
}else{
|
||||
this.setData({
|
||||
isOld:true
|
||||
})
|
||||
}
|
||||
let showFuli=wx.getStorageSync('showFuli');
|
||||
console.log("showFuli"+showFuli)
|
||||
if(!showFuli){
|
||||
this.setData({
|
||||
show:true
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
handelDelDoctor(){
|
||||
let {delId,my_doctor}=this.data;
|
||||
delDoctor(delId).then(data=>{
|
||||
for (let i = 0; i < my_doctor.length; i++) {
|
||||
if(my_doctor[i].doctor_id==delId){
|
||||
my_doctor.splice(i,1);
|
||||
this.setData({
|
||||
my_doctor:my_doctor
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
wx.showToast({
|
||||
title: '成功删除该医生',
|
||||
icon:"none"
|
||||
});
|
||||
})
|
||||
},
|
||||
confirmDel(event){
|
||||
let id=event.currentTarget.dataset.id;
|
||||
this.setData({
|
||||
showAlert:true,
|
||||
delId:id
|
||||
})
|
||||
},
|
||||
handleMyDoctor(){
|
||||
myDoctor({
|
||||
my_doctor_type:1,
|
||||
page:1,
|
||||
per_page:3
|
||||
}).then((data)=>{
|
||||
let result=data.data;
|
||||
this.setData({
|
||||
my_doctor:result
|
||||
})
|
||||
})
|
||||
},
|
||||
goMydoctor:throttle(function(){
|
||||
app.method.navigateTo({
|
||||
url: '/pages/myDoctor/myDoctor',
|
||||
})
|
||||
}),
|
||||
|
||||
onConfirmEntry(){
|
||||
//wx.setStorageSync('hasEntry', true);
|
||||
wx.showTabBar({
|
||||
animation: true
|
||||
})
|
||||
},
|
||||
onCloseEntry(){
|
||||
this.setData({
|
||||
showEntryTip_second:true,
|
||||
showEntryTip:true
|
||||
})
|
||||
|
||||
},
|
||||
onConfirmEntry_second(){
|
||||
this.setData({
|
||||
showEntryTip_second:false,
|
||||
//showEntryTip:false,
|
||||
});
|
||||
//wx.setStorageSync('hasEntry', true);
|
||||
// wx.showTabBar({
|
||||
// animation: true
|
||||
// })
|
||||
},
|
||||
onCloseEntry_second(){
|
||||
wx.showTabBar({
|
||||
animation: true
|
||||
});
|
||||
this.setData({
|
||||
showEntryTip_second:false,
|
||||
showEntryTip:false,
|
||||
});
|
||||
wx.exitMiniProgram({success: (res) => {}})
|
||||
},
|
||||
goAgreement:throttle(function(event){
|
||||
let id=event.currentTarget.dataset.id;
|
||||
app.method.navigateTo({
|
||||
url:"/pages/linkPage/linkPage?url="+encodeURIComponent(urlHost+'/basic/file/agreement.htm?id='+id)
|
||||
})
|
||||
}),
|
||||
goCheck:throttle(function(){
|
||||
// let that=this;
|
||||
// wx.scanCode({
|
||||
// onlyFromCamera: true,
|
||||
// scanType:['qrCode','barCode','datamatrix','pdf417'],
|
||||
// success (res) {
|
||||
// const reg=/^SD[A-Z]{2}\d{2}[A-Z]\d{5}$/
|
||||
// if(res.result.test(reg)){
|
||||
// that.setData({
|
||||
// codeMsg:res.result,
|
||||
// showCode:true
|
||||
// })
|
||||
// }
|
||||
|
||||
// }
|
||||
// })
|
||||
app.method.navigateTo({
|
||||
url: '/pages/sugarDetail/sugarDetail',
|
||||
})
|
||||
}),
|
||||
goMall:throttle(function(){
|
||||
wx.navigateToMiniProgram({
|
||||
appId: 'wxdee7006582529713',
|
||||
path:"/pages/home/dashboard/index",
|
||||
envVersion: 'release',
|
||||
success(res) {
|
||||
// 打开成功
|
||||
}
|
||||
})
|
||||
}),
|
||||
freeConsult:throttle(function(){
|
||||
app.method.navigateTo({
|
||||
url: '/pages/expertConsult/expertConsult?type=free'
|
||||
})
|
||||
}),
|
||||
handleFocus:throttle(function(event){
|
||||
wx.hideKeyboard();
|
||||
if(event.detail){
|
||||
app.method.navigateTo({
|
||||
url: '/pages/search/search',
|
||||
})
|
||||
}
|
||||
}),
|
||||
|
||||
goExpertDetail:throttle(function(event){
|
||||
let id=event.currentTarget.dataset.id;
|
||||
app.method.navigateTo({
|
||||
url: '/pages/expertDetail/expertDetail?doctor_id='+id
|
||||
})
|
||||
}),
|
||||
goquickExpert:throttle(function(){
|
||||
app.method.navigateTo({
|
||||
url: '/pages/quickConsult/quickConsult'
|
||||
})
|
||||
}),
|
||||
goExpertAndCloseOld:throttle(function(){
|
||||
app.method.navigateTo({
|
||||
url:'/pages/expertConsult/expertConsult'
|
||||
})
|
||||
this.onClickHide();
|
||||
}),
|
||||
goExpertAndClose:throttle(function(event){
|
||||
let id=event.currentTarget.dataset.id;
|
||||
let url='';
|
||||
if(id==1){
|
||||
url='/pages/index/expertConsult'
|
||||
}else if(id==2){
|
||||
url='pages/quickConsult/quickConsult'
|
||||
}else if(id==3){
|
||||
url='/pages/expertConsult/expertConsult?type=free'
|
||||
}else if(id==4){
|
||||
url='/pages/quickConsult/quickConsult?inquiry_type=4'
|
||||
}else if(id==5){
|
||||
url='pages/sugarDetail/sugarDetail'
|
||||
}
|
||||
if(id!==6){
|
||||
app.method.navigateTo({
|
||||
url:url //'/pages/expertConsult/expertConsult'
|
||||
})
|
||||
}
|
||||
this.onClickHide();
|
||||
}),
|
||||
goExpert:throttle(function(){
|
||||
app.method.navigateTo({
|
||||
url: '/pages/expertConsult/expertConsult'
|
||||
})
|
||||
}),
|
||||
goconsultandbuy:throttle(function(){
|
||||
app.method.navigateTo({
|
||||
url: '/pages/quickConsult/quickConsult?inquiry_type=4'
|
||||
})
|
||||
|
||||
}),
|
||||
watchBack(){
|
||||
let total=app.globalData.totalUnread;
|
||||
setBarData(total)
|
||||
},
|
||||
onClickHide() {
|
||||
this.setData({ show: false });
|
||||
wx.showTabBar();
|
||||
wx.setStorageSync('showFuli',true);
|
||||
},
|
||||
getData(){
|
||||
homeData().then((data)=>{
|
||||
let result=this.data;
|
||||
for (const key in data) {
|
||||
this.setData({
|
||||
[key]:data[key]
|
||||
})
|
||||
};
|
||||
|
||||
})
|
||||
},
|
||||
closeIntro(){
|
||||
this.setData({
|
||||
showIntro:false
|
||||
});
|
||||
wx.showTabBar({
|
||||
animation: true,
|
||||
});
|
||||
wx.setStorageSync('hasIntro',true)
|
||||
},
|
||||
onLoad(options) {
|
||||
this.setData({
|
||||
beforeClose: this.data.beforeClose.bind(this),
|
||||
})
|
||||
wx.removeTabBarBadge({
|
||||
index:1
|
||||
});
|
||||
//this.handleMyDoctor();
|
||||
},
|
||||
onShow(){
|
||||
let isIntro=wx.getStorageSync('hasIntro');
|
||||
//let isEntry=wx.getStorageSync('hasEntry');
|
||||
app.watch(this.watchBack.bind(this))//注册监听
|
||||
this.setData({
|
||||
img_host:app.hostConfig().imghost
|
||||
});
|
||||
if(!isIntro){
|
||||
this.setData({
|
||||
showIntro:true,
|
||||
});
|
||||
wx.hideTabBar({
|
||||
animation: true
|
||||
})
|
||||
};
|
||||
|
||||
// if(!isEntry){
|
||||
// this.setData({
|
||||
// showEntryTip:true
|
||||
// });
|
||||
// wx.hideTabBar({
|
||||
// animation: true
|
||||
// })
|
||||
// }else{
|
||||
// this.setData({
|
||||
// showEntryTip:false
|
||||
// });
|
||||
// wx.showTabBar({
|
||||
// animation: true
|
||||
// })
|
||||
// }
|
||||
this.getData();
|
||||
this.handlePopup();
|
||||
app.globalData.origion=0;
|
||||
|
||||
if(!app.globalData.totalUnread && app.globalData.totalUnread!=0){
|
||||
app.imLogin();
|
||||
}else{
|
||||
let total=app.globalData.totalUnread;
|
||||
setBarData(total)
|
||||
}
|
||||
wx.getPrivacySetting({
|
||||
success: res => {
|
||||
console.log(res)
|
||||
if (res.needAuthorization) {
|
||||
// 需要弹出隐私协议
|
||||
this.setData({
|
||||
showEntryTip:true
|
||||
})
|
||||
wx.hideTabBar({
|
||||
animation: true
|
||||
})
|
||||
} else {
|
||||
this.setData({
|
||||
showEntryTip:false
|
||||
})
|
||||
wx.showTabBar({
|
||||
animation: true
|
||||
})
|
||||
|
||||
}
|
||||
},
|
||||
fail: () => {},
|
||||
complete: () => {}
|
||||
})
|
||||
|
||||
},
|
||||
onShareTimeline(){
|
||||
return {
|
||||
title: '肝胆相照互联网医院,复诊购药一站式服务',
|
||||
query: '/pages/index/index'
|
||||
}
|
||||
},
|
||||
onShareAppMessage() {
|
||||
return {
|
||||
title: '肝胆相照互联网医院,复诊购药一站式服务',
|
||||
path: '/pages/index/index'
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
})
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"usingComponents": {
|
||||
"nav-bar": "/components/navbar/navbar",
|
||||
"van-overlay": "@vant/weapp/overlay/index",
|
||||
"van-dialog": "@vant/weapp/dialog/index",
|
||||
"dialog":"/components/dialog/dialog"
|
||||
},
|
||||
|
||||
"navigationStyle":"custom"
|
||||
}
|
||||
@@ -0,0 +1,185 @@
|
||||
<!--index.wxml-->
|
||||
<wxs src="../../filters/filter.wxs" module="moduleFilter"></wxs>
|
||||
<van-overlay show="{{ show }}" lock-scroll="{{true}}" root-portal="{{true}}" z-index="999" custom-class="mask">
|
||||
<view class="fuliwrapper">
|
||||
<view class="fulititle">新人红包福利</view>
|
||||
<view class="fulicontent">
|
||||
<view class="fuliprice">¥<text class="price" decode="true"> {{moduleFilter.formatMoney(popupData.coupon_price)}}</text></view>
|
||||
<!-- "application_scope": 1, // 适用范围(1:全部 2:快速问诊 3:专家问诊 4:公益问诊 5:问诊购药) -->
|
||||
<view class="rightbox">
|
||||
<view class="type" wx:if="{{popupData.application_scope==1}}">全场通用</view>
|
||||
<view class="type" wx:elif="{{popupData.application_scope==2}}">问诊适用</view>
|
||||
<view class="type" wx:elif="{{popupData.application_scope==3}}">按品牌适用</view>
|
||||
<view class="type" wx:elif="{{popupData.application_scope==4}}">按类别适用</view>
|
||||
<view class="type" wx:elif="{{popupData.application_scope==5}}">单品适用</view>
|
||||
<view class="expire" wx:if="{{popupData.valid_type==2 && popupData.valid_days>0}}">有效期{{popupData.valid_days}}天</view>
|
||||
<!-- <view class="expire" wx:elif="{{popupData.valid_type==1}}">有效期:{{popupData.valid_end_time}}</view> -->
|
||||
</view>
|
||||
|
||||
<!-- <view class="rightbox" wx:else>
|
||||
<view class="type" wx:if="{{popupData.application_scope==1}}">所有问诊类型</view>
|
||||
<view class="type" wx:elif="{{popupData.application_scope==2}}">快速问诊</view>
|
||||
<view class="type" wx:elif="{{popupData.application_scope==3}}">专家问诊</view>
|
||||
<view class="type" wx:elif="{{popupData.application_scope==4}}">公益问诊</view>
|
||||
<view class="type" wx:elif="{{popupData.application_scope==5}}">问诊购药</view>
|
||||
<view class="expire" wx:if="{{popupData.valid_type==2 && popupData.valid_days>0}}">有效期{{popupData.valid_days}}天</view>
|
||||
</view> -->
|
||||
|
||||
|
||||
</view>
|
||||
<view class="fulibtn" bindtap="goExpertAndCloseOld">专家问诊</view>
|
||||
<!-- <view wx:if="{{!isOld}}">
|
||||
<view class="fulibtn" bindtap="goExpertAndClose" data-id="1" wx:if="popupData.application_scope==2 && popupData.inquiry_type==1">专家问诊</view>
|
||||
<view class="fulibtn" bindtap="goExpertAndClose" wx:elif="popupData.application_scope==2 && popupData.inquiry_type==2" data-id="2">快速问诊</view>
|
||||
<view class="fulibtn" bindtap="goExpertAndClose" wx:elif="popupData.application_scope==2 && popupData.inquiry_type==3" data-id="3">公益问诊</view>
|
||||
<view class="fulibtn" bindtap="goExpertAndClose" wx:elif="popupData.application_scope==2 && popupData.inquiry_type==4" data-id="4">问诊购药</view>
|
||||
<view class="fulibtn" bindtap="goExpertAndClose" wx:elif="popupData.application_scope==2 && popupData.inquiry_type==5" data-id="5">检测</view>
|
||||
<view class="fulibtn" bindtap="goExpertAndClose" wx:else data-id="6">去使用</view>
|
||||
</view>
|
||||
<view wx:else>
|
||||
<view class="fulibtn" bindtap="goExpertAndCloseOld">专家问诊</view>
|
||||
</view> -->
|
||||
<image src="{{img_host+'/fulibg.png'}}" class="fulibg" lazy-load="true"></image>
|
||||
<image src="{{img_host+'/closefuli.png'}}" class="closefuli" bindtap="onClickHide"></image>
|
||||
</view>
|
||||
</van-overlay>
|
||||
<van-overlay show="{{ showIntro }}" lock-scroll="{{true}}" z-index="9999" custom-class="mask">
|
||||
<view class="introbox">
|
||||
<image src="{{img_host+'/intro.png'}}" class="introimg" mode='widthFix'></image>
|
||||
<view class="btnbox">
|
||||
<view class="btn" bindtap="closeIntro">
|
||||
我知道了
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</van-overlay>
|
||||
<nav-bar bind:handleFocus="handleFocus"></nav-bar>
|
||||
<view class="container">
|
||||
<view class="containIndex">
|
||||
<view class="wenzhen">
|
||||
<view class="wenzhenbox">
|
||||
<view class="wenzhencell" bindtap="goquickExpert">
|
||||
<view class="row">
|
||||
<view>快速问诊</view>
|
||||
<image src="{{img_host+'/kswz.png'}}"></image>
|
||||
</view>
|
||||
<view class="desc">
|
||||
5分钟接诊不耽误
|
||||
</view>
|
||||
</view>
|
||||
<view class="wenzhencell" bindtap="goExpert">
|
||||
<view class="row">
|
||||
<view>专家问诊</view>
|
||||
<image src="{{img_host+'/zjwz.png'}}"></image>
|
||||
</view>
|
||||
<view class="desc">
|
||||
专业医生,服务保障
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="buybox" bindtap="goconsultandbuy">
|
||||
<view class="left">
|
||||
<view>问诊购药</view>
|
||||
<view class="desc">在线复诊,正品无忧,送药到家</view>
|
||||
</view>
|
||||
<view class="right">
|
||||
<image src="{{img_host+'/yao.png'}}"></image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="cellbox">
|
||||
<view class="cell" bindtap="freeConsult">
|
||||
<image src="{{img_host+'/gywz.png'}}"></image>
|
||||
<view class="name">公益问诊</view>
|
||||
</view>
|
||||
<view class="cell" bindtap="goMall">
|
||||
<image src="{{img_host+'/gdmall.png'}}"></image>
|
||||
<view class="name">肝胆商城</view>
|
||||
</view>
|
||||
<view class="cell" bindtap="goCheck">
|
||||
<image src="../../assets/images/tangzu.png"></image>
|
||||
<view class="name">糖组检测</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ad">
|
||||
<swiper class="swiper" indicator-dots="{{true}}" circular="{{true}}" indicator-active-color="#3CC7C0" autoplay="{{true}}" interval="3000">
|
||||
<block wx:for="{{banner}}" wx:key="banner_id">
|
||||
<swiper-item>
|
||||
<view class="swiper-item">
|
||||
<image class="swiperimg" src="{{item.banner_path}}" data-url="{{item.banner_link}}" data-name="{{item.banner_name}}" bindtap="goH5"></image>
|
||||
</view>
|
||||
</swiper-item>
|
||||
</block>
|
||||
</swiper>
|
||||
</view>
|
||||
<view class="mydoctor" wx:if="{{my_doctor.length>0}}">
|
||||
<view class="titlebox">
|
||||
<view class="title">我的医生</view>
|
||||
<view class="more" wx:if="{{my_doctor.length>5}}" bindtap="goMydoctor">更多<image src="{{img_host+'/right.png'}}"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="page-section-spacing">
|
||||
<scroll-view class="scroll-view_H" scroll-x="true" style="width: 100%" show-scrollbar="false" enhanced="true">
|
||||
<view class="scroll-view-item_H" wx:for="{{my_doctor}}" wx:key="doctor_id" bindtap="goExpertDetail" data-id="{{item.doctor_id}}">
|
||||
<view class="close" catchtap="confirmDel" data-id="{{item.doctor_id}}" data-index="{{index}}">
|
||||
<image src="{{img_host+'/close.png'}}"></image>
|
||||
</view>
|
||||
<view class="left">
|
||||
<image src="{{item.avatar}}" wx:if="{{item.avatar}}" mode="aspectFill"></image>
|
||||
<image src="{{img_host+'/doctor_avatar.png'}}" wx:else></image>
|
||||
</view>
|
||||
<view class="right">
|
||||
<view class="namebox mydoctorbox">
|
||||
<view class="name">{{item.user_name}}</view>
|
||||
<view class="position">{{item.doctor_title}}</view>
|
||||
</view>
|
||||
<view class="hospital mydoctor">{{item.hospital_name}}</view>
|
||||
<view class="service">{{item.days}}天内服务过您</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="recommend" wx:if="{{recommend_doctor.length>0}}">
|
||||
<view class="titlebox">
|
||||
<view class="title">推荐医生</view>
|
||||
</view>
|
||||
<view class="viewbox">
|
||||
<view class="viewcell" wx:for="{{recommend_doctor}}" wx:key="doctor_id" bindtap="goExpertDetail" data-id="{{item.doctor_id}}">
|
||||
<view class="left">
|
||||
<image src="{{item.avatar}}" wx:if="{{item.avatar}}" mode="aspectFill"></image>
|
||||
<image src="{{img_host+'/doctor_avatar.png'}}" wx:else></image>
|
||||
</view>
|
||||
<view class="right">
|
||||
<view class="namebox">
|
||||
<view class="name">{{item.user_name}}</view>
|
||||
<view class="type" wx:if="{{item.hospital_level_name != '未知'&& item.hospital_level_name}}">{{item.hospital_level_name}}</view>
|
||||
<view class="type" wx:if="{{item.multi_point_status == 1 && item.multi_point_enable==1}}">可处方</view>
|
||||
</view>
|
||||
<view class="hospital"><text class="doctor_title" wx:if="{{item.doctor_title}}">{{item.doctor_title}}</text><text>{{item.department_custom_name}}</text></view>
|
||||
<view class="hospital">{{item.hospital_name}}</view>
|
||||
<view class="goodjob" wx:if="{{item.be_good_at}}">擅长:{{item.be_good_at}}</view>
|
||||
<view class="price" wx:if="{{moduleFilter.formatInquiryType(item.doctor_inquiry_config)==1}}">公益问诊:<text>¥{{item.free_clinic_price}}</text></view>
|
||||
<view class="price" wx:elif="{{moduleFilter.formatInquiryType(item.doctor_inquiry_config)==2}}">专家问诊:<text>¥{{item.price}}</text></view>
|
||||
<view class="price" wx:else></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<dialog bind:confirm="confirm" showDialog="{{showAlert}}" message="确定删除该服务过的医生?"></dialog>
|
||||
<dialog showDialog="{{showCode}}" message="{{codeMsg}}"></dialog>
|
||||
<van-dialog zIndex="9999" 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-dialog zIndex="99999" 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>
|
||||
File diff suppressed because one or more lines are too long
@@ -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() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
|
||||
})
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
<!--pages/linkPage/linkPage.wxml-->
|
||||
<web-view src="{{url}}" ></web-view>
|
||||
@@ -0,0 +1 @@
|
||||
/* pages/linkPage/linkPage.wxss */
|
||||
@@ -0,0 +1,222 @@
|
||||
// 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(){
|
||||
//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);
|
||||
app.imLogin();
|
||||
let url=this.data.redirectUrl?this.data.redirectUrl:'/pages/index/index';
|
||||
if(url.indexOf('login')!=-1 || url.indexOf('mobileLogin')!=-1){
|
||||
wx.reLaunch({
|
||||
url:'/pages/index/index'
|
||||
})
|
||||
}else{
|
||||
wx.reLaunch({
|
||||
url:url
|
||||
})
|
||||
}
|
||||
})
|
||||
});
|
||||
}else if(e.detail.errMsg == 'getPhoneNumber:fail user deny'){
|
||||
console.log('您拒绝手机号授权')
|
||||
}else{
|
||||
wx.showToast({
|
||||
title: '手机号授权失败',
|
||||
icon:'none'
|
||||
})
|
||||
}
|
||||
}),
|
||||
goMobile(){
|
||||
let url='/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:"/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() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
|
||||
})
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"usingComponents": {
|
||||
"van-dialog": "@vant/weapp/dialog/index"
|
||||
},
|
||||
"navigationBarTitleText": "登录"
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
<!--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">
|
||||
<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-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-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>
|
||||
@@ -0,0 +1,43 @@
|
||||
/* 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{width:100%;margin-top: 280rpx;}
|
||||
.btnbox 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
|
||||
}
|
||||
@@ -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: '/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": "肝胆相照互联网医院"
|
||||
}
|
||||
@@ -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="../../assets/images/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">数量 </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>
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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: '/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: '/pages/medinceOrderDetail/medinceOrderDetail?order_product_id='+id,
|
||||
})
|
||||
},
|
||||
goExpress:throttle(function(event){
|
||||
let id=event.currentTarget.dataset.id;
|
||||
app.method.navigateTo({
|
||||
url: '/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="../../assets/images/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: '/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: '/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="../../assets/images/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"> 关注</text>
|
||||
</view>
|
||||
<view class="guanzhu" wx:else catchtap="toggleFllow">
|
||||
<image src="{{img_host+'/star_on.png'}}" ></image>
|
||||
<text decode="true"> 关注</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: '/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: "/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: '/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;
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user