更新截图

This commit is contained in:
jiangzeyin 2019-01-03 11:55:43 +08:00
parent e96ef13609
commit a0c488f8b0
8 changed files with 21 additions and 7 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB

After

Width:  |  Height:  |  Size: 85 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 KiB

After

Width:  |  Height:  |  Size: 81 KiB

View File

@ -11,7 +11,7 @@ import org.springframework.web.context.request.RequestAttributes;
*/ */
public abstract class BaseController extends AbstractController { public abstract class BaseController extends AbstractController {
protected String userName; protected String userName;
protected String userPwd; private String userPwd;
@Override @Override
public void resetInfo() { public void resetInfo() {
@ -19,6 +19,11 @@ public abstract class BaseController extends AbstractController {
userPwd = getSessionAttribute(LoginInterceptor.SESSION_PWD); userPwd = getSessionAttribute(LoginInterceptor.SESSION_PWD);
} }
/**
* 获取当前登录人
*
* @return 用户名
*/
public static String getUserName() { public static String getUserName() {
return (String) getRequestAttributes().getAttribute(LoginInterceptor.SESSION_NAME, RequestAttributes.SCOPE_SESSION); return (String) getRequestAttributes().getAttribute(LoginInterceptor.SESSION_NAME, RequestAttributes.SCOPE_SESSION);
} }

View File

@ -5,6 +5,9 @@ import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestMethod;
/**
* @author Administrator
*/
@Controller @Controller
@RequestMapping(value = "/") @RequestMapping(value = "/")
public class IndexControl extends BaseController { public class IndexControl extends BaseController {
@ -17,7 +20,7 @@ public class IndexControl extends BaseController {
/** /**
* 加载首页 * 加载首页
* *
* @return * @return page
*/ */
@RequestMapping(value = {"index", "", "index.html", "/"}, method = RequestMethod.GET, produces = MediaType.TEXT_HTML_VALUE) @RequestMapping(value = {"index", "", "index.html", "/"}, method = RequestMethod.GET, produces = MediaType.TEXT_HTML_VALUE)
public String index() { public String index() {
@ -27,7 +30,7 @@ public class IndexControl extends BaseController {
/** /**
* 退出登录 * 退出登录
* *
* @return * @return page
*/ */
@RequestMapping(value = "logout") @RequestMapping(value = "logout")
public String logout() { public String logout() {

View File

@ -13,6 +13,9 @@ import org.springframework.web.bind.annotation.ResponseBody;
import javax.annotation.Resource; import javax.annotation.Resource;
/**
* @author Administrator
*/
@Controller @Controller
public class LoginControl extends BaseController { public class LoginControl extends BaseController {

View File

@ -4,6 +4,9 @@ import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestMethod;
/**
* @author Administrator
*/
@Controller @Controller
@RequestMapping(value = "/") @RequestMapping(value = "/")
public class WelcomeController extends BaseController { public class WelcomeController extends BaseController {

View File

@ -36,7 +36,7 @@ public class ManageControl extends BaseController {
/** /**
* 展示项目页面 * 展示项目页面
* *
* @return * @return page
*/ */
@RequestMapping(value = "projectInfo") @RequestMapping(value = "projectInfo")
public String projectInfo() { public String projectInfo() {
@ -83,8 +83,8 @@ public class ManageControl extends BaseController {
/** /**
* 删除项目 * 删除项目
* *
* @param id * @param id id
* @return * @return json
*/ */
@RequestMapping(value = "deleteProject", method = RequestMethod.POST) @RequestMapping(value = "deleteProject", method = RequestMethod.POST)
@ResponseBody @ResponseBody

View File

@ -1 +1 @@
错误啦 <h1>错误啦</h1>