修复home页面的乱码问题

广告会通知到微信
监听/路径
This commit is contained in:
Yutousama 2020-04-02 00:19:43 +08:00
parent 11d2c15dae
commit ec6f658935
3 changed files with 11 additions and 4 deletions

View File

@ -2,7 +2,7 @@
<html> <html>
<head> <head>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>个人中心</title> <title>个人中心</title>
<link rel="stylesheet" href="/static/layui/css/layui.css"> <link rel="stylesheet" href="/static/layui/css/layui.css">
<link rel="stylesheet" href="/static/layui/css/modules/layer/default/layer.css"> <link rel="stylesheet" href="/static/layui/css/modules/layer/default/layer.css">

View File

@ -13,6 +13,11 @@ public class MainView {
return "/home.html"; return "/home.html";
} }
@RequestMapping("/")
public String mainHome(HttpServletRequest request) {
return "/index.html";
}
@RequestMapping("/html/permission.html") @RequestMapping("/html/permission.html")
public String permission(HttpServletRequest request) { public String permission(HttpServletRequest request) {

View File

@ -49,12 +49,13 @@ public class SystemController {
@ResponseBody @ResponseBody
public String addFeedBack(HttpServletRequest request) { public String addFeedBack(HttpServletRequest request) {
JSONObject json=new JSONObject(); JSONObject json=new JSONObject();
if(!(boolean) request.getAttribute(LOGINSTATE)) { int uid_ = Tools.getUidOfToken(request);
if (uid_ == 0) {
json.put("code", UserEnum.LOGIN_NOT_LOGIN.code); json.put("code", UserEnum.LOGIN_NOT_LOGIN.code);
json.put("msg", UserEnum.LOGIN_NOT_LOGIN.msg); json.put("msg", UserEnum.LOGIN_NOT_LOGIN.msg);
return json.toString(); return json.toString();
} }
String uid=(String) request.getAttribute("uid"); String uid=uid_+"";
String context=request.getParameter("context"); String context=request.getParameter("context");
String sysinfo=request.getParameter("sysinfo"); String sysinfo=request.getParameter("sysinfo");
int _uid=0; int _uid=0;
@ -70,8 +71,9 @@ public class SystemController {
} }
json.put("code", 100); json.put("code", 100);
json.put("msg", systemService.addFeedBack(_uid, context, sysinfo)==1?"提交成功":"提交失败"); json.put("msg", systemService.addFeedBack(_uid, context, sysinfo)==1?"提交成功":"提交失败");
UUserdata udata=user.getUUserData(Integer.parseInt(uid));
Tools.getHTTPUrlString("https://sc.ftqq.com/SCU64034T5adf5c5940dcecc016e0e9d0cf9b1e725da126ff47475.send?text=盒子问题反馈&desp="+"来自uid:"+uid+"的问题反馈\n"+context+"\n系统信息:"+sysinfo+"\n对方邮箱:"+udata.getEmail());
try { try {
UUserdata udata=user.getUUserData(Integer.valueOf(uid));
EmailTools.send("583819556@qq.com", "盒子问题反馈", "来自uid:"+uid+"的问题反馈\n"+context+"\n系统信息:"+sysinfo+"\n对方邮箱:"+udata.getEmail()); EmailTools.send("583819556@qq.com", "盒子问题反馈", "来自uid:"+uid+"的问题反馈\n"+context+"\n系统信息:"+sysinfo+"\n对方邮箱:"+udata.getEmail());
} catch (Exception e) { } catch (Exception e) {
// TODO: handle exception // TODO: handle exception