Selaa lähdekoodia

修复后台页面标题,增加单独昵称接口,删除无效页面

albertshaw 8 vuotta sitten
vanhempi
commit
d357f03f66

+ 0 - 6
src/main/java/com/goafanti/common/controller/WebpageController.java

@@ -150,12 +150,6 @@ public class WebpageController extends BaseController {
 		return modelview;
 	}
 
-	@RequestMapping(value = "/user/index", method = RequestMethod.GET)
-	public ModelAndView userIndex(HttpServletRequest request, ModelAndView modelview) {
-		modelview.setViewName("/user/index");
-		return modelview;
-	}
-
 	@RequestMapping(value = "/user/subscriberDetail", method = RequestMethod.GET)
 	public ModelAndView subscriberDetail(HttpServletRequest request, ModelAndView modelview, String uid, Integer type) {
 		ModelAndView mv = new ModelAndView();

+ 13 - 0
src/main/java/com/goafanti/user/controller/UserApiController.java

@@ -14,6 +14,7 @@ import org.apache.shiro.crypto.hash.SimpleHash;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.HttpMethod;
+import org.springframework.util.Assert;
 import org.springframework.validation.BindingResult;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
@@ -527,6 +528,18 @@ public class UserApiController extends BaseApiController {
 	}
 
 	/**
+	 * 获取昵称
+	 * 
+	 * @return
+	 */
+	@RequestMapping(value = "/nickname", method = RequestMethod.GET)
+	public Result nickname() {
+		User u = userService.selectByPrimaryKey(TokenManager.getUserId());
+		Assert.notNull(u, "用户不存在");
+		return res().data(u.getNickname());
+	}
+
+	/**
 	 * 团体人力资源情况入口
 	 * 
 	 * @return

+ 1 - 1
src/main/webapp/WEB-INF/views/common.html

@@ -11,7 +11,7 @@
 <meta name="viewport"
 	content="width=device-width,initial-scale=1, minimum-scale=1, maximum-scale=1,user-scalable=no">
 <meta http-equiv="x-ua-compatible" content="ie=edge">
-<title th:replace="${title}"></title>
+<title>技淘--我的技术和科技服务交易平台</title>
 <th:block th:replace="${link}" />
 <!-- [if lt IE 9]>
 			<script src="//cdn.bootcss.com/html5shiv/r29/html5.min.js"></script>

+ 1 - 1
src/main/webapp/WEB-INF/views/error.html

@@ -2,7 +2,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml"
       xmlns:th="http://www.thymeleaf.org">
 <head th:replace="common::header(~{::title},~{})">
-    <title>出错啦</title>
+    <title>技淘--我的技术和科技服务交易平台</title>
 </head>
 <body>
 <p>错误信息:</p>