扩大问诊开关的点击区域
This commit is contained in:
parent
bd97a69fb4
commit
70dca249c3
@ -62,17 +62,34 @@ Page({
|
||||
|
||||
}).catch(errors => {console.error(errors);})
|
||||
},
|
||||
changeON(){
|
||||
let is_open = this.data.info.is_open
|
||||
console.log("changeON:", is_open)
|
||||
let detail = false
|
||||
if(is_open == 0){
|
||||
detail = true
|
||||
}else{
|
||||
detail = false
|
||||
}
|
||||
this.doChange(detail)
|
||||
},
|
||||
onChange({ detail }) {
|
||||
console.log("onChange: ", detail);
|
||||
this.doChange(detail)
|
||||
},
|
||||
doChange(detail){
|
||||
let is_open = 0;
|
||||
if(detail){
|
||||
this.setData({ note: this.data.open_note });
|
||||
wx.vibrateShort({
|
||||
"type": "heavy"
|
||||
})
|
||||
is_open = 1
|
||||
}else{
|
||||
this.setData({ note: this.data.close_note });
|
||||
is_open = 0
|
||||
}
|
||||
this.setData({ "info.is_open": detail });
|
||||
this.setData({ "info.is_open": is_open });
|
||||
|
||||
//修改开关
|
||||
let params = {};
|
||||
|
||||
@ -2,15 +2,15 @@
|
||||
<view class="container">
|
||||
<view class="switch_box">
|
||||
<view class="switch_box_top">
|
||||
<view class="switch_box_item">
|
||||
<view class="switch_box_item" bindtap="changeON">
|
||||
<view class="switch_box_item_name">接诊开关</view>
|
||||
<view class="switch_box_item_btn">
|
||||
<van-switch
|
||||
active-color="#3CC7C0"
|
||||
inactive-color="#E7E7E7"
|
||||
size="40rpx"
|
||||
checked="{{ info.is_open==1 }}"
|
||||
bind:change="onChange" />
|
||||
checked="{{ info.is_open==1 }}"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="switch_box_note">{{ note }}</view>
|
||||
|
||||
@ -54,8 +54,23 @@ Page({
|
||||
})
|
||||
}).catch(errors => {console.error(errors);})
|
||||
},
|
||||
changeON(){
|
||||
let is_open = this.data.info.is_open
|
||||
console.log("changeON:", is_open)
|
||||
let detail = false
|
||||
if(is_open == 0){
|
||||
detail = true
|
||||
}else{
|
||||
detail = false
|
||||
}
|
||||
this.doChange(detail)
|
||||
},
|
||||
onChange({ detail }) {
|
||||
this.doChange(detail)
|
||||
},
|
||||
doChange(detail){
|
||||
console.log("onChange: ", detail);
|
||||
let is_open = 0;
|
||||
if(detail){
|
||||
let inquiry_price = this.data.info.inquiry_price;
|
||||
let check = this.checkPrice(inquiry_price);
|
||||
@ -64,10 +79,12 @@ Page({
|
||||
wx.vibrateShort({
|
||||
"type": "heavy"
|
||||
})
|
||||
is_open = 1
|
||||
}else{
|
||||
this.setData({ note: this.data.close_note });
|
||||
is_open = 0
|
||||
}
|
||||
this.setData({ "info.is_open": detail });
|
||||
this.setData({ "info.is_open": is_open });
|
||||
|
||||
//修改开关
|
||||
let params = {};
|
||||
|
||||
@ -2,15 +2,14 @@
|
||||
<view class="container">
|
||||
<view class="switch_box">
|
||||
<view class="switch_box_top">
|
||||
<view class="switch_box_item">
|
||||
<view class="switch_box_item" bindtap="changeON">
|
||||
<view class="switch_box_item_name">接诊开关</view>
|
||||
<view class="switch_box_item_btn">
|
||||
<van-switch
|
||||
active-color="#3CC7C0"
|
||||
inactive-color="#E7E7E7"
|
||||
size="40rpx"
|
||||
checked="{{ info.is_open==1 }}"
|
||||
bind:change="onChange" />
|
||||
checked="{{ info.is_open==1 }}" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="switch_box_note">{{ note }}</view>
|
||||
|
||||
@ -85,20 +85,37 @@ Page({
|
||||
amountText: val
|
||||
})
|
||||
},
|
||||
changeON(){
|
||||
let is_open = this.data.info.is_open
|
||||
console.log("changeON:", is_open)
|
||||
let detail = false
|
||||
if(is_open == 0){
|
||||
detail = true
|
||||
}else{
|
||||
detail = false
|
||||
}
|
||||
this.doChange(detail)
|
||||
},
|
||||
onChange({ detail }) {
|
||||
console.log("onChange: ", detail);
|
||||
|
||||
if(detail){
|
||||
wx.vibrateShort({
|
||||
"type": "heavy"
|
||||
})
|
||||
}
|
||||
//修改开关
|
||||
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:会员)
|
||||
params.is_open = detail?1:0;
|
||||
api.putDoctorInquiryOpen(params).then(response => {
|
||||
this.doChange(detail)
|
||||
},
|
||||
doChange(detail){
|
||||
let is_open = 0;
|
||||
if(detail){
|
||||
wx.vibrateShort({
|
||||
"type": "heavy"
|
||||
})
|
||||
is_open = 1;
|
||||
}else{
|
||||
is_open = 0
|
||||
}
|
||||
//修改开关
|
||||
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:会员)
|
||||
params.is_open = detail?1:0;
|
||||
api.putDoctorInquiryOpen(params).then(response => {
|
||||
console.log(response);
|
||||
}).then(()=>{
|
||||
if(detail){
|
||||
@ -123,8 +140,9 @@ Page({
|
||||
}else{
|
||||
this.setData({ note: this.data.close_note });
|
||||
}
|
||||
this.setData({ "info.is_open": detail });
|
||||
}).catch(errors => {console.error(errors);})
|
||||
this.setData({ "info.is_open": is_open });
|
||||
}).catch(errors => {console.error(errors);})
|
||||
|
||||
},
|
||||
subcancelDialog(){
|
||||
this.setData({
|
||||
|
||||
@ -2,15 +2,15 @@
|
||||
<view class="container">
|
||||
<view class="switch_box">
|
||||
<view class="switch_box_top">
|
||||
<view class="switch_box_item">
|
||||
<view class="switch_box_item" bindtap="changeON">
|
||||
<view class="switch_box_item_name">接诊开关</view>
|
||||
<view class="switch_box_item_btn">
|
||||
<van-switch
|
||||
active-color="#3CC7C0"
|
||||
inactive-color="#E7E7E7"
|
||||
size="40rpx"
|
||||
checked="{{ info.is_open==1 }}"
|
||||
bind:change="onChange" />
|
||||
checked="{{ info.is_open==1 }}"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="switch_box_note">{{ note }}</view>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user