From d20894284be7589eb61917b5cd3975773f150ed4 Mon Sep 17 00:00:00 2001 From: Junling Bu Date: Thu, 22 Nov 2018 19:57:08 +0800 Subject: [PATCH] =?UTF-8?q?feat[litemall-wx,=20litemall-wx-api]:=20?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E8=B6=B3=E8=BF=B9=E5=8F=82=E6=95=B0=E9=87=87?= =?UTF-8?q?=E7=94=A8id?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wx/web/WxFootprintController.java | 20 +++++-------------- .../pages/ucenter/footprint/footprint.js | 2 +- 2 files changed, 6 insertions(+), 16 deletions(-) diff --git a/litemall-wx-api/src/main/java/org/linlinjava/litemall/wx/web/WxFootprintController.java b/litemall-wx-api/src/main/java/org/linlinjava/litemall/wx/web/WxFootprintController.java index 0465957a..62d84494 100644 --- a/litemall-wx-api/src/main/java/org/linlinjava/litemall/wx/web/WxFootprintController.java +++ b/litemall-wx-api/src/main/java/org/linlinjava/litemall/wx/web/WxFootprintController.java @@ -18,6 +18,9 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +/** + * 用户访问足迹服务 + */ @RestController @RequestMapping("/wx/footprint") @Validated @@ -33,10 +36,8 @@ public class WxFootprintController { * 删除用户足迹 * * @param userId 用户ID - * @param body 请求内容, { footprintId: xxx } + * @param body 请求内容, { id: xxx } * @return 删除操作结果 - * 成功则 { errno: 0, errmsg: '成功' } - * 失败则 { errno: XXX, errmsg: XXX } */ @PostMapping("delete") public Object delete(@LoginUser Integer userId, @RequestBody String body) { @@ -47,7 +48,7 @@ public class WxFootprintController { return ResponseUtil.badArgument(); } - Integer footprintId = JacksonUtil.parseInteger(body, "footprintId"); + Integer footprintId = JacksonUtil.parseInteger(body, "id"); if (footprintId == null) { return ResponseUtil.badArgument(); } @@ -70,17 +71,6 @@ public class WxFootprintController { * @param page 分页页数 * @param size 分页大小 * @return 用户足迹列表 - * 成功则 - * { - * errno: 0, - * errmsg: '成功', - * data: - * { - * footprintList: xxx, - * totalPages: xxx - * } - * } - * 失败则 { errno: XXX, errmsg: XXX } */ @GetMapping("list") public Object list(@LoginUser Integer userId, diff --git a/litemall-wx/pages/ucenter/footprint/footprint.js b/litemall-wx/pages/ucenter/footprint/footprint.js index f1e084d6..3847b4d4 100644 --- a/litemall-wx/pages/ucenter/footprint/footprint.js +++ b/litemall-wx/pages/ucenter/footprint/footprint.js @@ -57,7 +57,7 @@ Page({ success: function(res) { if (res.confirm) { util.request(api.FootprintDelete, { - footprintId: footprintId + id: footprintId }, 'POST').then(function(res) { if (res.errno === 0) { wx.showToast({