setting.html 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>系统设置</title>
  6. <meta name="description" content="后台管理系统" />
  7. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  8. <!-- bootstrap -->
  9. <link href="css/bootstrap/bootstrap.css" rel="stylesheet">
  10. <link href="css/bootstrap/bootstrap-overrides.css" type="text/css" rel="stylesheet">
  11. <!-- global styles -->
  12. <link rel="stylesheet" type="text/css" href="css/compiled/layout.css">
  13. <link rel="stylesheet" type="text/css" href="css/compiled/elements.css">
  14. <link rel="stylesheet" type="text/css" href="css/compiled/icons.css">
  15. <!-- libraries -->
  16. <link href="css/lib/font-awesome.css" type="text/css" rel="stylesheet" />
  17. <!-- this page specific styles -->
  18. <link rel="stylesheet" href="css/compiled/setting.css" type="text/css" media="screen" />
  19. <link rel="stylesheet" href="css/compiled/tables.css" type="text/css" media="screen" />
  20. <!--[if lt IE 9]>
  21. <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
  22. <![endif]-->
  23. </head>
  24. <body>
  25. <!-- navbar -->
  26. <header class="navbar navbar-inverse" role="banner">
  27. <div class="navbar-header">
  28. <button class="navbar-toggle" type="button" data-toggle="collapse" id="menu-toggler">
  29. <span class="sr-only">导航</span>
  30. <span class="icon-bar"></span>
  31. <span class="icon-bar"></span>
  32. <span class="icon-bar"></span>
  33. </button>
  34. <a class="navbar-brand" href="./index.html"><img src="img/logo.png"></a>
  35. </div>
  36. <ul class="nav navbar-nav pull-right hidden-xs">
  37. <li class="settings hidden-xs hidden-sm">
  38. <a href="./setting.html" role="button">
  39. <i class="icon-cog"></i>
  40. </a>
  41. </li>
  42. <li class="settings hidden-xs hidden-sm">
  43. <a href="./signin.html" role="button">
  44. 退出<i class="icon-signout" style="font-size: 12px;margin-left: 10px;"></i>
  45. </a>
  46. </li>
  47. </ul>
  48. </header>
  49. <!-- end navbar -->
  50. <!-- sidebar -->
  51. <div id="sidebar-nav">
  52. <ul id="dashboard-menu">
  53. <li>
  54. <a href="./index.html">
  55. <i class="icon-home"></i>
  56. <span>首页</span>
  57. </a>
  58. </li>
  59. <li>
  60. <a href="./flight-query.html">
  61. <i class="icon-plane"></i>
  62. <span>快捷下单</span>
  63. </a>
  64. </li>
  65. <li>
  66. <a href="./flight-query-complex.html">
  67. <i class="icon-fighter-jet"></i>
  68. <span>人工下单</span>
  69. </a>
  70. </li>
  71. <li>
  72. <a href="./order-list.html">
  73. <i class="icon-tasks"></i>
  74. <span>订单管理</span>
  75. </a>
  76. </li>
  77. <li class="active">
  78. <div class="pointer">
  79. <div class="arrow"></div>
  80. <div class="arrow_border"></div>
  81. </div>
  82. <a href="./setting.html">
  83. <i class="icon-cog"></i>
  84. <span>系统配置</span>
  85. </a>
  86. </li>
  87. </ul>
  88. </div>
  89. <!-- end sidebar -->
  90. <!-- main container -->
  91. <div class="content">
  92. <div id="pad-wrapper">
  93. <!-- query form -->
  94. <form class="setting">
  95. <div class="alert alert-danger"><i class="icon-remove-sign"></i>请输入您的设置信息。</div>
  96. <p class="tit">系统配置</p>
  97. <div class="row form-wrapper">
  98. <div class="seting-cont col-md-7 col-xs-10">
  99. <div class="field-box clearfix">
  100. <label>sessionKey:</label>
  101. <input class="form-control" type="text" name="sessionKey" required="required"/>
  102. </div>
  103. <div class="field-box clearfix">
  104. <label>用户名:</label>
  105. <input class="form-control" type="text" name="name" required="required"/>
  106. </div>
  107. <div class="field-box clearfix">
  108. <label>手机号:</label>
  109. <input class="form-control" type="text" name="phone" required="required"/>
  110. </div>
  111. <div class="field-box clearfix">
  112. <label>邮箱:</label>
  113. <input class="form-control" type="text" name="email" />
  114. </div>
  115. </div>
  116. </div>
  117. </form>
  118. <!-- end setting form -->
  119. <button class="btn btn-info setting-btn pull-right" type="button" data-toggle="modal" data-target="#orderinfoS" style="width: 9%;">确定</button>
  120. <!-- end query-list table -->
  121. </div>
  122. <div class="modal fade" tabindex="-1" role="dialog" aria-labelledby="orderinfoS" id="orderinfoS" aria-hidden="true">
  123. <div class="modal-dialog" role="document" style="width:32%;">
  124. <div class="modal-content">
  125. <div class="modal-header">
  126. <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
  127. <h3 class="modal-title text-success" id="gridSystemModalLabel">设置成功!</h3>
  128. </div>
  129. <div class="modal-body">
  130. <a type="button" class="btn btn-info details" href="./flight-query.html">快捷下单</a>
  131. <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
  132. </div>
  133. <!-- <div class="modal-footer">
  134. </div> -->
  135. </div><!-- /.modal-content -->
  136. </div><!-- /.modal-dialog -->
  137. </div><!-- /.modal -->
  138. </div>
  139. <!-- end main container -->
  140. <!-- scripts -->
  141. <script src="js/jquery.min.js"></script>
  142. <script src="js/bootstrap.min.js"></script>
  143. <script src="js/theme.js"></script>
  144. <script>
  145. $(function(){
  146. var uname = localStorage.uname;
  147. var token = localStorage.tokenId;
  148. var name;
  149. var phone;
  150. var email;
  151. var sessionKey;
  152. var configId;
  153. $(".icon-remove-sign").click(function(){
  154. $(this).parent(".alert").hide();
  155. });
  156. $.ajax({
  157. url:'http://114.55.6.23/jh/jhConfig/list',
  158. data:{},
  159. type:"POST",
  160. dataType:"json",
  161. error:function(XMLHttpRequest, textStatus, errorThrown) {
  162. console.log(XMLHttpRequest.responseText);
  163. console.log(XMLHttpRequest.readyState);
  164. console.log(textStatus);
  165. },
  166. success:function(data){
  167. console.log(data);
  168. configId = data.id;
  169. $("input[name='name']").val(data.name);
  170. $("input[name='phone']").val(data.phone);
  171. $("input[name='email']").val(data.email);
  172. $("input[name='sessionKey']").val(data.sessionKey);
  173. }
  174. });
  175. // 提交表单
  176. $(".setting-btn").click(function(){
  177. name = $("input[name='name']").val();
  178. phone = $("input[name='phone']").val();
  179. email = $("input[name='email']").val();
  180. sessionKey = $("input[name='sessionKey']").val();
  181. /*
  182. if(name || phone || email || sessionKey){
  183. $(this).parent(".setting").find(".alert").show();
  184. $(".icon-remove-sign").click(function(){
  185. $(this).parent(".alert").hide();
  186. });
  187. };*/
  188. $.ajax({
  189. url:'http://114.55.6.23/jh/jhConfig/save',
  190. data:{
  191. "uname":uname,
  192. "token":token,
  193. "id":configId,
  194. "name":name,
  195. "phone":phone,
  196. "email":email,
  197. "sessionKey":sessionKey
  198. },
  199. type:"POST",
  200. dataType:"json",
  201. error:function(XMLHttpRequest, textStatus, errorThrown) {
  202. console.log(XMLHttpRequest.responseText);
  203. console.log(XMLHttpRequest.readyState);
  204. console.log(textStatus);
  205. },
  206. success:function(data){
  207. if(data.status == 100){
  208. $(".setting .alert").html('<i class="icon-remove-sign"></i>'+data.attachment).show();
  209. $(".icon-remove-sign").click(function(){
  210. $(this).parent(".alert").hide();
  211. });
  212. }else if(data.status == 200){
  213. console.log(data);
  214. $('#orderinfoS').modal();
  215. }
  216. }
  217. });
  218. });
  219. });
  220. </script>
  221. </body>
  222. </html>