Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
御承扬
Campus
提交
ebc75995
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 搜索 >>
提交
ebc75995
编写于
6月 14, 2020
作者:
7
7wc98#14
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Update
上级
0a6bfc6a
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
287 addition
and
2 deletion
+287
-2
src/main/java/com/pyc/campus/controller/WebController.java
src/main/java/com/pyc/campus/controller/WebController.java
+8
-0
src/main/java/com/pyc/campus/domain/Question.java
src/main/java/com/pyc/campus/domain/Question.java
+12
-0
src/main/resources/templates/page/AdminPage.html
src/main/resources/templates/page/AdminPage.html
+3
-0
src/main/resources/templates/page/PublishQuestion.html
src/main/resources/templates/page/PublishQuestion.html
+262
-0
src/main/resources/templates/page/UpQuestion.html
src/main/resources/templates/page/UpQuestion.html
+2
-2
未找到文件。
src/main/java/com/pyc/campus/controller/WebController.java
浏览文件 @
ebc75995
...
...
@@ -349,4 +349,12 @@ public class WebController {
return
"page/UpQuestion"
;
}
}
@RequestMapping
(
"/toPublishQuestion"
)
public
String
toPublishQuestion
(
Model
model
,
HttpSession
session
){
SecurityContextImpl
securityContext
=
(
SecurityContextImpl
)
session
.
getAttribute
(
"SPRING_SECURITY_CONTEXT"
);
String
currentStudentId
=
((
UserDetails
)
securityContext
.
getAuthentication
().
getPrincipal
()).
getUsername
();
Student
s
=
studentRepository
.
findNameByStudentID
(
currentStudentId
);
model
.
addAttribute
(
"curUse"
,
s
);
return
"/page/PublishQuestion"
;
}
}
src/main/java/com/pyc/campus/domain/Question.java
0 → 100644
浏览文件 @
ebc75995
//IntelliJ IDEA
//campus
//Question
//2020/6/14
// Author:御承扬
//E-mail:2923616405@qq.com
package
com.pyc.campus.domain
;
public
class
Question
{
}
src/main/resources/templates/page/AdminPage.html
浏览文件 @
ebc75995
...
...
@@ -94,6 +94,9 @@
<div
class=
"item-box list-group-item"
>
<a
href=
"/toImportGrade"
>
成绩导入
</a>
</div>
<div
class=
"item-box list-group-item"
>
<a
href=
"/toPublishQuestion"
>
发布悬赏问题
</a>
</div>
</div>
</div>
</div>
...
...
src/main/resources/templates/page/PublishQuestion.html
0 → 100644
浏览文件 @
ebc75995
<!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
{
font-family
:
Helvetica
Neue
,
Helvetica
,
Arial
,
sans-serif
;
font-size
:
14px
;
color
:
#000
;
margin
:
0
;
padding
:
0
;
background
:
#eee
url("../../static/images/campus/logo.jpg")
center
no-repeat
fixed
;
}
.main
{
margin
:
10px
auto
;
width
:
800px
;
height
:
700px
;
}
.form-box
{
margin
:
100px
auto
;
width
:
500px
;
height
:
auto
;
}
.starter-template
{
padding
:
40px
15px
;
text-align
:
center
;
}
</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
class=
"right"
>
<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
class=
"right"
>
<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=
"main"
>
<h1>
悬赏问题发布
</h1>
<div
class=
"form-box"
>
<form
class=
"form-horizontal"
method=
"post"
name=
"form"
>
<div
class=
"form-group"
>
<label
for=
"inputEmail3"
class=
"col-sm-2 control-label"
>
邮箱
</label>
<div
class=
"col-sm-10"
>
<input
type=
"email"
class=
"form-control"
name=
"mail"
id=
"inputEmail3"
placeholder=
"Your Email"
>
</div>
</div>
<div
class=
"form-group"
>
<label
for=
"inputName"
class=
"col-sm-2 control-label"
>
姓名
</label>
<div
class=
"col-sm-10"
>
<input
type=
"text"
class=
"form-control"
name=
"name"
id=
"inputName"
placeholder=
"Your Name"
>
</div>
</div>
<div
class=
"form-group"
>
<label
for=
"inputTitle"
class=
"col-sm-2 control-label"
>
问题类型
</label>
<div
class=
"col-sm-10"
>
<input
type=
"text"
class=
"form-control"
name=
"title"
id=
"inputTitle"
placeholder=
"Title Of Your Question"
>
</div>
</div>
<div
class=
"form-group"
>
<label
for=
"inputContent"
class=
"col-sm-2 control-label"
>
问题描述
</label>
<div
class=
"col-sm-10"
>
<textarea
class=
"form-control"
name=
"content"
id=
"inputContent"
rows=
"3"
placeholder=
"请描述你的问题,一百字以内"
></textarea>
</div>
</div>
<div
class=
"form-group"
>
<label
for=
"inputReward"
class=
"col-sm-2 control-label"
>
悬赏
</label>
<div
class=
"col-sm-10"
>
<input
type=
"text"
class=
"form-control"
name=
"reward"
id=
"inputReward"
placeholder=
"Reward Of Your Question"
>
</div>
</div>
<div
class=
"form-group"
>
<div
class=
"col-sm-offset-2 col-sm-10"
>
<button
type=
"submit"
class=
"btn btn-default"
>
发布
</button>
</div>
</div>
</form>
</div>
</div>
<div
id=
"serve"
>
<div
class=
"container"
>
<ul>
<li>
<dl>
<dt></dt>
<dd
class=
"dd1"
>
正规网站
</dd>
<dd
class=
"dd2"
>
所有的服务都是合法的
</dd>
</dl>
</li>
<li>
<dl>
<dt></dt>
<dd
class=
"dd1"
>
正规网站
</dd>
<dd
class=
"dd2"
>
所有的服务都是合法的
</dd>
</dl>
</li>
<li>
<dl>
<dt></dt>
<dd
class=
"dd1"
>
正规网站
</dd>
<dd
class=
"dd2"
>
所有的服务都是合法的
</dd>
</dl>
</li>
<li>
<dl>
<dt></dt>
<dd
class=
"dd1"
>
正规网站
</dd>
<dd
class=
"dd2"
>
所有的服务都是合法的
</dd>
</dl>
</li>
<li>
<dl>
<dt></dt>
<dd
class=
"dd1"
>
正规网站
</dd>
<dd
class=
"dd2"
>
所有的服务都是合法的
</dd>
</dl>
</li>
</ul>
</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>
<a
id=
"btn"
href=
"javascript:;"
style=
'position:fixed;right: 0px; bottom: 25%;font-size: 24px;'
>
<img
src=
"../../static/images/toTop1.png"
alt=
"pic"
>
</a>
<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
;
window
.
onscroll
=
function
()
{
let
backTop
=
document
.
documentElement
.
scrollTop
||
document
.
body
.
scrollTop
;
if
(
backTop
>
pageHeight
)
{
tp
.
style
.
display
=
"
block
"
;
}
else
{
tp
.
style
.
display
=
"
none
"
;
}
if
(
backTop
>=
navTop
)
{
nav
.
style
.
position
=
"
fixed
"
;
nav
.
style
.
top
=
"
0
"
;
nav
.
style
.
left
=
"
0
"
;
nav
.
style
.
zIndex
=
"
100
"
;
}
else
{
nav
.
style
.
position
=
""
;
}
}
}
</script>
</body>
</html>
\ No newline at end of file
src/main/resources/templates/page/UpQuestion.html
浏览文件 @
ebc75995
...
...
@@ -85,7 +85,7 @@
</div>
</div>
<div
class=
"main"
>
<h1>
成绩导入
</h1>
<h1>
悬赏问题申请
</h1>
<div
class=
"starter-template"
>
<h1
th:text=
"${msg.title}"
></h1>
<p
class=
"bg-primary"
th:text=
"${msg.content}"
></p>
...
...
@@ -105,7 +105,7 @@
</div>
</div>
<div
class=
"form-group"
>
<label
for=
"inputTitle"
class=
"col-sm-2 control-label"
>
问题
标题
</label>
<label
for=
"inputTitle"
class=
"col-sm-2 control-label"
>
问题
类型
</label>
<div
class=
"col-sm-10"
>
<input
type=
"text"
class=
"form-control"
name=
"title"
id=
"inputTitle"
placeholder=
"Title Of Your Question"
>
</div>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录