Commit 9d4166a1 authored by fwz's avatar fwz

获得免费挪车码图片、车辆编辑里删除加对话框,确认才删除

parent 29cbfbdd
......@@ -31,7 +31,7 @@
<div class="add__btn add__no__bind" @click="editCarInfo">
保存
</div>
<div class="add__btn add__back" @click="goBack">
<div class="add__btn add__back" @click="delModal">
删除
</div>
<u-modal :show="deleteShow" :title="deleteTitle" :content='deleteContent'
......@@ -127,6 +127,31 @@ export default {
uni.$u.toast('校验失败')
})
},
//确认删除车辆
confirmModal(){
let opts = { url: '/app/vehicleAdmin/remove/' + this.id, method: 'delete' };
this.http.httpTokenRequest(opts, {}).then(res => {
if (res.data.code == 200) {
uni.showToast({
title: '删除成功',
icon: "success",
});
this.goBack()
}else{
uni.showToast({
title: res.data.msg,
icon: "error",
});
}
})
this.deleteShow = false
},
cancelModal(){
this.deleteShow = false
},
delModal(){
this.deleteShow = true
},
},
onLoad(option) {
this.id = option.id
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment