timeSync.jsp 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
  2. <%
  3. String path = request.getContextPath();
  4. String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
  5. %>
  6. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  7. <html>
  8. <head>
  9. <base href="<%=basePath%>">
  10. <title>My JSP 'timeSync.jsp' starting page</title>
  11. <meta http-equiv="pragma" content="no-cache">
  12. <meta http-equiv="cache-control" content="no-cache">
  13. <meta http-equiv="expires" content="0">
  14. <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
  15. <meta http-equiv="description" content="This is my page">
  16. <meta http-equiv="X-UA-Compatible" content="IE=9"/>
  17. <meta http-equiv="X-UA-Compatible" content="IE=10"/>
  18. <link rel="stylesheet" type="text/css" href="css/easyui/themes/default/easyui.css">
  19. <link rel="stylesheet" type="text/css" href="css/easyui/themes/icon.css">
  20. <link rel="stylesheet" type="text/css" href="css/easyui/demo/demo.css">
  21. <script type="text/javascript" src="css/easyui/jquery.min.js"></script>
  22. <script type="text/javascript" src="css/easyui/jquery.easyui.min.js" charset="utf-8"></script>
  23. <script type="text/javascript" src="css/easyui/locale/easyui-lang-zh_CN.js" charset="utf-8"></script>
  24. <link rel="stylesheet" type="text/css" href="css/common/hzbstyle.css">
  25. <style type="text/css">
  26. .datagrid-header-row td{font-weight: bold;}
  27. #fm
  28. {
  29. margin: 0;
  30. padding: 10px 30px;
  31. }
  32. .ftitle
  33. {
  34. font-size: 14px;
  35. font-weight: bold;
  36. padding: 5px 0;
  37. margin-bottom: 10px;
  38. border-bottom: 1px solid #ccc;
  39. }
  40. .fitem
  41. {
  42. margin-bottom: 5px;
  43. }
  44. .fitem label
  45. {
  46. display: inline-block;
  47. width: 90px;
  48. }
  49. </style>
  50. <script type="text/javascript">
  51. $(document).ready(function(){
  52. $("#randomCode").textbox('textbox').css("font-size", "40px");
  53. });
  54. function save(){
  55. var randomCode = $("#randomCode").textbox('getValue');
  56. if(randomCode){
  57. $.messager.progress({
  58. title: '请等待',
  59. msg: '正在请求数据...',
  60. text: '查询中.......'
  61. });
  62. $("#disposablefm").form("submit", {
  63. url: "appgetkey.do",
  64. type: 'post',
  65. onsubmit: function () {
  66. return $(this).form("validate");
  67. },
  68. success:function (data){
  69. $.messager.progress('close');
  70. var vData = $.parseJSON(data);
  71. $('#lockKey').textbox('setValue', vData.msg);
  72. var s = vData.msg.substring(0,2)+vData.msg.substring(2,4)+vData.msg.substring(4,6)+" "+vData.msg.substring(6,8)
  73. +vData.msg.substring(8,10)+" "+vData.msg.substring(10,14);
  74. $("#showcontent").text(s);
  75. },
  76. error:function(XMLHttpRequest,textStatus, errorThrown) {
  77. $.messager.progress('close');
  78. $.messager.show({
  79. title: '提示',
  80. msg: '系统错误' + XMLHttpRequest.status
  81. });
  82. }
  83. });
  84. }else{
  85. $.messager.show({
  86. title: '提示',
  87. msg: '请输入8位手持码'
  88. });
  89. }
  90. }
  91. </script>
  92. </head>
  93. <body>
  94. <center>
  95. <form action="" id="disposablefm">
  96. <table>
  97. <tr>
  98. <td style="text-align: left;font-size: 40px;">8位手持密码:</td>
  99. <td><input name="number" id="randomCode" class="easyui-textbox" style="width: 250px;height: 50px;" data-options="required:true,validType:['length[1,8]']"/></td>
  100. </tr>
  101. <tr height="20px;"></tr>
  102. <tr >
  103. <td style="text-align: left;font-size: 40px;" id="hiddentd"></td>
  104. <td colspan="1"><a style="width:250px;height:60px;" href="javascript:void(0)" class="easyui-linkbutton" onclick="save()" iconcls="icon-add1">
  105. <span style="font-size: 26px;">点击获取</span>
  106. </a> </td>
  107. </tr>
  108. <tr height="40px;"></tr>
  109. <tr>
  110. <td style="text-align: left;font-size: 40px;">14位同步码:</td>
  111. <td><span id="showcontent" style="font-size: 50px;font-weight: bold;color: green;"></span></td>
  112. </tr>
  113. <tr>
  114. <td style="text-align: left;font-size: 40px;">扫描下载:</td>
  115. <td >
  116. <img src="appDownload_new.png" width="100px"/>
  117. </td>
  118. </tr>
  119. <tr>
  120. <td style="text-align: left;font-size: 40px;">点击下载:</td>
  121. <td >
  122. <a style="width:250px;height:60px;" href="http://www.cngrfid.com/rzx_new.apk" class="easyui-linkbutton" target="_blank" >
  123. <span style="font-size: 26px;">点击下载</span>
  124. </a>
  125. </td>
  126. </tr>
  127. </table>
  128. </form>
  129. </div>
  130. </center>
  131. </body>
  132. </html>