Commit d5f1e43f authored by fwz's avatar fwz

添加车辆失败提示、删除记录bug修改,退款中不展示删除记录

parent 2de7d003
......@@ -137,6 +137,11 @@ export default {
//添加成功
uni.$u.toast('添加成功')
this.goBack()
}else{
uni.showToast({
title: res.data.msg,
icon: "error"
})
}
})
}).catch(errors => {
......
......@@ -143,7 +143,7 @@
</div>
<div class="order__btn">
<u-modal :show="showDelModal" @confirm="confirmDel" @cancel="cancelModal" :title="delTitle" ref="delModal" :showCancelButton="true"></u-modal>
<span @click.stop="showDel(item.id)">删除记录</span>
<span v-if="item.orderStatus==40" @click.stop="showDel(item.id)">删除记录</span>
<span class="btn__two" @click.stop="orderDetail(item.id)">查看详情</span>
</div>
</div>
......@@ -251,9 +251,32 @@ export default {
})
},
showDel(id) {
//
this.showDelModal = true
this.deleteId = id
let that = this;
uni.showModal({
title: '删除记录',
content: '确认删除该纪录吗?',
success: function (res) {
let opts = {
url: '/app/user/order/remove/' + id,
method: 'delete'
};
that.http.httpTokenRequest(opts, {}).then(res => {
if (res.data.code == 200) {
uni.showToast({
title: '删除成功',
icon: "success",
});
that.getOrderList()
} else {
uni.showToast({
title: '删除失败',
icon: "error"
});
}
})
}
});
},
cancelModal() {
this.showDelModal = false
......@@ -262,7 +285,7 @@ export default {
let opts = {
url: '/app/user/order/remove/' + this.deleteId,
method: 'get'
method: 'delete'
};
this.http.httpTokenRequest(opts, {}).then(res => {
if (res.data.code == 200) {
......
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