parent
78adf337e5
commit
c843dcdfe3
@ -1,13 +0,0 @@
|
||||
package ${basePackage}.action.ajax.${moudle};
|
||||
|
||||
import ${basePackage}.frame.base.Ajax;
|
||||
import ${basePackage}.frame.base.BaseResponse;
|
||||
|
||||
public class UserAjax extends Ajax {
|
||||
|
||||
public BaseResponse create(String param) {
|
||||
BaseResponse baseResponse = new BaseResponse();
|
||||
|
||||
return baseResponse;
|
||||
}
|
||||
}
|
@ -0,0 +1,26 @@
|
||||
package ${basePackage}.action.ajax.system;
|
||||
|
||||
import ${basePackage}.frame.base.Ajax;
|
||||
import ${basePackage}.frame.auth.LocalData;
|
||||
import ${basePackage}.frame.base.BaseResponse;
|
||||
|
||||
import javax.servlet.http.Cookie;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
public class AuthAjax extends Ajax {
|
||||
|
||||
public BaseResponse login(String param) {
|
||||
BaseResponse baseResponse = new BaseResponse();
|
||||
|
||||
// todo 设置cookie
|
||||
HttpServletRequest request = LocalData.getRequest();
|
||||
HttpServletResponse response = LocalData.getResponse();
|
||||
Cookie token = new Cookie("token", "");
|
||||
token.setDomain(request.getServerName());
|
||||
token.setPath("/");
|
||||
response.addCookie(token);
|
||||
|
||||
return baseResponse;
|
||||
}
|
||||
}
|
Loading…
Reference in new issue