diff --git a/Pages/index/index.js b/Pages/index/index.js index 9fdfb96..e40eb50 100644 --- a/Pages/index/index.js +++ b/Pages/index/index.js @@ -118,7 +118,13 @@ Page({ app.imLogout(); url = "/Pages/yaoshi/home/home"; } - let token = wx.getStorageSync('AUTH_TOKEN_'+usertype); + let token = ''; + const { envVersion } = wx.getAccountInfoSync().miniProgram; + if(envVersion=='release'){ + token= wx.getStorageSync('AUTH_TOKEN_'+usertype) + }else{ + token= wx.getStorageSync('DEV_AUTH_TOKEN_'+usertype) + } console.log(token); console.log(url); if(token){ diff --git a/Pages/yaoshi/my/my.js b/Pages/yaoshi/my/my.js index 0f2c357..ecb670d 100644 --- a/Pages/yaoshi/my/my.js +++ b/Pages/yaoshi/my/my.js @@ -35,7 +35,14 @@ Page({ success (res) { if (res.confirm) { console.log('用户点击确定') - wx.setStorageSync('AUTH_TOKEN_'+usertype, ""); + //wx.setStorageSync('AUTH_TOKEN_'+usertype, ""); + const { envVersion } = wx.getAccountInfoSync().miniProgram; + if(envVersion=='release'){ + wx.setStorageSync('AUTH_TOKEN_'+usertype, ''); + }else{ + wx.setStorageSync('DEV_AUTH_TOKEN_'+usertype,''); + + } wx.setStorageSync('user_id_'+usertype, ""); wx.setStorageSync('client_user_id_'+usertype, ""); app.globalData.isLogin=false; diff --git a/Pages/yishi/index/index.js b/Pages/yishi/index/index.js index 8bf4f85..5b12cac 100644 --- a/Pages/yishi/index/index.js +++ b/Pages/yishi/index/index.js @@ -268,6 +268,42 @@ Page({ let multi_point_status = response.data.info.multi_point_status; //绑定结算银行卡 let is_bind_bank = response.data.info.is_bind_bank; + api.getDoctorService(response.data.info.doctor_id).then(res=>{ + if(res.code==200){ + let result=res.data; + for (let i = 0; i < result.length; i++) { + if(result[i].inquiry_type=1 && result[i].inquiry_mode==1 && result[i].is_enable==1){ + this.setData({ + 'info.is_img_expert_reception':1 + }) + }else{ + this.setData({ + 'info.is_img_expert_reception':0 + }) + }; + if(result[i].inquiry_type=2 && result[i].is_enable==1){ + this.setData({ + 'info.is_img_quick_reception':1 + }) + }else{ + this.setData({ + 'info.is_img_quick_reception':0 + }) + }; + if(result[i].inquiry_type=3 && result[i].is_enable==1){ + this.setData({ + 'info.is_img_welfare_reception':1 + }) + }else{ + this.setData({ + 'info.is_img_welfare_reception':0 + }) + }; + + } + + } + }) // //是否参加专家图文接诊(0:否 1:是) // let is_img_expert_reception = response.data.info.is_img_expert_reception; // //是否参加专家快速接诊(0:否 1:是) diff --git a/Pages/yishi/index/index.wxml b/Pages/yishi/index/index.wxml index 8a80fec..febfbe1 100644 --- a/Pages/yishi/index/index.wxml +++ b/Pages/yishi/index/index.wxml @@ -115,7 +115,7 @@ 个人简介管理 ! - + { let conversationID = item.conversationID; if(conversationID == "C2Cadministrator") return;//如果是管理员消息直接跳过 let lastMessage = item.lastMessage; let type = lastMessage.type; + let no_inquiry_cancel_time=item.no_inquiry_cancel_time; let userProfile = item.userProfile; if(!lastMessage) return; let cloudCustomData = lastMessage.cloudCustomData; if(!cloudCustomData) return; let cloudCustomDataJson = JSON.parse(cloudCustomData); + // remaining_month_inquiry_count:serviceInfo.remaining_month_inquiry_count, + // service_package_start_time:serviceInfo.start_time, + // service_package_finish_time:serviceInfo.finish_timestart_time, + // service_period:serviceInfo.service_period, + // remaining_quantity:serviceInfo.remaining_quantity, + let remaining_month_inquiry_count=cloudCustomDataJson.remaining_month_inquiry_count; + let service_package_start_time=cloudCustomDataJson.service_package_start_time; + let service_package_finish_time=cloudCustomDataJson.service_package_finish_time; + let remaining_quantity=cloudCustomDataJson.remaining_quantity; + let service_period=cloudCustomDataJson.service_period; + let monthly_frequency=cloudCustomDataJson.monthly_frequency; + let month_inquiry_count=cloudCustomDataJson.month_inquiry_count; let order_inquiry_id = cloudCustomDataJson.order_inquiry_id; if(!order_inquiry_id) return; let inquiry_type = cloudCustomDataJson.inquiry_type; @@ -354,6 +375,15 @@ Page({ txt.Text= lastMessage.messageForShow; session_item.last_message_content = txt; session_item.message_send_time = getTimeAgo(lastMessage.lastTime); + session_item.no_inquiry_cancel_time=no_inquiry_cancel_time; + + session_item.remaining_month_inquiry_count=remaining_month_inquiry_count; + session_item.service_package_start_time=service_package_start_time; + session_item.service_package_finish_time=service_package_finish_time; + session_item.service_period=service_period; + session_item.remaining_quantity=remaining_quantity; + session_item.monthly_frequency= monthly_frequency; + session_item.month_inquiry_count= month_inquiry_count; session_item.message_type = type; session_item.order_inquiry_id = order_inquiry_id; session_item.inquiry_type = inquiry_type; @@ -442,25 +472,33 @@ Page({ } app.go(url); + this.setData({ + isLock: false + }) }, postDoctorInquiry(e){ - this.setData({ - show: false - }) - // console.log("order_inquiry_id: ", e.currentTarget.dataset.order_inquiry_id); - let params = {}; - params.order_inquiry_id = e.currentTarget.dataset.order_inquiry_id; - // console.log("params: ",params) - api.postDoctorInquiry(params).then(response => { - // console.log("开始接诊"); - // console.log(response); - }).then(() => { - console.log(e) - console.log("gochat") - this.goChat(e); - }).catch(errors => { - console.error(errors); - }) + let {isLock}=this.data; + if(!isLock){ + this.setData({ + show: false, + isLock:true + }) + // console.log("order_inquiry_id: ", e.currentTarget.dataset.order_inquiry_id); + let params = {}; + params.order_inquiry_id = e.currentTarget.dataset.order_inquiry_id; + // console.log("params: ",params) + api.postDoctorInquiry(params).then(response => { + // console.log("开始接诊"); + // console.log(response); + }).then(() => { + console.log(e) + console.log("gochat") + this.goChat(e); + }).catch(errors => { + console.error(errors); + }) + } + }, //获取上方角标 getDoctorMessageNotice(e){ @@ -501,6 +539,7 @@ Page({ }) //点击请求数据为0,则重新渲染页面 this.getDoctorInquiryFinishMessage('end'); + } }, vanTabsChange(e){ @@ -538,7 +577,11 @@ Page({ last_page: response.data.last_page }) if(from && response.data.data.length==0){ - this.formatStatus(); + //this.formatStatus(); + + this.onHide(); + this.onShow(); + } // this.selectComponent('#tabs').resize(); }).then(res =>{ diff --git a/Pages/yishi/wenzhen_v2/wenzhen.wxml b/Pages/yishi/wenzhen_v2/wenzhen.wxml index a107d04..636ad7e 100644 --- a/Pages/yishi/wenzhen_v2/wenzhen.wxml +++ b/Pages/yishi/wenzhen_v2/wenzhen.wxml @@ -43,16 +43,34 @@ - {{item.inquiry_mode==1?'图文':item.inquiry_mode==2?'视频':item.inquiry_mode==6?'疑难问诊':item.inquiry_mode==7?'附赠回复':'其他'}} + {{item.inquiry_mode==1?'图文':item.inquiry_mode==2?'视频':item.inquiry_mode==6?'疑难问诊':item.inquiry_mode==7?'附赠回复':item.inquiry_mode==8?'健康包':item.inquiry_mode==9?'随访包':'其他'}} 就诊人: {{item.patient_name}} {{item.patient_sex==1?'男':'女'}}|{{item.patient_age}} - {{item.message_send_time}} + {{ item.inquiry_status==1?'待支付':item.inquiry_status==2?'待分配':item.inquiry_status==3?'待接诊':item.inquiry_status==4?'接诊中':item.inquiry_status==5?'已完成':item.inquiry_status==6?'已结束':item.inquiry_status==7?'已取消':'其他' }} + 服务内容:服务周期{{item.service_period/30}}个月 + + 服务期限:{{item.service_package_start_time}}-{{item.service_package_finish_time}} + 服务进度:不限次数问诊 + 服务进度:当月剩余{{item.remaining_month_inquiry_count}}次问诊 + + 服务内容:{{item.monthly_frequency==='0'?'不限':item.monthly_frequency}}次问诊/月,30盒肝爽颗粒(步长) + + 服务期限:{{item.service_package_start_time}}-{{item.service_package_finish_time}} + 服务进度:当月不限次问诊 + 当月剩余{{item.remaining_month_inquiry_count}}次问诊,剩余{{item.remaining_quantity}}盒干爽颗粒(步长) + + + + + {{item.custommessagetype==13?'[附赠回复]':item.last_message_content.Text}} - {{ item.inquiry_status==1?'待支付':item.inquiry_status==2?'待分配':item.inquiry_status==3?'待接诊':item.inquiry_status==4?'接诊中':item.inquiry_status==5?'已完成':item.inquiry_status==6?'已结束':item.inquiry_status==7?'已取消':'其他' }} + + {{item.message_send_time}} + 查看病历 - 不接诊5分钟后自动取消 - 不接诊24小时后自动取消 + 不接诊{{no_inquiry_cancel_time}}分钟{{item.no_inquiry_cancel_time/60}}小时后自动取消 + 不接诊{{no_inquiry_cancel_time}}分钟{{item.no_inquiry_cancel_time/60}}小时后自动取消 + 不接诊{{no_inquiry_cancel_time}}分钟{{item.no_inquiry_cancel_time/60}}小时后自动取消 @@ -207,7 +226,8 @@ 问诊已结束 - {{ item.inquiry_type==1?'专家问诊':item.inquiry_type==2?'快速问诊':item.inquiry_type==3?'公益问诊':item.inquiry_type==4?'问诊购药':item.inquiry_type==5?'糖组检测':'其他' }} + + {{ (item.inquiry_type==1 && item.inquiry_mode==1)?'在线问诊-图文':(item.inquiry_type==1 && item.inquiry_mode==2)?'在线问诊-视频':(item.inquiry_type==1 && item.inquiry_mode==6)?'疑难问诊':(item.inquiry_type==1 && item.inquiry_mode==7)?'附赠回复':(item.inquiry_type==1 && item.inquiry_mode==8)?'健康包':(item.inquiry_type==1 && item.inquiry_mode==9)?'随访包':item.inquiry_type==2?'快速问诊':item.inquiry_type==3?'公益问诊':item.inquiry_type==4?'问诊购药':item.inquiry_type==5?'糖组检测':'其他' }} 不接诊24小时后自动取消 diff --git a/Pages/yishi/wenzhen_v2/wenzhen.wxss b/Pages/yishi/wenzhen_v2/wenzhen.wxss index bca92af..348f1a6 100644 --- a/Pages/yishi/wenzhen_v2/wenzhen.wxss +++ b/Pages/yishi/wenzhen_v2/wenzhen.wxss @@ -82,7 +82,8 @@ page{ } .date{ font-size: 30rpx; - color: #999; + color: #FA541C; + } .content_2{ background-color: #FAFAFA; @@ -98,7 +99,7 @@ page{ } .status{ font-size: 26rpx; - color: #FA541C; + color: #999; flex: 1; } .status_end{ @@ -175,4 +176,15 @@ page{ } .parallelogram.yinan.parallelogram::before{ background:#ffb700; +} +.parallelogram.healthy.parallelogram::before{ + background:#ff5d6a; +} +.parallelogram.visit.parallelogram::before{ + background:#03b5e3; +} +.desc{ + margin: 0 30rpx 10rpx; + font-size: 28rpx; +color: #000000; } \ No newline at end of file diff --git a/TUIChatService/TUIKit/components/TUIChat/components/MessageInput/index.js b/TUIChatService/TUIKit/components/TUIChat/components/MessageInput/index.js index 8a7108a..68177e4 100644 --- a/TUIChatService/TUIKit/components/TUIChat/components/MessageInput/index.js +++ b/TUIChatService/TUIKit/components/TUIChat/components/MessageInput/index.js @@ -48,6 +48,15 @@ Component({ }); }, }, + serviceInfo:{ + type: Object, + value:{}, + observer(val){ + this.setData({ + serviceInfo:val + }); + } + }, videoInfo:{ type: Object, value:{}, @@ -101,12 +110,14 @@ Component({ * 组件的初始数据 */ data: { + textFocus:false, conversation: {}, message: '', showRound:false, video_dialog_visible:false, showTalk:false, videoInfo:{}, + serviceInfo:{}, baseInfo:{}, family_id:'', patient_user_id:'', @@ -237,7 +248,7 @@ Component({ let cach_message_rounds = this.data.message_rounds message_rounds = cach_message_rounds>message_rounds?cach_message_rounds:message_rounds - + let {serviceInfo}=this.data; const mycloudCustomData = JSON.stringify({ order_inquiry_id: this.data.order_inquiry_id, inquiry_type: this.data.inquiry_type, @@ -245,6 +256,13 @@ Component({ message_type: 0, is_system: 0, message_rounds: message_rounds, + 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, + remaining_quantity:serviceInfo.remaining_quantity, + monthly_frequency:serviceInfo.monthly_frequency, patient_family_data: patient_family_data }); @@ -317,7 +335,21 @@ this.setData({ }) wx.setStorageSync('words', ""); } - + wx.hideKeyboard(); + //let THIS=this; + // wx.getSystemInfo({ + // success: function(res) { + // let platform = res.platform; + // if (platform === 'ios') { + // setTimeout(()=>{ + // THIS.setData({ + // textFocus: true, + // }); + // }) + // } + // } + // }); + // console.log("pageLifetimes show") let _this = this wx.getNetworkType({ @@ -331,6 +363,7 @@ this.setData({ }, hide: function () { + wx.hideKeyboard(); let THIS=this; if(THIS.data.isRecording){ THIS.handleTouchEnd() @@ -796,7 +829,7 @@ this.setData({ let cach_message_rounds = this.data.message_rounds message_rounds = cach_message_rounds>message_rounds?cach_message_rounds:message_rounds - + let {serviceInfo}=this.data; const mycloudCustomData = JSON.stringify({ order_inquiry_id: this.data.order_inquiry_id, inquiry_type: this.data.inquiry_type, @@ -804,6 +837,13 @@ this.setData({ message_type: 0, is_system: 0, message_rounds: message_rounds, + 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, + remaining_quantity:serviceInfo.remaining_quantity, + monthly_frequency:serviceInfo.monthly_frequency, patient_family_data: patient_family_data }); @@ -1215,7 +1255,7 @@ this.setData({ const to = this.getToAccount(); const text = flag ? msg : this.data.message; - + let {serviceInfo}=this.data; const { FEAT_NATIVE_CODE } = constant; const mycloudCustomData = JSON.stringify({ order_inquiry_id: this.data.order_inquiry_id, @@ -1224,6 +1264,13 @@ this.setData({ message_type: 0, is_system: 0, message_rounds: message_rounds, + 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, + remaining_quantity:serviceInfo.remaining_quantity, + monthly_frequency:serviceInfo.monthly_frequency, patient_family_data: patient_family_data }); @@ -1318,9 +1365,13 @@ this.setData({ }, // 监听是否获取焦点,有焦点则向父级传值,动态改变input组件的高度。 inputBindFocus(event) { - this.setData({ - focus: true, - }); + //let {height}= event.detail; + // console.log(height); + // if(height==0){ + // this.setData({ + // textFocus: true, + // }); + // } // this.getMessageList(this.data.conversation); this.triggerEvent('pullKeysBoards', { event, diff --git a/TUIChatService/TUIKit/components/TUIChat/components/MessageInput/index.wxml b/TUIChatService/TUIKit/components/TUIChat/components/MessageInput/index.wxml index da7bb5e..d206d3a 100644 --- a/TUIChatService/TUIKit/components/TUIChat/components/MessageInput/index.wxml +++ b/TUIChatService/TUIKit/components/TUIChat/components/MessageInput/index.wxml @@ -11,8 +11,8 @@ src="{{isAudio ? '../../../../static/assets/keyboard.svg' : '../../../../static/assets/audio.svg'}}" /> - + diff --git a/user/commpents/textarea-cell/index.wxss b/user/commpents/textarea-cell/index.wxss index e7c0253..d149498 100644 --- a/user/commpents/textarea-cell/index.wxss +++ b/user/commpents/textarea-cell/index.wxss @@ -74,4 +74,5 @@ color: #FF0000; letter-spacing: 3rpx; font-weight: 600; + word-break:break-all; } \ No newline at end of file diff --git a/user/pages/login/index.js b/user/pages/login/index.js index 785a152..52ea1a4 100644 --- a/user/pages/login/index.js +++ b/user/pages/login/index.js @@ -25,25 +25,27 @@ Page({ }, onShow(){ let usertype = wx.getStorageSync('usertype'); + if(!usertype){ + wx.redirectTo({ + url: "/Pages/index/index" + }) + }; this.setData({ beforeClose: this.data.beforeClose.bind(this), }) - if(!usertype){ - wx.navigateTo({ - url: "/Pages/index/index" - }) - }; + }, onLoad(){ let usertype = wx.getStorageSync('usertype'); + if(!usertype){ + wx.redirectTo({ + url: "/Pages/index/index" + }) + }; this.setData({ beforeClose: this.data.beforeClose.bind(this), }) - if(!usertype){ - wx.navigateTo({ - url: "/Pages/index/index" - }) - }; + wx.getPrivacySetting({ success: res => { console.log(res) // 返回结果为: res = { needAuthorization: true/false, privacyContractName: '《xxx隐私保护指引》' } @@ -143,8 +145,15 @@ Page({ wx_code: res.code } api.wechatMobileLogin(params).then(response => { - console.log(response); - wx.setStorageSync('AUTH_TOKEN_'+usertype, response.data.token); + // console.log(response); + const { envVersion } = wx.getAccountInfoSync().miniProgram; + if(envVersion=='release'){ + wx.setStorageSync('AUTH_TOKEN_'+usertype, response.data.token); + }else{ + wx.setStorageSync('DEV_AUTH_TOKEN_'+usertype, response.data.token); + + } + wx.setStorageSync('user_id_'+usertype, response.data.user_id); wx.setStorageSync('client_user_id_'+usertype, response.data.client_user_id); app.globalData.config.userID = response.data.user_id; diff --git a/user/pages/mobile_login/index.js b/user/pages/mobile_login/index.js index 591c8e1..4f74db7 100644 --- a/user/pages/mobile_login/index.js +++ b/user/pages/mobile_login/index.js @@ -138,8 +138,14 @@ Page({ api.mobileLogin(params).then(response => { app.globalData.isLogin=true; - console.log(response); - wx.setStorageSync('AUTH_TOKEN_'+usertype, response.data.token); + const { envVersion } = wx.getAccountInfoSync().miniProgram; + if(envVersion=='release'){ + wx.setStorageSync('AUTH_TOKEN_'+usertype, response.data.token); + }else{ + wx.setStorageSync('DEV_AUTH_TOKEN_'+usertype, response.data.token); + + } + // wx.setStorageSync('AUTH_TOKEN_'+usertype, response.data.token); wx.setStorageSync('user_id_'+usertype, response.data.user_id); wx.setStorageSync('client_user_id_'+usertype, response.data.client_user_id); app.globalData.config.userID = response.data.user_id; diff --git a/user/pages/yaoshi/my/my.js b/user/pages/yaoshi/my/my.js index 5e700c3..6ee6c16 100644 --- a/user/pages/yaoshi/my/my.js +++ b/user/pages/yaoshi/my/my.js @@ -35,7 +35,13 @@ Page({ success (res) { if (res.confirm) { console.log('用户点击确定') - wx.setStorageSync('AUTH_TOKEN_'+usertype, ""); + const { envVersion } = wx.getAccountInfoSync().miniProgram; + if(envVersion=='release'){ + wx.setStorageSync('AUTH_TOKEN_'+usertype, ''); + }else{ + wx.setStorageSync('DEV_AUTH_TOKEN_'+usertype, ''); + } + // wx.setStorageSync('AUTH_TOKEN_'+usertype, ""); wx.setStorageSync('user_id_'+usertype, ""); wx.setStorageSync('client_user_id_'+usertype, ""); app.globalData.isLogin=false; diff --git a/user/pages/yishi/addServiceContent/index.js b/user/pages/yishi/addServiceContent/index.js new file mode 100644 index 0000000..e9f6b1b --- /dev/null +++ b/user/pages/yishi/addServiceContent/index.js @@ -0,0 +1,309 @@ +// user/pages/yishi/addServiceContent/index.js +import { API } from '../../../../utils/network/api' +let api = new API() +const app = getApp() +Page({ + + /** + * 页面的初始数据 + */ + data: { + navbarData: { + showCapsule: 1, //是否显示左上角图标 1表示显示 0表示不显示 + title: '添加服务内容', //导航栏 中间的标题 + + }, + tuwenPrice:'', + cycle_columns:['1个月', '3个月', '6个月', '12个月'], + service_columns:['10次','不限次'], + showCycle:false, + showServiceNumber:false, + monthly_frequency:'', + isAdd:false, + service_rounds:0, + cur_id:'', + onePrice:null, + threePrice:null, + sixPrice:null, + yearPrice:null, + static_host: api.getStaticHost(), + items:[{ + service_period:'', + service_price:'' + }] + }, + openCycle(event){ + let {id} =event.currentTarget.dataset; + console.log(id); + this.setData({ + showCycle:true, + cur_id:id, + }) + }, + + confirmCycle(event){ + const { picker, value, index} = event.detail; + let {items,cur_id}=this.data; + + let obj='items['+cur_id+'].service_period'; + let day=null; + if(index==0){ + day=30 + }else if(index==1){ + day=90 + }else if(index==2){ + day=180 + }else if(index==3){ + day=360 + } + for (let index = 0; index < items.length; index++) { + if(items[index].service_period==day){ + wx.showToast({ + title: '此服务周期不能重复设置', + icon:'none' + }) + return false + }; + + } + this.setData({ + showCycle:false, + [obj]:day + }) + + }, + changeIpt(event){ + let {value}=event.detail; + let {id}=event.currentTarget.dataset; + console.log(id); + let obj='items['+id+'].service_price'; + this.setData({ + [obj]:value + }) + + }, + delService(event){ + let {items}=this.data; + let {id} =event.currentTarget.dataset; + items.splice(id,1) + this.setData({ + items + }) + }, + handle(){ + this.data.isAdd?this.addService():this.editService(); + }, + addServiceArr(){ + + this.setData({ + items:this.data.items.concat({ + service_period:'' , + service_price:'' + }) + }) + }, + cancelCycle(){ + this.setData({ + showCycle:false + }) + }, + getService(){ + api.getFollow().then(response=>{ + if(response.code==200){ + if(response.data){ + let {monthly_frequency,service_rounds,items}=response.data + this.setData({ + monthly_frequency, + service_rounds, + isAdd:false + }) + }else{ + this.setData({ + isAdd:true + }) + } + } + }) + }, + addService(){ + let {monthly_frequency,service_rounds,items}=this.data; + if(!monthly_frequency && monthly_frequency===''){ + wx.showToast({ + title: '请选择服务次数', + icon:'none' + }) + return false + }; + for (let i = 0; i < items.length; i++) { + if(!items[i].service_period){ + wx.showToast({ + title: '请选择第'+(i+1)+'个的服务周期', + icon:'none' + }) + return false + } + if(!items[i].service_price){ + wx.showToast({ + title: '请设置第'+(i+1)+'个的服务价格', + icon:'none' + }) + return false + } + } + api.postFollow({ + monthly_frequency, + service_rounds, + items + }).then(response=>{ + if(response.code==200){ + wx.showToast({ + title: '保存成功', + icon:'none' + }) + wx.navigateBack() + } + }) + }, + editService(){ + let {monthly_frequency,service_rounds,items}=this.data; + if(!monthly_frequency && monthly_frequency!=0){ + wx.showToast({ + title: '请选择服务次数', + icon:'none' + }) + return false + }; + for (let i = 0; i < items.length; i++) { + if(!items[i].service_period){ + wx.showToast({ + title: '请选择第'+(i+1)+'个的服务周期', + icon:'none' + }) + return false + } + if(!items[i].service_price){ + wx.showToast({ + title: '请设置第'+(i+1)+'个的服务价格', + icon:'none' + }) + return false + } + } + api.editFollow({ + monthly_frequency, + service_rounds, + items + }).then(response=>{ + if(response.code==200){ + wx.showToast({ + title: '修改成功', + }); + wx.navigateBack() + } + }) +}, +getFollowDetail(){ + let type=wx.getStorageSync('usertype'); + let id=wx.getStorageSync('client_user_id_'+type); + api.getFollowDetail(id).then(response=>{ + if(response.code==200){ + if(response.data){ + let res=response.data.map((item)=>{ + return {service_period:item.service_period,service_price:item.service_price} + }) + this.setData({ + items:res?res:[] + }) + console.log(this.data.items) + } + } + }) +}, + openServiceNumber(){ + this.setData({ + showServiceNumber:true + }) + }, + confirmServiceNumber(event){ + const { picker, value, index } = event.detail; + + this.setData({ + showServiceNumber:false, + monthly_frequency:index==0?10:'0' + }) + }, + cancelServiceNumber(){ + this.setData({ + showServiceNumber:false + }) + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + this.setData({ + iden_auth_status:options.iden_auth_status, + idcard_status:options.idcard_status, + is_bind_bank:options.is_bind_bank, + tuwenPrice:options.tuwenPrice, + onePrice:options.tuwenPrice?(options.tuwenPrice*10*0.5).toFixed(2):0, + threePrice:options.tuwenPrice?(options.tuwenPrice*30*0.4).toFixed(2):0, + sixPrice:options.tuwenPrice?(options.tuwenPrice*60*0.3).toFixed(2):0, + yearPrice:options.tuwenPrice?(options.tuwenPrice*120*0.2).toFixed(2):0, + + }) + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + this.getService(); + let {idcard_status,iden_auth_status,is_bind_bank}=this.data; + if(idcard_status==1 && iden_auth_status==1 && is_bind_bank==1){ + this.getFollowDetail(); + } + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/user/pages/yishi/addServiceContent/index.json b/user/pages/yishi/addServiceContent/index.json new file mode 100644 index 0000000..24d3fd7 --- /dev/null +++ b/user/pages/yishi/addServiceContent/index.json @@ -0,0 +1,10 @@ +{ + "usingComponents": { + "te-nav-bar": "../../../../commpents/te_navbar/index", + "van-field": "@vant/weapp/field/index", + "van-icon": "@vant/weapp/icon/index", + "van-picker": "@vant/weapp/picker/index", + "van-popup": "@vant/weapp/popup/index", + "van-button": "@vant/weapp/button/index" + } +} \ No newline at end of file diff --git a/user/pages/yishi/addServiceContent/index.wxml b/user/pages/yishi/addServiceContent/index.wxml new file mode 100644 index 0000000..6644502 --- /dev/null +++ b/user/pages/yishi/addServiceContent/index.wxml @@ -0,0 +1,71 @@ + + + + + + 服务次数/月 + + 请选择服务次数 + {{monthly_frequency==='0'?'不限次数':'10次'}} + + + + + + 服务回合数 + + + 不限制 + + + + + + + 服务内容 + + + 服务周期 + + {{item.service_period/30}}个月 + 请选择周期 + + + + + 服务价格 + + + + + + + 建议服务价格设置为:{{(item.service_period/30)==1?'¥'+onePrice:(item.service_period/30)==3?'¥'+threePrice:(item.service_period/30)==6?'¥'+sixPrice:(item.service_period/30)==12?'¥'+yearPrice:'单次图文*10次*0.5'}} + + + + + + +继续添加服务内容 + + +保存 + + + + + + \ No newline at end of file diff --git a/user/pages/yishi/addServiceContent/index.wxss b/user/pages/yishi/addServiceContent/index.wxss new file mode 100644 index 0000000..0834702 --- /dev/null +++ b/user/pages/yishi/addServiceContent/index.wxss @@ -0,0 +1,215 @@ +page { + background-color: #F6F6F6; +} + +.page { + overflow: hidden; + display: flex; + flex-direction: column; +} + +.title { + width: 90vw; + margin: 0 auto 20rpx; + font-weight: 550; + font-size: 32rpx; + color: rgba(0, 0, 0, 0.85); +} + +.checked_box { + margin-top: 30rpx; +} + +.price_title { + width: 90vw; + margin: 20rpx auto 0 auto; + font-size: 32rpx; + margin-bottom: 20rpx; + /* font-family: "AlibabaPuHuiTi-2-55-Regular"; */ + color: #333333; +} + +.price_steup_box { + display: flex; + width: 90vw; + height: 180rpx; + margin: 0 auto 20rpx; + border-radius: 20rpx; + flex-direction: column; + background-color: rgb(255, 255, 255); +} + +.price_steup_box_top { + position: relative; + display: flex; + justify-content: space-between; + margin: 20rpx 20rpx 20rpx 30rpx; + align-items: center; + padding-bottom: 30rpx; +} + +.price_steup_box_bottom { + position: relative; + display: flex; + justify-content: space-between; + margin: 0rpx 20rpx 0rpx 30rpx; + align-items: center; +} + +.price_steup_box_top_title, +.price_steup_box_bottom_title { + flex: 1; + font-size: 32rpx; + color: #333; +} + +.price { + text-align: right !important; + font-size: 28rpx; +} + +.price_steup_box_bottom_num { + flex: 1.5; + display: flex; + justify-content: flex-end; + text-align: right; + align-items: center; +} + +.ipt { + font-size: 28rpx; + color: #E34D59; +} + +.unit { + font-size: 28rpx; +} + +.price_steup_box_top::after { + position: absolute; + box-sizing: border-box; + content: ' '; + pointer-events: none; + right: 0; + left: 0; + bottom: 0; + border-bottom: 1px solid var(--td-cell-border-color, var(--td-gray-color-3, #e7e7e7)); + transform: scaleY(0.5); +} + +.price_steup_box_top_stepper { + display: flex; + text-align: right; + align-items: center; +} + +.bottom { + width: 90vw; + margin: -20rpx auto; + color: #999; + letter-spacing: 2rpx; + font-size: 28rpx; + line-height: 40rpx; +} + +.go { + position: fixed; + left: 50%; + transform: translateX(-50%); + bottom: 100rpx; + width: 90vw; +} + +.weui-input { + color: red; + display: inline-block; + text-align: right; +} + +.price { + text-align: center; + flex: 1; +} + +.green { + color: #3CC7C0; +} + +.tips { + margin: 15rpx 30rpx; + margin-right: 0; + font-weight: 400; + font-size: 24rpx; + display: flex; + justify-content: space-between; + color: #E34D59; +} + +.continueadd { + + font-size: 30rpx; + color: #3CC7C0; + display: flex; + align-items: center; + justify-content: center; + width: 90vw; + height: 80rpx; + margin: 80rpx auto 0; + background: rgba(44, 241, 248, 0.28); + border-radius: 8rpx; +} + +.btn { + bottom: 60rpx; + position: fixed; + font-size: 32rpx; + color: #fff; + display: flex; + align-items: center; + justify-content: center; + width: 90vw; + left: 50%; + transform: translate(-50%); + height: 80rpx; + margin: 160rpx auto 0; + background: #3CC7C0; + border-radius: 8rpx; +} + +.van-picker__cancel { + font-size: 32rpx !important; + color: rgba(0, 0, 0, 0.6) !important; +} + +.van-picker__confirm { + font-size: 32rpx !important; + color: #3CC7C0 !important; +} + +.van-picker__title { + font-size: 32rpx !important; +} + +.van-picker__toolbar { + border-bottom: .5px solid #E7E7E7; +} + +.amount.nodata { + font-size: 28rpx; + color: rgba(0, 0, 0, 0.45); +} + +.vontent { + flex: 1; + margin-bottom: 150rpx; + overflow-y: scroll; +} + +.del_img { + width: 160rpx; + height: 64rpx; +} + +.advice_price { + margin-top: 10rpx; +} \ No newline at end of file diff --git a/user/pages/yishi/cash/index.js b/user/pages/yishi/cash/index.js index 68cb098..d5a483b 100644 --- a/user/pages/yishi/cash/index.js +++ b/user/pages/yishi/cash/index.js @@ -23,11 +23,13 @@ Page({ sub_visible: false, skeleton_loading: true, order_inquiry_ids: [], + order_nos:[], sub_btn_disabled: false }, onLoad(option){ let order_inquiry_ids = option.order_inquiry_ids; let params = {}; + console.log(order_inquiry_ids) if(order_inquiry_ids){ params.order_inquiry_ids = order_inquiry_ids; this.setData({ @@ -93,7 +95,7 @@ Page({ bank_card_code_mask: response.data.bank.bank_card_code_mask, withdrawal_amount: response.data.withdrawal_amount, amount_total:response.data.amount_total, - order_inquiry_ids: response.data.order_inquiry_ids, + order_nos:response.data.order_nos, bank_card_name: response.data.bank.bank_card_name_mask, income_tax: response.data.income_tax, skeleton_loading: false @@ -109,7 +111,7 @@ Page({ sub_btn_disabled: true }) let params = {}; - params.order_inquiry_id = this.data.order_inquiry_ids.join(","); + params.order_no = this.data.order_nos.join(","); params.withdrawal_amount_total = this.data.withdrawal_amount; params.bank_card_id = this.data.bank_card_id; //获取提现数据 diff --git a/user/pages/yishi/identity/index.js b/user/pages/yishi/identity/index.js index fa78eae..3667b1a 100644 --- a/user/pages/yishi/identity/index.js +++ b/user/pages/yishi/identity/index.js @@ -354,7 +354,7 @@ Page({ console.log("idcard: ", idcard); realname = realname.replace(/•/g,"·"); var realname_reg= /^(([a-zA-Z+\.?\·?a-zA-Z+]{2,30}$)|([\u4e00-\u9fa5+\·?\u4e00-\u9fa5+]{2,30}$))/; - var idcard_reg=/^(^[1-9]\d{5}[1-9]\d{3}(((0[2])([0|1|2][0-8])|(([0-1][1|4|6|9])([0|1|2][0-9]|[3][0]))|(((0[1|3|5|7|8])|(1[0|2]))(([0|1|2]\d)|3[0-1]))))((\d{4})|\d{3}[Xx])$)$/; + var idcard_reg=/^(?:1[1-5]|2[1-3]|3[1-7]|4[1-6]|5[0-4]|6[1-5])\d{4}(?:1[89]|20)\d{2}(?:0[1-9]|1[0-2])(?:0[1-9]|[12]\d|3[01])\d{3}[\dxX]$/; //判断用户输入的真实姓名是否为空 if(realname.length == 0){ diff --git a/user/pages/yishi/kuaisusetup/index.js b/user/pages/yishi/kuaisusetup/index.js index 4763933..eb30b4f 100644 --- a/user/pages/yishi/kuaisusetup/index.js +++ b/user/pages/yishi/kuaisusetup/index.js @@ -48,10 +48,48 @@ Page({ api.getDoctorInquiryConfig(params).then(response => { console.log(response); this.setData({ - info: response.data.info, - config: response.data.config, + 'info.inquiry_price': response.data.inquiry_price, + 'info.work_num_day': response.data.work_num_day }) }).then(re => { + // let is_open = this.data.info.is_open; + // let note = this.data.note; + // if(is_open == 1) note = this.data.open_note; + // if(is_open == 0) note = this.data.close_note; + // this.setData({ + // note: note + // }) + + }).catch(errors => {console.error(errors);}) + this.getSysconfig() + this.getDoctorOpen(); + }, + getSysconfig(){ + let {inquiry_type,inquiry_mode}=this.data; + api.getSysconfig({ + inquiry_type, + inquiry_mode + }).then(response => { + console.log(response); + this.setData({ + 'config': response.data + // config: response.data.config, + // note: response.data.info.is_open == 1? this.data.open_note : this.data.close_note + }) + + }).catch(errors => {console.error(errors);}) + +}, +getDoctorOpen(){ + let {inquiry_type,inquiry_mode}=this.data; + api.getOpen({ + inquiry_type, + inquiry_mode + }).then(response => { + this.setData({ + note: response.data, + 'info.is_open': response.data + }) let is_open = this.data.info.is_open; let note = this.data.note; if(is_open == 1) note = this.data.open_note; @@ -59,7 +97,6 @@ Page({ this.setData({ note: note }) - }).catch(errors => {console.error(errors);}) }, changeON(){ diff --git a/user/pages/yishi/kuaisusetup/index.wxml b/user/pages/yishi/kuaisusetup/index.wxml index 2a73959..2ddb585 100644 --- a/user/pages/yishi/kuaisusetup/index.wxml +++ b/user/pages/yishi/kuaisusetup/index.wxml @@ -26,7 +26,7 @@ 问诊单价 - +  元 diff --git a/user/pages/yishi/myaccount/index.wxml b/user/pages/yishi/myaccount/index.wxml index 5aa946d..c31e6f5 100644 --- a/user/pages/yishi/myaccount/index.wxml +++ b/user/pages/yishi/myaccount/index.wxml @@ -26,7 +26,7 @@ ¥{{doctor_today_inquiry_total}} - 已完成待入账 + 待入账 ¥{{doctor_day_completed_amount_total}} @@ -69,7 +69,8 @@ 1、账户余额表示未提现的所有已经结束的订单金额总和 2、今日接诊收入表示今日已经接诊的订单金额总和 - 3、已完成待入账表示近期已完成未结束的订单金额总和 + 3、待入账表示单次问诊已完成未结束的订单金额总和+健康包/随访包服务开始后的订单金额总和 + 确定 diff --git a/user/pages/yishi/myinfo/index.js b/user/pages/yishi/myinfo/index.js index a377c86..9df9b0e 100644 --- a/user/pages/yishi/myinfo/index.js +++ b/user/pages/yishi/myinfo/index.js @@ -51,7 +51,13 @@ Page({ if (res.confirm) { console.log('用户点击确定') let usertype = wx.getStorageSync('usertype'); - wx.setStorageSync('AUTH_TOKEN_'+usertype, ""); + const { envVersion } = wx.getAccountInfoSync().miniProgram; + if(envVersion=='release'){ + wx.setStorageSync('AUTH_TOKEN_'+usertype, ''); + }else{ + wx.setStorageSync('DEV_AUTH_TOKEN_'+usertype, ''); + } + // wx.setStorageSync('AUTH_TOKEN_'+usertype, ""); wx.setStorageSync('user_id_'+usertype, ""); wx.setStorageSync('client_user_id_'+usertype, ""); diff --git a/user/pages/yishi/onlinechufang/index.js b/user/pages/yishi/onlinechufang/index.js index 37de07e..3713a16 100644 --- a/user/pages/yishi/onlinechufang/index.js +++ b/user/pages/yishi/onlinechufang/index.js @@ -462,6 +462,7 @@ Page({ save_durg_prescription_product_num = Number.parseInt(save_durg_prescription_product_num) console.log(save_durg_prescription_product_num) if(isNaN(save_durg_prescription_product_num)){ + wx.hideKeyboard(); Dialog.alert({ message: '请输入正确数字', }).then(() => { @@ -473,6 +474,7 @@ Page({ } let prescription_num=this.data.prescription_num?this.data.prescription_num:5 if(save_durg_prescription_product_num > prescription_num){ + wx.hideKeyboard(); Dialog.alert({ message: '药品数量不允许添加超过'+prescription_num+'个', }).then(() => { diff --git a/user/pages/yishi/onlinesetup/index.js b/user/pages/yishi/onlinesetup/index.js index 34c3cd2..93778b2 100644 --- a/user/pages/yishi/onlinesetup/index.js +++ b/user/pages/yishi/onlinesetup/index.js @@ -14,9 +14,13 @@ Page({ // open_note: "已开启,患者可以向您发起图文问诊", // close_note: "已关闭,暂不接诊", note: "", + tuwenPrice:'', inquiry_type: 1, inquiry_mode: 1, + monthly_frequency:'', + multi_point_status:'', config_setting:{}, + items:[], info:{ is_open: false, inquiry_price: 0, @@ -24,6 +28,7 @@ Page({ }, active:0, myprice: "", + healthPrice:'图文价格*0.5*6', config:{ "max_work_num_day": 30, "min_inquiry_price": 0, @@ -39,18 +44,71 @@ Page({ }, sub_visible: false, showSetting:false, - difficultSetting:false + difficultSetting:false, + showOpenchuFang:false, + showOpenTuWen:false, }, - onLoad(){ + onLoad(options){ + console.log(options.multi_point_status); + this.setData({ + multi_point_status:options.multi_point_status, + iden_auth_status:options.iden_auth_status, + idcard_status:options.idcard_status, + is_bind_bank:options.is_bind_bank + }) + }, + cancelOpenChuFang(){ + this.setData({ + showOpenchuFang:false + }) + }, + confirmOpenChuFang(){ + this.setData({ + showOpenchuFang:false + }) + app.go('/user/pages/yishi/zhiye_identity/index') + }, + cancelOpenTuWen(){ + this.setData({ + showOpenTuWen:false + }) + }, + confirmOpenTuWen(){ + this.setData({ + showOpenTuWen:false, + active:0 + }) }, onShow(){ - let {active}=this.data; + let {active,idcard_status,iden_auth_status,is_bind_bank}=this.data; this.getDoctorconfig(); - if(active==2){ + this.getDoctorOpen(); + this.getSysconfig(); + if(active==4){ this.getConfig() } + if(active==1){ + this.getFollow(); + if(idcard_status==1 && iden_auth_status==1 && is_bind_bank==1){ + this.getFollowDetail(); + } + } }, + + getDoctorOpen(){ + let {inquiry_type,inquiry_mode}=this.data; + api.getOpen({ + inquiry_type, + inquiry_mode + }).then(response => { + this.setData({ + note: response.data, + 'info.is_open': response.data + }) + }).catch(errors => {console.error(errors);}) + }, + getDoctorconfig(){ let {inquiry_type,inquiry_mode}=this.data; //接诊类型(1:专家问诊 2:快速问诊 3:公益问诊 4:问诊购药) @@ -62,10 +120,16 @@ Page({ }).then(response => { console.log(response); this.setData({ - info: response.data.info, - config: response.data.config, - note: response.data.info.is_open + 'info.inquiry_price': response.data.inquiry_price, + 'info.work_num_day': response.data.work_num_day, + // config: response.data.config, + // note: response.data.info.is_open }) + if(inquiry_mode==1){ + this.setData({ + tuwenPrice:response.data.inquiry_price + }) + } }).catch(errors => {console.error(errors);}) }, changeON(){ @@ -82,12 +146,10 @@ Page({ onChange({ detail }) { this.doChange(detail) }, + getConfig(){ - let {inquiry_type,inquiry_mode}=this.data; - api.getServiceConfig({ - inquiry_type, - inquiry_mode - }).then(response => { + // let {inquiry_type,inquiry_mode}=this.data; + api.getServiceConfig().then(response => { let result=response.data; if(result){ this.setData({ @@ -95,7 +157,7 @@ Page({ 'config_setting.service_process':result.service_process, 'config_setting.service_period':result.service_period, 'config_setting.service_rounds':result.service_rounds, - 'config_setting.config_service_id':result.config_service_id, + 'config_setting.config_service_id':result.difficult_consultation_id, difficultSetting:true }) }else{ @@ -105,7 +167,11 @@ Page({ } }).catch(errors => {console.error(errors);}) }, - doChange(detail){ + addServiceContent(){ + let {idcard_status,iden_auth_status,is_bind_bank,tuwenPrice}=this.data; + app.go('/user/pages/yishi/addServiceContent/index?idcard_status='+idcard_status+'&iden_auth_status='+iden_auth_status+'&is_bind_bank='+is_bind_bank+"&tuwenPrice="+tuwenPrice) + }, + async doChange(detail){ console.log("onChange: ", detail); let is_open = 0; if(detail){ @@ -114,15 +180,40 @@ Page({ if(this.data.active==0){ let check = this.checkPrice(inquiry_price); if(!check) return; - } + }; if(this.data.active==1 && detail){ + if(this.data.items.length==0){ + wx.showToast({ + title: '请先添加服务内容', + icon:'none' + }) + return false + } + } + if(this.data.active==2 && detail){ + let {data}=await api.getDoctorInquiryConfig({inquiry_type:1,inquiry_mode:1}); + if(data.inquiry_price==''){ + this.setData({ + showOpenTuWen:true + }) + return false + } + if(this.data.multi_point_status!=1){ + this.setData({ + showOpenchuFang:true + }) + return false + } + }; + + if(this.data.active==3 && detail){ wx.showToast({ title: '即将开通', icon:'none', }) return false } - if(this.data.active==1 || this.data.active==2){ + if(this.data.active==3 || this.data.active==4){ if(!this.data.info.work_num_day || !this.data.info.inquiry_price){ this.setData({ showSetting:true @@ -130,7 +221,7 @@ Page({ return false; } } - if(this.data.active==2){ + if(this.data.active==4){ if(!this.data.difficultSetting){ wx.showToast({ title: '请先设置服务设置', @@ -206,15 +297,17 @@ Page({ }) if(active==0){ app.go("/user/pages/yishi/onlinesetupprice/index?inquiry_mode=1") - }else if(active==1){ + }else if(active==3){ app.go("/user/pages/yishi/onlinesetupprice/index?inquiry_mode=2") - }else if(active==2){ + }else if(active==4){ app.go("/user/pages/yishi/onlinesetupprice/index?inquiry_mode=6") } }, + onChangeInquiry(event) { let index=event.detail.name; + let {idcard_status,iden_auth_status,is_bind_bank}=this.data; this.setData({ active:index }) @@ -224,11 +317,27 @@ Page({ inquiry_mode:1, }) }else if(index==1){ + this.setData({ + inquiry_type:1, + inquiry_mode:9, + }) + this.getFollow(); + if(idcard_status==1 && iden_auth_status==1 && is_bind_bank==1){ + this.getFollowDetail(); + } + + }else if(index==2){ + this.setData({ + inquiry_type:1, + inquiry_mode:8, + }) + this.getHealthy() + }else if(index==3){ this.setData({ inquiry_type:1, inquiry_mode:2, }) - }else{ + }else if(index==4){ this.setData({ inquiry_type:1, inquiry_mode:6, @@ -236,6 +345,38 @@ Page({ this.getConfig(); } this.getDoctorconfig(); + this.getDoctorOpen(); + this.getSysconfig(); + }, + getFollowDetail(){ + let type=wx.getStorageSync('usertype'); + let id=wx.getStorageSync('client_user_id_'+type); + api.getFollowDetail(id).then(response=>{ + if(response.code==200){ + if(response.data){ + let res=response.data.map((item)=>{ + return {service_period:item.service_period,service_price:item.service_price} + }) + res.sort((a, b) =>a.service_period-b.service_period); + this.setData({ + items:res + }) + } + } + }) +}, + getFollow(){ + api.getFollow().then(response=>{ + if(response.code==200){ + if(response.data){ + let {monthly_frequency,service_rounds}=response.data + this.setData({ + monthly_frequency, + service_rounds + }) + } + } + }) }, putDoctorInquiryConfig(){ //修改医生问诊配置 @@ -257,6 +398,27 @@ Page({ }) }, + getHealthy(){ + api.getHealthy().then(response => { + this.setData({ + healthPrice:(response.data.inquiry_price*response.data.service_rate/100*response.data.service_count).toFixed(2) + }) + }).catch(errors => {console.error(errors);}) + }, + getSysconfig(){ + let {inquiry_type,inquiry_mode}=this.data; + api.getSysconfig({ + inquiry_type, + inquiry_mode + }).then(response => { + this.setData({ + 'config': response.data + // config: response.data.config, + // note: response.data.info.is_open == 1? this.data.open_note : this.data.close_note + }) + }).catch(errors => {console.error(errors);}) + +}, myToast(message){ Toast({ context: this, diff --git a/user/pages/yishi/onlinesetup/index.json b/user/pages/yishi/onlinesetup/index.json index 6267a60..a145196 100644 --- a/user/pages/yishi/onlinesetup/index.json +++ b/user/pages/yishi/onlinesetup/index.json @@ -9,6 +9,7 @@ "van-button": "@vant/weapp/button/index", "t-toast": "tdesign-miniprogram/toast/toast", "van-tab": "@vant/weapp/tab/index", + "van-icon": "@vant/weapp/icon/index", "van-tabs": "@vant/weapp/tabs/index", "t-dialog": "tdesign-miniprogram/dialog/dialog" } diff --git a/user/pages/yishi/onlinesetup/index.wxml b/user/pages/yishi/onlinesetup/index.wxml index 38c4979..398db80 100644 --- a/user/pages/yishi/onlinesetup/index.wxml +++ b/user/pages/yishi/onlinesetup/index.wxml @@ -2,7 +2,6 @@ - @@ -23,15 +22,17 @@ 价格设置 - + {{info.work_num_day}} + 请选择每日接诊数量 - - + + {{info.inquiry_price}} + 请选择单价 @@ -46,6 +47,137 @@ 去接诊 + + + + + + + + 接诊开关 + + + + + {{ (info.is_open==1 && active==1)?'已开启,患者可以向您发起随访包服务':'已关闭,暂不接诊' }} + + + + + + + + + 服务次数/月 + + 请选择服务次数 + {{monthly_frequency==="0"?'不限次数':'10次'}} + + + + + + 服务回合数 + + + 不限制 + + + + + + + 服务内容 + + + 服务周期 + + {{item.service_period/30}}个月 + 请选择周期 + + + + + 服务价格 + + + + + + + + + + + + + + + 添加服务内容 + + + + + + + + + 接诊开关 + + + + + {{ (info.is_open==1 && active==2)?'已开启,患者可以向您发起健康包服务':'已关闭,暂不接诊' }} + + + + + + + + 服务价格 + + + + + + + + + 提示:开通此服务需通过多点执业认证 + + + + 去接诊 + + @@ -56,7 +188,7 @@ - {{ (info.is_open==1&& active==1)?'已开启,患者可以向您发起视频问诊':'已关闭,暂不接诊'}} + {{ (info.is_open==1 && active==3)?'已开启,患者可以向您发起视频问诊':'已关闭,暂不接诊'}} @@ -67,15 +199,17 @@ 价格设置 - + {{info.work_num_day}} + 请选择每日接诊数量 - + {{info.inquiry_price}} + 请选择问诊单价 @@ -111,7 +245,7 @@ - {{ (info.is_open==1 && active==2)?'已开启,患者可以向您发起疑难会诊':'已关闭,暂不接诊'}} + {{ (info.is_open==1 && active==4)?'已开启,患者可以向您发起疑难会诊':'已关闭,暂不接诊'}} @@ -217,4 +351,26 @@ 去设置 + + + 取消 + + + 前往 + + + + + 取消 + + + 前往 + + \ No newline at end of file diff --git a/user/pages/yishi/onlinesetup/index.wxss b/user/pages/yishi/onlinesetup/index.wxss index a57dd61..f14ce81 100644 --- a/user/pages/yishi/onlinesetup/index.wxss +++ b/user/pages/yishi/onlinesetup/index.wxss @@ -65,11 +65,12 @@ page{ padding-top: 10rpx; display: flex; width: 90vw; - margin: 0 auto; + margin: 0 auto 20rpx; border-radius: 20rpx; flex-direction: column; background-color: rgb(255, 255, 255); } + .price_steup_box_top{ position: relative; display: flex; @@ -139,6 +140,8 @@ page{ color: #000; } .cell_value_seting{ + + white-space: nowrap; color: rgba(0,0,0,0.45); } .dialog{ @@ -174,3 +177,49 @@ page{ .green{ color:#3CC7C0; } +.pricebox .van-cell:after{ + border-bottom: none!important; +} +.desc{ + width: 90vw; + font-size: 28rpx; + color: rgba(0,0,0,0.65); + margin: 20rpx auto 0 auto; +} +.healthPrice{ + font-size: 28rpx; + color: #E34D59; +} +.unit{ + color: #333; +} +.cell_value_heal{ + display: flex; + align-items: center; +} +.tips{ +margin:15rpx 30rpx; +font-weight: 400; +font-size: 24rpx; +display: flex; +justify-content: space-between; +color: #E34D59; +} +.checked_box .title{ + width:90vw; + font-weight: 550; + font-size: 32rpx; + color: rgba(0,0,0,0.85); + margin:20rpx auto 20rpx; +} +.ipt{ + font-size: 28rpx; + text-align: right; + color: #E34D59; + } + .unit{ + font-size: 28rpx; + } + .nodata{ + color: #999999; + } \ No newline at end of file diff --git a/user/pages/yishi/onlinesetupprice/index.js b/user/pages/yishi/onlinesetupprice/index.js index d6ae576..a2e50f3 100644 --- a/user/pages/yishi/onlinesetupprice/index.js +++ b/user/pages/yishi/onlinesetupprice/index.js @@ -46,11 +46,36 @@ Page({ api.getDoctorInquiryConfig(params).then(response => { console.log(response); this.setData({ - info: response.data.info, - config: response.data.config, - note: response.data.info.is_open == 1? this.data.open_note : this.data.close_note + 'info.inquiry_price': response.data.inquiry_price, + 'info.work_num_day': response.data.work_num_day, + // config: response.data.config, + // note: response.data.info.is_open == 1? this.data.open_note : this.data.close_note }) + this.getSysconfig(); }).catch(errors => {console.error(errors);}) + + }, + getSysconfig(){ + let {inquiry_type,inquiry_mode,info}=this.data; + api.getSysconfig({ + inquiry_type, + inquiry_mode + }).then(response => { + console.log(response); + this.setData({ + 'config': response.data + // config: response.data.config, + // note: response.data.info.is_open == 1? this.data.open_note : this.data.close_note + }); + + if(info.work_num_day===''){ + + this.setData({ + 'info.work_num_day':response.data.default_work_num_day + }) + } + }).catch(errors => {console.error(errors);}) + }, onStepperChange(event) { console.log(event.detail); diff --git a/user/pages/yishi/orderdetail/index.js b/user/pages/yishi/orderdetail/index.js index 5422e4b..42ed820 100644 --- a/user/pages/yishi/orderdetail/index.js +++ b/user/pages/yishi/orderdetail/index.js @@ -4,6 +4,15 @@ const api = new API() const app = getApp() Page({ data: { + active:1, + tabList:[{ + id:1, + name:'问诊订单' + },{ + id:2, + name:'服务包订单' + }], + navbarData: { showCapsule: 1, //是否显示左上角图标 1表示显示 0表示不显示 title: '收益明细 ', //导航栏 中间的标题 @@ -28,25 +37,38 @@ Page({ this.setData({ date: date }) + this.getDoctorAccountInfo(); }, onHide(){ - this.setData({ - list: [], - date: "", - current_page: 0, - total: 0, - per_page: 0, - last_page: 0 - }) + // this.setData({ + // list: [], + // date: "", + // current_page: 0, + // total: 0, + // per_page: 0, + // last_page: 0 + // }) }, onShow(){ - this.getDoctorAccountInfo(); + // if(this.data.date){ + // this.getDoctorAccountInfo(); + // } + + }, + switchTab(e){ + let {id}=e.currentTarget.dataset; + this.setData({ + active:id, + }) }, getDoctorAccountInfo(){ let list = this.data.list let params = {}; params.page = this.data.current_page + 1; params.date = this.data.date; + + //1:问诊订单 2:药品订单 3:检测订单 4:随访包订单 5:健康包订单) + params.per_page=10; api.getDoctorAccountInfo(params).then(response => { console.log(response); this.setData({ diff --git a/user/pages/yishi/orderdetail/index.wxml b/user/pages/yishi/orderdetail/index.wxml index da7e5b5..e263c31 100644 --- a/user/pages/yishi/orderdetail/index.wxml +++ b/user/pages/yishi/orderdetail/index.wxml @@ -1,21 +1,29 @@ + - {{ item.inquiry_type==1 && item.inquiry_mode==1?'在线问诊-图文':item.inquiry_type==1 && item.inquiry_mode==2?'在线问诊-视频':item.inquiry_type==1 && item.inquiry_mode==6?'疑难会诊':item.inquiry_type==2?'快速问诊':item.inquiry_type==3?'公益问诊':item.inquiry_type==4?'问诊购药':'其他' }} + {{ (item.inquiry_type==1 && item.inquiry_mode==1)?'在线问诊-图文':item.inquiry_type==1 && item.inquiry_mode==2?'在线问诊-视频':item.inquiry_type==1 && item.inquiry_mode==6?'疑难会诊':(item.inquiry_type==1 && item.inquiry_mode==8)?'健康包':(item.inquiry_type==1 && item.inquiry_mode==9)?'随访包':item.inquiry_type==2?'快速问诊':item.inquiry_type==3?'公益问诊':item.inquiry_type==4?'问诊购药':item.order_type==4?'随访包':item.order_type==5? '健康包':'其他' }} {{ item.entry_status==1?'入账中':item.entry_status==2?'入账成功':item.entry_status==3?'入账失败':'未知' }} - 订单编号:{{item.inquiry_no}} + 订单编号:{{item.order_no}} 就诊患者:{{item.patient_name}}({{item.patient_sex==1?'男':'女'}},{{item.patient_age}}岁) - 接诊时间:{{item.reception_time}} + {{(item.order_type==4 || item.order_type==5)?'开始时间':'问诊时间'}}:{{item.start_time}} 结束时间:{{item.finish_time}} 订单金额:¥{{item.amount_total}} - 预计收入:¥{{item.estimate_income}} + + 预计入账: +        入账:¥{{item.estimate_income}} +        原因:¥{{item.cancel_remarks}} + diff --git a/user/pages/yishi/orderdetail/index.wxss b/user/pages/yishi/orderdetail/index.wxss index 09759f0..8343baa 100644 --- a/user/pages/yishi/orderdetail/index.wxss +++ b/user/pages/yishi/orderdetail/index.wxss @@ -79,3 +79,29 @@ page{ align-items: center; font-size: 30rpx; } +.tabbox{ + display: flex; + height: 100rpx; + background-color: #fff; + border-bottom: 1rpx solid #E5E5E5; +} +.tabbox .tab:first-child::after{ + right:0; + top:26rpx; + width:rpx; + content:'|'; + position:absolute; + color:#E5E5E5; + + font-size: 32rpx; +} +.tabbox .tab{ + position: relative; + display: flex; + justify-content: center; + align-items: center; + flex:1; +} +.tabbox .tab.active{ + color: #3CC7C0; +} \ No newline at end of file diff --git a/user/pages/yishi/wenzhenorderV2/index.js b/user/pages/yishi/wenzhenorderV2/index.js index a944c28..0211c01 100644 --- a/user/pages/yishi/wenzhenorderV2/index.js +++ b/user/pages/yishi/wenzhenorderV2/index.js @@ -106,6 +106,7 @@ Page({ app.go("/user/pages/yishi/cash/index?order_inquiry_ids="+order_inquiry_ids); }, goback(){ + wx.navigateBack() }, onLoad(options){ diff --git a/user/pages/yishi/wenzhenorderV2/index.wxml b/user/pages/yishi/wenzhenorderV2/index.wxml index 27ba2ba..93eaca2 100644 --- a/user/pages/yishi/wenzhenorderV2/index.wxml +++ b/user/pages/yishi/wenzhenorderV2/index.wxml @@ -1,18 +1,20 @@ + + - {{item.inquiry_type==1 && item.inquiry_mode==1?'在线问诊-图文':item.inquiry_type==1 && item.inquiry_mode==2?'在线问诊-视频':item.inquiry_type==1 && item.inquiry_mode==6?'疑难会诊':item.inquiry_type==2?'快速问诊':item.inquiry_type==3?'公益问诊':item.inquiry_type==4?'问诊购药':item.inquiry_type==5?'糖组检测':'未知'}} + {{item.inquiry_type==1 && item.inquiry_mode==1?'在线问诊-图文':item.inquiry_type==1 && item.inquiry_mode==2?'在线问诊-视频':item.inquiry_type==1 && item.inquiry_mode==6?'疑难会诊':item.inquiry_type==1 && item.inquiry_mode==8?'健康包':item.inquiry_type==1 && item.inquiry_mode==9?'随访包':item.inquiry_type==2?'快速问诊':item.inquiry_type==3?'公益问诊':item.inquiry_type==4?'问诊购药':item.inquiry_type==5?'糖组检测':item.inquiry_type==4?'问诊购药':item.order_type==4?'随访包':item.order_type==5? '健康包':'其他'}} - 订单编号:{{item.inquiry_no }} + 订单编号:{{item.order_no}} 就诊患者:{{item.patient_name}}({{item.patient_sex==1?'男':'女'}},{{item.patient_age}}岁) - 接诊时间:{{item.reception_time}} + 接诊时间:{{item.start_time}} 结束时间:{{item.finish_time}} 订单金额:¥{{item.amount_total}} - 入账入账{{item.amount_total}}*0.75元 + 入账入账:{{filter.countMoney(item.amount_total)}}元 diff --git a/user/pages/yishi/yizhensetup/index.js b/user/pages/yishi/yizhensetup/index.js index 33a664d..02dd0eb 100644 --- a/user/pages/yishi/yizhensetup/index.js +++ b/user/pages/yishi/yizhensetup/index.js @@ -11,7 +11,6 @@ Page({ }, height: app.globalData.height, checked: true, - canFree:false, showSetting:false, open_note: "已开启,可在问诊消息中进行接诊", close_note: "已关闭,暂不接收公益问诊", @@ -46,8 +45,9 @@ Page({ }, onShow(){ + this.getDoctorOpen() let doctor_id=wx.getStorageSync('client_user_id_2'); - console.log(doctor_id); + if(doctor_id){ this.getService(doctor_id) } @@ -58,12 +58,33 @@ Page({ api.getDoctorInquiryConfig(params).then(response => { console.log(response); this.setData({ - info: response.data.info, - config: response.data.config, + 'info.inquiry_price': response.data.inquiry_price, + 'info.work_num_day': response.data.work_num_day + // config: response.data.config, }) - this.formatAmounts(); - this.formatAmountValue(); + // this.formatAmounts(); + // this.formatAmountValue(); }).then(re =>{ + // let is_open = this.data.info.is_open; + // let note = this.data.note; + // if(is_open == 1) note = this.data.open_note; + // if(is_open == 0) note = this.data.close_note; + // this.setData({ + // note: note + // }) + }).catch(errors => {console.error(errors);}) + this.getSysconfig(); + }, + getDoctorOpen(){ + let {inquiry_type,inquiry_mode}=this.data; + api.getOpen({ + inquiry_type, + inquiry_mode + }).then(response => { + this.setData({ + note: response.data, + 'info.is_open': response.data + }) let is_open = this.data.info.is_open; let note = this.data.note; if(is_open == 1) note = this.data.open_note; @@ -108,6 +129,23 @@ Page({ amountText: val }) }, + getSysconfig(){ + let {inquiry_type,inquiry_mode}=this.data; + api.getSysconfig({ + inquiry_type, + inquiry_mode + }).then(response => { + console.log(response); + this.setData({ + 'config': response.data + // config: response.data.config, + // note: response.data.info.is_open == 1? this.data.open_note : this.data.close_note + }) + this.formatAmounts(); + this.formatAmountValue(); + }).catch(errors => {console.error(errors);}) + +}, changeON(){ let is_open = this.data.info.is_open console.log("changeON:", is_open) diff --git a/user/pages/yishi/yizhensetup/index.wxml b/user/pages/yishi/yizhensetup/index.wxml index eaf02c5..c648d1d 100644 --- a/user/pages/yishi/yizhensetup/index.wxml +++ b/user/pages/yishi/yizhensetup/index.wxml @@ -28,7 +28,7 @@ border="{{true}}" url="/user/pages/yishi/yizhensetupprice/index" > - + {{ info.work_num_day }} 去设置 @@ -39,7 +39,7 @@ border="{{false}}" url="/user/pages/yishi/yizhensetupprice/index" > - + {{ amountText }} diff --git a/user/pages/yishi/yizhensetupprice/index.js b/user/pages/yishi/yizhensetupprice/index.js index fe8b253..73d43c0 100644 --- a/user/pages/yishi/yizhensetupprice/index.js +++ b/user/pages/yishi/yizhensetupprice/index.js @@ -48,21 +48,47 @@ Page({ api.getDoctorInquiryConfig(params).then(response => { console.log(response); this.setData({ - info: response.data.info, - config: response.data.config, + 'info.inquiry_price': response.data.inquiry_price, + 'info.work_num_day': response.data.work_num_day + // config: response.data.config, }) - this.formatAmounts(); - this.formatAmountValue(); + // this.formatAmounts(); + // this.formatAmountValue(); }).then(re =>{ - let is_open = this.data.info.is_open; - let note = this.data.note; - if(is_open == 1) note = this.data.open_note; - if(is_open == 0) note = this.data.close_note; - this.setData({ - note: note - }) + // let is_open = this.data.info.is_open; + // let note = this.data.note; + // if(is_open == 1) note = this.data.open_note; + // if(is_open == 0) note = this.data.close_note; + // this.setData({ + // note: note + // }) + this.getSysconfig() }).catch(errors => {console.error(errors);}) + }, + getSysconfig(){ + let {inquiry_type,inquiry_mode,info}=this.data; + api.getSysconfig({ + inquiry_type, + inquiry_mode + }).then(response => { + console.log(response); + this.setData({ + 'config': response.data + // config: response.data.config, + // note: response.data.info.is_open == 1? this.data.open_note : this.data.close_note + }) + + if(info.work_num_day===''){ + this.setData({ + 'info.work_num_day':response.data.default_work_num_day + }) + } + this.formatAmounts(); + this.formatAmountValue(); + }).catch(errors => {console.error(errors);}) + +}, formatAmounts(){ let list = this.data.config.system_inquiry_price.map(item => { let it = {}; diff --git a/user/pages/yishi/yizhensetupprice/index.wxml b/user/pages/yishi/yizhensetupprice/index.wxml index 0aa7c5f..b68b9cd 100644 --- a/user/pages/yishi/yizhensetupprice/index.wxml +++ b/user/pages/yishi/yizhensetupprice/index.wxml @@ -1,4 +1,5 @@ + diff --git a/utils/network/api.js b/utils/network/api.js index 7962c98..544fe77 100644 --- a/utils/network/api.js +++ b/utils/network/api.js @@ -912,7 +912,7 @@ getJob() {//获取职业 } getServiceConfig(params) {//获取医生问诊配置-服务设置 return this.request({ - url: `${this.baseUrl}/doctor/inquiry/config/service`, + url: `${this.baseUrl}/doctor/inquiry/config/difficult`, method: 'GET', data: { ...params @@ -922,7 +922,7 @@ getServiceConfig(params) {//获取医生问诊配置-服务设置 postServiceConfig(params) {//新增医生问诊配置-服务设置 return this.request({ - url: `${this.baseUrl}/doctor/inquiry/config/service`, + url: `${this.baseUrl}/doctor/inquiry/config/difficult`, method: 'POST', data: { ...params @@ -931,7 +931,7 @@ postServiceConfig(params) {//新增医生问诊配置-服务设置 } putServiceConfig(params,id) {//修改医生问诊配置-服务设置 return this.request({ - url: `${this.baseUrl}/doctor/inquiry/config/service/${id}`, + url: `${this.baseUrl}/doctor/inquiry/config/difficult/${id}`, method: 'PUT', data: { ...params @@ -1005,13 +1005,79 @@ postServiceConfig(params) {//新增医生问诊配置-服务设置 method: 'GET' }) } - getDoctorService(params){ + getDoctorService(params){//获取开通服务 return this.request({ url: `${this.baseUrl}/doctor/inquiry/service/${params}`, method: 'GET' }) } + getOpen(params){//获取医生问诊服务开启状态 + return this.request({ + url: `${this.baseUrl}/doctor/inquiry/config/open`, + method: 'GET', + data: { + ...params + } + }) + } + + getSysconfig(params){ + return this.request({//获取系统问诊配置 + url: `${this.baseUrl}/system/inquiry/config`, + method: 'GET', + data: { + ...params + } + }) + } + getFollow(params){ + return this.request({//获取医生问诊配置-随访包 + url: `${this.baseUrl}/doctor/inquiry/config/follow`, + method: 'GET', + data: { + ...params + } + }) + } + + postFollow(params){ + return this.request({//新增医生问诊配置-随访包 + url: `${this.baseUrl}/doctor/inquiry/config/follow`, + method: 'POST', + data: { + ...params + } + }) + } + getFollowDetail(id){ + return this.request({//获取医生问诊配置-随访包-明细 + url: `${this.baseUrl}/doctor/inquiry/service/follow/item/${id}`, + method: 'GET' + }) + } + editFollow(params){ + return this.request({//修改医生问诊配置-随访包 + url: `${this.baseUrl}/doctor/inquiry/config/follow`, + method: 'PUT', + data: { + ...params + } + }) + } + getHealthy(){ + return this.request({//获取医生问诊配置-健康包 + url: `${this.baseUrl}/doctor/inquiry/config/health`, + method: 'GET' + }) + } + serviceChatMsg(id){ + return this.request({//获取服务包关联问诊订单消息内页基础数据 + url: `${this.baseUrl}/im/inquiry/basic/service/${id}`, + method: 'GET' + }) + } + } export { API } diff --git a/utils/network/request.js b/utils/network/request.js index d54573d..f14fdd2 100644 --- a/utils/network/request.js +++ b/utils/network/request.js @@ -28,19 +28,32 @@ class HTTP { _request(url, resolve, reject, data = {}, method = 'GET', contentType = 'application/json', showLoading = true) { if(showLoading) wx.showLoading(); let usertype = wx.getStorageSync('usertype'); + let token=''; + const { envVersion } = wx.getAccountInfoSync().miniProgram; + if(envVersion=='release'){ + token= wx.getStorageSync('AUTH_TOKEN_'+usertype) + }else{ + token= wx.getStorageSync('DEV_AUTH_TOKEN_'+usertype) + } wx.request({ url: url, method: method, data: data, header: { 'content-type': contentType, - 'Authorization': "Bearer " + wx.getStorageSync('AUTH_TOKEN_'+usertype) + 'Authorization': "Bearer " + token }, success: (res) => { // console.log("header Authorization: ", res.header.Authorization); var Authorization_token = res.header.Authorization; if(Authorization_token){ - wx.setStorageSync('AUTH_TOKEN_'+usertype, Authorization_token);//当token快过期时,服务器会返回新token,本地刷新 + const { envVersion } = wx.getAccountInfoSync().miniProgram; + if(envVersion=='release'){ + wx.setStorageSync('AUTH_TOKEN_'+usertype, Authorization_token);//当token快过期时,服务器会返回新token,本地刷新 + }else{ + wx.setStorageSync('DEV_AUTH_TOKEN_'+usertype, Authorization_token);//当token快过期时,服务器会返回新token,本地刷新 + } + } if (res.data) { const code = res.data.code;