File size: 4,406 Bytes
f5baa4d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
<!DOCTYPE html>
<html>

<head>
  <meta charset="utf-8">
  <title>cookie推送工具配置</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <link rel="stylesheet" href="/vendor/layui/css/layui.css" media="all">
</head>

<body>

  <div class="layui-main">
    <fieldset class="layui-elem-field layui-field-title" style="margin-top: 50px;text-align:center;">
      <legend>cookie推送配置</legend>
    </fieldset>

    <form class="layui-form" action="" lay-filter="configForm" id="configForm">
      <div class="layui-form-item">
        <label class="layui-form-label">推送链接</label>
        <div class="layui-input-block">
          <input type="text" name="url" lay-verify="url" autocomplete="off" placeholder="请输入服务器地址" class="layui-input"
            lay-verType="tips">
        </div>
      </div>

      <div class="layui-form-item">
        <label class="layui-form-label">请求方法</label>
        <div class="layui-input-block">
          <select name="method">
            <option value="GET">GET</option>
            <option value="POST" selected>POST</option>
            <option value="PUT">PUT</option>
            <option value="DELETE">DELETE</option>
            <option value="PATCH">PATCH</option>
          </select>
        </div>
      </div>

      <div class="layui-form-item">
        <label class="layui-form-label">推送字段名</label>
        <div class="layui-input-block">
          <input type="text" name="fieldName" id="fieldName" lay-verify="required" autocomplete="off"
            class="layui-input" value="cookie" lay-verType="tips">
        </div>
      </div>

      <div class="layui-form-item">
        <label class="layui-form-label">存放位置</label>
        <div class="layui-input-block">
          <select name="fieldLocation">
            <option value="body" selected>body</option>
            <option value="url">url</option>
            <option value="header">header</option>
          </select>
        </div>
      </div>

      <div class="layui-form-item">
        <label class="layui-form-label">自动推送</label>
        <div class="layui-input-inline">
          <input type="checkbox" name="isAutoPush" lay-skin="switch" lay-filter="isAutoPush" lay-text="开启|关闭">
        </div>
        <div class="layui-form-mid layui-word-aux">开启后将在cookie发生改变时自动推送</div>
      </div>

      <div class="layui-hide" id='autoPushConfigView'>
        <div class="layui-form-item">
          <label class="layui-form-label">监控URL</label>
          <div class="layui-input-block">
            <input type="text" id="listenerUrl" name="listenerUrl" lay-reqText="监控的URL不能为空" autocomplete="off"
              placeholder="请输入需要监控的URL" class="layui-input" lay-verType="tips">
          </div>
        </div>

        <div class="layui-form-item" style="white-space:nowrap!important;">
          <label class="layui-form-label">监控Cookie</label>
          <div class="layui-input-block" id="cookieNames"></div>
        </div>

        <div class="layui-form-item" style="white-space:nowrap!important;">
          <label class="layui-form-label">最短推送间隔</label>
          <div class="layui-input-inline">
            <input type="number" id="minPushInterval" name="minPushInterval" lay-reqText="推送间隔不能为空" autocomplete="off"
              placeholder="请输入推送间隔时间" class="layui-input" lay-verType="tips" value="300">
          </div>
          <div class="layui-form-mid"></div>
          <div class="layui-form-mid layui-word-aux">用于防止短时间内进行无意义的重复推送</div>
        </div>
      </div>
      <div class="layui-form-item" style="text-align:center;">
        <div class="layui-input-block">
          <button type="button" class="layui-btn" lay-submit lay-filter="save" id="saveConfig">保存</button>
        </div>
      </div>
    </form>
  </div>
  <script src="/vendor/layui/layui.js" charset="utf-8"></script>
  <script src="/vendor/notify/notify.js" charset="utf-8"></script>
  <script src="/vendor/xm-select/xm-select.js" charset="utf-8"></script>
  <script src="/js/options.js" charset="utf-8"></script>

</body>

</html>