修改ajax获取方式

master
星期八 5 years ago
parent 5ac68f2688
commit 1b4e0a00f3
  1. 2
      src/main/java/com/lq/cms/web/FileSystemController.java
  2. 4
      src/main/java/com/lq/cms/web/LoginController.java
  3. 4
      src/main/java/com/lq/cms/web/sys/PermissionController.java

@ -34,7 +34,7 @@ public class FileSystemController extends BaseController{
@RequestMapping(value = "/upload",method = RequestMethod.POST) @RequestMapping(value = "/upload",method = RequestMethod.POST)
@ResponseBody @ResponseBody
public Object fileUpload(@RequestParam("files")MultipartFile[] files, HttpServletRequest request) throws IOException { public Object fileUpload(@RequestParam("files")MultipartFile[] files, HttpServletRequest request) throws IOException {
AjaxResult ajaxResult = this.getAjaxResult(); AjaxResult ajaxResult = AjaxResult.getSuccessInstance();
Date nowTime=new Date(); Date nowTime=new Date();
if (files!=null&&files.length>0){ if (files!=null&&files.length>0){
for (MultipartFile file:files){ for (MultipartFile file:files){

@ -49,7 +49,7 @@ public class LoginController extends BaseController{
@ResponseBody @ResponseBody
@PostMapping(value = "/doLogin") @PostMapping(value = "/doLogin")
public Object doLogin(String loginName, String password, HttpSession session,String authCode,Boolean rememberMe){ public Object doLogin(String loginName, String password, HttpSession session,String authCode,Boolean rememberMe){
AjaxResult ajaxResult= this.getAjaxResult(); AjaxResult ajaxResult= AjaxResult.getSuccessInstance();
String strCode=(String) session.getAttribute("strCode"); String strCode=(String) session.getAttribute("strCode");
session.setAttribute("strCode",null); session.setAttribute("strCode",null);
//验证码不正确 //验证码不正确
@ -83,7 +83,7 @@ public class LoginController extends BaseController{
@ResponseBody @ResponseBody
@RequestMapping("/sendEmail") @RequestMapping("/sendEmail")
public Object sendEmail(String email){ public Object sendEmail(String email){
AjaxResult ajaxResult = this.getAjaxResult(); AjaxResult ajaxResult = AjaxResult.getSuccessInstance();
// try { // try {
//// mailService.sendMail("qi_liang_gz@163.com",email,"忘记密码","重新设置网址为<a href=\"#\">http://www.baidu.com</a>"); //// mailService.sendMail("qi_liang_gz@163.com",email,"忘记密码","重新设置网址为<a href=\"#\">http://www.baidu.com</a>");
// } catch (AddressException e) { // } catch (AddressException e) {

@ -69,7 +69,7 @@ public class PermissionController extends BaseController{
@ResponseBody @ResponseBody
@RequestMapping("/save") @RequestMapping("/save")
public Object save(SysPermissionVo vo){ public Object save(SysPermissionVo vo){
AjaxResult ajaxResult = this.getAjaxResult(); AjaxResult ajaxResult = AjaxResult.getSuccessInstance();
SysPermission sysPermission = sysPermissionService.save(vo); SysPermission sysPermission = sysPermissionService.save(vo);
ajaxResult.setData(sysPermission); ajaxResult.setData(sysPermission);
return ajaxResult; return ajaxResult;
@ -78,7 +78,7 @@ public class PermissionController extends BaseController{
@ResponseBody @ResponseBody
@RequestMapping("/update") @RequestMapping("/update")
public Object update(SysPermissionVo vo){ public Object update(SysPermissionVo vo){
AjaxResult ajaxResult = this.getAjaxResult(); AjaxResult ajaxResult = AjaxResult.getSuccessInstance();
SysPermission sysPermission = sysPermissionService.update(vo); SysPermission sysPermission = sysPermissionService.update(vo);
ajaxResult.setData(sysPermission); ajaxResult.setData(sysPermission);
return ajaxResult; return ajaxResult;

Loading…
Cancel
Save