修改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)
@ResponseBody
public Object fileUpload(@RequestParam("files")MultipartFile[] files, HttpServletRequest request) throws IOException {
AjaxResult ajaxResult = this.getAjaxResult();
AjaxResult ajaxResult = AjaxResult.getSuccessInstance();
Date nowTime=new Date();
if (files!=null&&files.length>0){
for (MultipartFile file:files){

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

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

Loading…
Cancel
Save