Commit 7ac928b8 by rongkailun

【修改】官网接口统一返回数据格式

parent f76eb802
...@@ -148,7 +148,7 @@ public class NewsController extends AbstractController { ...@@ -148,7 +148,7 @@ public class NewsController extends AbstractController {
Page<NewsEntity> page = this.newsService.selectRealTimeInfo(newsParams, Page<NewsEntity> page = this.newsService.selectRealTimeInfo(newsParams,
new Page(newsParams.getPage(), newsParams.getLimit())); new Page(newsParams.getPage(), newsParams.getLimit()));
PageUtils pageUtils = new PageUtils(page); PageUtils pageUtils = new PageUtils(page);
return R.ok().put("page", pageUtils); return R.ok().put("data", pageUtils);
} }
/** /**
......
...@@ -53,7 +53,7 @@ public class PolicyController extends AbstractController { ...@@ -53,7 +53,7 @@ public class PolicyController extends AbstractController {
public R info(@PathVariable("id") Integer id){ public R info(@PathVariable("id") Integer id){
PolicyEntity policy = policyService.getById(id); PolicyEntity policy = policyService.getById(id);
return R.ok().put("data", policy); return R.ok().put("policy", policy);
} }
/** /**
......
...@@ -137,7 +137,7 @@ public class TopicnewsController extends AbstractController { ...@@ -137,7 +137,7 @@ public class TopicnewsController extends AbstractController {
Page<NewsEntity> page = this.topicnewsService.getHdbdList(newsParams, Page<NewsEntity> page = this.topicnewsService.getHdbdList(newsParams,
new Page(newsParams.getPage(),newsParams.getLimit())); new Page(newsParams.getPage(),newsParams.getLimit()));
PageUtils pageUtils = new PageUtils(page); PageUtils pageUtils = new PageUtils(page);
return R.ok().put("page", pageUtils); return R.ok().put("data", pageUtils);
} }
......
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