feat(crawl): 账号退出

This commit is contained in:
xiongxiaoyang 2023-10-15 19:13:07 +08:00
parent a55f456b3d
commit 0332802fe5
9 changed files with 78 additions and 86 deletions

View File

@ -55,6 +55,9 @@ public class SecurityConfiguration extends WebSecurityConfigurerAdapter {
.antMatchers("/css/**").permitAll()
.antMatchers("/**").hasRole("ADMIN")
.and().formLogin().loginPage("/login.html").loginProcessingUrl("/login").permitAll()
.and().logout()
.logoutUrl("/logout")
.logoutSuccessUrl("/")
.and().httpBasic();
}

View File

@ -12,15 +12,7 @@
</head>
<body class="">
<div class="header">
<div class="mainNav" id="mainNav">
<div class="box_center cf"
style="text-align: center;height: 44px;line-height: 48px;color: #fff;font-size: 16px;">
小说精品屋爬虫管理
</div>
</div>
<div th:replace="crawl/header :: header">
</div>
<div class="main box_center cf">
@ -165,7 +157,14 @@
$.ajax({
type: "POST",
url: "/crawl/addCrawlSingleTask",
data: {'sourceId': sourceId, 'sourceName': sourceName,'catId':catId,'sourceBookId' : sourceBookId,'bookName':bookName,'authorName':authorName},
data: {
'sourceId': sourceId,
'sourceName': sourceName,
'catId': catId,
'sourceBookId': sourceBookId,
'bookName': bookName,
'authorName': authorName
},
dataType: "json",
success: function (data) {
if (data.code == 200) {

View File

@ -12,15 +12,7 @@
</head>
<body class="">
<div class="header">
<div class="mainNav" id="mainNav">
<div class="box_center cf"
style="text-align: center;height: 44px;line-height: 48px;color: #fff;font-size: 16px;">
小说精品屋爬虫管理
</div>
</div>
<div th:replace="crawl/header :: header">
</div>
<div class="main box_center cf">

View File

@ -12,15 +12,7 @@
</head>
<body class="">
<div class="header">
<div class="mainNav" id="mainNav">
<div class="box_center cf"
style="text-align: center;height: 44px;line-height: 48px;color: #fff;font-size: 16px;">
小说精品屋爬虫管理
</div>
</div>
<div th:replace="crawl/header :: header">
</div>
<div class="main box_center cf">

View File

@ -12,15 +12,7 @@
</head>
<body class="">
<div class="header">
<div class="mainNav" id="mainNav">
<div class="box_center cf"
style="text-align: center;height: 44px;line-height: 48px;color: #fff;font-size: 16px;">
小说精品屋爬虫管理
</div>
</div>
<div th:replace="crawl/header :: header">
</div>
<div class="main box_center cf">

View File

@ -12,15 +12,7 @@
</head>
<body class="">
<div class="header">
<div class="mainNav" id="mainNav">
<div class="box_center cf"
style="text-align: center;height: 44px;line-height: 48px;color: #fff;font-size: 16px;">
小说精品屋爬虫管理
</div>
</div>
<div th:replace="crawl/header :: header">
</div>
<div class="main box_center cf">

View File

@ -12,15 +12,7 @@
</head>
<body class="">
<div class="header">
<div class="mainNav" id="mainNav">
<div class="box_center cf"
style="text-align: center;height: 44px;line-height: 48px;color: #fff;font-size: 16px;">
小说精品屋爬虫管理
</div>
</div>
<div th:replace="crawl/header :: header">
</div>
<div class="main box_center cf">
@ -229,6 +221,7 @@
})
}
}
function loadPage(data) {
$("#sourceId").val(data.id);
$("#sourceName").val(data.sourceName);
@ -279,6 +272,7 @@
}
}
load();
function updateCrawlSource() {

View File

@ -0,0 +1,28 @@
<div th:fragment="header" class="header">
<div class="mainNav" id="mainNav">
<div class="box_center cf"
style="text-align: center;height: 44px;line-height: 48px;color: #fff;font-size: 16px;width: 100%">
小说精品屋爬虫管理
<div style="text-align: center;height: 44px;line-height: 48px;font-size: 14px;float: right;padding-right: 20px">
<a style="color: #fff;"
href="/logout">
退出
</a>
</div>
<div style="float: right;margin-right:5px;margin-top: 15px">
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img"
class="mr-3 iconify iconify--gitee icon-user-arrow-right" width="16" height="16"
preserveAspectRatio="xMidYMid meet" viewBox="0 0 16 16">
<g fill="none" fill-rule="evenodd">
<path d="M0 0h16v16H0z"></path>
<path fill="currentColor" fill-rule="nonzero"
d="M8 1.5a3.5 3.5 0 01.192 6.995L8 8.5a5.75 5.75 0 00-5.75 5.75.5.5 0 11-1 0 6.753 6.753 0 014.681-6.427A3.5 3.5 0 018 1.5zm6.996 10.767.003.041v.002l.001.011a.51.51 0 010 .006v.006l-.002.03a.502.502 0 01-.004.037l-.002.011a.39.39 0 01-.016.063.491.491 0 01-.053.114l-.028.039-.031.035.027-.03-.009.011-.017.02-.011.012-2.122 2.121a.5.5 0 01-.707-.707l1.268-1.268H9.5a.5.5 0 110-1h3.794l-1.269-1.267a.5.5 0 11.707-.708l2.122 2.122a.491.491 0 01.135.248l.005.037v-.006zM8 2.5a2.5 2.5 0 100 5 2.5 2.5 0 000-5z"></path>
</g>
</svg>
</div>
</div>
</div>
</div>

View File

@ -44,7 +44,7 @@
<body>
<div class="container">
<form class="form-signin" method="post" action="/login">
<h4 class="form-signin-heading">爬虫管理系统登录</h4>
<h4 style="text-align: center" class="form-signin-heading">爬虫管理系统登录</h4>
<p>
<label for="username" class="sr-only">用户名</label>
<input type="text" id="username" name="username" class="form-control" placeholder="用户名" required