From ec6f658935a7e47ae7e815ea7aa130866958270d Mon Sep 17 00:00:00 2001
From: Yutousama <583819556@qq.com>
Date: Thu, 2 Apr 2020 00:19:43 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dhome=E9=A1=B5=E9=9D=A2?=
=?UTF-8?q?=E7=9A=84=E4=B9=B1=E7=A0=81=E9=97=AE=E9=A2=98=20=E5=B9=BF?=
=?UTF-8?q?=E5=91=8A=E4=BC=9A=E9=80=9A=E7=9F=A5=E5=88=B0=E5=BE=AE=E4=BF=A1?=
=?UTF-8?q?=20=E7=9B=91=E5=90=AC/=E8=B7=AF=E5=BE=84?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
html/home.html | 2 +-
src/main/java/com/yutou/controller/Web/MainView.java | 5 +++++
.../com/yutou/controller/android/SystemController.java | 8 +++++---
3 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/html/home.html b/html/home.html
index edaa8ca..151e57c 100644
--- a/html/home.html
+++ b/html/home.html
@@ -2,7 +2,7 @@
-
+
个人中心
diff --git a/src/main/java/com/yutou/controller/Web/MainView.java b/src/main/java/com/yutou/controller/Web/MainView.java
index a5bec73..5ced540 100644
--- a/src/main/java/com/yutou/controller/Web/MainView.java
+++ b/src/main/java/com/yutou/controller/Web/MainView.java
@@ -13,6 +13,11 @@ public class MainView {
return "/home.html";
}
+ @RequestMapping("/")
+ public String mainHome(HttpServletRequest request) {
+
+ return "/index.html";
+ }
@RequestMapping("/html/permission.html")
public String permission(HttpServletRequest request) {
diff --git a/src/main/java/com/yutou/controller/android/SystemController.java b/src/main/java/com/yutou/controller/android/SystemController.java
index a2f61d2..4d8fe77 100644
--- a/src/main/java/com/yutou/controller/android/SystemController.java
+++ b/src/main/java/com/yutou/controller/android/SystemController.java
@@ -49,12 +49,13 @@ public class SystemController {
@ResponseBody
public String addFeedBack(HttpServletRequest request) {
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("msg", UserEnum.LOGIN_NOT_LOGIN.msg);
return json.toString();
}
- String uid=(String) request.getAttribute("uid");
+ String uid=uid_+"";
String context=request.getParameter("context");
String sysinfo=request.getParameter("sysinfo");
int _uid=0;
@@ -70,8 +71,9 @@ public class SystemController {
}
json.put("code", 100);
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 {
- UUserdata udata=user.getUUserData(Integer.valueOf(uid));
EmailTools.send("583819556@qq.com", "盒子问题反馈", "来自uid:"+uid+"的问题反馈\n"+context+"\n系统信息:"+sysinfo+"\n对方邮箱:"+udata.getEmail());
} catch (Exception e) {
// TODO: handle exception