|
|
@@ -203,11 +203,10 @@
|
|
|
<view style="border:2upx solid #CCCCCC;margin-top:20upx;">
|
|
|
<tui-list-cell class="line-cell" :hover="false">
|
|
|
<div class="tui-title">送货上门</div>
|
|
|
- <div class="switch_bx">
|
|
|
- <text v-if="form.home == 0">不支持</text>
|
|
|
- <text v-else>支持</text>
|
|
|
- <switch :checked="form.home == 0 ? false : true" @change="homeChangeFn" style="transform: scale(0.8,0.8)" />
|
|
|
- </div>
|
|
|
+ <view style="margin-left: auto; display: flex; align-items: center;">
|
|
|
+ <button class="admin-button-com middle" :class="[form.home == 1 ? 'blue' : 'default']" @click="changeHomeBtn(1)">启用</button>
|
|
|
+ <button class="admin-button-com middle" :class="[form.home == 0 ? 'blue' : 'default']" @click="changeHomeBtn(0)" style="margin-left:20upx;">禁用</button>
|
|
|
+ </view>
|
|
|
</tui-list-cell>
|
|
|
<tui-list-cell class="line-cell" :hover="false" v-if="form.home == 1">
|
|
|
<div class="tui-title">最低消费金额</div>
|
|
|
@@ -1121,6 +1120,17 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ changeHomeBtn(value){
|
|
|
+ if (Number(this.form.home) === value) {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.form.home = value
|
|
|
+ toChangeHome({customId:this.userInfo.id,home:this.form.home}).then(res=>{
|
|
|
+ if(res.code == 1){
|
|
|
+ this.$msg(res.msg)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
passStatusChangeFn(e){
|
|
|
this.form.passStatus = e.detail.value ? 1 : 0
|
|
|
changePassStatus({customId:this.userInfo.id,passStatus:this.form.passStatus}).then(res=>{
|