3.22医生
This commit is contained in:
@@ -11,6 +11,8 @@ Page({
|
||||
},
|
||||
height: app.globalData.height,
|
||||
checked: true,
|
||||
canFree:false,
|
||||
showSetting:false,
|
||||
open_note: "已开启,可在问诊消息中进行接诊",
|
||||
close_note: "已关闭,暂不接收公益问诊",
|
||||
note: "",
|
||||
@@ -44,6 +46,11 @@ Page({
|
||||
|
||||
},
|
||||
onShow(){
|
||||
let doctor_id=wx.getStorageSync('client_user_id_2');
|
||||
console.log(doctor_id);
|
||||
if(doctor_id){
|
||||
this.getService(doctor_id)
|
||||
}
|
||||
let params = {};
|
||||
params.inquiry_type = this.data.inquiry_type;//接诊类型(1:专家问诊 2:快速问诊 3:公益问诊 4:问诊购药)
|
||||
params.inquiry_mode = this.data.inquiry_mode;//接诊方式(1:图文 2:视频 3:语音 4:电话 5:会员)
|
||||
@@ -66,6 +73,21 @@ Page({
|
||||
})
|
||||
}).catch(errors => {console.error(errors);})
|
||||
},
|
||||
getService(id){
|
||||
api.getDoctorService(id).then(response=>{
|
||||
let res=response.data;
|
||||
for (let i = 0; i < res.length; i++) {
|
||||
if(res[i].inquiry_mode==1 && res[i].inquiry_type==3){
|
||||
this.setData({
|
||||
canFree:true
|
||||
})
|
||||
break;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
})
|
||||
},
|
||||
formatAmounts(){
|
||||
let list = this.data.config.system_inquiry_price.map(item => {
|
||||
let it = {};
|
||||
@@ -104,6 +126,13 @@ Page({
|
||||
doChange(detail){
|
||||
let is_open = 0;
|
||||
if(detail){
|
||||
|
||||
if(!this.data.canFree){
|
||||
this.setData({
|
||||
showSetting:true
|
||||
})
|
||||
return false;
|
||||
}
|
||||
wx.vibrateShort({
|
||||
"type": "heavy"
|
||||
})
|
||||
@@ -202,7 +231,20 @@ Page({
|
||||
|
||||
this.putDoctorInquiryConfig()
|
||||
},
|
||||
|
||||
settingcancelDialog(){
|
||||
|
||||
this.setData({
|
||||
showSetting: false
|
||||
})
|
||||
},
|
||||
settingconfirmDialog(){
|
||||
|
||||
this.setData({
|
||||
showSetting: false
|
||||
})
|
||||
app.go("/user/pages/yishi/yizhensetupprice/index")
|
||||
|
||||
},
|
||||
onPickerCancel(e) {
|
||||
const { key } = e.currentTarget.dataset;
|
||||
console.log(e, '取消');
|
||||
|
||||
@@ -28,9 +28,10 @@
|
||||
border="{{true}}"
|
||||
url="/user/pages/yishi/yizhensetupprice/index"
|
||||
>
|
||||
<view class="num">
|
||||
<view class="num" wx:if="{{canFree}}">
|
||||
{{ info.work_num_day }}
|
||||
</view>
|
||||
<view calss="cell_value_seting" wx:else>去设置</view>
|
||||
</van-cell>
|
||||
<view class="price_steup_box_bottom">
|
||||
<van-cell size="large" custom-style="font-size:32rpx;border-radius: 20rpx;"
|
||||
@@ -38,11 +39,11 @@
|
||||
border="{{false}}"
|
||||
url="/user/pages/yishi/yizhensetupprice/index"
|
||||
>
|
||||
<view>
|
||||
<view wx:if="{{canFree}}">
|
||||
<text class="price">{{ amountText }}</text>
|
||||
<text style="color: #000;"> 元</text>
|
||||
</view>
|
||||
|
||||
<view calss="cell_value_seting" wx:else >去设置</view>
|
||||
</van-cell>
|
||||
</view>
|
||||
</view>
|
||||
@@ -88,4 +89,16 @@
|
||||
确定
|
||||
</view>
|
||||
</t-dialog>
|
||||
<t-dialog
|
||||
visible="{{ showSetting }}"
|
||||
title="提示"
|
||||
content="请先设置每日接诊数量和问诊单价"
|
||||
>
|
||||
<view slot="cancel-btn" class="dialog dialog_cancel_btn" bindtap="settingcancelDialog">
|
||||
取消
|
||||
</view>
|
||||
<view slot="confirm-btn" class="dialog dialog_confirm_btn" bindtap="settingconfirmDialog">
|
||||
去设置
|
||||
</view>
|
||||
</t-dialog>
|
||||
</view>
|
||||
@@ -135,4 +135,7 @@ page{
|
||||
.dialog_confirm_btn{
|
||||
border-top: 1px solid #E9E9E9;
|
||||
color: #3CC7C0;
|
||||
}
|
||||
}
|
||||
.cell_value_seting{
|
||||
color: rgba(0,0,0,0.45);
|
||||
}
|
||||
Reference in New Issue
Block a user