index.html 2.0 KB
Newer Older
H
hjdhnx 已提交
1 2 3
<!DOCTYPE html>
<html lang="en">
<head>
H
hjdhnx 已提交
4
    <meta charset="utf-8">
H
hjdhnx 已提交
5
    <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon"/>
H
hjdhnx 已提交
6 7 8 9
    <meta http-equiv="Cache-Control" content="no-siteapp;no-transform">
    <meta name="applicable-device" content="pc,mobile">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
H
hjdhnx 已提交
10
    <title>dr_py首页</title>
H
hjdhnx 已提交
11
    <script src="/static/js/jquery.min.js"></script>
H
hjdhnx 已提交
12
</head>
H
hjdhnx 已提交
13 14 15 16 17 18 19 20 21 22 23 24 25 26
<style>
    .btn{
        margin-bottom: 2rem;
        border:1px solid #F00;
        width: 180px;
        height: 30px;
        text-align: center;
        background-color: #1379cb;
        color: #ffffff;
    }
    .btn a{
        color: #ffffff;
    }
</style>
H
hjdhnx 已提交
27
<body>
H
hjdhnx 已提交
28 29 30 31 32 33 34 35 36 37 38 39
<script>
    $(document).ready(function(){
        $("#gen_config").click(function(){
            // let rule = this.innerText.trim();
            let code = $.ajax({url:"/configs",async:false}).responseText;
            code = typeof(code) === "object"?code:JSON.parse(code);
            if(code.code === 200){
                alert(code.msg);
            }
        });
});
</script>
H
hjdhnx 已提交
40 41
<h1>欢迎使用dr_py项目</h1>
<p>可以简单的自定义爬虫实现cms数据接口</p>
H
hjdhnx 已提交
42
<div class="btn">
H
hjdhnx 已提交
43 44
    <a href="/clear?rule=">缓存清理接口</a>
</div>
H
hjdhnx 已提交
45 46 47 48 49
<div class="btn">
    <a href="/rules">缓存文件列表-清除</a>
</div>
<div class="btn">
    <a href="/raw">缓存文件列表-查看</a>
H
hjdhnx 已提交
50
</div>
H
hjdhnx 已提交
51 52 53
<div class="btn">
    <a href="http://{{ getHost(0) }}/config/0">本地配置地址</a>
</div>
H
hjdhnx 已提交
54 55 56
<!--<a href="{{ getHost(1) }}">局域网:{{ getHost(1) }}</a>-->
<p>局域网:{{ getHost(1) }}</p>
{% if '192.168' in getHost(1) %}
H
hjdhnx 已提交
57 58 59
<div class="btn">
    <a href="http://{{ getHost(1) }}/config/1">局域网配置地址</a>
</div>
H
hjdhnx 已提交
60
{% endif %}
H
hjdhnx 已提交
61 62 63
<div class="btn">
    <a href="http://{{ getHost(2) }}/config/2">远程配置地址</a>
</div>
H
hjdhnx 已提交
64

H
hjdhnx 已提交
65 66 67
<div class="btn">
    <a href="javascript:void(0);" id="gen_config">生成配置文件</a>
</div>
H
hjdhnx 已提交
68 69
</body>
</html>