Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
Litemall
Commits
d2089428
Commit
d2089428
authored
Nov 22, 2018
by
Junling Bu
Browse files
feat[litemall-wx, litemall-wx-api]: 删除足迹参数采用id
parent
45b0da77
Changes
2
Hide whitespace changes
Inline
Side-by-side
litemall-wx-api/src/main/java/org/linlinjava/litemall/wx/web/WxFootprintController.java
View file @
d2089428
...
...
@@ -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 请求内容, {
footprintI
d: xxx }
* @param body 请求内容, {
i
d: 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
,
"
footprintI
d"
);
Integer
footprintId
=
JacksonUtil
.
parseInteger
(
body
,
"
i
d"
);
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
,
...
...
litemall-wx/pages/ucenter/footprint/footprint.js
View file @
d2089428
...
...
@@ -57,7 +57,7 @@ Page({
success
:
function
(
res
)
{
if
(
res
.
confirm
)
{
util
.
request
(
api
.
FootprintDelete
,
{
footprintI
d
:
footprintId
i
d
:
footprintId
},
'
POST
'
).
then
(
function
(
res
)
{
if
(
res
.
errno
===
0
)
{
wx
.
showToast
({
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment