优化
This commit is contained in:
@@ -39,7 +39,7 @@ Page({
|
||||
},
|
||||
|
||||
onLoad(){
|
||||
this.setData({ note: this.data.open_note });
|
||||
|
||||
},
|
||||
onShow(){
|
||||
let params = {};
|
||||
@@ -54,6 +54,14 @@ Page({
|
||||
})
|
||||
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);})
|
||||
},
|
||||
formatAmounts(){
|
||||
@@ -91,6 +99,15 @@ Page({
|
||||
params.is_open = detail?1:0;
|
||||
api.putDoctorInquiryOpen(params).then(response => {
|
||||
console.log(response);
|
||||
}).then(()=>{
|
||||
if(detail){
|
||||
wx.requestSubscribeMessage({
|
||||
tmplIds: ['G1RIs0RYqsTQ2CuPQWalIGVet9sd_d371YtDVhfBsFg'],
|
||||
success (res) {
|
||||
console.log(res);//同意授权
|
||||
}
|
||||
})
|
||||
}
|
||||
}).catch(errors => {console.error(errors);})
|
||||
},
|
||||
|
||||
@@ -104,9 +121,6 @@ Page({
|
||||
api.putDoctorInquiryConfig(params).then(response => {
|
||||
console.log(response);
|
||||
Toast.success("修改成功");
|
||||
wx.switchTab({
|
||||
url: "/Pages/yishi/wenzhen_v2/wenzhen"
|
||||
})
|
||||
}).catch(errors => {console.error(errors);})
|
||||
},
|
||||
onStepperChange(event) {
|
||||
@@ -114,6 +128,7 @@ Page({
|
||||
this.setData({
|
||||
"info.work_num_day": event.detail
|
||||
});
|
||||
this.putDoctorInquiryConfig()
|
||||
},
|
||||
|
||||
onAmountPicker() {
|
||||
@@ -135,6 +150,8 @@ Page({
|
||||
[`${key}Text`]: value+' 元',
|
||||
"info.inquiry_price": value[0]
|
||||
});
|
||||
|
||||
this.putDoctorInquiryConfig()
|
||||
},
|
||||
|
||||
onPickerCancel(e) {
|
||||
@@ -145,5 +162,10 @@ Page({
|
||||
[`${key}Visible`]: false,
|
||||
});
|
||||
},
|
||||
|
||||
go(e){
|
||||
let url = e.currentTarget.dataset.url;
|
||||
wx.switchTab({
|
||||
url: url
|
||||
})
|
||||
}
|
||||
})
|
||||
@@ -49,7 +49,7 @@
|
||||
</view>
|
||||
|
||||
<view class="go">
|
||||
<van-button bind:click="putDoctorInquiryConfig" color="#3CC7C0" custom-style="border-radius: 20rpx;font-size:30rpx;" type="primary" block>去接诊</van-button>
|
||||
<van-button color="#3CC7C0" bind:click="go" data-url="/Pages/yishi/wenzhen_v2/wenzhen" custom-style="border-radius: 20rpx;font-size:30rpx;" type="primary" block>去接诊</van-button>
|
||||
</view>
|
||||
|
||||
<t-picker
|
||||
|
||||
@@ -111,4 +111,8 @@ page{
|
||||
transform: translateX(-50%);
|
||||
bottom: 100rpx;
|
||||
width: 90vw;
|
||||
}
|
||||
}
|
||||
|
||||
.t-picker__confirm,.t-class-confirm{
|
||||
color: #49B9AD !important;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user