|
|
|
@ -3,6 +3,7 @@ |
|
|
|
|
<div class="bt-w-menu"> |
|
|
|
|
<p class="bgw" onclick="pluginService('clean');">服务</p> |
|
|
|
|
<p onclick="pluginConfig('clean');">配置修改</p> |
|
|
|
|
<p onclick="commonFunc();">常用功能</p> |
|
|
|
|
<p onclick="pluginLogs('clean',null,'run_log');">运行日志</p> |
|
|
|
|
<p onclick="pRead()">说明</p> |
|
|
|
|
</div> |
|
|
|
@ -12,8 +13,53 @@ |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<script type="text/javascript"> |
|
|
|
|
|
|
|
|
|
pluginService('clean'); |
|
|
|
|
|
|
|
|
|
function cleanPost(method, version, args, callback){ |
|
|
|
|
var loadT = layer.msg('正在获取...', { icon: 16, time: 0, shade: 0.3 }); |
|
|
|
|
|
|
|
|
|
var req_data = {}; |
|
|
|
|
req_data['name'] = 'clean'; |
|
|
|
|
req_data['func'] = method; |
|
|
|
|
req_data['version'] = version; |
|
|
|
|
|
|
|
|
|
if (typeof(args) == 'string'){ |
|
|
|
|
req_data['args'] = JSON.stringify(toArrayObject(args)); |
|
|
|
|
} else { |
|
|
|
|
req_data['args'] = JSON.stringify(args); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$.post('/plugins/run', req_data, function(data) { |
|
|
|
|
layer.close(loadT); |
|
|
|
|
if (!data.status){ |
|
|
|
|
layer.msg(data.msg,{icon:0,time:2000,shade: [10, '#000']}); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if(typeof(callback) == 'function'){ |
|
|
|
|
callback(data); |
|
|
|
|
} |
|
|
|
|
},'json'); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function cleanRun(){ |
|
|
|
|
cleanPost('clean_run', '', {}, function(rdata){ |
|
|
|
|
// var rdata = $.parseJSON(rdata.data); |
|
|
|
|
// layer.msg(rdata.msg, { icon: rdata.status ? 1 : 2 }); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
layer.msg("执行成功!", { icon: 1}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function commonFunc(){ |
|
|
|
|
|
|
|
|
|
con = '<hr/><p class="conf_p" style="text-align:center;">\ |
|
|
|
|
<button class="btn btn-default btn-sm" onclick="cleanRun()">手动执行</button> \ |
|
|
|
|
</p>'; |
|
|
|
|
|
|
|
|
|
$(".soft-man-con").html(con); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function pRead(){ |
|
|
|
|
var readme = '<ul class="help-info-text c7">'; |
|
|
|
|