tamper.html 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>Insert title here</title>
  6. <link rel="stylesheet" type="text/css" href="${ctx}/assets/static/h-ui/css/H-ui.min.css" />
  7. <link rel="stylesheet" type="text/css" href="${ctx}/assets/static/h-ui.admin/css/H-ui.admin.css" />
  8. <link rel="stylesheet" type="text/css" href="${ctx}/assets/lib/Hui-iconfont/1.0.7/iconfont.css" />
  9. <link rel="stylesheet" type="text/css" href="${ctx}/assets/lib/icheck/icheck.css" />
  10. <link rel="stylesheet" type="text/css" href="${ctx}/assets/static/h-ui.admin/skin/default/skin.css" id="skin" />
  11. <link rel="stylesheet" type="text/css" href="${ctx}/assets/static/h-ui.admin/css/style.css" />
  12. <script type="text/ecmascript" src="${ctx}/assets/lib/jquery/1.9.1/jquery.js"></script>
  13. <script type="text/javascript" src="${ctx}/assets/static/h-ui/js/H-ui.js"></script>
  14. <link rel="stylesheet" type="text/css" href="${ctx}/assets/lib/on-off/css/style.css" />
  15. <link rel="stylesheet" type="text/css" href="${ctx}/assets/lib/on-off/css/font-awesome.css" />
  16. <script type="text/javascript" src="${ctx}/assets/lib/layer/3.0.3/layer.js"></script>
  17. <script type="text/javascript">
  18. $(function(){
  19. $('#tamperOpen').on('click', function () {
  20. var val =$(this).is(':checked');
  21. //console.log(val);
  22. $.post("${ctx}/myconsole/tamper/saveOrUpdate",{"tamper.open":val},function(rtn){
  23. //console.log(rtn);
  24. })
  25. });
  26. if(${tamper.open!"false"}){
  27. $("#tamperOpen").attr("checked", "checked");
  28. }
  29. $("#tamperPrefix").change(function(){
  30. $.post("${ctx}/myconsole/tamper/saveOrUpdate",{"tamper.prefix":$(this).val()},function(rtn){
  31. //console.log(rtn);
  32. var msg="保存失败";
  33. if(rtn){
  34. msg="保存成功";
  35. }
  36. layer.msg(msg)
  37. })
  38. })
  39. $("#tamperGenerate").click(function(){
  40. $.post("${ctx}/myconsole/tamper/generate",{},function(rtn){
  41. layer.msg(rtn)
  42. })
  43. })
  44. })
  45. </script>
  46. </head>
  47. <body>
  48. <div class="page-container">
  49. <div class="row cl">
  50. <label style="float: left;" class="form-label col-xs-4 col-sm-2">是否启用</label>
  51. <div class="formControls col-xs-8 col-sm-9">
  52. <div class="switch demo3_s">
  53. <input type="checkbox" id="tamperOpen" name="tamper.open"> <label><i></i></label>
  54. </div>
  55. </div>
  56. </div>
  57. <div class="row cl">
  58. <label style="float: left;" class="form-label col-xs-4 col-sm-2">防篡改水印前缀:</label>
  59. <div class="formControls col-xs-8 col-sm-9">
  60. <input type="text" id="tamperPrefix" name="tamper.prefix" value="${tamper.prefix!}">
  61. </div>
  62. </div>
  63. <div class="row cl">
  64. <label style="float: left;" class="form-label col-xs-4 col-sm-2">批量生成水印:</label>
  65. <div class="formControls col-xs-8 col-sm-9">
  66. <button id="tamperGenerate" class="btn btn-primary radius" type="button">
  67. <i class="Hui-iconfont">&#xe632;</i>执行
  68. </button>
  69. </div>
  70. </div>
  71. </div>
  72. <footer class="footer mt-20">
  73. <div class="container">
  74. <p></p>
  75. </div>
  76. </footer>
  77. </body>
  78. </html>