This commit is contained in:
haomingming
2023-03-23 15:52:15 +08:00
parent cfa69efd15
commit 12e4984a95
53 changed files with 661 additions and 193 deletions
+20 -25
View File
@@ -36,7 +36,7 @@ Page({
},
onLoad(){
this.setData({ note: this.data.open_note });
},
onShow(){
let params = {};
@@ -49,6 +49,15 @@ Page({
info: response.data.info,
config: response.data.config,
})
}).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);})
},
onChange({ detail }) {
@@ -67,6 +76,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);})
},
@@ -75,29 +93,6 @@ Page({
url: "/Pages/yishi/wenzhen_v2/wenzhen"
})
},
onStepperChange(event) {
console.log(event.detail);
this.setData({
"info.work_num_day": event.detail
});
},
onPriceChange(e){
console.log(e.detail);
let value = e.detail.value;
let min = this.data.config.min_inquiry_price;
let max = this.data.config.max_inquiry_price;
if(value < min){
value = min;
Toast.fail('价格不能低于' + min + '元');
}else if(value >= min && value <=max ){
value = value;
}else{
value = max;
Toast.fail('价格不能高于' + max + '元');
}
this.setData({
"info.inquiry_price": value
})
}
})