Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
御承扬
Campus
提交
168c0318
C
Campus
项目概览
御承扬
/
Campus
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
C
Campus
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
168c0318
编写于
12月 30, 2020
作者:
7
7wc98#14
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
modify
上级
32af8bde
变更
10
显示空白变更内容
内联
并排
Showing
10 changed file
with
530 addition
and
25 deletion
+530
-25
src/main/java/com/pyc/campus/controller/WebController.java
src/main/java/com/pyc/campus/controller/WebController.java
+27
-1
src/main/java/com/pyc/campus/dao/FriendListRepository.java
src/main/java/com/pyc/campus/dao/FriendListRepository.java
+4
-4
src/main/java/com/pyc/campus/dao/StudentRepository.java
src/main/java/com/pyc/campus/dao/StudentRepository.java
+4
-0
src/main/java/com/pyc/campus/domain/FriendList.java
src/main/java/com/pyc/campus/domain/FriendList.java
+0
-10
src/main/java/com/pyc/campus/domain/Student.java
src/main/java/com/pyc/campus/domain/Student.java
+10
-0
src/main/resources/templates/page/AddFriend.html
src/main/resources/templates/page/AddFriend.html
+2
-1
src/main/resources/templates/page/BrowseFriendInfo.html
src/main/resources/templates/page/BrowseFriendInfo.html
+231
-0
src/main/resources/templates/page/MyFriend.html
src/main/resources/templates/page/MyFriend.html
+46
-9
src/main/resources/templates/page/UserCenter.html
src/main/resources/templates/page/UserCenter.html
+1
-0
src/main/resources/templates/page/VerifyFriend.html
src/main/resources/templates/page/VerifyFriend.html
+205
-0
未找到文件。
src/main/java/com/pyc/campus/controller/WebController.java
浏览文件 @
168c0318
...
...
@@ -109,12 +109,25 @@ public class WebController {
SecurityContextImpl
securityContext
=
(
SecurityContextImpl
)
session
.
getAttribute
(
"SPRING_SECURITY_CONTEXT"
);
String
currentStudentId
=
((
UserDetails
)
securityContext
.
getAuthentication
().
getPrincipal
()).
getUsername
();
Student
s
=
studentRepository
.
findNameByStudentID
(
currentStudentId
);
friendLis
tRepository
.
setOnlineStatus
(
onlineStatus
,
currentStudentId
);
studen
tRepository
.
setOnlineStatus
(
onlineStatus
,
currentStudentId
);
Msg
msg
=
new
Msg
(
""
,
""
,
""
);
model
.
addAttribute
(
"msg"
,
msg
);
model
.
addAttribute
(
"curUse"
,
s
);
return
"page/UserCenter"
;
}
@RequestMapping
(
"/toBrowseFriendInfo"
)
public
String
toBrowseFriendInfo
(
Model
model
,
HttpSession
session
,
@Param
(
"toName"
)
String
toName
){
SecurityContextImpl
securityContext
=
(
SecurityContextImpl
)
session
.
getAttribute
(
"SPRING_SECURITY_CONTEXT"
);
String
currentStudentId
=
((
UserDetails
)
securityContext
.
getAuthentication
().
getPrincipal
()).
getUsername
();
Student
s
=
studentRepository
.
findNameByStudentID
(
currentStudentId
);
Student
stu
=
studentRepository
.
findNameByStudentID
(
toName
);
Msg
msg
=
new
Msg
(
""
,
""
,
""
);
model
.
addAttribute
(
"msg"
,
msg
);
model
.
addAttribute
(
"curUse"
,
s
);
model
.
addAttribute
(
"stu"
,
stu
);
return
"page/BrowseFriendInfo"
;
}
@RequestMapping
(
"/addFriend"
)
public
String
addFriend
(
Model
model
,
HttpSession
session
,
@Param
(
"fromName"
)
String
fromName
,
...
...
@@ -137,6 +150,19 @@ public class WebController {
model
.
addAttribute
(
"curUse"
,
s
);
return
"page/AddFriend"
;
}
@RequestMapping
(
"/toVerifyFriend"
)
public
String
toVerifyFriend
(
Model
model
,
HttpSession
session
)
{
SecurityContextImpl
securityContext
=
(
SecurityContextImpl
)
session
.
getAttribute
(
"SPRING_SECURITY_CONTEXT"
);
String
currentStudentId
=
((
UserDetails
)
securityContext
.
getAuthentication
().
getPrincipal
()).
getUsername
();
Student
s
=
studentRepository
.
findNameByStudentID
(
currentStudentId
);
List
<
FriendList
>
fl
=
friendListRepository
.
toNameIsFalseByToName
(
currentStudentId
);
int
len
=
fl
.
size
();
Msg
msg
=
new
Msg
(
"待验证好友申请数量:"
,
"一共"
+
len
+
"个"
,
""
);
model
.
addAttribute
(
"msg"
,
msg
);
model
.
addAttribute
(
"curUse"
,
s
);
model
.
addAttribute
(
"fl"
,
fl
);
return
"page/VerifyFriend"
;
}
@RequestMapping
(
"/toChangePWD"
)
public
String
toChangePWD
(
Model
model
,
HttpSession
session
){
SecurityContextImpl
securityContext
=
(
SecurityContextImpl
)
session
.
getAttribute
(
"SPRING_SECURITY_CONTEXT"
);
...
...
src/main/java/com/pyc/campus/dao/FriendListRepository.java
浏览文件 @
168c0318
...
...
@@ -23,15 +23,15 @@ public interface FriendListRepository extends JpaRepository<FriendList,Long> {
List
<
FriendList
>
toNameIsFalseByFromName
(
String
fromName
);
@Modifying
@Transactional
@Query
(
"select fl from FriendList fl where fl.toName=?1 and fl.status=false "
)
List
<
FriendList
>
toNameIsFalseByToName
(
String
toName
);
@Modifying
@Transactional
@Query
(
"select fl from FriendList fl where fl.fromName=?1 and fl.status=true "
)
List
<
FriendList
>
findMyFriendsByFromName
(
String
fromName
);
@Modifying
@Transactional
@Query
(
"select fl from FriendList fl where fl.toName=?1 and fl.status=true"
)
List
<
FriendList
>
findMyFriendsByToName
(
String
toName
);
@Modifying
@Transactional
@Query
(
"update FriendList fl set fl.onlineStatus=?1 where fl.fromName=?2"
)
void
setOnlineStatus
(
Boolean
onlineStatus
,
String
fromName
);
}
src/main/java/com/pyc/campus/dao/StudentRepository.java
浏览文件 @
168c0318
...
...
@@ -27,6 +27,10 @@ public interface StudentRepository extends JpaRepository<Student,Long> {
@Transactional
@Query
(
"update Student s set s.password=?1 where s.studentID=?2"
)
int
saveChangePWD
(
String
password
,
String
studentID
);
@Modifying
@Transactional
@Query
(
"update Student s set s.onlineStatus=?1 where s.studentID=?2"
)
void
setOnlineStatus
(
Boolean
onlineStatus
,
String
studentID
);
// 根据Student ID前缀查询
@Modifying
@Transactional
...
...
src/main/java/com/pyc/campus/domain/FriendList.java
浏览文件 @
168c0318
...
...
@@ -20,7 +20,6 @@ public class FriendList {
private
String
fromName
;
//主动添加方
private
String
toName
;
private
Boolean
status
;
// 标识双方是否通过好友申请
private
Boolean
onlineStatus
;
// 是否在线
public
FriendList
()
{
super
();
}
...
...
@@ -28,7 +27,6 @@ public class FriendList {
this
.
fromName
=
fromName
;
this
.
toName
=
toName
;
this
.
status
=
false
;
this
.
onlineStatus
=
false
;
}
public
void
setId
(
long
id
)
{
...
...
@@ -47,14 +45,6 @@ public class FriendList {
this
.
status
=
status
;
}
public
void
setOnlineStatus
(
Boolean
onlineStatus
)
{
this
.
onlineStatus
=
onlineStatus
;
}
public
Boolean
getOnlineStatus
()
{
return
onlineStatus
;
}
public
long
getId
()
{
return
id
;
}
...
...
src/main/java/com/pyc/campus/domain/Student.java
浏览文件 @
168c0318
...
...
@@ -22,6 +22,7 @@ public class Student {
private
String
weChat
;
private
String
QQ
;
private
int
admin
;
private
boolean
onlineStatus
;
public
Student
()
{
super
();
...
...
@@ -35,12 +36,21 @@ public class Student {
this
.
weChat
=
weChat
;
this
.
QQ
=
QQ
;
this
.
admin
=
admin
;
this
.
onlineStatus
=
false
;
}
public
void
setAdmin
(
int
admin
)
{
this
.
admin
=
admin
;
}
public
boolean
isOnlineStatus
()
{
return
onlineStatus
;
}
public
void
setOnlineStatus
(
boolean
onlineStatus
)
{
this
.
onlineStatus
=
onlineStatus
;
}
public
int
getAdmin
()
{
return
admin
;
}
...
...
src/main/resources/templates/page/AddFriend.html
浏览文件 @
168c0318
...
...
@@ -98,7 +98,7 @@
<li><a
href=
"/home"
>
Home
</a></li>
<li><a
href=
"/learn"
>
学习资源
</a></li>
<li><a
href=
"/news"
>
校内新闻
</a></li>
<li
sec:authorize=
"hasRole('ROLE_USER')"
><a
href=
"
#
"
style=
"color: red"
th:text=
"${curUse.getName()}"
></a>
<li
sec:authorize=
"hasRole('ROLE_USER')"
><a
href=
"
/userCenter
"
style=
"color: red"
th:text=
"${curUse.getName()}"
></a>
</li>
<li
sec:authorize=
"hasRole('ROLE_ADMIN')"
><a
href=
"/admin"
>
网站管理
</a></li>
<li
sec:authorize=
"hasRole('ROLE_ADMIN')"
><a
href=
"/userCenter"
style=
"color: red"
th:text=
"${curUse.getName()}"
></a>
...
...
@@ -120,6 +120,7 @@
<li><a
href=
"/publicChatRoom"
>
公共聊天室
</a></li>
<li
class=
"active"
><a
href=
"/toAddFriend"
>
添加好友
</a></li>
<li><a
href=
"/toMyFriend"
>
我的好友
</a>
</li>
<li><a
href=
"/toVerifyFriend"
>
好友申请验证
</a>
</li>
</ul>
<hr
class=
"hidden-sm hidden-md hidden-lg"
>
</div>
...
...
src/main/resources/templates/page/BrowseFriendInfo.html
0 → 100644
浏览文件 @
168c0318
<!DOCTYPE html>
<html
xmlns:th=
"http://www.thymeleaf.org"
xmlns:sec=
"http://www.thymeleaf.org/thymeleaf-extras-springsecurity4"
lang=
"en"
>
<head>
<meta
charset=
"UTF-8"
>
<title>
查看好友信息
</title>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"../../static/css/oppo.css"
>
<!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
<link
rel=
"stylesheet"
href=
"https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css"
integrity=
"sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u"
crossorigin=
"anonymous"
>
<!-- 可选的 Bootstrap 主题文件(一般不用引入) -->
<link
rel=
"stylesheet"
href=
"https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap-theme.min.css"
integrity=
"sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp"
crossorigin=
"anonymous"
>
<!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
<script
src=
"https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/js/bootstrap.min.js"
integrity=
"sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa"
crossorigin=
"anonymous"
></script>
<script
src=
"https://cdn.bootcss.com/jquery/1.12.4/jquery.min.js"
></script>
<script
type=
"text/javascript"
>
$
(
function
()
{
var
speed
=
800
;
//滚动速度
var
h
=
document
.
body
.
clientHeight
;
//回到顶部
$
(
"
#toTop
"
).
click
(
function
()
{
$
(
'
html,body
'
).
animate
({
scrollTop
:
'
0px
'
},
speed
);
});
//回到底部
var
windowHeight
=
parseInt
(
$
(
"
body
"
).
css
(
"
height
"
));
//整个页面的高度
$
(
"
#toBottom
"
).
click
(
function
()
{
//alert(h);
$
(
'
html,body
'
).
animate
({
scrollTop
:
h
+
'
px
'
},
speed
);
});
});
</script>
<style>
body
{
background
:
#eee
;
font-family
:
Helvetica
Neue
,
Helvetica
,
Arial
,
sans-serif
;
font-size
:
14px
;
color
:
#000
;
margin
:
0
;
padding
:
0
;
}
.user-info
{
margin
:
10px
auto
;
width
:
100%
;
height
:
auto
;
}
#scroll
{
position
:
fixed
;
top
:
300px
;
right
:
100px
;
}
.scrollItem
{
width
:
20px
;
height
:
70px
;
border
:
#e1e1e1
1px
solid
;
cursor
:
pointer
;
text-align
:
center
;
padding-top
:
10px
;
}
</style>
</head>
<body>
<!--页面顶部-->
<div
id=
"top"
>
<div
class=
"container"
></div>
</div>
<!-- 页面的头部 -->
<div
id=
"header"
>
<div
class=
"container"
>
<div
class=
"header_left left"
>
<div
class=
"xlwb"
></div>
<div
class=
"txwb"
></div>
<div
class=
"tel"
>
150-1436-6986
</div>
</div>
<ul>
<li>
<form
th:action=
"@{/logout}"
method=
"post"
>
<input
type=
"submit"
class=
"btn btn-link"
th:value=
"安全退出"
>
</form>
</li>
</ul>
</div>
</div>
<!-- 页面的导航 -->
<div
id=
"nav"
>
<div
class=
"container"
>
<div
class=
"logo left"
>
<h1>
Campus
</h1>
</div>
<ul>
<li><a
href=
"/home"
>
Home
</a></li>
<li><a
href=
"/learn"
>
学习资源
</a></li>
<li><a
href=
"/news"
>
校内新闻
</a></li>
<li
sec:authorize=
"hasRole('ROLE_USER')"
><a
href=
"/userCenter"
style=
"color: red"
th:text=
"${curUse.getName()}"
></a>
</li>
<li
sec:authorize=
"hasRole('ROLE_ADMIN')"
><a
href=
"/admin"
>
网站管理
</a></li>
<li
sec:authorize=
"hasRole('ROLE_ADMIN')"
><a
href=
"/userCenter"
style=
"color: red"
th:text=
"${curUse.getName()}"
></a>
</li>
</ul>
</div>
</div>
<div
class=
"container"
>
<div
class=
"row"
>
<div
class=
"col-sm-4"
>
<ul
class=
"nav nav-pills nav-stacked"
>
<li><a
href=
"#"
>
信息查看
</a>
</li>
<li><a
href=
"/updateUserInfo"
>
更新信息
</a></li>
<li><a
href=
"/sign"
>
注册
</a></li>
<li><a
href=
"/toChangePWD"
>
修改密码
</a></li>
<li><a
href=
"/toQueryGrade"
>
查看课程成绩
</a>
</li>
<li><a
href=
"/toUpQuestion"
>
申请问题悬赏
</a>
</li>
<li><a
href=
"/toBrowserQuestion"
>
浏览悬赏问题
</a>
</li>
<li><a
href=
"/publicChatRoom"
>
公共聊天室
</a>
</li>
<li><a
href=
"/toAddFriend"
>
添加好友
</a>
</li>
<li
class=
"active"
><a
href=
"/toMyFriend"
>
我的好友
</a>
</li>
</ul>
<hr
class=
"hidden-sm hidden-md hidden-lg"
>
</div>
<div
class=
"col-sm-8"
style=
"height: 800px;"
>
<div
class=
"starter-template"
>
<h1
th:text=
"${msg.title}"
></h1>
<p
class=
"bg-primary"
th:text=
"${msg.content}"
></p>
</div>
<div
class=
"user-info"
th:if=
"${not #lists.isEmpty(curUse)}"
>
<div
class=
"panel panel-primary"
>
<div
class=
"panel-heading"
>
<h3
class=
"panel-title"
>
好友信息
</h3>
</div>
<div
class=
"panel-body"
>
<ul
class=
"list-group"
>
<li
class=
"list-group-item-heading"
>
姓名:
</li>
<li
class=
"list-group-item-text"
>
<span
th:text=
"${stu.getName()}"
></span>
</li>
<li
class=
"list-group-item-heading"
>
学号:
</li>
<li
class=
"list-group-item-text"
>
<span
th:text=
"${stu.getStudentID()}"
></span>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
<div
id=
"after_sale"
>
<div
class=
"container"
>
<ul>
<li>
<ol>
<li><a
href=
"#"
>
联系方式
</a></li>
<li><a
href=
"#"
>
15014366986
</a></li>
<li><a
href=
"#"
>
2923616405
</a></li>
<li><a
href=
"#"
>
pyc852164
</a></li>
</ol>
</li>
<li>
<ol>
<li><a
href=
"#"
>
关于我
</a></li>
<li><a
href=
"https://blog.csdn.net/qq_42896653"
>
CSDN
</a></li>
<li><a
href=
"https://github.com/pyc-ycy"
>
Github
</a></li>
<li><a
href=
"https://gitee.com/pengyoucongcode"
>
Gitee
</a></li>
</ol>
</li>
<li>
<ol>
<li>
关于我
</li>
<li>
我的博客文章,
</li>
<li>
我的代码托管平台,
</li>
<li>
也是代码托管平台,
</li>
</ol>
</li>
<li>
<ol>
<li>
关于我
</li>
<li>
可以了解我的所学
</li>
<li>
可以看到我的开源代码
</li>
<li>
为避免Github访问不了
</li>
</ol>
</li>
</ul>
</div>
</div>
<div
id=
"footer"
>
<div
class=
"container"
>
<p
style=
"color: white;text-align: center;"
>
@2020 御承扬Copyright
©
2020-05-04
</p>
</div>
</div>
<div
id=
"scroll"
>
<div
class=
"scrollItem"
id=
"toTop"
>
顶部
</div>
<div
class=
"scrollItem"
id=
"toBottom"
>
底部
</div>
</div>
<script
type=
"text/javascript"
src=
"../../static/js/jquery-1.11.3.js"
></script>
<script
type=
"text/javascript"
src=
"../../static/js/oppo.js"
></script>
<script>
window
.
onload
=
function
()
{
let
tp
=
document
.
getElementById
(
"
btn
"
);
tp
.
style
.
display
=
"
none
"
;
let
timer
=
null
;
tp
.
onclick
=
function
()
{
timer
=
setInterval
(
function
()
{
let
backTop
=
document
.
documentElement
.
scrollTop
||
document
.
body
.
scrollTop
;
// 越滚月慢
let
speedTop
=
backTop
/
5
;
document
.
documentElement
.
scrollTop
-=
backTop
-
speedTop
;
if
(
backTop
===
0
)
{
clearInterval
(
timer
);
}
},
30
);
}
let
pageHeight
=
700
;
let
nav
=
document
.
getElementById
(
"
nav
"
);
let
navTop
=
nav
.
offsetTop
;
}
</script>
</body>
</html>
\ No newline at end of file
src/main/resources/templates/page/MyFriend.html
浏览文件 @
168c0318
...
...
@@ -4,7 +4,7 @@
lang=
"en"
>
<head>
<meta
charset=
"UTF-8"
>
<title>
用户中心
</title>
<title>
我的好友
</title>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"../static/css/oppo.css"
>
<!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
<link
rel=
"stylesheet"
href=
"https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css"
...
...
@@ -20,6 +20,9 @@
crossorigin=
"anonymous"
></script>
<script
src=
"https://cdn.bootcss.com/jquery/1.12.4/jquery.min.js"
></script>
<script
type=
"text/javascript"
>
function
getFriendInfo
(
toName
){
window
.
location
.
href
=
"
/toBrowseFriendInfo?toName=
"
+
toName
;
}
$
(
function
()
{
var
speed
=
800
;
//滚动速度
var
h
=
document
.
body
.
clientHeight
;
...
...
@@ -98,7 +101,7 @@
<li><a
href=
"/home"
>
Home
</a></li>
<li><a
href=
"/learn"
>
学习资源
</a></li>
<li><a
href=
"/news"
>
校内新闻
</a></li>
<li
sec:authorize=
"hasRole('ROLE_USER')"
><a
href=
"
#
"
style=
"color: red"
th:text=
"${curUse.getName()}"
></a>
<li
sec:authorize=
"hasRole('ROLE_USER')"
><a
href=
"
/userCenter
"
style=
"color: red"
th:text=
"${curUse.getName()}"
></a>
</li>
<li
sec:authorize=
"hasRole('ROLE_ADMIN')"
><a
href=
"/admin"
>
网站管理
</a></li>
<li
sec:authorize=
"hasRole('ROLE_ADMIN')"
><a
href=
"/userCenter"
style=
"color: red"
th:text=
"${curUse.getName()}"
></a>
...
...
@@ -120,6 +123,7 @@
<li><a
href=
"/publicChatRoom"
>
公共聊天室
</a>
</li>
<li><a
href=
"/toAddFriend"
>
添加好友
</a>
</li>
<li
class=
"active"
><a
href=
"/toMyFriend"
>
我的好友
</a>
</li>
<li><a
href=
"/toVerifyFriend"
>
好友申请验证
</a>
</li>
</ul>
<hr
class=
"hidden-sm hidden-md hidden-lg"
>
</div>
...
...
@@ -133,13 +137,13 @@
<ul
class=
"list-group"
th:if=
"${not #lists.isEmpty(tempFl)}"
>
<li
class=
"list-group-item list-group-item-info"
th:each=
"TFL:${tempFl}"
>
<span
th:text=
"${TFL.getToName()}"
></span>
<button
class=
"btn btn-primary"
>
查看好友信息
</button>
</li>
</ul>
</div>
</div>
</div>
<br>
</div>
<div
class=
"col-md-8"
>
<div
class=
"col-md-6"
>
<div
class=
"panel panel-primary"
>
<div
class=
"panel-heading"
>
...
...
@@ -149,13 +153,40 @@
<ul
class=
"list-group"
th:if=
"${not #lists.isEmpty(Fl) or #lists.isEmpty(Fl1)}"
>
<li
class=
"list-group-item list-group-item-info"
th:each=
"FL:${Fl}"
>
<span
th:text=
"${FL.getToName()}"
></span>
<button
class=
"btn btn-primary"
>
聊天
</button>
<button
class=
"btn btn-primary"
>
查看好友信息
</button>
</li>
<li
class=
"list-group-item list-group-item-info"
th:each=
"FL1:${Fl1}"
>
<span
th:text=
"${FL1.getFromName()}"
></span>
<button
class=
"btn btn-primary"
>
聊天
</button>
<button
class=
"btn btn-primary"
>
查看好友信息
</button>
</li>
</ul>
</div>
</div>
</div>
</div>
<div
class=
"col-md-8"
>
<div
class=
"col-md-6"
>
<div
class=
"panel panel-primary"
>
<div
class=
"panel-heading"
>
<h3
class=
"panel-title"
>
查看好友信息或发起聊天
</h3>
</div>
<div
class=
"panel-body"
>
<ul
class=
"list-group"
>
<li
class=
"list-group-item-heading"
>
请输入要查看的好友的学号:
</li>
<li
class=
"list-group-item-text"
>
<form
name=
"browseFriendInfo"
method=
"post"
th:action=
"@{/toBrowseFriendInfo}"
action=
"/toBrowseFriendInfo"
onsubmit=
"return check(browseFriendInfo.toName.value)"
>
<label>
<input
type=
"text"
name=
"toName"
placeholder=
"示例:201724073161"
>
</label>
<input
class=
"btn-primary"
type=
"submit"
value=
"查询"
>
</form>
</li>
<li
class=
"list-group-item-heading"
>
请输入要发起私聊的好友学号:
</li>
<li
class=
"list-group-item-text"
>
<form
name=
"chatFrom"
method=
"post"
action=
"#"
onsubmit=
"check()"
>
<label>
<input
type=
"text"
name=
"toName"
placeholder=
"示例:201724073161"
>
</label>
<input
class=
"btn-primary"
type=
"submit"
value=
"发起"
>
</form>
</li>
</ul>
</div>
...
...
@@ -164,7 +195,13 @@
</div>
</div>
</div>
<script
type=
"text/javascript"
>
function
check
(
value
)
{
if
(
value
!==
""
)
return
true
;
return
false
;
}
</script>
<div
id=
"after_sale"
>
<div
class=
"container"
>
<ul>
...
...
src/main/resources/templates/page/UserCenter.html
浏览文件 @
168c0318
...
...
@@ -119,6 +119,7 @@
<li><a
href=
"/publicChatRoom"
>
公共聊天室
</a>
</li>
<li><a
href=
"/toAddFriend"
>
添加好友
</a>
</li>
<li><a
href=
"/toMyFriend"
>
我的好友
</a>
</li>
<li><a
href=
"/toVerifyFriend"
>
好友申请验证
</a>
</li>
</ul>
<hr
class=
"hidden-sm hidden-md hidden-lg"
>
</div>
...
...
src/main/resources/templates/page/VerifyFriend.html
0 → 100644
浏览文件 @
168c0318
<!DOCTYPE html>
<html
xmlns:th=
"http://www.thymeleaf.org"
xmlns:sec=
"http://www.thymeleaf.org/thymeleaf-extras-springsecurity4"
lang=
"en"
>
<head>
<meta
charset=
"UTF-8"
>
<title>
好友申请验证
</title>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"../static/css/oppo.css"
>
<!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
<link
rel=
"stylesheet"
href=
"https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css"
integrity=
"sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u"
crossorigin=
"anonymous"
>
<!-- 可选的 Bootstrap 主题文件(一般不用引入) -->
<link
rel=
"stylesheet"
href=
"https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap-theme.min.css"
integrity=
"sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp"
crossorigin=
"anonymous"
>
<!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
<script
src=
"https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/js/bootstrap.min.js"
integrity=
"sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa"
crossorigin=
"anonymous"
></script>
<script
src=
"https://cdn.bootcss.com/jquery/1.12.4/jquery.min.js"
></script>
<style>
body
{
background
:
#eee
;
font-family
:
Helvetica
Neue
,
Helvetica
,
Arial
,
sans-serif
;
font-size
:
14px
;
color
:
#000
;
margin
:
0
;
padding
:
0
;
}
.user-info
{
margin
:
10px
auto
;
width
:
800px
;
height
:
auto
;
}
#scroll
{
position
:
fixed
;
top
:
300px
;
right
:
100px
;
}
.scrollItem
{
width
:
20px
;
height
:
70px
;
border
:
#e1e1e1
1px
solid
;
cursor
:
pointer
;
text-align
:
center
;
padding-top
:
10px
;
}
</style>
<script
src=
"http://www.jq22.com/jquery/1.7.2/jquery.min.js"
></script>
<script
type=
"text/javascript"
>
$
(
function
()
{
var
speed
=
800
;
//滚动速度
var
h
=
document
.
body
.
clientHeight
;
//回到顶部
$
(
"
#toTop
"
).
click
(
function
()
{
$
(
'
html,body
'
).
animate
({
scrollTop
:
'
0px
'
},
speed
);
});
//回到底部
var
windowHeight
=
parseInt
(
$
(
"
body
"
).
css
(
"
height
"
));
//整个页面的高度
$
(
"
#toBottom
"
).
click
(
function
()
{
//alert(h);
$
(
'
html,body
'
).
animate
({
scrollTop
:
h
+
'
px
'
},
speed
);
});
});
</script>
</head>
<body>
<!--页面顶部-->
<div
id=
"top"
>
<div
class=
"container"
></div>
</div>
<!-- 页面的头部 -->
<div
id=
"header"
>
<div
class=
"container"
>
<div
class=
"header_left left"
>
<div
class=
"xlwb"
></div>
<div
class=
"txwb"
></div>
<div
class=
"tel"
>
150-1436-6986
</div>
</div>
<ul>
<li>
<form
th:action=
"@{/logout}"
method=
"post"
>
<input
type=
"submit"
class=
"btn btn-link"
th:value=
"安全退出"
>
</form>
</li>
</ul>
</div>
</div>
<!-- 页面的导航 -->
<div
id=
"nav"
>
<div
class=
"container"
>
<div
class=
"logo left"
>
<h1>
Campus
</h1>
</div>
<ul>
<li><a
href=
"/home"
>
Home
</a></li>
<li><a
href=
"/learn"
>
学习资源
</a></li>
<li><a
href=
"/news"
>
校内新闻
</a></li>
<li
sec:authorize=
"hasRole('ROLE_USER')"
><a
href=
"/userCenter"
style=
"color: red"
th:text=
"${curUse.getName()}"
></a>
</li>
<li
sec:authorize=
"hasRole('ROLE_ADMIN')"
><a
href=
"/admin"
>
网站管理
</a></li>
<li
sec:authorize=
"hasRole('ROLE_ADMIN')"
><a
href=
"/userCenter"
style=
"color: red"
th:text=
"${curUse.getName()}"
></a>
</li>
</ul>
</div>
</div>
<div
class=
"container"
>
<div
class=
"row"
>
<div
class=
"col-sm-4"
>
<ul
class=
"nav nav-pills nav-stacked"
>
<li><a
href=
"/userCenter"
>
信息查看
</a>
</li>
<li><a
href=
"/updateUserInfo"
>
更新信息
</a></li>
<li><a
href=
"/sign"
>
注册
</a></li>
<li><a
href=
"/toChangePWD"
>
修改密码
</a></li>
<li><a
href=
"/toQueryGrade"
>
查看课程成绩
</a>
</li>
<li><a
href=
"/toUpQuestion"
>
申请问题悬赏
</a>
</li>
<li><a
href=
"/toBrowserQuestion"
>
浏览悬赏问题
</a>
</li>
<li><a
href=
"/publicChatRoom"
>
公共聊天室
</a>
</li>
<li><a
href=
"/toAddFriend"
>
添加好友
</a>
</li>
<li><a
href=
"/toMyFriend"
>
我的好友
</a>
</li>
<li
class=
"active"
><a
href=
"/toVerifyFriend"
>
好友申请验证
</a>
</li>
</ul>
<hr
class=
"hidden-sm hidden-md hidden-lg"
>
</div>
<div
class=
"col-md-8"
>
<div
class=
"starter-template"
>
<h1
th:text=
"${msg.title}"
></h1>
<p
class=
"bg-primary"
th:text=
"${msg.content}"
></p>
</div>
<div
class=
"col-md-6"
>
<div
class=
"panel panel-primary"
>
<div
class=
"panel-heading"
>
<h3
class=
"panel-title"
>
好友申请待验证
</h3>
</div>
<div
class=
"panel-body"
>
<ul
class=
"list-group"
th:if=
"${not #lists.isEmpty(fl)}"
>
<li
class=
"list-group-item list-group-item-info"
th:each=
"TFL:${fl}"
>
<span
th:text=
"${TFL.getFromName()}"
></span>
</li>
</ul>
</div>
</div>
</div>
</div>
<!--TODO:编辑通过好友申请的功能-->
</div>
</div>
<div
id=
"after_sale"
>
<div
class=
"container"
>
<ul>
<li>
<ol>
<li><a
href=
"#"
>
联系方式
</a></li>
<li><a
href=
"#"
>
15014366986
</a></li>
<li><a
href=
"#"
>
2923616405
</a></li>
<li><a
href=
"#"
>
pyc852164
</a></li>
</ol>
</li>
<li>
<ol>
<li><a
href=
"#"
>
关于我
</a></li>
<li><a
href=
"https://blog.csdn.net/qq_42896653"
>
CSDN
</a></li>
<li><a
href=
"https://github.com/pyc-ycy"
>
Github
</a></li>
<li><a
href=
"https://gitee.com/pengyoucongcode"
>
Gitee
</a></li>
</ol>
</li>
<li>
<ol>
<li>
关于我
</li>
<li>
我的博客文章,
</li>
<li>
我的代码托管平台,
</li>
<li>
也是代码托管平台,
</li>
</ol>
</li>
<li>
<ol>
<li>
关于我
</li>
<li>
可以了解我的所学
</li>
<li>
可以看到我的开源代码
</li>
<li>
为避免Github访问不了
</li>
</ol>
</li>
</ul>
</div>
</div>
<div
id=
"footer"
>
<div
class=
"container"
>
<p
style=
"color: white;text-align: center;"
>
@2020 御承扬Copyright
©
2020-05-04
</p>
</div>
</div>
<div
id=
"scroll"
>
<div
class=
"scrollItem"
id=
"toTop"
>
顶部
</div>
<div
class=
"scrollItem"
id=
"toBottom"
>
底部
</div>
</div>
<script
type=
"text/javascript"
src=
"../static/js/jquery-1.11.3.js"
></script>
<script
type=
"text/javascript"
src=
"../static/js/oppo.js"
></script>
</body>
</html>
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录