diff --git a/TUIService/TUIKit/components/TUIChat/components/MessageInput/index.js b/TUIService/TUIKit/components/TUIChat/components/MessageInput/index.js index 1b00136..33f36fc 100644 --- a/TUIService/TUIKit/components/TUIChat/components/MessageInput/index.js +++ b/TUIService/TUIKit/components/TUIChat/components/MessageInput/index.js @@ -59,6 +59,15 @@ Component({ }); }, }, + serviceInfo:{ + type: Object, + value:{}, + observer(newVal) { + this.setData({ + serviceInfo:newVal + }); + }, + }, patient_family_data:{ type: Object, value:{}, @@ -153,6 +162,7 @@ Component({ inquiry_type:'', inquiry_mode:'', patient_family_data:{}, + serviceInfo:{}, message: '', message_rounds:0, rest_rounds:0, @@ -219,6 +229,7 @@ Component({ }); } this.sendCallback(); + let {serviceInfo}=this.data; const message = wx.$TUIKit.createAudioMessage({ to: this.getToAccount(), conversationType: this.data.conversation.type, @@ -231,6 +242,13 @@ Component({ inquiry_mode:this.data.inquiry_mode, message_rounds:this.data.msgData.msg_round, patient_family_data:this.data.patient_family_data, + remaining_month_inquiry_count:serviceInfo.remaining_month_inquiry_count, + month_inquiry_count:serviceInfo.month_inquiry_count, + service_package_start_time:serviceInfo.start_time, + service_package_finish_time:serviceInfo.finish_time, + monthly_frequency:serviceInfo.monthly_frequency, + service_period:serviceInfo.service_period, + remaining_quantity:serviceInfo.remaining_quantity, is_system:0 }) }); @@ -539,6 +557,7 @@ pageLifetimes:{ // 发送图片消息 handleSendImageMessage(file) { + let {serviceInfo}=this.data; const message = wx.$TUIKit.createImageMessage({ to: this.getToAccount(), conversationType: this.data.conversation.type, @@ -551,6 +570,13 @@ pageLifetimes:{ inquiry_mode:this.data.inquiry_mode, message_rounds:this.data.msgData.msg_round, patient_family_data:this.data.patient_family_data, + remaining_month_inquiry_count:serviceInfo.remaining_month_inquiry_count, + month_inquiry_count:serviceInfo.month_inquiry_count, + service_package_start_time:serviceInfo.start_time, + service_package_finish_time:serviceInfo.finish_time, + service_period:serviceInfo.service_period, + monthly_frequency:serviceInfo.monthly_frequency, + remaining_quantity:serviceInfo.remaining_quantity, is_system:0 }), onProgress: (percent) => { @@ -878,6 +904,7 @@ pageLifetimes:{ const text = flag ? msg : this.data.message; const { FEAT_NATIVE_CODE } = constant; this.sendCallback(); + let {serviceInfo}=this.data; const message = wx.$TUIKit.createTextMessage({ to, conversationType: this.data.conversation.type, @@ -890,6 +917,13 @@ pageLifetimes:{ inquiry_mode:this.data.inquiry_mode, message_rounds:this.data.msgData.msg_round, patient_family_data:this.data.patient_family_data, + remaining_month_inquiry_count:serviceInfo.remaining_month_inquiry_count, + month_inquiry_count:serviceInfo.month_inquiry_count, + service_package_start_time:serviceInfo.start_time, + service_package_finish_time:serviceInfo.finish_time, + service_period:serviceInfo.service_period, + monthly_frequency:serviceInfo.monthly_frequency, + remaining_quantity:serviceInfo.remaining_quantity, is_system:0 }), }); @@ -927,6 +961,7 @@ pageLifetimes:{ // 发送正在输入状态消息 sendTypingStatusMessage() { const { BUSINESS_ID_TEXT, FEAT_NATIVE_CODE } = constant; + let {serviceInfo}=this.data; // 创建正在输入状态消息, "typingStatus":1,正在输入中1, 输入结束0, "version": 1 兼容老版本,userAction:0, // 14表示正在输入,actionParam:"EIMAMSG_InputStatus_Ing" //"EIMAMSG_InputStatus_Ing" 表示正在输入, "EIMAMSG_InputStatus_End" 表示输入结束 const typingMessage = wx.$TUIKit.createCustomMessage({ to: this.getToAccount(), @@ -948,6 +983,13 @@ pageLifetimes:{ inquiry_mode:this.data.inquiry_mode, message_rounds:this.data.msgData.msg_round, patient_family_data:this.data.patient_family_data, + remaining_month_inquiry_count:serviceInfo.remaining_month_inquiry_count, + month_inquiry_count:serviceInfo.month_inquiry_count, + service_package_start_time:serviceInfo.start_time, + service_package_finish_time:serviceInfo.finish_time, + service_period:serviceInfo.service_period, + monthly_frequency:serviceInfo.monthly_frequency, + remaining_quantity:serviceInfo.remaining_quantity, is_system:0 }), }); diff --git a/TUIService/TUIKit/components/TUIChat/components/MessagePrivate/ServiceEvaluation/index.wxml b/TUIService/TUIKit/components/TUIChat/components/MessagePrivate/ServiceEvaluation/index.wxml index 633e7d7..4dbd931 100644 --- a/TUIService/TUIKit/components/TUIChat/components/MessagePrivate/ServiceEvaluation/index.wxml +++ b/TUIService/TUIKit/components/TUIChat/components/MessagePrivate/ServiceEvaluation/index.wxml @@ -24,7 +24,7 @@ - 非常满意 + 评价 diff --git a/TUIService/TUIKit/components/TUIChat/index.js b/TUIService/TUIKit/components/TUIChat/index.js index d90599b..ad77c46 100644 --- a/TUIService/TUIKit/components/TUIChat/index.js +++ b/TUIService/TUIKit/components/TUIChat/index.js @@ -14,7 +14,7 @@ import { import { - chatMsg + chatMsg,serviceChatMsg } from "../../../../api/common" import {throttle} from "../../../../utils/util" @@ -117,6 +117,7 @@ Component({ }) console.log(this.data.order_inquiry_id); this.handleChatMsg(this.data.order_inquiry_id); + }, hide: function() { @@ -134,6 +135,7 @@ Component({ */ data: { img_host:'https://oss.prod.applets.igandanyiyuan.com/applet/patient/static', + serviceInfo:{}, conversationName: '', isEvaluation:false, conversation: {}, @@ -164,6 +166,7 @@ Component({ duration: 0, reception_time: null, rest_time: 0, + inquiry_mode:'', doctor_id: '', doctor_user_id:'', timeData: {}, @@ -437,8 +440,17 @@ Component({ this.handelfllowDoctor() } }, + handleServiceChatMsg(id){ + serviceChatMsg(id).then(res=> { + console.log(res) + this.setData({ + serviceInfo:res + }) + }) + }, handleChatMsg(id) { chatMsg(id).then(data => { + this.handleServiceChatMsg(id); // console.log("接口请求收到时间66666"+dayjs().format("YYYY-MM-DD HH:mm:ss:SSS")); // console.log(data); let promise=wx.$TUIKit.getUserProfile({ diff --git a/TUIService/TUIKit/components/TUIChat/index.wxml b/TUIService/TUIKit/components/TUIChat/index.wxml index 3756603..6108760 100644 --- a/TUIService/TUIKit/components/TUIChat/index.wxml +++ b/TUIService/TUIKit/components/TUIChat/index.wxml @@ -37,7 +37,7 @@ 问诊中 | - + 不限时间 剩余 @@ -51,6 +51,10 @@  {{rest_rounds>=0?rest_rounds:0}}个 沟通回合 + + 不限问诊次数,{{serviceInfo.remaining_finish_day}}天后结束 + 当月剩余:{{serviceInfo.monthly_frequency-serviceInfo.month_inquiry_count}} + @@ -83,7 +87,9 @@ - diff --git a/TUIService/TUIKit/components/TUIChat/index.wxss b/TUIService/TUIKit/components/TUIChat/index.wxss index 57dd2f5..437e2f3 100644 --- a/TUIService/TUIKit/components/TUIChat/index.wxss +++ b/TUIService/TUIKit/components/TUIChat/index.wxss @@ -634,3 +634,6 @@ border-radius: 30rpx; width:80rpx; height:80rpx; } +.count_time .red{ + color:#E34D59; + } \ No newline at end of file diff --git a/api/common.js b/api/common.js index 6b21b7f..01b6169 100644 --- a/api/common.js +++ b/api/common.js @@ -28,6 +28,9 @@ function job(){//获取职业数据 function chatMsg(id){//获取问诊订单消息内页基础数据 return request('/im/inquiry/basic/'+id,'GET') }; +function serviceChatMsg(id){ + return request('/im/inquiry/basic/service/'+id,'GET') +} function hotSearch(data){//热门搜索 return request('/basic/keyword/search','GET',data) }; @@ -39,6 +42,7 @@ function agreement(id){ } module.exports={ + serviceChatMsg, sickType, sickList, getSign, diff --git a/api/health.js b/api/health.js new file mode 100644 index 0000000..3217afb --- /dev/null +++ b/api/health.js @@ -0,0 +1,53 @@ +import {request} from '../utils/request.js' +function getItems(id){ //获取地址 + return request('/doctor/inquiry/service/follow/item/'+id,'GET',{},true) +}; +function getServiceDetail(data){ + return request('/patient/service/detail','GET',data,true) +} +function createServiceOrder(data){ + return request('/patient/service','POST',data,true) +} +function serviceList(data){ //获取患者检测订单列表 + return request('/patient/order/service','GET',data) + }; + function serviceDetail(id){ //获取患者检测订单详情 + return request('/patient/order/service/'+id,'GET',{},true) + }; + + function cancelCheckPay(id){ //取消支付 + return request('/patient/order/cancel-pay/'+id,'PUT') + }; + function cancelCheckOrder(id){ //取消支付 + return request('/patient/order/cancel/'+id,'PUT') + }; + function delCheckOrder(id){ + return request('/patient/order/detection/'+id,'DELETE') + }; + function createServiceChatOrder(id){ + return request('/patient/service/inquiry/'+id,'POST',{},true) +} +function serviceEquityDetail(id){ //获取患者服务包订单服务权益详情 + return request('/patient/order/service/detail/'+id,'GET',{},true) + }; + function serviceSickInfo(id){ //获取服务包订单病例详情-基础益详情 + return request('/case/service/'+id,'GET',{}) + }; + function checkService(id){ //检测是否可创建服务包问诊订单 + return request('/patient/service/check/'+id,'GET',{},true) + }; + + +module.exports={ + checkService, + serviceSickInfo, + serviceEquityDetail, + createServiceChatOrder, + cancelCheckPay, + cancelCheckOrder, + serviceDetail, + serviceList, + getItems, + getServiceDetail, + createServiceOrder +} diff --git a/app.json b/app.json index 4fad8ed..625e269 100644 --- a/app.json +++ b/app.json @@ -77,7 +77,7 @@ "pages/checkOrder/checkOrder", "pages/checkOrderDetail/checkOrderDetail" ], - "independent": true + "independent": false }, { "root": "TUICallKit", @@ -86,6 +86,21 @@ "pages/globalCall/globalCall" ], "independent": false + }, + { + "root": "healthyService", + "name": "healthyService", + "pages": [ + "pages/healthyIntro/healthyIntro", + "pages/healthyDetail/healthyDetail", + "pages/visitDetail/visitDetail", + "pages/healthyOrder/healthyOrder", + "pages/healthyOrderDetail/healthyOrderDetail", + "pages/writeSick/writeSick", + "pages/visitList/visitList", + "pages/sickInfo/sickInfo" + ], + "independent": false } ], "preloadRule": { diff --git a/components/navbar/navbar.js b/components/navbar/navbar.js index df35b70..8772db3 100644 --- a/components/navbar/navbar.js +++ b/components/navbar/navbar.js @@ -26,7 +26,7 @@ Component({ }, goInquirtForm(){ // wx.navigateTo({ - // url: '/patient/pages/expertDetail/expertDetail?doctor_id=516904855116750848', + // url: '/healthyService/pages/visitList/visitList', // }) } }, diff --git a/filters/filter.wxs b/filters/filter.wxs index d584d52..bde33a7 100644 --- a/filters/filter.wxs +++ b/filters/filter.wxs @@ -91,6 +91,8 @@ function transforDay(time, type) { time_str = y + '-' + m + '-' + d; } else if(type == 'dateminute'){ time_str = y + '-' + m + '-' + d + ' ' + h + ':' + i + }else if(type == 'dotdateminute'){ + time_str = y + '.' + m + '.' + d + ' ' + h + ':' + i }else if (type == 'datetime') { time_str = y + '-' + m + '-' + d + ' ' + h + ':' + i + ':' + s; } else if (type == 'onlyMonth') { @@ -202,7 +204,21 @@ function hasTuWen(arr){ } return false } + +function formatHealthPrcice(arr){ + var price=null; + if(arr){ + for (var i = 0; i < arr.length; i++) { + if(arr[i].inquiry_type==1 && arr[i].inquiry_mode==8){ + return arr[i].inquiry_price; + } + + } + } + return price +}; module.exports = { + formatHealthPrcice:formatHealthPrcice, formatwenzhenList:formatwenzhenList, formatChufang:formatChufang, formatPrice:formatPrice, diff --git a/healthyService/pages/healthyDetail/healthyDetail.js b/healthyService/pages/healthyDetail/healthyDetail.js new file mode 100644 index 0000000..ba2b2f9 --- /dev/null +++ b/healthyService/pages/healthyDetail/healthyDetail.js @@ -0,0 +1,438 @@ +// healthyService/pages/healthyDetail/healthyDetail.js +import {doctorDetail} from "../../../api/consultExpert" +import {family,addfamily} from "../../../api/familyDoc"; +import {getServiceDetail,createServiceChatOrder} from "../../../api/health" +import {doctorService} from "../../../api/consultExpert" +import {throttle} from "../../../utils/util" +const app = getApp() +Page({ + + /** + * 页面的初始数据 + */ + data: { + order_no:'', + confirmNext:'确定', + order_inquiry_id:'', + chat_id:'', + showPicker:false, + columns:[ + {text:"本人",value:1}, + {text:"父母",value:2}, + {text:"爱人",value:3}, + {text:"子女",value:4}, + {text:"亲戚",value:5}, + {text:"其他 ",value:6} + ], + showWarn:false, + status:'', + active:0, + img_host:app.hostConfig().imghost, + doctor_id:'', + currentData:0, + inquiry_mode:8, + inquiry_type:1, + current_price:'', + avatar: '', + user_name: '', + doctor_title: '', + doctor_id: '', + doctor_title_name:'', + user_id:'', + is_online:'0', + hospital: null, + multi_point_enable:'', + multi_point_status:'', + hospital:{}, + priceList:[], + show:false, + currentFamilyId:'', + realName:'', + idCard:'', + phoneNumber:'', + relationId:'', + sex:'', + service_type:1, + chat_id:'', + }, + goHasOrder(){ + let {status,doctor_id,order_no}=this.data; + if(status==4){ + let id=this.data.order_inquiry_id; + app.method.navigateTo({ + url: '/patient/pages/orderDetail/orderDetail?order_inquiry_id='+id, + }) + }else if(status==2){ + let id=this.data.order_no; + app.method.navigateTo({ + url: '/healthyService/pages/healthyOrderDetail/healthyOrderDetail?order_service_id='+id, + }) + + }else if(status==3){ + app.method.navigateTo({ + url:'/patient/pages/expertDetail/expertDetail?doctor_id='+doctor_id + }) + }else if(status==5){ + this.handleCreateServiceChatOrder(order_no) + } +}, +onConfirm(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 + }) + }, + goNext:throttle(function() { + this.handleGetServiceDetail(); + + }), + 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 + }) + + }) + }, + showPatient(){ + this.setData({ + show:true + }) + }, + 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 + }) + }, + 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; + } + }, + getFamily() { + family().then((data) => { + this.setData({ + family: this.transforpage(data) + }) + }) + }, + 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; + } + }, + onClose() { + this.setData({ + show: false + }); + }, + onCloseAdd() { + this.setData({ + showAdd: false + }); + }, + + getDeatil(id) { + doctorDetail(id).then((res) => { + for (const key in this.data) { + if (res[key]) { + this.setData({ + [key]: res[key] + }) + } + }; + this.setData({ + chat_id:res.user_id + }) + }) + }, + handleGetServiceDetail(){ + let {doctor_id,currentFamilyId,service_type,follow_package_item_id,chat_id,sex,inquiry_mode,inquiry_type}=this.data; + getServiceDetail({ + doctor_id, + family_id:currentFamilyId, + service_type, + follow_package_item_id + + }).then((res)=>{ + if(res.status==1){ + app.method.navigateTo({ + url:'/healthyService/pages/writeSick/writeSick?doctor_id='+doctor_id+"&family_id="+currentFamilyId+"&chat_id="+chat_id+"&inquiry_type="+inquiry_type+"&sex="+sex+"&inquiry_mode="+inquiry_mode+"&package_id="+follow_package_item_id + }) + }else if(res.status==2){ + this.setData({ + showWarn:true, + order_no:res.data.order_no, + status:2, + confirmNext:'确定', + message:res.message + }) + + }else if(res.status==3){ + this.setData({ + showWarn:true, + status:3, + confirmNext:'前往', + message:'本月问诊次数已用完,您可选择医生其他服务' + }) + }else if(res.status==4){ + this.setData({ + showWarn:true, + order_no:res.data.order_no, + order_inquiry_id:res.data.order_inquiry_id, + status:4, + confirmNext:'确定', + message:res.message + }) + }else if(res.status==5){ + this.setData({ + showWarn:true, + status:5, + confirmNext:'前往', + order_no:res.data.order_no, + message:'是否使用剩余问诊次数?' + }) + + + } + + }) +}, + handleCreateServiceChatOrder(id){ + createServiceChatOrder(id).then(res=>{ + let order_inquiry_id=res.order_inquiry_id; + let chat_id=this.data.chat_id; + app.method.navigateTo({ + url: '/TUIService/pages/index?currentConversationID=' + chat_id + "&order_inquiry_id=" + order_inquiry_id + "&inquiry_type=1&fromType=chat" + }) + }) + }, + showPatient(){ + this.setData({ + show:true + }) + }, + getService(id){ + doctorService(id).then(res=>{ + for (let i = 0; i < res.length; i++) { + if(res[i].inquiry_mode==8 && res[i].inquiry_type==1){ + this.setData({ + current_price:res[i].inquiry_price + }) + }; + // + + } + + }) + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + this.setData({ + doctor_id:options.doctor_id, + }) + + this.getDeatil(options.doctor_id); + this.getService(options.doctor_id); + this.getFamily(); + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/healthyService/pages/healthyDetail/healthyDetail.json b/healthyService/pages/healthyDetail/healthyDetail.json new file mode 100644 index 0000000..141ca68 --- /dev/null +++ b/healthyService/pages/healthyDetail/healthyDetail.json @@ -0,0 +1,9 @@ +{ + "usingComponents": { + "nav":"../../../components/nav/nav", + "van-popup": "@vant/weapp/popup/index", + "van-picker": "@vant/weapp/picker/index", + "van-dialog": "@vant/weapp/dialog/index" + }, + "navigationStyle":"custom" +} \ No newline at end of file diff --git a/healthyService/pages/healthyDetail/healthyDetail.wxml b/healthyService/pages/healthyDetail/healthyDetail.wxml new file mode 100644 index 0000000..20818ca --- /dev/null +++ b/healthyService/pages/healthyDetail/healthyDetail.wxml @@ -0,0 +1,174 @@ + + + + + + + + + + + + + + + {{user_name}} + {{hospital.hospital_level_name}} + 可处方 + + {{doctor_title_name}} {{item.department_custom_name}} + {{hospital.hospital_name}} + + + + + + 服务权益 + + + + 专属标识: + 享有特殊标识,获得医生全面照护 + + + 服务周期: + 购买后,从第一次消费起90天内 + + + 图文问诊2次/月 + 1、医生接诊后,每次可持续48小时; + + 2、图片、文字、语音形式,无限制的进行沟通; + + 3、超出的问诊需按原价的图文服务购买。 + + + 处方: + 1、每次问诊,只可产生一个处方单; + + + 2、服务包含30盒肝爽颗粒(步长),每月和医生问诊时,医生开具处方。 + + + + 优惠劵: + 1、赠送全品类药品劵10元(不可与其他优惠劵叠加使用); + + + + 2、赠送肝胆相照商城优惠劵100元(仅限纽娃复合蛋白营养素固体饮料使用,注册肝胆相照商城后,2~3个工作日到账)。 + + + + 退费: + 1、未使用随时退; + + + + + + 2、健康包开始使用后如需退款请联系客服,退款不收取任何服务费等额外费用,但不支持部分退款; + + + 3、药品一经发出,问诊一经接诊,均概不退换; + + + 4、未消费健康包内容可退款,已消费服务的部分按原价计费,即:已发生的问诊按照问诊时互联网医院显示的价格结算,肝爽颗粒按照原价每盒42.8元结算。 + + + + + + + 立即购买:¥{{current_price}} + + + + 选择患者 + + + + + + {{item.card_name}} + 本人 + 父母 + 爱人 + 子女 + 亲戚 + 其他 + + + 性别未知 + + + {{item.age}}岁 + + + + + +新建患者 + + + + + + + + + + + + 新建患者 + + 真实姓名* + + + + 身份证号* + + + + 联系电话 + + + + 患者关系 + + + + 温馨提示: + + 1、根据国家卫健委要求,就医实行实名制,请如实填写患者信息。 + 2、信息受隐私保护,仅接诊医生可见。 + + 3、6岁以下儿童不支持线上问诊,请到线下就诊。 + + + + + 确定 + + + + + + + + + \ No newline at end of file diff --git a/healthyService/pages/healthyDetail/healthyDetail.wxss b/healthyService/pages/healthyDetail/healthyDetail.wxss new file mode 100644 index 0000000..28aa342 --- /dev/null +++ b/healthyService/pages/healthyDetail/healthyDetail.wxss @@ -0,0 +1,369 @@ +page{ + height:100vh; + overflow: hidden; +} +/* healthyService/pages/healthyDetail/healthyDetail.wxss */ +.page{ + width:100%; + height:calc(100% - 172rpx); + margin-top: 172rpx; + display: flex; + overflow: hidden; + flex-direction: column; +} +.dcimg{ + width:100%; + position: absolute; + z-index:-1; +} +.detailbox{ + overflow: hidden; + /* position: relative; */ + z-index:1; + flex:1; + display: flex; + flex-direction: column; +margin:0rpx; +background: #FFFFFF; +border-radius: 32rpx 32rpx 0rpx 0rpx; +} +.con{ + flex:1; + padding: 0 30rpx; + overflow-y: scroll; + -webkit-overflow-scrolling: touch; +} +.quanyi{ + position: relative; + width:260rpx; + margin:0 auto; + height:70rpx; +} +.quanyiImg{ + width:260rpx; + height:70rpx; +} +.cell{ + margin-bottom: 30rpx; +} +.quanyiText{ + top:0; + position: absolute; + + font-size: 34rpx; + width:260rpx; + height:70rpx; + display: flex; + justify-content: center; + align-items: center; + color: #FFFFFF; +} + +.celltitle{ + font-weight: 550; + font-size: 30rpx; + color: #000000; +} +.celldesc{ + margin-top: 15rpx; + font-size: 30rpx; + color: #000000; +} +.buttonbox{ + width:100%; + height:200rpx; +} +.btn{ + height: 94rpx; + margin:35rpx 30rpx 0; + background: #3CC7C0; +border-radius: 47rpx; +font-size: 36rpx; +color: #FFFFFF; +display: flex; +align-items: center; +justify-content: center; +line-height: 50rpx; +text-align: center; +} +.viewcell{ + display: flex; + background-color: #fff; + margin:30rpx; + padding:20rpx; + box-shadow: 0rpx 8rpx 20rpx 2rpx rgba(0,0,0,0.04); +border-radius: 10rpx; + +} +.headimg{ + width:120rpx; + height:120rpx; + border-radius: 50%; +} +.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; + } + .viewcellbox .hospital{ + margin-top: 12rpx; + color: #333333; + display: flex; + font-size: 30rpx; + word-wrap: break-word; + } + .hospital_name{ + font-size: 28rpx; + word-wrap: break-word; + margin-right: 10rpx; + overflow: hidden; + white-space: nowrap; + color:#333; + text-overflow: ellipsis; + } + .viewcell .right{ + flex:1; + margin-left: 20rpx; + } + .namebox{ + display: flex; + font-size: 34rpx; + font-weight: 600; + color:#333; + align-items: flex-end; + } + .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; + } + .celladd{ + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + height: 120rpx; + } + .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; + } + .viewcell .left{ + position: relative; +} + .onlinebox .icon { + top: 90rpx; + left: 50%; + position: absolute; + margin-left: -48rpx; + width: 96rpx; + height: 34rpx; + border-radius: 0; +} + \ No newline at end of file diff --git a/healthyService/pages/healthyIntro/healthyIntro.js b/healthyService/pages/healthyIntro/healthyIntro.js new file mode 100644 index 0000000..0a01ce7 --- /dev/null +++ b/healthyService/pages/healthyIntro/healthyIntro.js @@ -0,0 +1,224 @@ +// healthyService/pages/healthyIntro/healthyIntro.js +import {throttle} from "../../../utils/util" +import {doctorList} from "../../../api/consultExpert" +const app = getApp() +Page({ + + /** + * 页面的初始数据 + */ + data: { + blockHeight:"150rpx", + type:'', + doctorList:[], + page:1, + pageNumber:10, + isTriggered:false, + show:false, + expertise_id:'', + province_id:'', + city_id:'', + keyword:'', + lock:false, + is_online:0, + sort_order:1, + inquiry_type:'1', + inquiry_mode:'8', + }, + handleRefresher(){ + + this.setData({ + lock:false, + page:1, + doctorList:[] + }); + this.getDoctorList() + }, + goExpertDetail:throttle(function(e){ + let {doctorid,price}=e.currentTarget.dataset; + if(price){ + app.method.navigateTo({ + url:'/healthyService/pages/healthyDetail/healthyDetail?doctor_id='+doctorid + }) + } + else{ + app.method.navigateTo({ + url:'/healthyService/pages/healthyDetail/healthyDetail?doctor_id='+doctorid+"&price="+price + }) + wx.showToast({ + title: '未设置健康包价格', + icon:'none' + }) + } + + }), + getDoctorList(){ + let {expertise_id,province_id, city_id,sort_order,keyword,page,pageNumber,is_online,inquiry_type,inquiry_mode}=this.data; + doctorList({ + expertise_id:expertise_id, + province_id:province_id, + city_id:city_id, + sort_order: sort_order, + is_first_online:is_online, + keyword:keyword, + inquiry_type, + inquiry_mode, + page:page, + per_page:pageNumber + }).then((res)=>{ + let {doctorList}=this.data; + if(res.data.length==0){ + this.setData({ + lock:true, + isTriggered:false + }); + return false; + }else{ + this.setData({ + isTriggered:false, + doctorList:doctorList.concat(res.data) + }) + } + + + }) + }, + 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(); + } + }, + goAgree(){ + this.setData({ + showRight:false + }) + }, + lookGood:throttle(function(){ + this.setData({ + showRight:true + }) + }), +// 显示遮罩层 +showModal() { + this.setData({ + hideModal: true, + blockHeight:"1130rpx" + }) + }, + // 隐藏遮罩层 + hideModal() { + + this.setData({ + hideModal: false, + blockHeight:"150rpx" + }) + }, + touchstart(e) { + this.setData({ + startX: e.changedTouches[0].clientX, + startY: e.changedTouches[0].clientY + }) + }, + angle(start, end) { + var _X = end.X - start.X, + _Y = end.Y - start.Y; + //返回角度 Math.atan()返回数字的反正切值 + return 360 * Math.atan(_Y / _X) / (2 * Math.PI); + }, + touchend(e) { + let {startX,startY} = this.data; + let slidingRange = 45; // + let touchMoveX = e.changedTouches[0].clientX; + let touchMoveY = e.changedTouches[0].clientY; + let angle = this.angle({ + X: startX, + Y: startY + }, { + X: touchMoveX, + Y: touchMoveY + }); + //为了方便计算取绝对值判断 + if (Math.abs(angle) > slidingRange && touchMoveY < startY) { + + this.showModal() + // 向上滑动 + }; + if (Math.abs(angle) > slidingRange && touchMoveY > startY ) { + this.hideModal() + // 向下滑动 + } + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + if(options.type){ + this.setData({ + type:'visit' + }) + } + this.getDoctorList(); + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/healthyService/pages/healthyIntro/healthyIntro.json b/healthyService/pages/healthyIntro/healthyIntro.json new file mode 100644 index 0000000..195d1fd --- /dev/null +++ b/healthyService/pages/healthyIntro/healthyIntro.json @@ -0,0 +1,8 @@ +{ + "usingComponents": { + "nav":"../../../components/nav/nav", + "van-popup": "@vant/weapp/popup/index", + "van-dialog": "@vant/weapp/dialog/index" + }, + "navigationStyle":"custom" +} \ No newline at end of file diff --git a/healthyService/pages/healthyIntro/healthyIntro.wxml b/healthyService/pages/healthyIntro/healthyIntro.wxml new file mode 100644 index 0000000..09934a0 --- /dev/null +++ b/healthyService/pages/healthyIntro/healthyIntro.wxml @@ -0,0 +1,186 @@ + + + + + + + + + + + + + + + + + 健康包服务医生 + + + + + + + + + + + + + + + + {{item.user_name}} + + {{item.hospital.hospital_level_name}} + 可处方 + + {{item.doctor_title_name}} {{item.department_custom_name}} + {{item.hospital.hospital_name}} + 擅长:{{item.be_good_at}} + {{cell.expertise_name}} + + 评分: {{item.praise_rate}} 暂无 + 问诊量: {{item.served_patients_num}}暂无 + 平均回复: {{moduleFilter.formatReply(item.avg_response_time)}}h暂无 + + + + 健康包:¥{{itemName.inquiry_price}} + + + + + + + + + 暂无数据! + + + + + + + + + + + 服务内容: + + 1、 + 每个月2次问诊; + + + 2、 + 30盒肝爽颗粒(3g*9袋) 。 + + + + + 服务价格: + + 1、 + 健康包价格低至1080元起,内所含每月两次问诊,费用低至5折;超出次数需按照原价支付问诊费; + + + 2、 + 健康包内包含30盒肝爽颗粒(3g*9袋),原价42.8元/盒,健康包内售价为35元/盒,超出30盒的可按38.8元/盒优惠价购买; + + + + 3、 + 赠送全品类药品劵10元; + + + + 4、 + + 赠送肝胆相照商城优惠劵100元。 + (药品总价满100元方可使用,不可与其他优惠劵叠加使用)。 + + + + + 退款说明: + + 1、 + 未使用随时退; + + + 2、 + +健康包开始使用后如需退款请联系客服,退款不收取任何服务费等额外费用,但不支持部分退款; + + + + + 3、 + 药品一经发出,问诊一经接诊,均概不退换; + + + + + 4、 + 未消费健康包内容可退款,已消费服务的部分按原价计费,即:已发生的问诊按照问诊时互联网医院显示的价格结算,肝爽颗粒按照原价每盒42.8元结算。 + + + + + diff --git a/healthyService/pages/healthyIntro/healthyIntro.wxss b/healthyService/pages/healthyIntro/healthyIntro.wxss new file mode 100644 index 0000000..2c179aa --- /dev/null +++ b/healthyService/pages/healthyIntro/healthyIntro.wxss @@ -0,0 +1,461 @@ +/* healthyService/pages/healthyIntro/healthyIntro.wxss */ +.page { + + margin-top: 172rpx; + overflow-y: scroll; + height: calc(100vh - 172rpx - 60rpx); + position: relative; +} + +.imgbox { + position: relative; +} + +page { + height: 100vh; + overflow: hidden; +} + +.btn { + position: absolute; + + left: 50%; + margin-left: -232rpx; + width: 464rpx; + height: 86rpx; + bottom: 130rpx; +} + +.bg { + width: 100%; +} + +.top { + /* position: absolute; + top: 10rpx; */ + width: 100%; + display: flex; + justify-content: center; + padding: 20rpx 0; +} + +.top .up { + width: 40rpx; + height: 22rpx; + transition: all 0.5s; +} + +.top .up.active { + transform: rotate(180deg); +} + +.popname { + margin-top: 0rpx; + padding: 20rpx 52rpx 30rpx; + font-size: 34rpx; + color: #333; + border-bottom: 1px solid #E7E7E7; +} + +.popwrper { + /* top: 0rpx; */ + background-color: #fff; + /* position: relative; */ + transition: height 0.5s; + width: 100%; + border-radius: 20rpx; + overflow: hidden; + height: 100%; + bottom: 0px; +} + +.wraper { + + height: 100%; +} + +.containexpert { + margin-top: 172rpx; + padding: 0 30rpx 0rpx; + overflow: hidden; + position: relative; + transform: all 0.3s ease; +} + +.droptitle, +.van-ellipsis { + font-size: 30rpx !important; +} + +.namebox .name { + max-width: 400rpx; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + +.droptitle.active { + color: #3CC7C0; +} + +.searchbox { + width: 100%; + height: 72rpx; + display: flex; + border-radius: 40rpx; + align-items: center; + margin-top: 20rpx; + background: #FBFBFB; + border-radius: 36px; + border: 1rpx solid #CCCCCC; +} + +.searchbox input { + margin-left: 30rpx; + flex: 1; + font-size: 32rpx; + height: 80rpx; +} + +.searchbox image { + width: 30rpx; + height: 30rpx; + margin-right: 28rpx; +} + +.scroll-view_H { + height: 195rpx; + white-space: nowrap; + vertical-align: top; +} + +.scroll-view-item_H { + /* width: 154rpx; */ + padding: 0 15rpx; + background: #F4F4F4; + border-radius: 30rpx; + font-size: 28rpx; + color: #666666; + margin-left: 36rpx; + border: 1rpx solid #F4F4F4; + height: 58rpx; + display: inline-block; + text-align: center; + line-height: 58rpx; +} + +.page-section-spacing .row { + margin-top: 40rpx; + margin-bottom: 30rpx; +} + +.page-section-spacing .row:last-child { + margin-top: 30rpx; + margin-bottom: 10rpx; +} + +.scroll-view_H .scroll-view-item_H:first-child { + margin-left: 0rpx; + +} + +.scroll-view-item_H.active { + background: #E2FFFE; + color: #3CC7C0; + border: 1rpx solid #3CC7C0; +} + +.van-dropdown-menu { + box-shadow: none !important; + +} + +.viewcell { + display: flex; + overflow: hidden; + box-sizing: border-box; + padding: 40rpx 30rpx 30rpx; + width: 100%; + border-radius: 10rpx; + background-color: #fff; + border-bottom: 1rpx solid #E7E7E7; +} + +.viewcell:last-child { + border-bottom: none; +} + +.viewcell .type { + height: 32rpx; + margin-bottom: 6rpx; + line-height: 32rpx; + display: flex; + white-space: nowrap; + align-items: center; + margin-left: 18rpx; + padding: 0rpx 6rpx; + background: #ED9C00; + border-radius: 4rpx; + color: #FFFFFF; + font-size: 24rpx; +} + +.viewcell .hospital { + margin-top: 12rpx; + color: #333333; + display: flex; + font-size: 30rpx; + word-wrap: break-word; +} + +.hospital_name { + word-wrap: break-word; + margin-right: 10rpx; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; +} + +.goodjob { + color: #666666; + margin-top: 28rpx; + line-height: 42rpx; + font-size: 28rpx; + word-break: break-all; + text-overflow: ellipsis; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 2; + /* 这里是超出几行省略 */ + overflow: hidden; +} + +.price { + font-size: 28rpx; + position: relative; +} + +.price text { + margin-left: 5rpx; + font-size: 32rpx; + color: #EF4F20; +} + +.viewcell .right { + flex: 1; + margin-left: 20rpx; +} + +.viewcell image { + width: 80rpx; + height: 80rpx; + border-radius: 50%; +} + +.namebox { + display: flex; + font-size: 34rpx; + font-weight: 600; + color: #333; + align-items: flex-end; +} + +.namebox .position { + font-weight: normal; + margin-left: 15rpx; + font-size: 30rpx; +} + +.dropOnline.active { + color: #3CC7C0; +} + +.diseaseType { + height: 40rpx; + background: #E2FFFE; + border-radius: 20rpx; + margin-right: 20rpx; + border: 1rpx solid #3CC7C0; + color: #3CC7C0; + font-size: 24rpx; + display: inline-flex; + text-align: center; + padding: 0 15rpx; + align-items: center; + justify-content: center; + margin-top: 20rpx; + white-space: nowrap; +} + +.detail { + margin-top: 20rpx; + display: flex; + font-size: 24rpx; +} + +.detail view { + margin-right: 40rpx; +} + +.detail view text { + font-size: 28rpx; + color: #3CC7C0; +} + +.consultbox { + position: relative; + + margin-top: 28rpx; + display: flex; + align-items: center; + justify-content: space-between; +} + +.consult { + height: 60rpx; + background: #3CC7C0; + border-radius: 30rpx; + color: #FFFFFF; + display: flex; + align-items: center; + padding: 0 20rpx; + font-size: 30rpx; +} + +.wraper { + display: flex; + flex-direction: column; +} + +.scrollwraper { + flex: 1; + overflow-y: scroll; + -webkit-overflow-scrolling: touch; +} + +.dropdown { + width: 100%; + position: relative; + justify-content: center; + align-items: center; + border-bottom: 1rpx solid #E7E7E7; + display: flex; +} + +.dropdown .bar { + + height: 40rpx; + width: 1rpx; + left: 50%; + top: 50%; + transform: translate(-50%, -50%); + position: absolute; + background: #ccc; + opacity: 0.9; +} + +.dropbar { + background: #ccc; + opacity: 0.9; + height: 40rpx; + width: 1rpx; + position: static; + margin-top: 30rpx; +} + +.dropOnline { + display: flex; + justify-content: center; + align-items: center; + width: 33.33%; +} + +.viewcell .left { + position: relative; +} + +.price .expert_prcie { + text-decoration: line-through; + color: #999; +} + +.price .expert_prcie .priceactive { + color: #999; +} + +.pricecell { + display: flex; + font-size: 30rpx; + align-items: center; + white-space: nowrap; +} + +.videocell { + position: absolute; + right: 0rpx; +} + +.price.qs { + display: none; +} + +.price.gy, +.price.hasfree { + display: none; +} + +.nonekaitong { + position: absolute; + top: 0rpx; + font-size: 30rpx; + right: 320rpx; +} + +.nonekaitong text { + font-size: 30rpx; +} + +.popwrper { + display: flex; + flex-direction: column; +} + +.slotmsg { + height: 500rpx; + overflow-y: scroll; + padding: 30rpx; +} + +.row { + display: flex; + margin-bottom: 6rpx; + line-height: 45rpx; + font-weight: 400; + font-size: 28rpx; + color: #333333; +} + +.slotmsg .rowtitle { + margin-bottom: 15rpx; + font-weight: 500; + font-size: 32rpx; + text-align: left; + color: #000000; + +} +.slotmsg .rowright{ + text-align: left; +} +.rowbox { + margin-bottom: 20rpx; +} + +.row .tips { + margin-top: 10rpx; + display: flex; + height: 113rpx; + padding: 0 18rpx; + align-items: center; + background: #F1F1F1; + border-radius: 10rpx; +} \ No newline at end of file diff --git a/healthyService/pages/healthyOrder/healthyOrder.js b/healthyService/pages/healthyOrder/healthyOrder.js new file mode 100644 index 0000000..f336849 --- /dev/null +++ b/healthyService/pages/healthyOrder/healthyOrder.js @@ -0,0 +1,273 @@ +// pages/consultOrder/consultOrder.js +const app = getApp() +import {serviceList} from "../../../api/health" + 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: [], + order_service_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.getServiceList(); + }, + 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.getServiceList() + } + }, + goExpertList(){ + app.method.navigateTo({ + url: '/healthyService/pages/healthyOrderDetail/healthyOrderDetail' //'/pages/expertConsult/expertConsult', + }) + }, + changeStatus({ detail }){ + this.setData({ + isLock:false, + page:1, + selectstatus:true, + order_service_status:detail, + orderList:[] + }) + this.getServiceList() + }, + changeFamily({ detail }){ + this.setData({ + family_id:detail, + isLock:false, + selectfamily:true, + page:1, + orderList:[] + }) + this.getServiceList() + }, + getServiceList(){ + let {order_service_status,family_id,page,pageNumber}=this.data; + this.setData({ + isLoading:true + }) + serviceList({ + order_service_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.getServiceList(); + }) + + }, + goDetail(event){ + let id=event.currentTarget.dataset.id; + app.method.navigateTo({ + url: '/healthyService/pages/healthyOrderDetail/healthyOrderDetail?order_service_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_service_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_service_id==changeId){ + let currentitem=`orderList[${i}].order_service_status` + this.setData({ + [currentitem]:changeStatus + }) + break; + } + } + }else{ + // this.setData({ + // isLock:false, + // page:1, + // orderList:[] + // }) + // this.getDetectionList(); + // this.getfamily(); + } + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + // this.goBack(false) + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + +}) \ No newline at end of file diff --git a/healthyService/pages/healthyOrder/healthyOrder.json b/healthyService/pages/healthyOrder/healthyOrder.json new file mode 100644 index 0000000..e30fe4e --- /dev/null +++ b/healthyService/pages/healthyOrder/healthyOrder.json @@ -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":"肝胆相照互联网医院" + +} \ No newline at end of file diff --git a/healthyService/pages/healthyOrder/healthyOrder.wxml b/healthyService/pages/healthyOrder/healthyOrder.wxml new file mode 100644 index 0000000..3c0a1a3 --- /dev/null +++ b/healthyService/pages/healthyOrder/healthyOrder.wxml @@ -0,0 +1,108 @@ + + + + + + 服务包订单 + + + + + + + + + + + + + {{item.order_service_type==1?'健康包':'随访包'}} + + + 待支付 + + + + + 待接诊 + 服务中 + 已完成 + 已取消 + + 支付超时 + + + + + + + + + + {{item.user_doctor.user_name}} {{item.user_doctor.doctor_title}} + 平台分配医生中 + 接诊医生 + + {{item.user_doctor.hospital_name}} + + + + +
有效期:{{item.start_time+"-"+item.finish_time}}
+ + + + + + {{item.patient_name}}(未知{{item.patient_age}}岁) + + + + 病情描述 + + {{item.disease_desc}} + + + + + + 下单时间 + + {{item.created_at}} + + + 详情 + + + + + 下单时间 + + {{item.created_at}} + + + + 待付金额 + + ¥{{item.payment_amount_total}} + + + 详情 + + + +
+
+ +
+ + + 暂无服务包订单 + + + +
\ No newline at end of file diff --git a/healthyService/pages/healthyOrder/healthyOrder.wxss b/healthyService/pages/healthyOrder/healthyOrder.wxss new file mode 100644 index 0000000..95323e8 --- /dev/null +++ b/healthyService/pages/healthyOrder/healthyOrder.wxss @@ -0,0 +1,343 @@ +/* pages/consultOrder/consultOrder.wxss */ +/**app.wxss**/ +.container { + padding-top: 135px; + padding-bottom: 10rpx; + /* top:280rpx; */ + /* position: absolute; */ + width:100%; + /* overflow-y: scroll; */ + background: #F2F2F2; + } + input{ + font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Helvetica, + } + page{ + position: relative; + width:100%; + height:100%; + font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Helvetica, + Segoe UI, Arial, Roboto, 'PingFang SC', 'miui', 'Hiragino Sans GB', 'Microsoft Yahei', + sans-serif; + } + .page{ + width:100vw; + height:100vh; + background: #f2f2f2; + } + .contain{padding: 0 30rpx 0rpx;height: 100%;overflow: hidden;position: relative;} + ::-webkit-scrollbar { + display: none; + width: 0; + height: 0; + color: transparent; + } + .van-picker__confirm { + color:#3CC7C0!important; + font-size: 32rpx!important; + } + .van-picker__title{ + font-weight: 600!important; + color: rgba(0,0,0,0.9)!important; + font-size: 32rpx!important; + } + .van-picker__cancel{ + color: rgba(0,0,0,0.6)!important; + font-size: 32rpx!important; + } + .nonedata{ + width:100%; + color:#666; + min-height: 320rpx; + font-size: 28rpx; + display: flex; + justify-content: center; + align-items: center; + } + .ui-navigatorbar { + position: fixed; + z-index:99; + top: 0; + width: 750rpx; + height: 172rpx; + background: #F2F2F2; + backdrop-filter: blur(20px); + } + + .ui-navigatorbar-back { + position: absolute; + padding-left:40rpx; + padding-right:40rpx; + width:30rpx; + height:60rpx; + left: 0rpx; + bottom: 20rpx; + } + + .ui-title { + position: absolute; + width: 350rpx; + height: 88rpx; + line-height: 56rpx; + font-size: 36rpx; + color: #000000; + bottom: 0; + left: 200rpx; + display: flex; + justify-content: center; + align-items: center; + } + .droptitle.active{ + color:#3CC7C0; + } + .slotmsg{ + -webkit-overflow-scrolling: touch; + font-size: 28rpx; + line-height:40rpx; + max-height:60vh; + overflow-y: auto; + padding:48rpx; + text-align: center; + } + .van-dropdown-item__title{ + width:100%!important; + flex:1; + text-align: center; + } + .van-dropdown-item__icon{ + z-index:2; + position: absolute!important; + + right:25rpx; + } + .van-cell__value{ + flex:none!important; + z-index:1; + } + .onlinebox .icon{ + top:60rpx; + left:50%; + position: absolute; + margin-left: -48rpx; + width:96rpx; + height:34rpx; + border-radius: 0; + } +.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; +} +.validatetime{ + height: 64rpx; + display: flex; + background: #FAFAFA; + padding: 10rpx; + font-size: 28rpx; + color: #333; + margin:20rpx 32rpx 0; + align-items: center; + border-radius: 8rpx; +} +.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; +} \ No newline at end of file diff --git a/healthyService/pages/healthyOrderDetail/healthyOrderDetail.js b/healthyService/pages/healthyOrderDetail/healthyOrderDetail.js new file mode 100644 index 0000000..7fd3534 --- /dev/null +++ b/healthyService/pages/healthyOrderDetail/healthyOrderDetail.js @@ -0,0 +1,705 @@ +// pages/medinceOrderDetail/medinceOrderDetail.js +const app = getApp() +import {serviceDetail,cancelCheckPay,delCheckOrder,cancelCheckOrder,serviceEquityDetail,createServiceChatOrder,checkService} from "../../../api/health" +import {cancelPay} from "../../../api/consultOrder" +import {cancelOrder} from "../../../api/consultOrder" +import {fllowDoctor,notfllowDoctor} from "../../../api/consultExpert" +import {throttle} from "../../../utils/util" + +import Dialog from '@vant/weapp/dialog/dialog'; +Page({ + + /** + * 页面的初始数据 + */ + data: { + confirmText:'确定', + restProduct:0, + columns:[], + showMoneyDetail:true, + status:'', + order_no:'', + showWarn:false, + order_inquiry_id:'', + messageWarn:'', + showJuan:true, + refund:{}, + time: 30 * 60 * 60 * 1000, + showCover:true, + showExpand:true, + isWait:true, + cancelBtn:false, + order:{}, + equity:{},//权益 + showError:false, + showProduct:true, + productList:[], + yaoList:[], + pay_money:0, + fileList:[], + checkSatus:1, + showCheckDialog:false, + checkmessage:'', + detection_bar_code:'', + detection_code:'', + order_service_id:'', + showDialog:false, + inquiryList:[], + toggleList:[], + juanList:[{ + id:1, + name:'1、价值5元的全品类药品优惠劵2张' + },{ + id:2, + name:' 2、价值100元的肝胆商城优惠劵1张' + }], + 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链接列表 + }) + }, + toggleDetail(){ + this.setData({ + showMoneyDetail:!this.data.showMoneyDetail + }) + }, + toggleJuan(){ + this.setData({ + showJuan:!this.data.showJuan + }) + let arr=[{ + id:1, + name:'1、价值5元的全品类药品优惠劵2张' + },{ + id:2, + name:' 2、价值100元的肝胆商城优惠劵1张' + }] + if(!this.data.showJuan){ + this.setData({ + juanList:arr.slice(0,1) + }) + }else{ + this.setData({ + juanList:arr + }) + } + }, + toggleExpand(){ + this.setData({ + showExpand:!this.data.showExpand + }) + let list=this.data.toggleList; + if(!this.data.showExpand){ + this.setData({ + inquriyList:list.slice(0,1) + }) + }else{ + this.setData({ + inquriyList:list + }) + } + }, + toggleProduct(){ + this.setData({ + showProduct:!this.data.showProduct + }) + let list=this.data.yaoList; + if(!this.data.showProduct){ + this.setData({ + productList:list.slice(0,1) + }) + }else{ + this.setData({ + productList:list + }) + } + }, + goApp:throttle(function(e){ + + wx.navigateToMiniProgram({ + appId: 'wxdee7006582529713', + path:'/pages/home/dashboard/index', + envVersion: 'release', + success(res) { + // 打开成功 + } + }) + }), + goWelfare:throttle(function(e){ + let {status}=e.currentTarget.dataset; + app.method.navigateTo({ + url:'/patient/pages/myWelfare/myWelfare?status='+status + }) + }), + goInquiry:throttle(function(e){ + let {id}=e.currentTarget.dataset; + app.method.navigateTo({ + url:'/patient/pages/orderDetail/orderDetail?order_inquiry_id='+id + }) + }), + goProduct:throttle(function(e){ + let {id}=e.currentTarget.dataset; + app.method.navigateTo({ + url:'/patient/pages/medinceOrderDetail/medinceOrderDetail?order_product_id='+id + }) + }), + goHasOrder(){ + + let status=this.data.status; + // let {order_service_type,user_doctor,order_service_no}=this.data.order; + + if(status==4){ + let id=this.data.order_inquiry_id; + app.method.navigateTo({ + url: '/patient/pages/orderDetail/orderDetail?order_inquiry_id='+id, + }) + }else if(status==2){ + let id=this.data.order_no; + app.method.navigateTo({ + url: '/healthyService/pages/healthyOrderDetail/healthyOrderDetail?order_service_id='+id, + }) + + }else if(status==1){ + let id=this.data.order_no; + this.handleCreateServiceChatOrder(id) + }else if(status==3){ + let doctor_id=this.data.order.user_doctor.doctor_id; + app.method.navigateTo({ + url:'/patient/pages/expertDetail/expertDetail?doctor_id='+doctor_id + }) + } + +}, + handleCheckService:throttle(function(){ + let {order_service_no}=this.data.order; + + checkService(order_service_no).then((res)=>{ + if(res.status==1){ + console.log(res.data.order_no) + this.setData({ + showWarn:true, + status:1, + confirmText:'前往', + order_no:res.data.order_no, + messageWarn:'是否使用剩余问诊次数?' + }) + }else if(res.status==2){ + this.setData({ + showWarn:true, + order_no:res.data.order_no, + status:2, + confirmText:'确定', + messageWarn:res.message + }) + }else if(res.status==3){ + this.setData({ + showWarn:true, + status:3, + confirmNext:'前往', + messageWarn:'本月问诊次数已用完,您可选择医生其他服务' + }) + }else if(res.status==4){ + this.setData({ + showWarn:true, + order_no:res.data.order_no, + order_inquiry_id:res.data.order_inquiry_id, + status:4, + confirmText:'确定', + messageWarn:res.message + }) + } + + }) +}), +goXuFei:throttle(function(){ + let {order_service_type,user_doctor,amount_total}=this.data.order; + let url=order_service_type==2?'/healthyService/pages/visitDetail/visitDetail?doctor_id='+user_doctor.doctor_id:'/healthyService/pages/healthyDetail/healthyDetail?doctor_id='+user_doctor.doctor_id + app.method.navigateTo({ + url:url + }) +}), +handleCreateServiceChatOrder(id){ + createServiceChatOrder(id).then(res=>{ + let order_inquiry_id=res.order_inquiry_id; + let chat_id=this.data.user_doctor.user_id; + // /TUIService/pages/index?currentConversationID='+currentConversationID+'&order_inquiry_id='+custom.order_inquiry_id+'&inquiry_type='+custom.inquiry_type + app.method.navigateTo({ + url: '/TUIService/pages/index?currentConversationID=' + chat_id + "&order_inquiry_id=" + order_inquiry_id + "&inquiry_type=1&fromType=chat" + }) +}) +}, + goBack(){ + + let {fromType}=this.data; + console.log(fromType) + 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='/healthyService/pages/healthyOrder/healthyOrder' + } + console.log(goUrl) + //处理聊天收到消息不及时; + 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', + }) + } + }) + } + } + + }, + handelServiceEquityDetail(id){ + serviceEquityDetail(id).then(res=>{ + let package_product=res.order_service_package_product; + console.log(res.order_inquiry); + this.setData({ + equity:res, + inquriyList:res.order_inquiry, + toggleList:res.order_inquiry, + productList:res.order_product, + yaoList:res.order_product, + restProduct:package_product.length>0?package_product[0].quantity-package_product[0].used_quantity:0 + }) + }) + }, + 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() + }) + }, + + 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) + // }) + }), + + 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: '/sugarCheck/pages/sugarDetail/sugarDetail', + }) + }), + goExpert:throttle(function(){ + let id=this.data.user_doctor.doctor_id; + app.method.navigateTo({ + url: '/patient/pages/expertDetail/expertDetail?doctor_id='+id, + }) + }), + handleServiceDetail(flag=false){ + let id =this.data.order_service_id; + serviceDetail(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, + refund:data.order_refund[0], + 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:"是否确定要取消订单?" + }) +}, +goChat:throttle(function(){ + let user_id=this.data.order.user_id; + app.method.navigateTo({ + url: '/TUIService/pages/index?currentConversationID=' + user_id + "&order_inquiry_id=" + id+ "&inquiry_type=1" + }) +}), +goSickInfo(event){ + let order_no=this.data.order_service_id; + app.method.navigateTo({ + url: '/healthyService/pages/sickInfo/sickInfo?order_no='+order_no + }) + }, +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_service_no; + cancelCheckOrder(id).then(data=>{ + wx.showToast({ + title: '取消成功', + icon:"none" + }) + this.handleServiceDetail(); + this.handelServiceEquityDetail(this.data.order_service_id) + + }) +}, +handelCancelPayProduct(flag=true){ + let id =this.data.order.order_service_no; + cancelCheckPay(id).then(data=>{ + wx.showToast({ + title: '取消支付成功', + icon:"none" + }) + if(!flag){ + this.handleCheckInquiry(); + } + this.handleServiceDetail(); + }) +}, +copy(event){ + let text=event.target.dataset.text; + wx.setClipboardData({ + data:text + }) +}, + +goPay:throttle(function(){ + let {order_service_id,order_service_no,order_service_type}=this.data.order; + let order_type=order_service_type==1?5:4; + let inquiry_mode=order_service_type==1?9:8; + app.method.navigateTo({ + url: '/patient/pages/payOrder/payOrder?inquiry_no='+ order_service_no +"&order_service_id="+order_service_no+"&order_type="+order_type+"&fromType="+encodeURIComponent('healthyService/pages/healthyOrder/healthyOrder')+"&inquiry_mode="+inquiry_mode + }) +}), +handelDelProduct(){ + let id =this.data.order.order_service_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: '/patient/pages/prescriptDetail/prescriptDetail?order_prescription_id='+id, + }) +}), +handelfllowDoctor(){ + let id=this.data.user_doctor.doctor_id + fllowDoctor(id).then(data=>{ + this.setData({ + "user_doctor.follow":true + }) + wx.showToast({ + title: '关注成功', + icon:"none" + }) + }) +}, +handenotfllowDoctor(){ + let id=this.data.user_doctor.doctor_id; + notfllowDoctor(id).then(data=>{ + this.setData({ + "user_doctor.follow":false + }) + wx.showToast({ + title: '已取消关注', + icon:"none" + }) + }) +}, +toggleFllow(){ + if(this.data.order.user_doctor.follow){ + this.handenotfllowDoctor() + }else{ + this.handelfllowDoctor() + } +}, + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + + if(options.fromType){ + this.setData({ + fromType:options.fromType + }) + } + let order_service_id=options.order_service_id; + console.log(order_service_id) + if(order_service_id){ + this.setData({ + order_service_id + }); + this.handleServiceDetail(); + this.handelServiceEquityDetail(order_service_id) + } + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + this.setData({ + img_host:app.hostConfig().imghost + }); + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + +}) \ No newline at end of file diff --git a/healthyService/pages/healthyOrderDetail/healthyOrderDetail.json b/healthyService/pages/healthyOrderDetail/healthyOrderDetail.json new file mode 100644 index 0000000..60d4be6 --- /dev/null +++ b/healthyService/pages/healthyOrderDetail/healthyOrderDetail.json @@ -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": "肝胆相照互联网医院" +} \ No newline at end of file diff --git a/healthyService/pages/healthyOrderDetail/healthyOrderDetail.wxml b/healthyService/pages/healthyOrderDetail/healthyOrderDetail.wxml new file mode 100644 index 0000000..79adaa0 --- /dev/null +++ b/healthyService/pages/healthyOrderDetail/healthyOrderDetail.wxml @@ -0,0 +1,393 @@ + + + + + 服务包订单详情 + + + + + + + + + 订单信息 + + + + + 待支付 + + + + + 待接诊 + 服务中 + 服务完成 + 服务取消 + 支付超时 + + + + 订单编号 + + + + {{order.order_service_no}} + + | + + 复制 + + + + + 下单时间 + + + {{order.created_at}} + + + + 订单类型 + + {{order.order_service_type==1?"健康包":'随访包'}} + + + + 订单金额 + + + ¥{{order.amount_total}} + + + + + + + + ¥{{order.coupon_amount_total}} + + + + + 支付金额 + + + + ¥{{pay_money}} + + 明细 + + + + + + + + + + + + + + + ¥{{order.discount_product_total_amount}} + + + + + + + + + + + + + + + ¥{{(pay_money-order.discount_product_total_amount)}} + + + + + + + + + + {{order.cancel_remarks}} + + + + + + + + + +医生接诊前可点击取消订单按钮,自动退款 + + + + + + 退款进度 + + + + 无退款 + + + 申请退款 + + + 退款中 + + + 退款成功 + + + 拒绝退款 + + + 退款关闭 + + + + + 退款金额 + + + + ¥{{refund.refund_total}} + + + + + 取消订单 + + + 联系客服 + + + + + + + + + 服务权益 + + + 有 效 期 + + + 接诊后有效 + {{filter.transforDay(equity.order_service_package.start_time,'dotdateminute')+'-'+filter.transforDay(equity.order_service_package.finish_time,'dotdateminute')}} + + + + 当月时间 + + + {{equity.order_service_package.current_month_start_date+'-'+equity.order_service_package.current_month_finish_date}} + + + + 问诊服务 + + + 内      容 + + + {{equity.order_service_package_detail.service_period/30}}个月内,每月{{equity.order_service_package_detail.monthly_frequency==0?'不限':equity.order_service_package_detail.monthly_frequency}}次问诊 + + + + + 当月剩余 + + + {{equity.order_service_package_detail.monthly_frequency==0?'不限':(equity.order_service_package_detail.monthly_frequency-equity.order_service_package_detail.month_inquiry_count)}}次图文 + {{showExpand?'收起':'展开'}} + + + 问诊时间:{{item.created_at}} + {{item.inquiry_status==1?'待支付':item.inquiry_status==2?'待分配':item.inquiry_status==3?'待接诊':item.inquiry_status==4?'问诊中':item.inquiry_status==5?'问诊完成':item.inquiry_status==6?'问诊结束':'问诊取消'}} + + + + + 问诊服务 + + + 内      容 + + + 3个月内,每月2次问诊 + + + + + 当月剩余 + + + {{equity.order_service_package_detail.monthly_frequency==0?'不限':(equity.order_service_package_detail.remaining_inquiry_count)}}次图文 + {{showExpand?'收起':'展开'}} + + + + 问诊时间:{{item.created_at}} + {{item.inquiry_status==1?'待支付':item.inquiry_status==2?'待分配':item.inquiry_status==3?'待接诊':item.inquiry_status==4?'问诊中':item.inquiry_status==5?'问诊完成':item.inquiry_status==6?'问诊结束':'问诊取消'}} + + + + + 药品服务 + + + 内      容 + + + 30盒肝爽颗粒(步长) + + + + 药品剩余 + + + {{equity.order_service_package_detail.remaining_quantity}}盒肝爽颗粒(步长) + {{showProduct?'收起':'展开'}} + + + 下单时间:{{item.created_at}} + {{item.order_product_status==1?'待支付':item.order_product_status==2?'待发货':item.order_product_status==3?'已发货':item.order_product_status==4?'已签收':'已取消'}} + + + + + 优惠卷 + + + 内      容 + + + + {{item.name}} + + + {{showJuan?'收起':'展开'}} + + + {{item.coupon.coupon_name}} + {{item.user_coupon_status==0?'未使用':item.user_coupon_status==1?'已使用':'已过期'}} + + + 100元的肝胆商城优惠劵 + 注册即发放 + + + + + + + 患者信息 + 查看详情病情信息 + + + {{order.patient_name}}(未知,{{order.patient_age}}岁) + + 所患疾病:{{order.case.disease_class_name}} + 病情主诉:{{order.case.disease_desc}} + + + + + + + + + + + {{user_doctor.user_name}} + {{user_doctor.hospital_level_name}} + 可处方 + + + + + {{user_doctor.doctor_title}} + 主任中医师 + {{user_doctor.department_custom_name}} + + {{user_doctor.hospital_name}} + + + +   关注 + + + +   关注 + + + + + + + + + + + + + + 取消支付 + + 立即支付 + + + + 去使用 + + + 去续费 + + + + + + + + + + + + \ No newline at end of file diff --git a/healthyService/pages/healthyOrderDetail/healthyOrderDetail.wxss b/healthyService/pages/healthyOrderDetail/healthyOrderDetail.wxss new file mode 100644 index 0000000..9375287 --- /dev/null +++ b/healthyService/pages/healthyOrderDetail/healthyOrderDetail.wxss @@ -0,0 +1,1146 @@ +/* pages/medinceOrderDetail/medinceOrderDetail.wxss */ +/**app.wxss**/ +.container { + padding-top: 135px; + padding-bottom: 10rpx; + /* top:280rpx; */ + /* position: absolute; */ + width: 100%; + /* overflow-y: scroll; */ + background: #F2F2F2; +} + +input { + font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Helvetica, +} + +page { + position: relative; + width: 100%; + height: 100%; + font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Helvetica, + Segoe UI, Arial, Roboto, 'PingFang SC', 'miui', 'Hiragino Sans GB', 'Microsoft Yahei', + sans-serif; +} + +.page { + width: 100vw; + height: 100vh; + background: #f2f2f2; +} + +.contain { + padding: 0 30rpx 0rpx; + height: 100%; + overflow: hidden; + position: relative; +} + +::-webkit-scrollbar { + display: none; + width: 0; + height: 0; + color: transparent; +} + +.van-picker__confirm { + color: #3CC7C0 !important; + font-size: 32rpx !important; +} + +.van-picker__title { + font-weight: 600 !important; + color: rgba(0, 0, 0, 0.9) !important; + font-size: 32rpx !important; +} + +.van-picker__cancel { + color: rgba(0, 0, 0, 0.6) !important; + font-size: 32rpx !important; +} + +.nonedata { + width: 100%; + color: #666; + min-height: 320rpx; + font-size: 28rpx; + display: flex; + justify-content: center; + align-items: center; +} + +.ui-navigatorbar { + position: fixed; + z-index: 99; + top: 0; + width: 750rpx; + height: 172rpx; + background: #F2F2F2; + backdrop-filter: blur(20px); +} + +.ui-navigatorbar-back { + position: absolute; + padding-left: 40rpx; + padding-right: 40rpx; + width: 30rpx; + height: 60rpx; + left: 0rpx; + bottom: 20rpx; +} + +.ui-title { + position: absolute; + width: 350rpx; + height: 88rpx; + line-height: 56rpx; + font-size: 36rpx; + color: #000000; + bottom: 0; + left: 200rpx; + display: flex; + justify-content: center; + align-items: center; +} + +.droptitle.active { + color: #3CC7C0; +} + +.slotmsg { + -webkit-overflow-scrolling: touch; + font-size: 28rpx; + line-height: 40rpx; + max-height: 60vh; + overflow-y: auto; + padding: 48rpx; + text-align: center; +} + +.van-dropdown-item__title { + width: 100% !important; + flex: 1; + text-align: center; +} + +.van-dropdown-item__icon { + z-index: 2; + position: absolute !important; + + right: 25rpx; +} + +.van-cell__value { + flex: none !important; + z-index: 1; +} + +.onlinebox .icon { + top: 60rpx; + left: 50%; + position: absolute; + margin-left: -48rpx; + width: 96rpx; + height: 34rpx; + border-radius: 0; +} + +.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 { + width: 80rpx; + height: 40rpx; + background: #3CC7C0; + border-radius: 6rpx; + height: 40rpx; + color: #fff; + width: 80rpx; + height: 40rpx; + background: #3CC7C0; + border-radius: 6rpx; + 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: 30rpx; + height: 104rpx; + background: #FFFFFF; + position: absolute; + display: flex; + z-index: 1; + width: 100%; +} + +.submitbtn { + width: 100%; + margin: 3px 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: 104rpx; + border-radius: 47rpx; + font-size: 36rpx; + color: #999; + flex: 1; + + font-size: 28rpx; + + 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; + + + color: #FFFFFF; + display: flex; + + align-items: center; + justify-content: center; + background: #3CC7C0; + height: 104rpx; + font-size: 36rpx; + color: #FFFFFF; + background: #3CC7C0; + + 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: 20rpx; + width: 100%; + box-sizing: border-box; + + + background: #FFFFFF; +} +.patientdesc{ + padding:0 32rpx; +} +.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; +} + + + +.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); +} + +.moneydetail { + width: 96rpx; + height: 40rpx; + background: #3CC7C0; + border-radius: 6rpx; + font-size: 24rpx; + display: flex; + margin-left: 20rpx; + align-items: center; + justify-content: center; + color: #FFFFFF; +} + +.dealbox { + display: flex; + margin: 20rpx 30rpx 0; + justify-content: flex-end; +} + +.linkbtn { + width: 168rpx; + display: flex; + height: 60rpx; + justify-content: center; + align-items: center; + font-size: 28rpx; + color: #FFFFFF; + border-radius: 29rpx; + background-color: #3CC7C0; +} + +.cancelbtn { + width: 168rpx; + display: flex; + height: 60rpx; + justify-content: center; + align-items: center; + font-size: 28rpx; + color: #FFFFFF; + border-radius: 29rpx; + + background: #CECECE; + +} + +.quanyibox { + border-radius: 20rpx 20rpx 0 0; + padding: 10rpx 0rpx; + margin-top: 20rpx; + background-color: #fff; +} + +.topbox { + border-bottom: 1rpx solid #E3E4E5; +} + +.topbox .title { + margin: 20rpx 30rpx 16rpx; + font-weight: 500; + font-size: 34rpx; + color: rgba(0, 0, 0, 0.9); +} + +.expand { + position: absolute; + right: 0; + color: #999; + font-size: 24rpx; +} + +.medbox .row { + margin-right: 30rpx; + +} + +.usebox { + padding: 0 15rpx; + height: 78rpx; + display: flex; + align-items: center; + font-size: 28rpx; + margin: 0 30rpx 16rpx; + justify-content: space-between; + background-color: #fafafa; +} + +.medbox .title { + + margin: 26rpx 30rpx 26rpx; + font-size: 30rpx; + color: #000000; +} + +.medbox .detail { + font-size: 28rpx; + color: #000000; +} + +.medbox { + border-bottom: 1rpx solid #E3E4E5; + +} + +.medbox:last-child { + border-bottom: none; +} +.quanyibox .row .name{ + + font-weight: normal; +} +.topbox .time{ + font-size: 30rpx; + color: #F06036; +} +.usebox .time{ + font-weight: 400; + font-size: 28rpx; + color: #666666; +} +.titlebox{ + display: flex; +} +.patientdesc .name{ + font-size: 28rpx; + margin-top: 20rpx; +} +.nameinfo{ + font-size: 28rpx; +color:#999; + padding:0rpx 0 15rpx; +} +.more{ + font-size: 28rpx; + color: #333333; +} +.red{ + color:#EF4F20 +} +.row.mb{ + margin-bottom: 10rpx; +} +.threeword{ + width:100%; + display: flex; + + justify-content: space-between; +} diff --git a/healthyService/pages/sickInfo/sickInfo.js b/healthyService/pages/sickInfo/sickInfo.js new file mode 100644 index 0000000..6642716 --- /dev/null +++ b/healthyService/pages/sickInfo/sickInfo.js @@ -0,0 +1,189 @@ +// pages/sickInfo/sickInfo.js +const app = getApp(); +import {serviceSickInfo} from "../../../api/health" +import {formatDateText} from "../../../utils/util" +Page({ + /** + * 页面的初始数据 + */ + data: { + sick:{ + }, + otherList:[] + }, + previewImage(event) { + let id = event.currentTarget.dataset.id; + let urls = this.data.sick.diagnose_images; + wx.previewImage({ + current: urls[id], // 当前显示图片的http链接 + urls: urls // 需要预览的图片http链接列表 + }) + }, + getsickInfo(id){ + serviceSickInfo(id).then(data=>{ + this.setData({ + sick:data, + }); + //infoType 1 只有是否 2 饮酒,吸烟 3 化合物 4 只有文字叙述 + let filter1=[]; + let filter2=[]; + let arr=[ + { + type:"taboo", + name:'是否服用过您想购买的药品且无相关禁忌:', + nameTip:'', + status:data.is_taboo, + desc:"", + infoType:1 + }, + { + type:"allergy_history", + name:'是否有过敏史:', + nameTip:'过敏史:', + infoType:1, + status:data.is_allergy_history, + desc:data.allergy_history + }, + { + type:"family_history", + name:'是否有家族史:', + nameTip:'家族史:', + infoType:1, + status:data.is_family_history, + desc:data.family_history + }, + { + infoType:1, + type:"pregnant", + name:'是否处于备孕、妊娠、哺乳期:', + nameTip:'', + status:data.is_pregnant, + desc:data.pregnant + }, + { infoType:1, + type:"operation", + name:'是否做过手术:', + nameTip:'手术史', + status:data.is_operation, + desc:data.operation + }, + { + infoType:2, + type:"drink_wine", + name:'是否有饮酒史:', + nameTip:'', + status:data.drink_wine_status, + desc:'' + }, + { + infoType:2, + type:"smoke", + name:'是否有吸烟史:', + nameTip:'', + status:data.smoke_status, + desc:'' + }, + { + infoType:3, + type:"chemical", + name:'是否有接触过化学物:', + nameTip:'接触过的化学物:', + status:data.chemical_compound_status, + desc:data.chemical_compound_describe + }, + { + infoType:4, + type:'hospital', + name:'确诊医院:', + status:'', + nameTip:'', + desc:data.diagnosis_hospital + }, + { + type:"takeMedince", + name:'是否服药:', + nameTip:'正在服药:', + status:data.is_take_medicine, + desc:data.drugs_name, + infoType:1 + } + ] + if(data.sex==1){ + filter1=arr.filter((item)=>{ + return item.type!="pregnant" + }); + }else{ + filter1=arr; + } + if(!data.diagnosis_hospital){ + filter2=filter1.filter((item)=>{ + return item.type!="hospital" + }); + }else{ + filter2=filter1 + } + let newarr=filter2.filter((item)=>{ + return item.status!=null + }); + let date=formatDateText(this.data.sick.diagnosis_date); + this.setData({ + otherList:newarr, + "sick.diagnosis_date":date + }) + + }) + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + this.getsickInfo(options.order_no) + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + +}) \ No newline at end of file diff --git a/healthyService/pages/sickInfo/sickInfo.json b/healthyService/pages/sickInfo/sickInfo.json new file mode 100644 index 0000000..1f4849f --- /dev/null +++ b/healthyService/pages/sickInfo/sickInfo.json @@ -0,0 +1,7 @@ +{ + "usingComponents": { + "nav":"../../../components/nav/nav" + }, + "navigationStyle":"custom", + "navigationBarTitleText": "肝胆相照互联网医院" +} \ No newline at end of file diff --git a/healthyService/pages/sickInfo/sickInfo.wxml b/healthyService/pages/sickInfo/sickInfo.wxml new file mode 100644 index 0000000..fe21c63 --- /dev/null +++ b/healthyService/pages/sickInfo/sickInfo.wxml @@ -0,0 +1,93 @@ + + + + + + 基本信息 + + + {{sick.name}}(未知,{{sick.age}}岁) + + + + 所患疾病: + {{sick.disease_class_name}} + + + 确诊日期: + {{sick.diagnosis_date}} + + + 病情主诉: + {{sick.disease_desc}} + + + + 用药意向: + + {{item}} + + + + 复诊凭证: + + + + + + + + + 其他信息 + + + {{index+1}}、 + + + {{item.name}} + + + + {{item.nameTip}} + {{item.desc}} + + + + + {{item.name}} + 从不 + 偶尔 + 经常 + 每天 + + 已戒烟 + 已戒酒 + + + + + + {{item.name}} + 从不 + 偶尔 + 经常 + 每天 + + + {{item.nameTip}} + {{item.desc}} + + + + + {{item.name}} + {{item.desc}} + + + + + + 暂无数据! + + + \ No newline at end of file diff --git a/healthyService/pages/sickInfo/sickInfo.wxss b/healthyService/pages/sickInfo/sickInfo.wxss new file mode 100644 index 0000000..9951a79 --- /dev/null +++ b/healthyService/pages/sickInfo/sickInfo.wxss @@ -0,0 +1,142 @@ +/* pages/sickInfo/sickInfo.wxss */ + +.page{ + height:100vh; + display: flex; + flex-direction: column; + background: #f2f2f2; +} +.wraper{ + overflow: scroll; + flex:1; + margin-top: 172rpx; + -webkit-overflow-scrolling: touch; +} +.databox{ + margin:0 32rpx; +} +.databox .title{ + margin:30rpx 0 20rpx; +} +.cell{ + background-color: #fff; + border-radius: 10rpx; + + + +} +.other .cell{ + margin-bottom: 20rpx; + min-height: 200rpx; +} +.other .cell{ + padding-bottom: 30rpx; +} +.cell .name{ + color: #333333; + height: 94rpx; + display: flex; + padding:0 20rpx; + align-items: center; + font-size: 34rpx; + border-bottom:1rpx solid #E7E7E7; +} +.info{ + background-color: #fff; + + padding-bottom: 30rpx; +} +.info .row{ + line-height: 52rpx; + display: flex; + + padding:0 20rpx; +} +.qabox{ + width:100%; +} +.info .row:first-child{ + padding-top: 30rpx; +} +.info .name{ + white-space: nowrap; + font-size:32rpx; + color:#333; +} +.info .desc{ + font-size:28rpx; + color:#666!important; + word-break: break-all; + } + .textbox .desc{ + word-break: break-all; + line-height: 42rpx; + color: #666; + margin-bottom: 20rpx; + font-size: 28rpx; +} +.textbox .goods{ + color:#666!important; + display: inline; + white-space:normal; +} +.textbox .goods:after{ + content:";" +} +.textbox .goods:last-child:after{ + content:"" +} +.textbox view:last-child{ + margin-bottom: 0; +} +.textbox text{ + color: #333333; + font-size: 28rpx; +} + .imglist{ + display: flex; + padding:0 20rpx; + flex-wrap: wrap; + + } + .img{ + width: 148rpx; + height:148rpx; + margin-right: 18rpx; + margin-bottom: 18rpx; + + } + .img:nth-child(4n){ + margin-right: 0; + } + .other .row{ + display: flex; + line-height: 52rpx; + padding:0 20rpx; + } + .other .row:first-child{ + padding-top: 30rpx; + } + .other .row .answer{ + color:#666; + font-size: 28rpx; + } + .radiotip{ + padding:24rpx 20rpx; + word-break: break-all; + margin-right: 20rpx; + margin-bottom: 20rpx; + justify-content: center; + margin-top: 20rpx; + + line-height: 42rpx; +background: #F2F2F2; +border-radius: 10rpx; +font-size: 28rpx; +color:#999; +} + +.radiotip text{ + white-space: nowrap; + color:#333; +} \ No newline at end of file diff --git a/healthyService/pages/visitDetail/visitDetail.js b/healthyService/pages/visitDetail/visitDetail.js new file mode 100644 index 0000000..3e5106a --- /dev/null +++ b/healthyService/pages/visitDetail/visitDetail.js @@ -0,0 +1,448 @@ +// healthyService/pages/healthyDetail/healthyDetail.js +import {doctorDetail} from "../../../api/consultExpert" +import {getItems,createServiceChatOrder,getServiceDetail} from "../../../api/health" +import {family,addfamily} from "../../../api/familyDoc"; +import {throttle} from "../../../utils/util" +const app = getApp() +Page({ + + /** + * 页面的初始数据 + */ + data: { + order_no:'', + monthly_frequency:'', + columns:[ + {text:"本人",value:1}, + {text:"父母",value:2}, + {text:"爱人",value:3}, + {text:"子女",value:4}, + {text:"亲戚",value:5}, + {text:"其他 ",value:6} + ], + order_inquiry_id:'', + chat_id:'', + confirmText:'确定', + multi_point_enable:'', + multi_point_status:'', + hospital:{}, + status:'', + follow_package_item_id:'', + message:'', + showWarn:false, + img_host:app.hostConfig().imghost, + doctor_id:'', + currentData:0, + inquiry_mode:9, + inquiry_type:1, + current_price:'', + avatar: '', + user_name: '', + doctor_title: '', + doctor_title_name:'', + user_id:'', + is_online:'0', + hospital: null, + priceList:[], + show:false, + currentFamilyId:'', + realName:'', + idCard:'', + phoneNumber:'', + relationId:'', + sex:'', + service_type:2, + chat_id:'', + img_host:app.hostConfig().imghost + }, + onConfirm(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 + }) + }, + goNext:throttle(function() { + this.handleGetServiceDetail(); + + }), + 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 + }) + + }) + }, + goHasOrder(){ + let {status,doctor_id,order_no}=this.data; + if(status==4){ + let id=this.data.order_inquiry_id; + app.method.navigateTo({ + url: '/patient/pages/orderDetail/orderDetail?order_inquiry_id='+id, + }) + }else if(status==2){ + let id=this.data.order_no; + app.method.navigateTo({ + url: '/healthyService/pages/healthyOrderDetail/healthyOrderDetail?order_service_id='+id, + }) + + }else if(status==3){ + app.method.navigateTo({ + url:'/patient/pages/expertDetail/expertDetail?doctor_id='+doctor_id + }) + }else if(status==5){ + this.handleCreateServiceChatOrder(order_no) + } + + +}, + 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 + }) + }, + 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; + } + }, + getFamily() { + family().then((data) => { + this.setData({ + family: this.transforpage(data) + }) + }) + }, + 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; + } + }, + onClose() { + this.setData({ + show: false + }); + }, + onCloseAdd() { + this.setData({ + showAdd: false + }); + }, + hanldeGetItems(id){ + getItems(id).then(res=>{ + + let arr=res.map((item,index)=>{ + return { + price:item.service_price+'元/'+ Number(item.service_period)/30+'月', + follow_package_item_id:item.follow_package_item_id, + service_price:item.service_price, + monthly_frequency:item.monthly_frequency + } + }); + arr.sort((a, b) =>a.service_period-b.service_period); + this.setData({ + monthly_frequency:res[0].monthly_frequency, + priceList:arr, + current_price:res[0].service_price, + follow_package_item_id:res[0].follow_package_item_id + }) + }) + }, + getDeatil(id) { + doctorDetail(id).then((res) => { + for (const key in this.data) { + if (res[key]) { + this.setData({ + [key]: res[key] + }) + } + }; + this.setData({ + chat_id:res.user_id + }) + }) + }, + + handleGetServiceDetail(){ + let {doctor_id,currentFamilyId,service_type,follow_package_item_id,chat_id,sex,inquiry_mode,inquiry_type}=this.data; + getServiceDetail({ + doctor_id, + family_id:currentFamilyId, + service_type, + follow_package_item_id + + }).then((res)=>{ + if(res.status==1){ + app.method.navigateTo({ + url:'/healthyService/pages/writeSick/writeSick?doctor_id='+doctor_id+"&family_id="+currentFamilyId+"&chat_id="+chat_id+"&inquiry_type="+inquiry_type+"&sex="+sex+"&inquiry_mode="+inquiry_mode+"&package_id="+follow_package_item_id + }) + }else if(res.status==2){ + this.setData({ + showWarn:true, + order_no:res.data.order_no, + status:2, + confirmNext:'确定', + message:res.message + }) + + }else if(res.status==3){ + this.setData({ + showWarn:true, + status:3, + confirmNext:'前往', + message:'本月问诊次数已用完,您可选择医生其他服务' + }) + }else if(res.status==4){ + this.setData({ + showWarn:true, + order_no:res.data.order_no, + order_inquiry_id:res.data.order_inquiry_id, + status:4, + confirmNext:'确定', + message:res.message + }) + }else if(res.status==5){ + this.setData({ + showWarn:true, + status:5, + confirmNext:'前往', + order_no:res.data.order_no, + message:'是否使用剩余问诊次数?' + }) + + + } + + }) + }, + handleCreateServiceChatOrder(id){ + createServiceChatOrder(id).then(res=>{ + console.log(res); + let order_inquiry_id=res.order_inquiry_id; + let chat_id=this.data.chat_id; + app.method.navigateTo({ + url: '/TUIService/pages/index?currentConversationID=' + chat_id + "&order_inquiry_id=" + order_inquiry_id + "&inquiry_type=1&fromType=chat" + }) + }) + }, + showPatient(){ + this.setData({ + show:true + }) + }, + choosePrice(e){ + + let {id,price}=e.currentTarget.dataset; + console.log(price); + this.setData({ + follow_package_item_id:id, + current_price:price + }) + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + this.setData({ + doctor_id:options.doctor_id + }) + this.getDeatil(options.doctor_id); + this.hanldeGetItems(options.doctor_id); + this.getFamily(); + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/healthyService/pages/visitDetail/visitDetail.json b/healthyService/pages/visitDetail/visitDetail.json new file mode 100644 index 0000000..141ca68 --- /dev/null +++ b/healthyService/pages/visitDetail/visitDetail.json @@ -0,0 +1,9 @@ +{ + "usingComponents": { + "nav":"../../../components/nav/nav", + "van-popup": "@vant/weapp/popup/index", + "van-picker": "@vant/weapp/picker/index", + "van-dialog": "@vant/weapp/dialog/index" + }, + "navigationStyle":"custom" +} \ No newline at end of file diff --git a/healthyService/pages/visitDetail/visitDetail.wxml b/healthyService/pages/visitDetail/visitDetail.wxml new file mode 100644 index 0000000..d297549 --- /dev/null +++ b/healthyService/pages/visitDetail/visitDetail.wxml @@ -0,0 +1,180 @@ + + + + + + + + + + + + + + + + {{user_name}} + {{hospital.hospital_level_name}} + 可处方 + + {{doctor_title_name}} {{item.department_custom_name}} + {{hospital.hospital_name}} + + + + 请选择服务 + + {{item.price}} + + + + + + + + + + + 服务权益 + + + + 专属标识: + 享有特殊标识,获得医生全面照护。 + + + + 图文问诊{{monthly_frequency==='0'?'不限':monthly_frequency}}次 + 服务期间,每次可持续48小时,图片、文字、语音形式,无限制的进行沟通。 + + + + + 处方: + 一次问诊只可开具一个处方单。 + + + + + + 退费: + 1、未使用随时退; + + + + + + 2、服务开始使用后,如需退款请联系客服,退款不收取任何服务费等额外费用,但不支持部分退款; + + + + + 3、已接诊的订单,不再退款; + + + + + 4、未消费服务包内容可退款,已消费服务的部分按原价计费,即:已发生的问诊按照问诊时互联网医院显示的价格结算。 + + + + + + + 立即购买:¥{{current_price}} + + + + 选择患者 + + + + + + {{item.card_name}} + 本人 + 父母 + 爱人 + 子女 + 亲戚 + 其他 + + + 性别未知 + + + {{item.age}}岁 + + + + + +新建患者 + + + + + + + + + + + + 新建患者 + + 真实姓名* + + + + 身份证号* + + + + 联系电话 + + + + 患者关系 + + + + 温馨提示: + + 1、根据国家卫健委要求,就医实行实名制,请如实填写患者信息。 + 2、信息受隐私保护,仅接诊医生可见。 + + 3、6岁以下儿童不支持线上问诊,请到线下就诊。 + + + + + 确定 + + + + + + + + + \ No newline at end of file diff --git a/healthyService/pages/visitDetail/visitDetail.wxss b/healthyService/pages/visitDetail/visitDetail.wxss new file mode 100644 index 0000000..3db21d2 --- /dev/null +++ b/healthyService/pages/visitDetail/visitDetail.wxss @@ -0,0 +1,441 @@ +page{ + height:100vh; + overflow: hidden; +} + +/* healthyService/pages/healthyDetail/healthyDetail.wxss */ +.page{ + width:100%; + background: #F2F2F2; + height:calc(100% - 172rpx); + margin-top: 172rpx; + display: flex; + overflow: hidden; + flex-direction: column; +} +.viewcell{ + display: flex; + background-color: #fff; + margin:30rpx; + padding:20rpx; + box-shadow: 0rpx 8rpx 20rpx 2rpx rgba(0,0,0,0.04); +border-radius: 10rpx; + +} +.dcimg{ + width:100%; + position: absolute; + z-index:-1; +} +.detailbox{ + overflow: hidden; + /* position: relative; */ + z-index:1; + flex:1; + display: flex; + flex-direction: column; +margin-top:30rpx; +background: #FFFFFF; +border-radius: 32rpx 32rpx 0rpx 0rpx; +} +.con{ + flex:1; + padding: 0 30rpx; + overflow-y: scroll; + -webkit-overflow-scrolling: touch; +} +.quanyi{ + position: relative; + width:260rpx; + margin:0 auto; + height:70rpx; +} +.quanyiImg{ + width:260rpx; + height:70rpx; +} +.cell{ + margin-bottom: 30rpx; +} +.quanyiText{ + top:0; + position: absolute; + + font-size: 34rpx; + width:260rpx; + height:70rpx; + display: flex; + justify-content: center; + align-items: center; + color: #FFFFFF; +} + +.celltitle{ + font-weight: 550; + font-size: 30rpx; + color: #000000; +} +.celldesc{ + margin-top: 15rpx; + font-size: 30rpx; + color: #000000; +} +.buttonbox{ + width:100%; + height:200rpx; +} +.btn{ + height: 94rpx; + margin:35rpx 30rpx 0; + background: #3CC7C0; +border-radius: 47rpx; +font-size: 36rpx; +color: #FFFFFF; +display: flex; +align-items: center; +justify-content: center; +line-height: 50rpx; +text-align: center; +} +.red{ + color:red; +} +.servicebox{ + margin:0 30rpx; + padding:27rpx 30rpx; + background: #FFFFFF; +border-radius: 10rpx; +} +.servicebox .ser_title{ + font-weight: 550; + font-size: 30rpx; + color: #000000; +} +.row{ + display: flex; + justify-content: space-between; + flex-wrap: wrap; +} +.moneyType{ + margin-top: 30rpx; + width: 300rpx; +height: 120rpx; +display: flex; +justify-content: center; +align-items: center; +font-size: 34rpx; +color: #333333; +border: 1rpx solid #CCCCCC; +border-radius: 10rpx; + +} +.moneyType.on{ + background: #3CC7C0; + color:#fff; + border: 1rpx solid #3CC7C0; +} + + + .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; + } + .viewcellbox .hospital{ + margin-top: 12rpx; + color: #333333; + display: flex; + font-size: 30rpx; + word-wrap: break-word; + } + .hospital_name{ + font-size: 28rpx; + word-wrap: break-word; + margin-right: 10rpx; + overflow: hidden; + white-space: nowrap; + color:#333; + 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; + position: relative; + } + + .price text{ + margin-left: 5rpx; + font-size: 32rpx; + color:#EF4F20; + } + .viewcell .right{ + flex:1; + margin-left: 20rpx; + } + .viewcell image{ + width:120rpx; + height:120rpx; + 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; + } + .headimg{ + width:120rpx; + height:120rpx; + border-radius: 50%; + } + .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; + } + .celladd{ + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + height: 120rpx; + } + .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; + } + .viewcell .left{ + position: relative; +} + .onlinebox .icon { + top: 90rpx; + left: 50%; + position: absolute; + margin-left: -48rpx; + width: 96rpx; + height: 34rpx; + border-radius: 0; +} \ No newline at end of file diff --git a/healthyService/pages/visitList/visitList.js b/healthyService/pages/visitList/visitList.js new file mode 100644 index 0000000..9f65dd9 --- /dev/null +++ b/healthyService/pages/visitList/visitList.js @@ -0,0 +1,159 @@ +// healthyService/pages/healthyIntro/healthyIntro.js +import {throttle} from "../../../utils/util" +import {doctorList} from "../../../api/consultExpert" +const app = getApp() +Page({ + + /** + * 页面的初始数据 + */ + data: { + blockHeight:"150rpx", + type:'', + doctorList:[], + page:1, + pageNumber:10, + isTriggered:false, + show:false, + expertise_id:'', + province_id:'', + city_id:'', + keyword:'', + lock:false, + is_online:0, + sort_order:1, + inquiry_type:'1', + inquiry_mode:'9', + }, + handleRefresher(){ + + this.setData({ + lock:false, + page:1, + doctorList:[] + }); + this.getDoctorList() + }, + goExpertDetail:throttle(function(e){ + let {doctorid}=e.currentTarget.dataset; + app.method.navigateTo({ + url:'/healthyService/pages/visitDetail/visitDetail?doctor_id='+doctorid + }) + }), + getDoctorList(){ + let {expertise_id,province_id, city_id,sort_order,keyword,page,pageNumber,is_online,inquiry_type,inquiry_mode}=this.data; + doctorList({ + expertise_id:expertise_id, + province_id:province_id, + city_id:city_id, + sort_order: sort_order, + is_first_online:is_online, + keyword:keyword, + inquiry_type, + inquiry_mode, + page:page, + per_page:pageNumber + }).then((res)=>{ + let {doctorList}=this.data; + if(res.data.length==0){ + this.setData({ + lock:true, + isTriggered:false + }); + return false; + }else{ + this.setData({ + isTriggered:false, + doctorList:doctorList.concat(res.data) + }) + } + + + }) + }, + 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(); + } + }, + goDetail:throttle(function(){ + let url=this.data.type?'/healthyService/pages/visitDetail/visitDetail':'/healthyService/pages/healthyDetail/healthyDetail' + app.method.navigateTo({ + url: url + }) + }), + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + if(options.type){ + this.setData({ + type:'visit' + }) + } + this.getDoctorList(); + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/healthyService/pages/visitList/visitList.json b/healthyService/pages/visitList/visitList.json new file mode 100644 index 0000000..39c3ea8 --- /dev/null +++ b/healthyService/pages/visitList/visitList.json @@ -0,0 +1,7 @@ +{ + "usingComponents": { + "nav":"../../../components/nav/nav", + "van-popup": "@vant/weapp/popup/index" + }, + "navigationStyle":"custom" +} \ No newline at end of file diff --git a/healthyService/pages/visitList/visitList.wxml b/healthyService/pages/visitList/visitList.wxml new file mode 100644 index 0000000..0c8a3e9 --- /dev/null +++ b/healthyService/pages/visitList/visitList.wxml @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + {{item.user_name}} + + {{item.hospital.hospital_level_name}} + 可处方 + + {{item.doctor_title_name}} {{item.department_custom_name}} + {{item.hospital.hospital_name}} + 擅长:{{item.be_good_at}} + {{cell.expertise_name}} + + 评分: {{item.praise_rate}} 暂无 + 问诊量: {{item.served_patients_num}}暂无 + 平均回复: {{moduleFilter.formatReply(item.avg_response_time)}}h暂无 + + + + 随访包:¥{{itemName.inquiry_price}}/月起 + + + + + + + + 暂无数据! + + + + diff --git a/healthyService/pages/visitList/visitList.wxss b/healthyService/pages/visitList/visitList.wxss new file mode 100644 index 0000000..288c123 --- /dev/null +++ b/healthyService/pages/visitList/visitList.wxss @@ -0,0 +1,376 @@ +/* healthyService/pages/healthyIntro/healthyIntro.wxss */ +.page{ + + margin-top: 172rpx; + overflow: hidden; + display: flex; + flex-direction: column; + height: calc(100vh - 172rpx); + position: relative; +} +.imgbox{ + position: relative; +} +page{ + height: 100vh; + overflow: hidden; +} +.btn{ + position: absolute; + + left: 50%; + margin-left: -232rpx; + width:464rpx; + height: 86rpx; + bottom:130rpx; +} +.bg{ + width:100%; +} +.top{ + position: absolute; + top:10rpx; + width:100%; + display: flex; + justify-content: center; + padding:20rpx 0; + } + .top .up{ + width:40rpx; + height:22rpx; + transition: all 0.5s; + } + .top .up.active{ + transform: rotate(180deg); + } + .popname{ + margin-top: 60rpx; + padding:20rpx 52rpx 30rpx; + font-size: 34rpx; + color:#333; + border-bottom: 1px solid #E7E7E7; + } +.popwrper{ + top:0rpx; + background-color: #fff; + position: relative; + transition: height 0.5s; + width:100%; + border-radius: 20rpx; + overflow: hidden; + height:100%; + bottom:0px; + } + .wraper{ + + height: 100%; + } + .containexpert{ + margin-top: 172rpx; + padding: 0 30rpx 0rpx; + overflow: hidden; + position: relative; + transform: all 0.3s ease; + } + .droptitle,.van-ellipsis{ + font-size: 30rpx!important; + } + .namebox .name{ + max-width:400rpx; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + } + + .droptitle.active{ + color:#3CC7C0; + } + .searchbox { + width: 100%; + height: 72rpx; + display: flex; + border-radius: 40rpx; + align-items: center; + margin-top: 20rpx; + background: #FBFBFB; + border-radius: 36px; + border: 1rpx solid #CCCCCC; + } + + .searchbox input { + margin-left: 30rpx; + flex: 1; + font-size: 32rpx; + height: 80rpx; + } + + .searchbox image { + width: 30rpx; + height: 30rpx; + margin-right: 28rpx; + } + + .scroll-view_H { + height:195rpx; + white-space: nowrap; + vertical-align: top; + } + .scroll-view-item_H{ + /* width: 154rpx; */ + padding:0 15rpx; + background: #F4F4F4; + border-radius: 30rpx; + font-size: 28rpx; + color: #666666; + margin-left: 36rpx; + border: 1rpx solid #F4F4F4; + height: 58rpx; + display: inline-block; + text-align: center; + line-height: 58rpx; + } + + .page-section-spacing .row{ + margin-top: 40rpx; + margin-bottom: 30rpx; + } + .page-section-spacing .row:last-child{ + margin-top: 30rpx; + margin-bottom: 10rpx; + } + .scroll-view_H .scroll-view-item_H:first-child{ + margin-left: 0rpx; + + } + .scroll-view-item_H.active { + background: #E2FFFE; + color: #3CC7C0; + border: 1rpx solid #3CC7C0; + } + .van-dropdown-menu{ + box-shadow: none!important; + + } + .viewcell{ + display: flex; + overflow: hidden; + box-sizing: border-box; + padding:40rpx 30rpx 30rpx; + width:100%; + border-radius: 10rpx; + background-color: #fff; + border-bottom: 1rpx solid #E7E7E7; + } + .viewcell:last-child{ + border-bottom: none; + } + .viewcell .type{ + height: 32rpx; + margin-bottom: 6rpx; + line-height: 32rpx; + display: flex; + white-space: nowrap; + align-items: center; + margin-left: 18rpx; + padding:0rpx 6rpx; + background: #ED9C00; + border-radius: 4rpx; + color: #FFFFFF; + font-size: 24rpx; + } + .viewcell .hospital{ + margin-top: 12rpx; + color: #333333; + display: flex; + font-size: 30rpx; + word-wrap: break-word; + } + .hospital_name{ + word-wrap: break-word; + margin-right: 10rpx; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + } + .goodjob{ + color: #666666; + margin-top: 28rpx; + line-height: 42rpx; + font-size: 28rpx; + word-break: break-all; + text-overflow: ellipsis; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 2; /* 这里是超出几行省略 */ + overflow: hidden; + } + .price{ + font-size: 28rpx; + position: relative; + } + + .price text{ + margin-left: 5rpx; + font-size: 32rpx; + color:#EF4F20; + } + .viewcell .right{ + flex:1; + margin-left: 20rpx; + } + .viewcell image{ + width:80rpx; + height:80rpx; + border-radius:50%; + } + .namebox{ + display: flex; + font-size: 34rpx; + font-weight: 600; + color:#333; + align-items: flex-end; + } + .namebox .position{ + font-weight: normal; + margin-left: 15rpx; + font-size: 30rpx; + } + .dropOnline.active{ + color: #3CC7C0; + } + .diseaseType{ + height: 40rpx; + background: #E2FFFE; + border-radius: 20rpx; + margin-right: 20rpx; + border: 1rpx solid #3CC7C0; + color: #3CC7C0; + font-size: 24rpx; + display: inline-flex; + text-align: center; + padding:0 15rpx; + align-items: center; + justify-content: center; + margin-top: 20rpx; + white-space: nowrap; + } + .detail{ + margin-top: 20rpx; + display: flex; + font-size: 24rpx; + } + .detail view{ + margin-right:40rpx; + } + + .detail view text{ + font-size: 28rpx; + color:#3CC7C0; + } + .consultbox{ + position: relative; + + margin-top: 28rpx; + display: flex; + align-items: center; + justify-content: space-between; + } + + .consult{ + height: 60rpx; + background: #3CC7C0; + border-radius: 30rpx; + color: #FFFFFF; + display: flex; + align-items: center; + padding:0 20rpx; + font-size: 30rpx; + } + .wraper{ + display: flex; + flex-direction: column; + } + .scrollwraper{ + flex: 1; + overflow-y: scroll; + -webkit-overflow-scrolling: touch; + } + .dropdown{ + width:100%; + position: relative; + justify-content:center; + align-items: center; + border-bottom: 1rpx solid #E7E7E7; + display: flex; + } + .dropdown .bar{ + + height:40rpx; + width:1rpx; + left: 50%; + top:50%; + transform: translate(-50%,-50%); + position: absolute; + background:#ccc; + opacity: 0.9; + } + .dropbar{ + background:#ccc; + opacity: 0.9; + height:40rpx; + width:1rpx; + position: static; + margin-top: 30rpx; + } + .dropOnline{ + display: flex; + justify-content: center; + align-items: center; + width:33.33%; + } + .viewcell .left{ + position: relative; + } + .price .expert_prcie{ + text-decoration: line-through; + color:#999; + } + .price .expert_prcie .priceactive{ + color:#999; + } + .pricecell{ + display: flex; + font-size: 30rpx; + align-items: center; + white-space: nowrap; + } + .videocell{ + position: absolute; + right:0rpx; + } + .price.qs{ + display: none; + } + .price.gy,.price.hasfree{ + display: none; + } + .nonekaitong{ + position: absolute; + top:0rpx; + font-size: 30rpx; + right:320rpx; + } + .nonekaitong text{ + font-size: 30rpx; + } + .popwrper{ + display: flex; + flex-direction: column; + } + .nonedata{ + display:flex; + width:100%; + min-height:500rpx; + align-items: center; + justify-content: center; + } \ No newline at end of file diff --git a/healthyService/pages/writeSick/writeSick.js b/healthyService/pages/writeSick/writeSick.js new file mode 100644 index 0000000..7f8face --- /dev/null +++ b/healthyService/pages/writeSick/writeSick.js @@ -0,0 +1,916 @@ +// pages/writeSick/writeSick.js +const app = getApp() +import Dialog from '@vant/weapp/dialog/dialog'; +import dayjs from '../../../utils/dayjs.min.js' +import { + createServiceOrder +} from "../../../api/health" +import { + getSign +} from "../../../api/common" +import { + lastSick +} from "../../../api/consultExpert" +import { + throttle +} from "../../../utils/util" +import {client_type} from "../../../utils/isPc" +import {isExist,pathographyDetail} from "../../../api/sickRecord" +let urlHost=app.hostConfig().agreehost; +console.log(client_type); +Page({ + + /** + * 页面的初始数据 + */ + data: { + prevData: null, + pathography_id:'', + showdialog: false, + order_no:'', + showAgreeDialog: false, + message: '', + order_inquiry_id:'', + doctor_id: '', + family_id: '', + chat_id: '', + inquiry_type: 1, + inquiry_mode: 1, + messageTitle: '', + disease_class_name: '', + disease_class_id:null, + show: false, + startIndex: 0, + cancelBtn: false, + showSick: false, + hideSick: false, + hideGuomin: false, + hidePregnant:false, + disease_desc: '', + hideFamilysick: false, + showBack: false, + is_exist:false, + fileList: [], + lockBtn: false, + checkSign: false, + is_allergy_history:null, + is_family_history:null, + is_pregnant:null, + pregnant: '', + checkAgree: false, + is_taboo:null, + diagnosis_date:null, + service_type:2, + product: [], + follow_package_item_id:'', + img_host:'https://oss.prod.applets.igandanyiyuan.com/applet/patient/static', + allergy_history: '', + family_history: '', + currentDate: new Date().getTime(), + minDate: new Date('1900/01/01 00:00:00').getTime(), + maxDate: new Date().getTime(), + formatter(type, value) { + if (type === 'year') { + return `${value}年`; + } + if (type === 'month') { + return `${value}月`; + } + if (type === 'day') { + return `${value}日`; + } + return value; + } + + }, + setInfo(obj){ + let Info =obj; + for (const key in Info) { + if (key != "product") { + if (Info[key]) { + this.setData({ + [key]: Info[key] + }) + } + } + + }; + if (Info.disease_desc) { + this.setData({ + hideSick: true + }) + }; + if (Info.pregnant) { + this.setData({ + hidePregnant: true + }) + }; + + if (Info.allergy_history) { + this.setData({ + hideGuomin: true + }) + }; + if (Info.family_history) { + this.setData({ + hideFamilysick: true + }) + }; + + if (Info.fileList) { + + this.setData({ + fileList:Info.fileList, + checkSign: false + }) + } else { + this.setData({ + checkSign: true + }) + } + }, + getlocalInfo(id){ + let sickInfo = wx.getStorageSync('sickInfo'); + if (sickInfo) { + var InfoObj = JSON.parse(sickInfo); + if (InfoObj instanceof Array) { + let obj=null; + let isHas= InfoObj.some((item)=>{ + if(item.family_id==id){ + obj=item; + } + return item.family_id==id; + }) + if(isHas){ + this.setInfo(obj) + }else{ + this.handleOnlineSick(this.data.family_id); + } + // for (let i = 0; i < InfoObj.length; i++) { + // if (InfoObj[i].family_id == id) { + // Dialog.confirm({ + // title: '温馨提示', + // message: '是否加载之前保存的病情信息?', + // }).then(() => { + // this.setInfo(InfoObj[i]) + // }).catch(() => { + + // }); + + // break; + // }; + // } + } + + }else{ + this.handleOnlineSick(this.data.family_id); + } + }, + handleSetValue(data){ + if(data){ + let obj = { + disease_class_name: '', + disease_class_id: '', + diagnosis_date: '', + disease_desc: '', + is_allergy_history:null, + product: [], + is_taboo:null, + is_pregnant:null, + pregnant: '', + is_family_history:null, + allergy_history: '', + family_history: '', + } + for (const key in obj) { + if (key != "product") { + if(key=="is_taboo" && !data[key]){ + this.setData({ + [key]: null + }) + }else{ + this.setData({ + [key]: data[key] + }) + } + + } + + }; + if (data.disease_desc) { + this.setData({ + hideSick: true + }) + }; + if (data.pregnant) { + this.setData({ + hidePregnant: true + }) + }; + + if (data.allergy_history) { + this.setData({ + hideGuomin: true + }) + }; + if (data.family_history) { + this.setData({ + hideFamilysick: true + }) + }; + if (data.diagnose_images) { + this.setData({ + fileList: data.diagnose_images, + checkSign: false + }) + } else { + this.setData({ + checkSign: false + }) + } + } + }, + handleOnlineSick(id){ + lastSick(id).then(data => { + this.handleSetValue(data); + }) + }, + // handleLastSick(id) { + // lastSick(id).then(data => { + // if (!data){ + // this.getlocalInfo(id); + // } else { + + + // } + // }) + // }, + + onConfirm(event) { + const { + value + } = event.detail; + this.setData({ + disease_class_name: `${value.disease_class_name}`, + disease_class_id: `${value.disease_class_id}`, + showSick: false + }) + }, + showSick() { + app.method.navigateTo({ + url: '/patient/pages/commonSick/commonSick' + }) + }, + 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: 2 + }).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>=9){ + wx.showToast({ + title: '复诊凭证最多上传9张', + icon:"none" + }) + return false + }; + let THIS = this; + wx.chooseMedia({ + count: 9-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" + }) + THIS.setData({ + checkSign: false + }) + wx.hideLoading(); + + }); + + } + }) + }, + onCancel() { + this.setData({ + showSick: false + }) + }, + goRecord:throttle(function(){ + app.method.navigateTo({ + url:'/patient/pages/sickRecord/sickRecord?family_id='+this.data.family_id + }) + }), + handleThrottle: throttle(function () { + this.create_Order() + }), + create_Order() { + let { + inquiry_type, + inquiry_mode, + doctor_id, + family_id, + disease_class_id, + diagnosis_date, + disease_desc, + fileList, + is_allergy_history, + checkSign, + is_pregnant, + pregnant, + is_family_history, + allergy_history, + family_history, + checkAgree, + sex, + service_type, + follow_package_item_id + } = this.data; + + if (!disease_class_id) { + wx.showToast({ + title: '请选择所患疾病', + icon: "none" + }) + return false; + }; + if (!diagnosis_date) { + wx.showToast({ + title: '请选择确诊日期', + icon: "none" + }) + return false; + }; + if (!disease_desc) { + wx.showToast({ + title: '请填写病情主诉', + icon: "none" + }) + return false; + }; + if(disease_desc.length<10){ + wx.showToast({ + title: '病情主诉不少于10个字', + icon: "none" + }) + return false; + }; + + if (fileList.length == 0 && !checkSign) { + wx.showToast({ + title: '请上传复诊凭证或者勾选凭证遗失或不在身边', + icon: "none" + }) + return false; + } + + + + if (inquiry_type == 4 && allergy_history) { + for (let i = 0; i < product.length; i++) { + if (allergy_history.indexOf(product[i].product_name) != -1) { + this.setData({ + showdialog: true, + messageTitle: "您的情况不适合线上问诊开方,建议线下就诊" + }) + return false + } + + } + }; + if(is_allergy_history==null){ + wx.showToast({ + title: '请选择您是否有过敏史', + icon: "none" + }) + return false; + }; + if(is_allergy_history==1){ + if(!allergy_history){ + wx.showToast({ + title: '过敏史内容不能为空', + icon: "none" + }) + return false; + } + }; + if(is_family_history==null){ + wx.showToast({ + title: '请选择您是否有家族病史', + icon: "none" + }) + return false; + }; + if(is_family_history==1){ + if(!family_history){ + wx.showToast({ + title: '家族病史内容不能为空', + icon: "none" + }) + return false; + } + }; + if(is_pregnant==null && sex==2){ + wx.showToast({ + title: '请选择您是否处于备孕、妊娠、哺乳期', + icon: "none" + }) + return false; + }; + if (is_pregnant == 1) { + wx.showToast({ + title: '您的情况不适合线上问诊开方,建议线下就诊', + icon: "none" + }) + return false; + } + if (!checkAgree) { + this.setData({ + showAgreeDialog: true + }) + return false; + }; + this.setData({ + lockBtn: true + }); + createServiceOrder({ + patient_id: wx.getStorageSync('CLIENT_USER_ID'), + doctor_id: doctor_id, + family_id: family_id, + disease_class_id: disease_class_id, + diagnosis_date: diagnosis_date, + disease_desc: disease_desc, + is_allergy_history:is_allergy_history, + allergy_history: allergy_history, + family_history: family_history, + is_family_history: is_family_history, + is_pregnant: is_pregnant, + pregnant: pregnant, + inquiry_type: inquiry_type, + inquiry_mode: inquiry_mode, + diagnose_images: fileList, + client_type:client_type , + service_type:service_type, + follow_package_item_id:follow_package_item_id + }).then((data) => { + console.log(data); + let { + order_no + } = data.data; + let { + chat_id, + inquiry_type, + inquiry_mode + } = this.data; + this.setData({ + lockBtn: false + }); + if(data.status==1){ + let order_type=inquiry_mode==8?5:4 + app.method.navigateTo({ + url: '/patient/pages/payOrder/payOrder?doctor_id=' + doctor_id + '&inquiry_no=' + order_no + "&chat_id=" + chat_id + "&inquiry_type=" + inquiry_type + "&inquiry_mode=" + inquiry_mode + "&fromType=chat&&order_type="+order_type + }) + }else if(data.status==2){ + + this.setData({ + showdialog:true, + messageTitle:"存在未支付订单", + order_no: order_no, + cancelBtn:true + }) + }else if(data.status==4){ + this.setData({ + showdialog:true, + messageTitle:"当前患者存在进行中问诊订单", + order_no:order_no, + cancelBtn:true + }) + } + + + }).catch((error)=>{ + // this.setData({ + // showdialog:true, + // messageTitle:error.message, + // cancelBtn:true + // }) + }) + }, + inputChange(e) { + this.setData({ + [e.target.dataset.id]: e.detail.value + }) + }, + openPop() { + this.setData({ + show: true + }) + }, + handleClose() { + this.setData({ + show: false + }) + }, + handleConfirm(event) { + this.setData({ + show: false + }); + this.setData({ + diagnosis_date: dayjs(event.detail).format('YYYY-MM-DD') + }); + }, + handlepathographyDetail(id){ + pathographyDetail(id).then(data=>{ + this.handleSetValue(data); + }) + }, + handleIsExist(){ + let {family_id}=this.data; + isExist({ + family_id + }).then(data=>{ + this.setData({ + is_exist:data.is_exist==0?false:true + }) + }) + }, + handelFocus(e) { + let key = e.target.dataset.id; + let value = e.target.dataset.value; + if (!e.detail.value) { + this.setData({ + [key]: false, + [value]: e.detail.value + }) + } else { + this.setData({ + [key]: true, + [value]: e.detail.value + }) + } + }, + handelTextFocus(e) { + let key = e.target.dataset.id; + let value = e.target.dataset.value; + if (!e.detail) { + this.setData({ + [key]: false, + [value]: e.detail + }) + } else { + this.setData({ + [key]: true, + [value]: e.detail + }) + } + }, + goBack() { + + if (app.globalData.origion == 1) { + wx.reLaunch({ + url: '/pages/index/index', + }) + } else if (app.globalData.origion == 2) { + wx.reLaunch({ + url: '/pages/index/index', + }) + } else { + let { + disease_class_name, + diagnosis_date, + fileList, + is_allergy_history, + is_pregnant, + checkSign, + checkAgree, + is_family_history, + disease_desc + } = this.data; + //封装组件后退有bug,通过引用,回退正常 + if (disease_class_name || is_allergy_history || is_pregnant || is_family_history || fileList.length > 0 || diagnosis_date || disease_desc || checkSign || checkAgree) { + Dialog.confirm({ + title: '温馨提示', + message: '是否保存填写的病情信息?', + }).then(() => { + this.onSave() + }) + .catch(() => { + //wx.setStorageSync('sickInfo',''); + wx.navigateBack({ + delta: 1, + fail: function () { + wx.reLaunch({ + url: '/pages/index/index', + }) + } + }) + }); + } else { + + wx.navigateBack({ + delta: 1 + }) + } + } + }, + agreeConfirm(){ + this.setData({ + checkAgree:true + }) + }, + confirm(event) { + + if (event.detail) { + this.setData({ + showdialog: false + }) + } + if(this.data.messageTitle=="存在未支付订单"){ + let {order_no}=this.data; + app.method.navigateTo({ + url: '/healthyService/pages/healthyOrderDetail/healthyOrderDetail?order_service_id='+order_no, + }) + }else if(this.data.messageTitle=="当前患者存在进行中问诊订单"){ + let {order_no}=this.data; + app.method.navigateTo({ + url: '/patient/pages/orderDetail/orderDetail?order_inquiry_id='+order_no, + }) + } + }, + cancelAlert(){ + this.setData({ + showdialog: false + }) + }, + onChangeSign() { + this.setData({ + checkSign: !this.data.checkSign + }) + if (this.data.checkSign) { + this.setData({ + fileList: [] + }) + } + }, + onChange(event) { + + let key = event.target.dataset.id; + this.setData({ + [key]: event.detail + }); + if (event.detail == 0) { + if (key == "is_allergy_history") { + this.setData({ + allergy_history: '' + }) + }; + + if (key == "is_family_history") { + this.setData({ + family_history: '' + }) + }; + + if (key == "is_pregnant") { + this.setData({ + pregnant: '' + }) + } + } + }, + onSave() { + let { + family_id, + allergy_history, + family_history, + disease_desc, + disease_class_name, + disease_class_id, + diagnosis_date, + fileList, + checkSign, + checkAgree, + is_allergy_history, + is_pregnant, + pregnant, + is_family_history, + + } = this.data; + let sickInfo = { + family_id, + disease_class_name, + diagnosis_date, + fileList, + disease_class_id, + disease_desc, + allergy_history, + family_history, + is_allergy_history, + is_pregnant, + pregnant, + checkSign, + checkAgree, + is_family_history + }; + let sickInfo_stroage = wx.getStorageSync("sickInfo"); + if (sickInfo_stroage) { + let sickInfoObj = JSON.parse(sickInfo_stroage); + if (sickInfoObj instanceof Array) { + for (let i = 0; i < sickInfoObj.length; i++) { + if (sickInfoObj[i].family_id == family_id) { + sickInfoObj.splice(i, 1); + } + } + sickInfoObj.push(sickInfo); + wx.setStorageSync('sickInfo', JSON.stringify(sickInfoObj)); + } else { + sickInfoObj.family_id = family_id; + wx.setStorageSync('sickInfo', JSON.stringify([sickInfoObj])); + } + } else { + wx.setStorageSync('sickInfo', JSON.stringify([sickInfo])); + } + + wx.navigateBack({ + delta: 1 + }) + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + // 订单类型(1:专家问诊 2:快速问诊 3:公益问诊 4:问诊购药) + console.log(options.package_id) + console.log(options.inquiry_mode) + if (options.inquiry_type == 1 || options.inquiry_type == 3) { + this.setData({ + follow_package_item_id:options.package_id?options.package_id:'', + doctor_id: options.doctor_id, + family_id: options.family_id, + chat_id: options.chat_id, + inquiry_type: options.inquiry_type, + inquiry_mode: options.inquiry_mode, + service_type:options.inquiry_mode==9?2:1, + sex: options.sex + }) + } else { + if (options.inquiry_type == 4) { + this.setData({ + startIndex: 1 + }) + } + + this.setData({ + // product: options.product ? JSON.parse(options.product) : [], + family_id: options.family_id, + inquiry_type: options.inquiry_type, + sex: options.sex, + inquiry_mode: 1 + }) + } + //this.getSick(); + + this.handleIsExist(); + this.getlocalInfo(options.family_id); + }, + goAgreement:throttle(function(){ + app.method.navigateTo({ + url:"/patient/pages/linkPage/linkPage?url="+encodeURIComponent(urlHost+'/basic/file/agreement.htm?id=1') + }) + }), + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + this.setData({ + img_host:app.hostConfig().imghost + }); + let { + prevData, + pathography_id, + family_id + } = this.data; + if (prevData) { + this.setData({ + disease_class_name: prevData.disease_class_name, + disease_class_id: prevData.disease_class_id, + }) + } + console.log(pathography_id) + if(pathography_id){ + this.handlepathographyDetail(pathography_id) + } + // else{ + + // //this.handleLastSick(options.family_id); + // } + + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() {}, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + +}) \ No newline at end of file diff --git a/healthyService/pages/writeSick/writeSick.json b/healthyService/pages/writeSick/writeSick.json new file mode 100644 index 0000000..6dafd2a --- /dev/null +++ b/healthyService/pages/writeSick/writeSick.json @@ -0,0 +1,17 @@ +{ + "usingComponents": { + "van-field": "@vant/weapp/field/index", + "van-checkbox": "@vant/weapp/checkbox/index", + "van-radio": "@vant/weapp/radio/index", + "van-radio-group": "@vant/weapp/radio-group/index", + "van-datetime-picker": "@vant/weapp/datetime-picker/index", + "van-popup": "@vant/weapp/popup/index", + "van-picker": "@vant/weapp/picker/index", + "van-icon": "@vant/weapp/icon/index", + "dialog":"../../../components/dialog/dialog", + "van-dialog": "@vant/weapp/dialog/index", + "nav":"../../../components/nav/nav" + }, + "navigationStyle":"custom", + "navigationBarTitleText": "肝胆相照互联网医院" +} \ No newline at end of file diff --git a/healthyService/pages/writeSick/writeSick.wxml b/healthyService/pages/writeSick/writeSick.wxml new file mode 100644 index 0000000..e2faadb --- /dev/null +++ b/healthyService/pages/writeSick/writeSick.wxml @@ -0,0 +1,168 @@ + + + + + + 填写病情 + + + + 病情历史 + 查看记录 + + + 所患疾病 + + + + + 确诊日期 + + + + 病情主诉 + + + + + + + + + + 用药意向 + + + + {{item.product_name}}{{item.product_spec}}(数量{{item.product_num}}) + + + + + + 上传复诊凭证(最多9张) + 请上传问诊本人清晰的复诊凭证(病例/处方单/检查报告/住院单),仅接诊医生可见。 + + + + + + + + + + 复诊凭证遗失或不在身边,请勾选本项,未上传凭证可能会影响医生对您的诊断 + + + + + + {{startIndex}}、 + + 是否服用过您想购买的药品且无相关禁忌? + + + + + + + + + + {{startIndex+1}}、 + + 您是否有过敏史? + + + + + + + + + + + {{startIndex+2}}、 + + 您是否有家族病史? + + + + + + + + + + + {{startIndex+3}}、 + + 您是否处于备孕、妊娠、哺乳期? + + + + + + + + + + + + + + 胆相照互联网医院平台医生为您提供健康咨询服务,医生建议仅供参考。根据国家互联网诊疗相关政策要求,请您在提交服务前仔细阅读《风险告知与知情同意书》。继续操作表示您知悉并同意上述全部内容。 + + + + + + + + + + + + + + + + + + + 请您先仔细阅读并同意《风险告知与知情同意书》 + + + \ No newline at end of file diff --git a/healthyService/pages/writeSick/writeSick.wxss b/healthyService/pages/writeSick/writeSick.wxss new file mode 100644 index 0000000..6bc9b8f --- /dev/null +++ b/healthyService/pages/writeSick/writeSick.wxss @@ -0,0 +1,365 @@ +/* pages/writeSick/writeSick.wxss */ +.content{ + min-height: 100%; + background: #f2f2f2; +} +.ui-navigatorbar { + position: fixed; + z-index:99; + top: 0; + width: 750rpx; + height: 172rpx; + background: #F2F2F2; + backdrop-filter: blur(20px); + } + + .ui-navigatorbar-back { + position: absolute; + padding-left:40rpx; + padding-right:40rpx; + width:30rpx; + height:60rpx; + left: 0rpx; + bottom: 20rpx; + } + + .ui-title { + position: absolute; + width: 350rpx; + height: 88rpx; + line-height: 56rpx; + font-size: 36rpx; + white-space: nowrap; + color: #000000; + bottom: 0; + left: 200rpx; + display: flex; + justify-content: center; + align-items: center; + } +.ui-navigatorbar-back { + position: absolute; + padding-left:40rpx; + padding-right:40rpx; + width:30rpx; + height:60rpx; + left: 0rpx; + bottom: 20rpx; + } + + .ui-title { + position: absolute; + width: 350rpx; + height: 88rpx; + line-height: 56rpx; + font-size: 36rpx; + color: #000000; + bottom: 0; + left: 200rpx; + display: flex; + justify-content: center; + align-items: center; + } +.infobox { + margin-top:172rpx; + +} +.sickHisbox{ + display: flex; + height:100rpx; + align-items: center; + margin-bottom: 20rpx; + background-color: #fff; + padding:0 55rpx; + justify-content: space-between; +} +.hisBtn{ +width: 166rpx; +height: 60rpx; +color:#3CC7C0; +display: flex; +font-size: 26rpx; +align-items: center; +justify-content: center; +background: #E2FFFE; +border-radius: 6rpx; +border: 1rpx solid #3CC7C0; +} +.info { + border-bottom: 1rpx solid #E7E7E7; + display: flex; + background-color: #fff; + align-items: center; + height: 112rpx; + color: #333333; +} + + +.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 .ipt { + margin-left: 15rpx; + margin-right: 52rpx; + flex: 1; +} +.input-placeholder { + color: #999999; + + font-size: 28rpx; +} +.textareaview{ + position: relative; + padding:40rpx 52rpx; + background: #fff!important; +} +.textwrap{ + background: #F2F2F2!important; + border-radius: 10rpx; +} +.van-cell{ + position: relative; + z-index:2; + background-color:transparent!important; +} +.van-field__body--textarea{ + height:360rpx; + width:580rpx; +} +.iptclass{ + top:0; + overflow-y: scroll; + -webkit-overflow-scrolling: touch; + height:360rpx!important; + bottom:0; + left:0rpx; + right:0rpx; + width:100%!important; + background-color: transparent; + +} +.mydailog .dialog-index--van-dialog__confirm{ + background:#ebf9f9!important; +} +/* +.van-field__control { + display: flex; + align-self: start; +} */ + +.van-field__word-limit { + color: #999999!important; + font-size: 24rpx; +} +.green{ + color:rgba(60, 199, 192, 1) +} +.van-field__word-num--full{ + color: #ee0a24!important; +} +.textbox{ + left:86rpx; + right:86rpx; + top:60rpx; + height:380rpx; + z-index:0; + position: absolute; +} + +.textbox .desc{ + word-break: break-all; + line-height: 42rpx; + color: #999; + margin-bottom: 20rpx; + font-size: 28rpx; +} +.textbox .goods{ + display: inline; + white-space:normal; +} +.textbox .goods:after{ + content:";" +} +.textbox .goods:last-child:after{ + content:"" +} +.textbox view:last-child{ + margin-bottom: 0; +} +.textbox text{ + color: #333333; + font-size: 28rpx; +} +.info .tip{ + line-height: 36rpx; + color: #666666; + margin:20rpx 52rpx 0; + font-size: 24rpx; +} +.uploadbox{ + + margin:30rpx 52rpx 0; + display: flex; + flex-wrap: wrap ; +} +.uploadbox .close{ + z-index:99; + top:5rpx; + right:5rpx; + position: absolute; + width:30rpx; + height:30rpx; +} +.uploadbox .upload{ + position: relative; + object-fit: cover; + margin: 5px 19rpx 5px 0; +} +.uploadbox .upload:nth-child(4n){ + margin-right: 0; +} +.van-icon-plus{ + color:#333; + font-size: 80rpx!important; +} +.agreebox{ + margin:30rpx 52rpx 0; + display: flex; +} +.agreebox .desc{ + color: #666666; + line-height: 36rpx; + + font-size: 24rpx; +} +.van-checkbox{ + display: flex; + align-items: flex-start!important; +} +.sickHis{ + background-color: #fff; + margin-top: 20rpx; + padding:40rpx 52rpx; + +} +textarea{ + width:100%; + color:#333; + height:132rpx; +} +.list .qa{ + display: flex; +} +.titlebox{ + flex:1; + +} +.radio{ + margin: 40rpx 0rpx 30rpx 0; +} +.sickArea{ + position: relative; + z-index:1; +} +.upload{ + width: 148rpx; + height:148rpx; + display: flex; + justify-content:center ; + align-items: center; + background: #F2F2F2; + border-radius: 4rpx +} +.radiotip{ + position: relative; + padding:24rpx 20rpx; + justify-content: center; + margin-top: 30rpx; + line-height: 42rpx; +background: #F2F2F2; +border-radius: 10rpx; +font-size: 28rpx; +color:#999; +margin-bottom: 20rpx; +} +.radiotip .textbox{ + top:20rpx; + left:20rpx; + height: 100rpx; + right:20rpx; +} +.radiotip .textarea{ + position: relative; + z-index:2; +} +.radiotip text{ + white-space: nowrap; + color:#333; +} +.xieyi{ + width:100%; + padding:30rpx 52rpx 40rpx; + + background-color: #fff; +} +.agreebox text{ + color:#3CC7C0; + +} +.nextbox{ + padding-bottom: 20rpx; + background-color: #fff; +} +.next{ + display: flex; + align-items: center; + justify-content: center; + height: 94rpx; + font-size: 36rpx; + border:none; + outline: none; + margin:0 52rpx; + border-radius: 47rpx; + color: #fff; + margin-bottom: 40rpx; + background: #3CC7C0!important; +} +.datePicker{ + width:100%; + position: fixed; + bottom:0; +} + +.dateTitle{ + border:1rpx solid #E7E7E7; +} +.van-uploader__preview-image,.van-uploader__upload{ + width: 148rpx!important; + height: 148rpx!important; +} +.van-uploader__preview{ + margin: 0 6px 8px 0; +} +.slotmsg{ + -webkit-overflow-scrolling: touch; + font-size: 28rpx; + line-height:40rpx; + max-height:60vh; + overflow-y: auto; + padding:48rpx; + text-align: center; + } \ No newline at end of file diff --git a/healthyService/static/images/healthy_bg.jpg b/healthyService/static/images/healthy_bg.jpg new file mode 100644 index 0000000..f6a04ae Binary files /dev/null and b/healthyService/static/images/healthy_bg.jpg differ diff --git a/healthyService/static/images/healthy_button.png b/healthyService/static/images/healthy_button.png new file mode 100644 index 0000000..a1676b3 Binary files /dev/null and b/healthyService/static/images/healthy_button.png differ diff --git a/healthyService/static/images/quanyi.png b/healthyService/static/images/quanyi.png new file mode 100644 index 0000000..ae0646d Binary files /dev/null and b/healthyService/static/images/quanyi.png differ diff --git a/healthyService/static/images/up.png b/healthyService/static/images/up.png new file mode 100644 index 0000000..b45bac3 Binary files /dev/null and b/healthyService/static/images/up.png differ diff --git a/healthyService/static/images/xia.png b/healthyService/static/images/xia.png new file mode 100644 index 0000000..5d5fa49 Binary files /dev/null and b/healthyService/static/images/xia.png differ diff --git a/pages/index/index.js b/pages/index/index.js index 2d76b94..5cc00c6 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -41,7 +41,7 @@ Page({ } }), goH5:throttle(function(event){ - let {url,name}=event.currentTarget.dataset; + let {url,name,type}=event.currentTarget.dataset; if(url.indexOf("http")!=-1){ let urlName=(decodeURIComponent(url)) if(this.verifySuffix(urlName)){ @@ -55,14 +55,21 @@ Page({ } }else{ - wx.navigateToMiniProgram({ - appId: 'wxdee7006582529713', - path:url, - envVersion: 'release', - success(res) { - // 打开成功 - } - }) + if(type==4){ + app.method.navigateTo({ + url:'/'+url + }) + }else{ + wx.navigateToMiniProgram({ + appId: 'wxdee7006582529713', + path:url, + envVersion: 'release', + success(res) { + // 打开成功 + } + }) + } + } }), diff --git a/pages/index/index.wxml b/pages/index/index.wxml index 06a8337..000c47a 100644 --- a/pages/index/index.wxml +++ b/pages/index/index.wxml @@ -107,7 +107,7 @@ - + diff --git a/pages/my/my.js b/pages/my/my.js index a67e15c..6f880ff 100644 --- a/pages/my/my.js +++ b/pages/my/my.js @@ -73,6 +73,11 @@ Page({ url: '/sugarCheck/pages/checkOrder/checkOrder', }) }), + goHealthyOrder:throttle(function(){ + app.method.navigateTo({ + url: '/healthyService/pages/healthyOrder/healthyOrder', + }) + }), goMyPrescript:throttle(function(){ app.method.navigateTo({ url: '/patient/pages/myPrescript/myPrescript', diff --git a/pages/my/my.wxml b/pages/my/my.wxml index fff2047..0b4197a 100644 --- a/pages/my/my.wxml +++ b/pages/my/my.wxml @@ -46,6 +46,14 @@ 检测 {{filter.formatNumber(patient_info.order_detection_count)}}
+ +
+ + + + 服务包 + {{filter.formatNumber(patient_info.order_detection_count)}} +
diff --git a/pages/my/my.wxss b/pages/my/my.wxss index 21deea0..f05ac1d 100644 --- a/pages/my/my.wxss +++ b/pages/my/my.wxss @@ -121,7 +121,7 @@ color: rgba(0,0,0,0.65); margin-top: 30rpx; width: 100%; padding-bottom: 20rpx; - height: 256rpx; + overflow: hidden; background: #FFFFFF; border-radius: 10rpx; @@ -144,7 +144,7 @@ color: rgba(0,0,0,0.65); .iconbox { display: flex; margin: 30rpx 52rpx 0; - + flex-wrap: wrap; justify-content: space-between; } diff --git a/patient/pages/consultOrder/consultOrder.wxml b/patient/pages/consultOrder/consultOrder.wxml index 9833afc..b454ce7 100644 --- a/patient/pages/consultOrder/consultOrder.wxml +++ b/patient/pages/consultOrder/consultOrder.wxml @@ -20,6 +20,9 @@ 专家问诊-视频 专家问诊-疑难会诊 专家问诊-附赠回复 + 健康包-单次问诊 + 随访包-单次问诊 + 快速问诊 快速问诊-附赠回复 公益问诊 diff --git a/patient/pages/expertConsult/expertConsult.js b/patient/pages/expertConsult/expertConsult.js index 00c31be..e4fdb5e 100644 --- a/patient/pages/expertConsult/expertConsult.js +++ b/patient/pages/expertConsult/expertConsult.js @@ -69,12 +69,17 @@ Page({ this.onfresh(); }, onScroll(event) { + let {doctorList}=this.data; wx.createSelectorQuery().select('#scroller') .boundingClientRect((res) => { - // console.log(event.detail.scrollTop) - let H=0; - if(event.detail.scrollTop>=175){ - H=0; + let H=0; + if(event.detail.scrollTop>175){ + if(doctorList.length<=3){ + H=150; + }else{ + H=1; + } + }else{ H=150 } @@ -83,6 +88,7 @@ Page({ // offsetTop: res.top, scrollHeight:H }); + }).exec(); }, transforpage(arr) { diff --git a/patient/pages/expertConsult/expertConsult.wxml b/patient/pages/expertConsult/expertConsult.wxml index dcef1a9..95f2531 100644 --- a/patient/pages/expertConsult/expertConsult.wxml +++ b/patient/pages/expertConsult/expertConsult.wxml @@ -4,7 +4,7 @@ - + diff --git a/patient/pages/expertDetail/expertDetail.js b/patient/pages/expertDetail/expertDetail.js index d84bd46..b5d0c3a 100644 --- a/patient/pages/expertDetail/expertDetail.js +++ b/patient/pages/expertDetail/expertDetail.js @@ -15,11 +15,12 @@ Page({ * 页面的初始数据 */ data: { + toView:'item0', tab3Height:500, img_host:'https://oss.prod.applets.igandanyiyuan.com/applet/patient/static', showDialog:false, - avatar: '', currentData:0, + avatar: '', user_name: '', doctor_title: '', doctor_id: '', @@ -35,6 +36,10 @@ Page({ canTuwen:false, canVideo:false, canDiffcult:false, + canHealthy:false, + canVisit:false, + healthyPrice:'', + visitPrice:'', brief_introduction:'', multi_point_status: 0, multi_point_enable:0, @@ -78,7 +83,7 @@ Page({ this.setData({ tab3Height:(rect.height) }) - console.log('元素高度为:', rect.height) + }).exec() }, handleThrottle:throttle(function(e){ @@ -123,11 +128,37 @@ Page({ bindchange(e){ const that = this; - console.log(e); that.setData({ currentData: e.detail.current }) }, + goVisit:throttle(function(){ + let doctorid=this.data.doctor_id; + if(this.data.canVisit){ + app.method.navigateTo({ + url:'/healthyService/pages/visitDetail/visitDetail?doctor_id='+doctorid + }) + }else{ + app.method.navigateTo({ + url:'/healthyService/pages/visitList/visitList' + }) + } + + }), + goHealthy:throttle(function(){ + let doctorid=this.data.doctor_id; + let price=this.data.healthyPrice; + if(this.data.canHealthy){ + app.method.navigateTo({ + url:'/healthyService/pages/healthyDetail/healthyDetail?doctor_id='+doctorid+"&price="+price + }) + }else{ + app.method.navigateTo({ + url:'/healthyService/pages/healthyIntro/healthyIntro' + }) + } + + }), switchTab(e){ let {id}=e. currentTarget.dataset; this.setData({ @@ -141,18 +172,32 @@ bindchange(e){ }) }else if(id==1){ - this.getHeight(2); + this.setData({ + inquiry_type:1, + inquiry_mode:9, + tab3Height:0 + }) + this.goVisit(); + }else if(id==2){ + this.setData({ + inquiry_type:1, + inquiry_mode:8, + tab3Height:0 + }) + this.goHealthy(); + }else if(id==3){ + this.getHeight(4); let {hasVideoList,canVideo}=this.data; this.setData({ inquiry_type:1, - inquiry_mode:2 + inquiry_mode:2, }) - if(hasVideoList && !canVideo){ - this.goVideo(); - } - + this.getVideoDoctorList(); + // if(hasVideoList && !canVideo){ + // this.goVideo(); + // } }else { - this.getHeight(3) + this.getHeight(5) this.setData({ inquiry_type:1, inquiry_mode:6 @@ -307,7 +352,8 @@ bindchange(e){ }) }; this.setData({ - expertAmount:arr[i].work_num_day-arr[i].order_inquiry_count + expertAmount:arr[i].work_num_day-arr[i].order_inquiry_count, + expertInquiry_price: arr[i].inquiry_price }) } if(arr[i].inquiry_type==1 && arr[i].inquiry_mode==2){ @@ -333,6 +379,26 @@ bindchange(e){ yinanPrice:arr[i].inquiry_price }) } + if(arr[i].inquiry_type==1 && arr[i].inquiry_mode==8){ + if(arr[i].is_enable==1){ + this.setData({ + canHealthy:true + }) + } + this.setData({ + healthyPrice: arr[i].inquiry_price + }) + } + if(arr[i].inquiry_type==1 && arr[i].inquiry_mode==9){ + if(arr[i].is_enable==1){ + this.setData({ + canVisit:true + }) + } + this.setData({ + visitPrice: arr[i].inquiry_price + }) + } } } @@ -367,6 +433,26 @@ bindchange(e){ cycle:arr[i].duration }) }; + if(arr[i].inquiry_type==1 && arr[i].inquiry_mode==8){ + if(arr[i].is_enable==1){ + this.setData({ + canHealthy:true + }) + } + this.setData({ + healthyPrice: arr[i].inquiry_price + }) + } + if(arr[i].inquiry_type==1 && arr[i].inquiry_mode==9){ + if(arr[i].is_enable==1){ + this.setData({ + canVisit:true + }) + } + this.setData({ + visitPrice: arr[i].inquiry_price + }) + } if(arr[i].inquiry_type==1 && arr[i].inquiry_mode==2){ if(arr[i].is_enable==1){ this.setData({ @@ -410,6 +496,11 @@ bindchange(e){ } return a }, + // 禁止用户滑动 + catchTouchMove() { + return false; + }, + getDeatil(id) { doctorDetail(id).then((res) => { for (const key in this.data) { @@ -423,6 +514,7 @@ bindchange(e){ }) }, getVideoDoctorList(){ + let {canVideo}=this.data; doctorList({ page:1, inquiry_type:1, @@ -434,11 +526,15 @@ bindchange(e){ this.setData({ hasVideoList:false }); - + }else{ this.setData({ hasVideoList:true }) + if(!canVideo){ + this.goVideo(); + } + } }) }, @@ -482,6 +578,7 @@ bindchange(e){ if(this.data.canTuwen){ this.setData({ currentData:0, + toView:'item0', inquiry_type:this.data.current_inquiry_config.inquiry_type, inquiry_mode:this.data.current_inquiry_config.inquiry_mode }) @@ -490,23 +587,27 @@ bindchange(e){ if(this.data.canVideo){ let {hasVideoList,canVideo}=this.data; this.setData({ - currentData:1, + currentData:3, inquiry_type:1, - inquiry_mode:2 + inquiry_mode:2, + toView:'item3' }) - if(hasVideoList && !canVideo){ - this.goVideo(); - } - this.getHeight(2) + this.getVideoDoctorList(); + this.getHeight(4) }else{ - if(this.data.canDiffcult){ + if(this.data.canDiffcult){ this.setData({ - currentData:2, + currentData:4, + toView:'item4', inquiry_type:1, inquiry_mode:6 }) - this.getHeight(3) - }else{ + this.getHeight(5) + }else{ + this.setData({ + currentData:0, + toView:'item0' + }) this.getHeight(1) } } @@ -530,9 +631,9 @@ bindchange(e){ }) this.getDeatil(doctor_id); - this.getService(doctor_id); + this.getEvaluationList(); - this.getVideoDoctorList(); + //this.getVideoDoctorList(); }, @@ -550,6 +651,7 @@ bindchange(e){ this.setData({ img_host:app.hostConfig().imghost }); + this.getService(this.data.doctor_id); }, /** diff --git a/patient/pages/expertDetail/expertDetail.wxml b/patient/pages/expertDetail/expertDetail.wxml index 1b0b8eb..7a41c22 100644 --- a/patient/pages/expertDetail/expertDetail.wxml +++ b/patient/pages/expertDetail/expertDetail.wxml @@ -72,9 +72,10 @@ 医生服务 {{filter.formatYear(days)}}内服务过您 - - - + + + + @@ -92,7 +93,7 @@ ¥{{freePrice}}/次 ¥{{expertInquiry_price}}/次 ¥{{freePrice}}/次 - ¥{{expertInquiry_price}}/次 + ¥{{expertInquiry_price}}/次 @@ -104,10 +105,33 @@ 暂未开通 - - - - + + + + + + 随访包 + ¥{{visitPrice}}起 + 暂未开通 + + + + + + + + 健康包 + ¥{{healthyPrice}}/次 + 暂未开通 + + + + + + 视频问诊 @@ -118,10 +142,11 @@ {{videoPrice?'¥'+videoPrice+'/次':'暂未开通'}} - - - - + + + + + 疑难问诊 @@ -134,8 +159,9 @@ - - + + + @@ -163,8 +189,10 @@ - - + + + + @@ -206,8 +234,8 @@ - - + + @@ -317,10 +345,10 @@ - - - - + + + + diff --git a/patient/pages/expertDetail/expertDetail.wxss b/patient/pages/expertDetail/expertDetail.wxss index 37d648f..0190df3 100644 --- a/patient/pages/expertDetail/expertDetail.wxss +++ b/patient/pages/expertDetail/expertDetail.wxss @@ -517,26 +517,37 @@ justify-content:center; .wz_tabbox{ margin-top: 20rpx; } +.tabbox{ + margin-top: 16rpx; + overflow-x: scroll; + width:100%; +} .tabs{ - margin-top: 16rpx; + height:330rpx; display: flex; - justify-content: space-between; + width:1100rpx; + } .tabs .tab{ - width: 214rpx; + width: 210rpx; height: 300rpx; position: relative; + margin-right: 16rpx; box-shadow: 0rpx 8rpx 20rpx 2rpx rgba(0,0,0,0.04); } + +.tabs .tab:last-child{ + margin-right: 0; +} .tabbg{ top:0rpx; width: 100%; z-index:0; -height: 314rpx; +height: 300rpx; position: absolute; } .tabbg.on{ - height: 330rpx; + height: 325rpx; } .typebox{ margin-top: 158rpx; @@ -568,7 +579,7 @@ color: #999999; text-decoration: line-through; } .swiperbox{ - margin-top: 45rpx; + margin-top: 35rpx; } .swiper-item{ border-radius: 20rpx; diff --git a/patient/pages/fuliMsgList/fuliMsgList.js b/patient/pages/fuliMsgList/fuliMsgList.js index 11405df..fe2b7df 100644 --- a/patient/pages/fuliMsgList/fuliMsgList.js +++ b/patient/pages/fuliMsgList/fuliMsgList.js @@ -87,7 +87,9 @@ Page({ }else if(link_type==13){ url='/patient/pages/prescriptDetail/prescriptDetail?order_prescription_id='+link_params.order_prescription_id - }; + }else if(link_type==15){ + url='/healthyService/pages/healthyOrderDetail/healthyOrderDetail?order_service_id='+link_params.order_no + }; app.method.navigateTo({ url: url, }) diff --git a/patient/pages/login/login.js b/patient/pages/login/login.js index de7e826..c6129af 100644 --- a/patient/pages/login/login.js +++ b/patient/pages/login/login.js @@ -80,7 +80,13 @@ Page({ user_type: 1, wx_code: res }).then((data)=>{ -  wx.setStorageSync('AUTH_TOKEN', data.token); + const { envVersion } = wx.getAccountInfoSync().miniProgram; + if(envVersion=='release'){ +  wx.setStorageSync('AUTH_TOKEN', data.token); + }else{ +  wx.setStorageSync('DEV_AUTH_TOKEN', data.token); + } +  wx.setStorageSync('CLIENT_USER_ID',data.client_user_id);  wx.setStorageSync('USER_ID',data.user_id); let url=this.data.redirectUrl?this.data.redirectUrl:'/pages/index/index'; diff --git a/patient/pages/medinceOrderDetail/medinceOrderDetail.js b/patient/pages/medinceOrderDetail/medinceOrderDetail.js index 5151c8f..220a0cb 100644 --- a/patient/pages/medinceOrderDetail/medinceOrderDetail.js +++ b/patient/pages/medinceOrderDetail/medinceOrderDetail.js @@ -38,7 +38,8 @@ Page({ if(url.indexOf('?')!=-1){ goUrl='/'+url+"&fromType="+url; }else{ - goUrl='/'+url+"?fromType="+url; + // goUrl='/'+url+"?fromType="+url; + goUrl='/patient/pages/medinceOrder/medinceOrder' } //处理聊天收到消息不及时; if(url.indexOf("TUIService/pages/index")!=-1){ diff --git a/patient/pages/medinceOrderDetail/medinceOrderDetail.wxml b/patient/pages/medinceOrderDetail/medinceOrderDetail.wxml index 1628f39..d36b8ff 100644 --- a/patient/pages/medinceOrderDetail/medinceOrderDetail.wxml +++ b/patient/pages/medinceOrderDetail/medinceOrderDetail.wxml @@ -71,6 +71,11 @@ ¥{{order_product.logistics_fee}} + + 优惠金额 + + -¥{{order_product.discount_amount}} + 支付金额 diff --git a/patient/pages/mobileLogin/mobileLogin.js b/patient/pages/mobileLogin/mobileLogin.js index 28b2d98..f1c1963 100644 --- a/patient/pages/mobileLogin/mobileLogin.js +++ b/patient/pages/mobileLogin/mobileLogin.js @@ -128,7 +128,12 @@ Page({ user_type:1, wx_code:res }).then((data)=>{ -  wx.setStorageSync('AUTH_TOKEN', data.token); + const { envVersion } = wx.getAccountInfoSync().miniProgram; + if(envVersion=='release'){ +  wx.setStorageSync('AUTH_TOKEN', data.token); + }else{ +  wx.setStorageSync('DEV_AUTH_TOKEN', data.token); + }  wx.setStorageSync('CLIENT_USER_ID',data.client_user_id);  wx.setStorageSync('USER_ID',data.user_id); let url=this.data.redirectUrl?this.data.redirectUrl:'/pages/index/index'; diff --git a/patient/pages/myPrescript/myPrescript.wxss b/patient/pages/myPrescript/myPrescript.wxss index 71ee39f..8b78939 100644 --- a/patient/pages/myPrescript/myPrescript.wxss +++ b/patient/pages/myPrescript/myPrescript.wxss @@ -106,7 +106,7 @@ font-weight:600; align-items: baseline; justify-content: space-between; - width:114rpx; + width:116rpx; } .row .dot{ display: flex; diff --git a/patient/pages/myWelfare/myWelfare.js b/patient/pages/myWelfare/myWelfare.js index 6efd93d..47cb2f9 100644 --- a/patient/pages/myWelfare/myWelfare.js +++ b/patient/pages/myWelfare/myWelfare.js @@ -11,6 +11,7 @@ Page({ nouseList: [], useList: [], expireList: [], + active:0, user_coupon_status:0, }, goIndex() { @@ -55,10 +56,12 @@ Page({ */ onChange(event) { let tabIndex = `${event.detail.index}` + console.log(event.detail.index); if(tabIndex==2){ tabIndex=3 } this.setData({ + active:`${event.detail.index}`, nouseList: [], useList: [], expireList: [], @@ -72,7 +75,26 @@ Page({ }) }, onLoad(options) { - this.getcoupon() + console.log('状态'); + console.log(options.status) + if(options.status==0){ + this.setData({ + user_coupon_status:0, + active:0 + }) + }else if(options.status==1){ + this.setData({ + user_coupon_status:1, + active:1 + }) + }else if(options.status==3){ + this.setData({ + user_coupon_status:3, + active:2 + }) + } + this.getcoupon(); + }, /** diff --git a/patient/pages/myWelfare/myWelfare.wxml b/patient/pages/myWelfare/myWelfare.wxml index c65aea3..a89518c 100644 --- a/patient/pages/myWelfare/myWelfare.wxml +++ b/patient/pages/myWelfare/myWelfare.wxml @@ -3,7 +3,9 @@ - + @@ -13,11 +15,14 @@ 单品补贴 {{item.coupon_name}} - 使用范围:全场通用 + + 使用范围:全场通用 使用范围:问诊适用 使用范围:购药 使用范围:购药 使用范围:购药 + 使用范围:购药 + 有效期:{{item.valid_end_time}} @@ -40,11 +45,19 @@ 单品补贴 {{item.coupon_name}} - 使用范围:全场通用 + + 使用范围:全场通用 使用范围:问诊适用 使用范围:购药 使用范围:购药 使用范围:购药 + 使用范围:购药 + + 有效期:{{item.valid_end_time}} @@ -66,11 +79,20 @@ 单品补贴 {{item.coupon_name}} - 使用范围:全场通用 + + 使用范围:全场通用 使用范围:问诊适用 使用范围:购药 使用范围:购药 使用范围:购药 + 使用范围:购药 + + + 有效期:{{item.valid_end_time}} diff --git a/patient/pages/myWelfare/myWelfare.wxss b/patient/pages/myWelfare/myWelfare.wxss index ccb5bcf..3214bb8 100644 --- a/patient/pages/myWelfare/myWelfare.wxss +++ b/patient/pages/myWelfare/myWelfare.wxss @@ -94,9 +94,13 @@ border-radius: 10rpx; display: inline; word-break: break-all; } +.fulibox .left .rangbox{ + margin-top: 20rpx; + height: 30rpx; +} .fulibox .left .range{ color: #E34D59; - margin-top: 20rpx; + font-size: 28rpx; } .fulibox .left .date{ @@ -124,6 +128,7 @@ border-radius: 10rpx; } .fulibox .right .use{ margin-top: 10rpx; + margin-bottom: 10rpx; width: 152rpx; height: 60rpx; background: #FFFFFF; diff --git a/patient/pages/orderDetail/orderDetail.wxml b/patient/pages/orderDetail/orderDetail.wxml index dde729d..dfb779b 100644 --- a/patient/pages/orderDetail/orderDetail.wxml +++ b/patient/pages/orderDetail/orderDetail.wxml @@ -47,6 +47,8 @@ 专家问诊-视频 专家问诊-疑难会诊 专家问诊-附赠回复 + 健康包服务 + 随访包服务 快速问诊 快速问诊-附赠回复 公益问诊 @@ -106,7 +108,7 @@ - + @@ -217,7 +219,7 @@ - 非常满意 + 评价 diff --git a/patient/pages/orderDetail/orderDetail.wxss b/patient/pages/orderDetail/orderDetail.wxss index 8546e22..5a3595f 100644 --- a/patient/pages/orderDetail/orderDetail.wxss +++ b/patient/pages/orderDetail/orderDetail.wxss @@ -203,9 +203,10 @@ color: #333333; border-radius: 10rpx; } .namebox .head { - width: 120rpx; - height: 120rpx; + width: 80rpx; + height: 80rpx; flex-shrink: 0; + margin-bottom: 28rpx; border-radius: 50%; } @@ -218,11 +219,11 @@ color: #333333; .namewraper { flex: 1; - max-width:420rpx; + max-width:490rpx; display: flex; justify-content: space-between; flex-direction: column; - margin-left: 20rpx; + margin-left: 0rpx; } .namebox .row { @@ -317,7 +318,7 @@ color: #333333; } .wenzhenbtn { /* position: fixed; */ - margin-bottom: 20rpx; + margin-bottom: 25rpx; width:100%; height: 94rpx; z-index:22; @@ -550,7 +551,7 @@ color: #333333; } .doctorAvatar { - width: 120rpx; + width:120rpx; height: 120rpx; border-radius: 50%; } diff --git a/patient/pages/payInfo/payInfo.wxml b/patient/pages/payInfo/payInfo.wxml index d48bde2..a7f340e 100644 --- a/patient/pages/payInfo/payInfo.wxml +++ b/patient/pages/payInfo/payInfo.wxml @@ -52,7 +52,7 @@ - ¥{{order.logistics_fee}}(包邮) + ¥{{order.logistics_fee}} ¥0.00(包邮) @@ -63,6 +63,11 @@ + + 优惠金额 + + -¥{{order.discount_amount}} + 支付金额 diff --git a/patient/pages/payOrder/payOrder.js b/patient/pages/payOrder/payOrder.js index cab525d..71cf4bc 100644 --- a/patient/pages/payOrder/payOrder.js +++ b/patient/pages/payOrder/payOrder.js @@ -28,6 +28,7 @@ Page({ time: '', inquiry_no: '', amount_total: "", + discount_amount:'', cannot_use_coupon_reason:'', coupon_amount_total: 0, logistics_fee: 0, @@ -43,6 +44,7 @@ Page({ address_id: '', product_ids: [], order_detection_id:'', + order_service_id:'', order_product_id: '', fromType: '', showDing:false, @@ -78,8 +80,10 @@ Page({ order_inquiry_id, order_type, order_detection_id, + order_service_id, fromType } = this.data; + console.log( order_type, order_service_id) if (order_type == 1) { if (fromType) { if (fromType == "detail") { @@ -103,7 +107,7 @@ Page({ }) } }else if(order_type==3){ - console.log("2222"); + if (fromType) { wx.redirectTo({ url: '/sugarCheck/pages/checkOrderDetail/checkOrderDetail?order_detection_id=' + order_detection_id + "&fromType=" + fromType, @@ -113,6 +117,16 @@ Page({ delta: 1, }) } + }else if(order_type==4 || order_type==5){ + if (fromType) { + wx.redirectTo({ + url: '/healthyService/pages/healthyOrderDetail/healthyOrderDetail?order_service_id=' + order_service_id + "&fromType=" + fromType, + }) + } else { + wx.navigateBack({ + delta: 1, + }) + } }else { if (fromType) { wx.redirectTo({ @@ -193,11 +207,15 @@ Page({ }, handleThrottle:throttle(function() { + console.log(this.data.isLock) if(!this.data.isLock){ + console.log(11111) + this.goPayPlatform(); + console.log(222222) this.setData({ isLock:true }); - this.goPayPlatform(); + } }), @@ -230,11 +248,15 @@ Page({ url = '/patient/pages/payPlatform/payPlatform?order_no=' + order_no + "&order_type=2" + "&order_prescription_id=" + order_prescription_id + "&order_product_id=" + order_product_id + "&fromType=" + fromType; }else if(order_type == 3){//糖组检测 url = '/patient/pages/payPlatform/payPlatform?order_no=' + order_no + "&order_type=3" + "&order_detection_id=" + order_detection_id+ "&fromType=" + fromType; + }else if(order_type == 4){//随访包 + url = '/patient/pages/payPlatform/payPlatform?order_no=' + order_no + "&order_type=4&chat_id=" + chat_id + "&doctor_id" + doctor_id + "&inquiry_type=" + inquiry_type + "&inquiry_mode=" + inquiry_mode + "&fromType=" + fromType; + }else if(order_type == 5){//健康包 + url = '/patient/pages/payPlatform/payPlatform?order_no=' + order_no + "&order_type=5&chat_id=" + chat_id + "&doctor_id" + doctor_id + "&inquiry_type=" + inquiry_type + "&inquiry_mode=" + inquiry_mode + "&fromType=" + fromType; }else { if (chat_id) { url = '/patient/pages/payPlatform/payPlatform?order_no=' + order_no + "&order_type=1&chat_id=" + chat_id + "&doctor_id" + doctor_id + "&inquiry_type=" + inquiry_type + "&inquiry_mode" + inquiry_mode + "&order_inquiry_id=" + order_inquiry_id + "&fromType=" + fromType; } else { - url = '/patient/pages/payPlatform/payPlatform?order_no=' + order_no + "&order_type=1&inquiry_type=" + inquiry_type + "&inquiry_mode" + inquiry_mode + "&order_inquiry_id=" + order_inquiry_id + "&fromType=" + fromType; + url = '/patient/pages/payPlatform/payPlatform?order_no=' + order_no + "&order_type=1&inquiry_type=" + inquiry_type + "&inquiry_mode=" + inquiry_mode + "&order_inquiry_id=" + order_inquiry_id + "&fromType=" + fromType; } } app.method.navigateTo({ @@ -264,6 +286,11 @@ Page({ this.setData({ order_detection_id:data.order_no }) + }else if(order_type==4 || order_type==5){ + this.setData({ + order_service_id:data.order_no + }) + } let { @@ -282,7 +309,8 @@ Page({ order_inquiry_id, order_detection_id, order_type, - fromType + fromType, + order_service_id } = this.data; if (order_type == 1) { if (fromType) { @@ -312,6 +340,17 @@ Page({ }) } + }else if(order_type == 4 || order_type == 5){ + if (fromType) { + wx.redirectTo({ + url: '/healthyService/pages/healthyOrderDetail/healthyOrderDetail?order_service_id=' + order_service_id + "&fromType=" + fromType, + }) + } else { + wx.navigateBack({ + delta: 1, + }) + + } }else { if (fromType) { wx.redirectTo({ @@ -325,7 +364,7 @@ Page({ } } } - }else{ + }else if(result.status==2){ //inquiry_status '问诊订单状态(1:待支付 2:待分配 3:待接诊 4:已接诊 5:已完成 6:已结束 7:已取消)', //inquiry_pay_status//1:未支付 2:已支付 3:支付中 4:支付失败 5:支付超时 6:支付关闭 7:已撤销 8:转入退款); let order_status='order_status'; @@ -380,14 +419,32 @@ Page({ wx.redirectTo({ url: '/patient/pages/medinceOrderDetail/medinceOrderDetail?order_product_id='+data.order_id+ "&fromType=" +encodeURIComponent("patient/pages/medinceOrder/medinceOrder"), }) - }else{ + }else if(order_type==3){ wx.redirectTo({ url: '/sugarCheck/pages/checkOrderDetail/checkOrderDetail?order_detection_id='+data.order_no+ "&fromType=" +encodeURIComponent("sugarCheck/checkOrder/checkOrder"), }) + }else if(order_type==4 || order_type==5){ + + wx.redirectTo({ + url:'/healthyService/pages/healthyOrderDetail/healthyOrderDetail?order_service_id='+data.order_no+ "&fromType=" +encodeURIComponent("healthyService/pages/healthyOrder/healthyOrder"), + }) } }) + }else if(result.status==3){ + this.setData({ + message_error:'当前有问诊中的订单,结束后才可购买' + }) + Dialog.confirm({ + title: '温馨提示', + showCancelButton:false, + selector:"#hasPayDialog" + }).then(() => { + wx.redirectTo({ + url: '/patient/pages/orderDetail/orderDetail?order_inquiry_id='+data.order_id+ "&fromType=list", + }) + }) } }) @@ -407,7 +464,7 @@ Page({ success(res) { let item = res.subscriptionsSetting.itemSettings; //console.log(res.subscriptionsSetting) - if (order_type == 1) { //问诊异常提醒 长期订阅 + if (order_type == 1 || order_type == 4 || order_type == 5) { //问诊异常提醒 长期订阅 let tmplIds_longtime = ['UOMww1S30Oq7rErJrqO8wN6lNEVKRo2fgcXnb0tBwHI', '9v6dZhjg09CttLd3W9nEUV_-eshNc4BYYNy59jglvZE']; //问诊提醒长期订阅 if (!item || !item['UOMww1S30Oq7rErJrqO8wN6lNEVKRo2fgcXnb0tBwHI'] ||(item['UOMww1S30Oq7rErJrqO8wN6lNEVKRo2fgcXnb0tBwHI'] != "accept") && (item['9v6dZhjg09CttLd3W9nEUV_-eshNc4BYYNy59jglvZE'] != "accept") || !item['9v6dZhjg09CttLd3W9nEUV_-eshNc4BYYNy59jglvZE']) { THIS.subscription(tmplIds_longtime,callback) @@ -428,7 +485,7 @@ Page({ let tmplIds = ['5aJSrO8SU5rxqdB99zzl4rMVgcOTjt5mQh56cpZI1Hg','dNj3azLupP_w3j649v6lqz7je_ScqwgwFsnug6pKvyI']; THIS.subscription(tmplIds,callback); - }else { //药品发货通知 一次性订阅 //购药提醒 一次性订阅 + }else if(order_type==2) { //药品发货通知 一次性订阅 //购药提醒 一次性订阅 let tmplIds = ['YFdVxDclV1ZjhS7E4Cs0zFdshTRizERpwYdZizj_UWo', 'KjX4m_HOPT5zYuDJqE2rRopAC_QCCMqUTCGc8ElDeWQ','gQO5vhPQfdnvXtK0XnGns1XqNhQpOrXTjdl-5HWWMUw']; //药品订单取消通知 一次性订阅 THIS.subscription(tmplIds,callback) @@ -508,6 +565,7 @@ Page({ order_inquiry_id, order_type, order_id, + order_no, order_product_id, fromType } = this.data; @@ -519,7 +577,11 @@ Page({ app.method.navigateTo({ url: '/sugarCheck/pages/checkOrderDetail/checkOrderDetail?order_detection_id=' + order_detection_id +"&fromType=" + fromType }) - }else { + }else if(order_type == 4 || order_type == 5){ + app.method.navigateTo({ + url: '/healthyService/pages/healthyOrderDetail/healthyOrderDetail?order_service_id=' + order_no + "&fromType=" + fromType, + }) +}else { // 订单类型(1:专家问诊 2:快速问诊 3:公益问诊 4:问诊购药) if (inquiry_type == 1) { app.method.navigateTo({ @@ -588,12 +650,14 @@ Page({ * 生命周期函数--监听页面加载 */ onLoad(options) { + console.log(options) //fromType list跳问诊订单列表页,处方过来的是链接,跳链接页 ,chat是问诊过来 if (options.fromType) { this.setData({ fromType: options.fromType }) }; + //处方订单 if (options.order_type == 2) { let order_prescription_id = options.order_prescription_id; @@ -614,6 +678,28 @@ Page({ order_detection_id }) + }else if(options.order_type==4){//随访包订单 + let order_service_id=options.order_service_id; + this.setData({ + order_type: 4, + doctor_id: options.doctor_id, + inquiry_type:options.inquiry_type, + order_no: options.inquiry_no, + chat_id: options.chat_id, + order_service_id:order_service_id?order_service_id:'', + inquiry_mode: options.inquiry_mode + }) + }else if(options.order_type==5){//健康包订单 + let order_service_id=options.order_service_id; + this.setData({ + order_type:5, + doctor_id: options.doctor_id, + inquiry_type:options.inquiry_type, + order_no: options.inquiry_no, + chat_id: options.chat_id, + order_service_id:order_service_id?order_service_id:'', + inquiry_mode: options.inquiry_mode + }) }else { //问诊相关 this.setData({ @@ -626,7 +712,7 @@ Page({ }) } - + //console.log(options.inquiry_mode,options.order_type) }, /** * 生命周期函数--监听页面初次渲染完成 @@ -649,7 +735,9 @@ Page({ * 生命周期函数--监听页面隐藏 */ onHide() { - + this.setData({ + isLock:false + }); }, /** diff --git a/patient/pages/payOrder/payOrder.wxml b/patient/pages/payOrder/payOrder.wxml index 916a941..2b9fed5 100644 --- a/patient/pages/payOrder/payOrder.wxml +++ b/patient/pages/payOrder/payOrder.wxml @@ -24,8 +24,10 @@ 问诊购药 药品金额 糖组检测 - + 随访包服务 + 健康包服务 ¥{{amount_total}} + 邮费 @@ -40,6 +42,10 @@ 暂不可用 + + 优惠金额 + -¥{{discount_amount}} + 支付金额:¥{{payment_amount_total}} diff --git a/patient/pages/payPlatform/payPlatform.js b/patient/pages/payPlatform/payPlatform.js index ced014e..f543920 100644 --- a/patient/pages/payPlatform/payPlatform.js +++ b/patient/pages/payPlatform/payPlatform.js @@ -101,7 +101,11 @@ Page({ wx.redirectTo({ url: '/patient/pages/medinceOrderDetail/medinceOrderDetail?order_product_id='+data.order_id+ "&fromType=" +encodeURIComponent("patient/pages/medinceOrder/medinceOrder"), }) - }else{ + }else if(order_type == 4 || order_type == 5){ + wx.redirectTo({ + url: '/healthyService/pages/healthyOrderDetail/healthyOrderDetail?order_service_id=' + data.order_no + "&fromType=" + +encodeURIComponent("healthyService/pages/healthyOrder/healthyOrder"), + }) + }else{ wx.redirectTo({ url: '/sugarCheck/pages/checkOrderDetail/checkOrderDetail?order_detection_id='+data.order_no+ "&fromType=" +encodeURIComponent("sugarCheck/pages/checkOrder/checkOrder"), }) @@ -147,6 +151,7 @@ Page({ order_inquiry_id, order_type, order_id, + order_no, order_product_id, order_detection_id, fromType @@ -160,7 +165,11 @@ Page({ wx.redirectTo({ url: '/sugarCheck/pages/checkOrderDetail/checkOrderDetail?order_detection_id=' + order_detection_id + "&fromType=" + fromType, }) - }else { + }else if(order_type == 4 || order_type == 5){ + wx.redirectTo({ + url: '/healthyService/pages/healthyOrderDetail/healthyOrderDetail?order_service_id=' + order_no + "&fromType=" + fromType, + }) + }else { // 订单类型(1:专家问诊 2:快速问诊 3:公益问诊 4:问诊购药) if (inquiry_type == 1) { app.method.navigateTo({ @@ -269,6 +278,24 @@ Page({ order_detection_id }) + }else if(options.order_type==4){//随访包订单 + this.setData({ + order_type: 4, + doctor_id: options.doctor_id, + inquiry_type:options.inquiry_type, + order_no: options.order_no, + chat_id: options.chat_id, + inquiry_mode: options.inquiry_mode + }) + }else if(options.order_type==5){//健康包订单 + this.setData({ + order_type:5, + doctor_id: options.doctor_id, + inquiry_type:options.inquiry_type, + order_no: options.order_no, + chat_id: options.chat_id, + inquiry_mode: options.inquiry_mode + }) }else { //问诊相关 this.setData({ diff --git a/patient/pages/refundMsgList/refundMsgList.js b/patient/pages/refundMsgList/refundMsgList.js index 3c9d917..9aa6584 100644 --- a/patient/pages/refundMsgList/refundMsgList.js +++ b/patient/pages/refundMsgList/refundMsgList.js @@ -93,7 +93,9 @@ Page({ }else if(link_type==13){ url='/patient/pages/prescriptDetail/prescriptDetail?order_prescription_id='+link_params.order_prescription_id - }; + }else if(link_type==15){ + url='/healthyService/pages/healthyOrderDetail/healthyOrderDetail?order_service_id='+link_params.order_no + }; app.method.navigateTo({ url: url, }) diff --git a/patient/pages/sysMsgList/sysMsgList.js b/patient/pages/sysMsgList/sysMsgList.js index 2276e30..cc03531 100644 --- a/patient/pages/sysMsgList/sysMsgList.js +++ b/patient/pages/sysMsgList/sysMsgList.js @@ -92,7 +92,9 @@ Page({ }else if(link_type==13){ url='/patient/pages/prescriptDetail/prescriptDetail?order_prescription_id='+link_params.order_prescription_id - }; + }else if(link_type==15){ + url='/healthyService/pages/healthyOrderDetail/healthyOrderDetail?order_service_id='+link_params.order_no + }; app.method.navigateTo({ url: url, }) diff --git a/patient/pages/writeSick/writeSick.js b/patient/pages/writeSick/writeSick.js index 6b96ca7..d583aab 100644 --- a/patient/pages/writeSick/writeSick.js +++ b/patient/pages/writeSick/writeSick.js @@ -25,6 +25,7 @@ Page({ */ data: { prevData: null, + order_no:'', pathography_id:'', showdialog: false, showAgreeDialog: false, @@ -533,7 +534,8 @@ Page({ }).then((data) => { let { inquiry_no, - order_inquiry_id + order_inquiry_id, + order_no, } = data.data; let { chat_id, @@ -554,6 +556,13 @@ Page({ order_inquiry_id: order_inquiry_id, cancelBtn:true }) + }else if(data.status==3){ + this.setData({ + showdialog:true, + messageTitle:"当前患者存在服务包订单", + order_no:order_no, + cancelBtn:true + }) } @@ -699,6 +708,11 @@ Page({ app.method.navigateTo({ url: '/patient/pages/orderDetail/orderDetail?order_inquiry_id='+ order_inquiry_id, }) + }else if(this.data.messageTitle=="当前患者存在服务包订单"){ + let {order_no}=this.data; + app.method.navigateTo({ + url: '/healthyService/pages/healthyOrderDetail/healthyOrderDetail?order_service_id='+order_no, + }) } }, cancelAlert(){ diff --git a/patient/pages/writeSick/writeSick.wxss b/patient/pages/writeSick/writeSick.wxss index ef5d57d..0a68acd 100644 --- a/patient/pages/writeSick/writeSick.wxss +++ b/patient/pages/writeSick/writeSick.wxss @@ -9,7 +9,7 @@ } .sickHisbox{ display: flex; - height:94rpx; + height:100rpx; align-items: center; margin-bottom: 20rpx; background-color: #fff; diff --git a/patient/static/images.zip b/patient/static/images.zip new file mode 100644 index 0000000..eb92c0c Binary files /dev/null and b/patient/static/images.zip differ diff --git a/patient/static/images/healthy_disable.png b/patient/static/images/healthy_disable.png new file mode 100644 index 0000000..23bd027 Binary files /dev/null and b/patient/static/images/healthy_disable.png differ diff --git a/patient/static/images/healthy_on.png b/patient/static/images/healthy_on.png new file mode 100644 index 0000000..037c809 Binary files /dev/null and b/patient/static/images/healthy_on.png differ diff --git a/patient/static/images/servicePackage.png b/patient/static/images/servicePackage.png new file mode 100644 index 0000000..18b3333 Binary files /dev/null and b/patient/static/images/servicePackage.png differ diff --git a/patient/static/images/suifang_disable.png b/patient/static/images/suifang_disable.png new file mode 100644 index 0000000..11708b9 Binary files /dev/null and b/patient/static/images/suifang_disable.png differ diff --git a/patient/static/images/suifang_on.png b/patient/static/images/suifang_on.png new file mode 100644 index 0000000..ccc6697 Binary files /dev/null and b/patient/static/images/suifang_on.png differ diff --git a/sugarCheck/pages/checkOrderDetail/checkOrderDetail.js b/sugarCheck/pages/checkOrderDetail/checkOrderDetail.js index 7e791f6..36fec21 100644 --- a/sugarCheck/pages/checkOrderDetail/checkOrderDetail.js +++ b/sugarCheck/pages/checkOrderDetail/checkOrderDetail.js @@ -13,6 +13,7 @@ Page({ * 页面的初始数据 */ data: { + order_no:'', time: 30 * 60 * 60 * 1000, showCover:true, isWait:true, @@ -153,7 +154,7 @@ Page({ if(url.indexOf('?')!=-1){ goUrl='/'+url+"&fromType="+url; }else{ - goUrl='/'+url+"?fromType="+url; + goUrl='/sugarCheck/pages/checkOrder/checkOrder' } //处理聊天收到消息不及时; if(url.indexOf("TUIService/pages/index")!=-1){ @@ -227,16 +228,17 @@ Page({ handleCheckInquiry:throttle(function(){ let id=this.data.order.order_detection_id; checkInquiry(id).then(data=>{ + let {order_inquiry_id,order_no}=data.data; console.log(data); if(data.status==1){ this.setData({ - order_inquiry_id:data.data, + order_inquiry_id:order_inquiry_id, }) this.goChat(); }else if(data.status==2){ this.setData({ showCheckDialog:true, - order_inquiry_id:data.data, + order_inquiry_id:order_inquiry_id, checkSatus:2, checkmessage:'当前医生有您待支付的订单,点击“继续”将为您取消订单直接进入报告解读服务。' }) @@ -244,16 +246,23 @@ Page({ this.setData({ checkSatus:3, showCheckDialog:true, - order_inquiry_id:data.data, + order_inquiry_id:order_inquiry_id, checkmessage:'当前医生有您待接诊的订单,点击“继续”将为您取消订单直接进入报告解读服务。' }) }else if(data.status==4){ this.setData({ showCheckDialog:true, checkSatus:4, - order_inquiry_id:data.data, + order_inquiry_id:order_inquiry_id, checkmessage:'当前医生有您接诊中的订单,点击“继续”将为您直接进入报告解读服务。' }) + }else if(data.status==5){ + this.setData({ + showCheckDialog:true, + checkSatus:5, + order_no:order_no, + checkmessage:'存在未支付的服务包订单,点击“继续”将为您直接进入服务包订单详情。' + }) } }) },1000), @@ -471,6 +480,11 @@ confirmCheck:throttle(function(){ this.handelCancelInquiryOrder(); }else if(this.data.checkSatus==4){ this.goChat(); + }else if(this.data.checkSatus==5){ + let {order_no}=this.data; + app.method.navigateTo({ + url: '/healthyService/pages/healthyOrderDetail/healthyOrderDetail?order_service_id='+order_no, + }) } }), handelCancelCheckOrder(flag=true){ @@ -508,7 +522,7 @@ copy(event){ goPay:throttle(function(){ let {order_detection_id,detection_no}=this.data.order; app.method.navigateTo({ - url: '/patient/pages/payOrder/payOrder?inquiry_no='+ detection_no +"&order_detection_id="+order_detection_id+"&order_type=3&fromType="+encodeURIComponent('/sugarCheck/pages/checkOrder/checkOrder') + url: '/patient/pages/payOrder/payOrder?inquiry_no='+ detection_no +"&order_detection_id="+order_detection_id+"&order_type=3&fromType="+encodeURIComponent('sugarCheck/pages/checkOrder/checkOrder') }) }), handelDelProduct(){ diff --git a/utils/request.js b/utils/request.js index c8e75de..dbbc001 100644 --- a/utils/request.js +++ b/utils/request.js @@ -20,7 +20,15 @@ function request(url, method, data, loding = false) { mask: true }) } - let token = wx.getStorageSync('AUTH_TOKEN'); + let token=''; + const { envVersion } = wx.getAccountInfoSync().miniProgram; + if(envVersion=='release'){ + token = wx.getStorageSync('AUTH_TOKEN'); + }else{ + token = wx.getStorageSync('DEV_AUTH_TOKEN'); + + } + if (!token) { let freelist = ["/login/wechat_mobile_login", '/login/mobile_login','/code/phone','/patient/index',"/popup","/sign/im"];//接口白名单 let currentUrl=getCurrentPageUrl(); @@ -53,7 +61,14 @@ function request(url, method, data, loding = false) { var Authorization_token = res.header.Authorization; if (Authorization_token) { - wx.setStorageSync('AUTH_TOKEN', Authorization_token); //当token快过期时,服务器会返回新token,本地刷新 + const { envVersion } = wx.getAccountInfoSync().miniProgram; + if(envVersion=='release'){ + wx.setStorageSync('AUTH_TOKEN', Authorization_token); + }else{ + wx.setStorageSync('DEV_AUTH_TOKEN', Authorization_token); + + } + //当token快过期时,服务器会返回新token,本地刷新 } if (loding) { wx.hideLoading() @@ -90,7 +105,14 @@ function request(url, method, data, loding = false) { }else if (Number(res.data.code) == 401 || Number(res.data.code) == 403 || Number(res.data.code) == 405 || Number(res.data.code) == 406) { let redirectUrl=formatUrl(); if(!isLock){ - wx.setStorageSync('AUTH_TOKEN',''); + const { envVersion } = wx.getAccountInfoSync().miniProgram; + if(envVersion=='release'){ + wx.setStorageSync('AUTH_TOKEN',''); + }else{ + wx.setStorageSync('DEV_AUTH_TOKEN',''); + + } + // wx.setStorageSync('AUTH_TOKEN',''); isLock=true; wx.reLaunch({ url: '/patient/pages/login/login?redirectUrl='+redirectUrl