mirror of
https://github.com/201206030/novel.git
synced 2025-06-24 08:06:39 +00:00
新增爬虫智能化配置项设置,优化按钮重复点击事件
This commit is contained in:
@ -35,9 +35,9 @@ spring:
|
||||
datasource:
|
||||
type: com.alibaba.druid.pool.DruidDataSource
|
||||
driverClassName: com.mysql.jdbc.Driver
|
||||
url: jdbc:mysql://127.0.0.1:3306/books?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai
|
||||
url: jdbc:mysql://47.106.243.172:3306/books?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai
|
||||
username: books
|
||||
password: books
|
||||
password: books!8888
|
||||
#password:
|
||||
initialSize: 1
|
||||
minIdle: 3
|
||||
|
@ -56,7 +56,7 @@
|
||||
<!-- 指定项目中某个包,当有日志操作行为时的日志记录级别 -->
|
||||
<!-- com.maijinjie.springboot 为根包,也就是只要是发生在这个根包下面的所有日志操作行为的权限都是DEBUG -->
|
||||
<!-- 级别依次为【从高到低】:FATAL > ERROR > WARN > INFO > DEBUG > TRACE -->
|
||||
<logger name="com.java2nb" level="ERROR">
|
||||
<logger name="com.java2nb" level="DEBUG">
|
||||
<appender-ref ref="debug" />
|
||||
</logger>
|
||||
</configuration>
|
||||
|
@ -98,14 +98,21 @@ function load() {
|
||||
}]
|
||||
});
|
||||
}
|
||||
|
||||
//防表单连续点击,需要等第一个点击有结果,才能进行第二次点击
|
||||
var lock = false;
|
||||
function updateStatus(id,cStatus,crawlWebCode,uStatus) {
|
||||
if(cStatus === 1 && uStatus === 1){
|
||||
if (lock) {
|
||||
return;
|
||||
}
|
||||
lock = true;
|
||||
|
||||
if(cStatus === 1 && uStatus === 1){
|
||||
lock = false;
|
||||
parent.layer.alert("正在运行中,无需重复运行");
|
||||
return;
|
||||
}
|
||||
if(cStatus === 0 && uStatus === 0){
|
||||
lock = false;
|
||||
parent.layer.alert("已经停止运行,无需重复执行");
|
||||
return;
|
||||
}
|
||||
@ -116,9 +123,11 @@ function updateStatus(id,cStatus,crawlWebCode,uStatus) {
|
||||
data : {id:id,status:uStatus,crawlWebCode:crawlWebCode},// 你的formid
|
||||
async : false,
|
||||
error : function(request) {
|
||||
lock = false;
|
||||
parent.layer.alert("Connection error");
|
||||
},
|
||||
success : function(data) {
|
||||
lock = false;
|
||||
if (data.code == 0) {
|
||||
layer.msg(data.msg);
|
||||
reLoad();
|
||||
|
Reference in New Issue
Block a user