4.7提交
This commit is contained in:
@@ -11,7 +11,6 @@ Page({
|
||||
},
|
||||
height: app.globalData.height,
|
||||
checked: true,
|
||||
canFree:false,
|
||||
showSetting:false,
|
||||
open_note: "已开启,可在问诊消息中进行接诊",
|
||||
close_note: "已关闭,暂不接收公益问诊",
|
||||
@@ -46,11 +45,12 @@ Page({
|
||||
|
||||
},
|
||||
onShow(){
|
||||
let doctor_id=wx.getStorageSync('client_user_id_2');
|
||||
console.log(doctor_id);
|
||||
if(doctor_id){
|
||||
this.getService(doctor_id)
|
||||
}
|
||||
this.getDoctorOpen()
|
||||
// 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:会员)
|
||||
@@ -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)
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
border="{{true}}"
|
||||
url="/user/pages/yishi/yizhensetupprice/index"
|
||||
>
|
||||
<view class="num" wx:if="{{canFree}}">
|
||||
<view class="num" wx:if="{{info.work_num_day}}">
|
||||
{{ info.work_num_day }}
|
||||
</view>
|
||||
<view calss="cell_value_seting" wx:else>去设置</view>
|
||||
@@ -39,7 +39,7 @@
|
||||
border="{{false}}"
|
||||
url="/user/pages/yishi/yizhensetupprice/index"
|
||||
>
|
||||
<view wx:if="{{canFree}}">
|
||||
<view wx:if="{{info.inquiry_price}}">
|
||||
<text class="price">{{ amountText }}</text>
|
||||
<text style="color: #000;"> 元</text>
|
||||
</view>
|
||||
|
||||
Reference in New Issue
Block a user