diff --git a/api/park.js b/api/park.js index 3906fe5d..2415d07d 100644 --- a/api/park.js +++ b/api/park.js @@ -17,4 +17,6 @@ export const apiArr = { tempParkingOrderQuery: '/api/v2/wechat/smart-parking/temp-parking/trade_query', // 临时车缴费订单交易查询 parkList: '/api/v2/wechat/smart-parking/parking/list', // 停车场列表 + + deleteCar: '/api/v2/wechat/smart-parking/car/del', // 删除车辆 } \ No newline at end of file diff --git a/packages/park/index/index.vue b/packages/park/index/index.vue index d251c112..c4445c90 100644 --- a/packages/park/index/index.vue +++ b/packages/park/index/index.vue @@ -73,18 +73,15 @@ export default { success: (res) => { if (res.confirm) { const params = { - user_id: uni.getStorageSync('userId'), - car_id: item.car_id + car_id: item.id } request(apiArr.deleteCar, "POST", params).then((res) => { - if (res.code == 200) { - uni.showToast({ - title: '删除成功', - icon: 'success', - duration: 2000 - }); - this.getCarList(); - } + uni.showToast({ + title: '删除成功', + icon: 'success', + duration: 2000 + }); + this.getCarList(); }) } }