官网 管理后台
Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

index.html 27KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772
  1. <!DOCTYPE html>
  2. <html lang="zh-cn">
  3. <head>
  4. <meta charset="UTF-8" />
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  7. <title>河南星火燎原软件科技有限公司</title>
  8. <link rel="shortcut icon" href="./favicon.ico" type="image/x-icon" />
  9. <link rel="stylesheet" href="./librarys/bootstrap@3.4.1/bootstrap.css" />
  10. <link
  11. rel="stylesheet"
  12. href="./librarys/bootstrapValidator@0.5.3/bootstrapValidator.css"
  13. />
  14. <link rel="stylesheet" href="./css/comm.css" />
  15. <link rel="stylesheet" href="./css/header.css" />
  16. <style>
  17. body {
  18. background-color: #fff;
  19. }
  20. .user_main {
  21. margin: 20px auto;
  22. width: 1000px;
  23. }
  24. .user_main .header_box {
  25. display: flex;
  26. justify-content: space-between;
  27. align-items: center;
  28. margin-bottom: 10px;
  29. }
  30. .header_left .user_radio {
  31. cursor: pointer;
  32. }
  33. .header_left #searchUserName {
  34. display: inline-block;
  35. margin-left: 16px;
  36. width: 240px;
  37. }
  38. .header_left .searchBtn {
  39. margin-left: 16px;
  40. }
  41. .user_main .table.table-bordered th {
  42. text-align: center;
  43. background-color: #f7f7f7;
  44. }
  45. .user_main .table.table-bordered td {
  46. text-align: center;
  47. background-color: #fff;
  48. }
  49. .user_main .table.table-bordered .action_btn {
  50. margin: 0 10px;
  51. cursor: pointer;
  52. }
  53. .user_main .table.table-bordered .action_show {
  54. display: block;
  55. }
  56. .user_main .table.table-bordered .action_hide {
  57. display: none;
  58. }
  59. </style>
  60. </head>
  61. <body>
  62. <div class="top_header_root" data-header_page="index">
  63. <div class="header_html_root">
  64. <div class="header_html_item" data-url="index">用户信息</div>
  65. <div class="header_html_item" data-url="history">发展历程</div>
  66. <div class="header_html_item" data-url="service">服务案例</div>
  67. <div class="header_html_item" data-url="school">学校图标</div>
  68. <div class="header_html_item" data-url="trial">申请试用</div>
  69. <div class="header_html_item" data-url="news">新闻资讯</div>
  70. <div class="header_html_item" data-url="log">登录日志</div>
  71. </div>
  72. </div>
  73. <div class="user_main">
  74. <div class="header_box">
  75. <div class="header_left">
  76. <div class="radio-inline">
  77. <input
  78. id="s_0"
  79. class="user_radio"
  80. name="user_radio"
  81. type="radio"
  82. value="0"
  83. />
  84. <label for="s_0" class="user_radio">全部</label>
  85. </div>
  86. <div class="radio-inline">
  87. <input
  88. id="s_1"
  89. class="user_radio"
  90. name="user_radio"
  91. type="radio"
  92. value="1"
  93. />
  94. <label for="s_1" class="user_radio">正常</label>
  95. </div>
  96. <div class="radio-inline">
  97. <input
  98. id="s_10"
  99. class="user_radio"
  100. name="user_radio"
  101. type="radio"
  102. value="10"
  103. />
  104. <label for="s_10" class="user_radio">已删除</label>
  105. </div>
  106. <input
  107. type="text"
  108. id="searchUserName"
  109. class="form-control"
  110. placeholder="请输入用户姓名"
  111. />
  112. <div type="button" class="btn btn-primary searchBtn">搜索</div>
  113. </div>
  114. <div type="button" class="btn btn-primary user_add_btn">添加</div>
  115. </div>
  116. <table class="table table-bordered">
  117. <thead>
  118. <tr>
  119. <th style="width: 60px">序号</th>
  120. <th>用户姓名</th>
  121. <th>登录账户</th>
  122. <th style="width: 110px">手机号</th>
  123. <th style="width: 70px">状态</th>
  124. <th>创建人</th>
  125. <th style="width: 160px">创建时间</th>
  126. <th style="width: 140px">操作</th>
  127. </tr>
  128. </thead>
  129. <tbody class="userTableBody"></tbody>
  130. </table>
  131. <div class="user_page page_box">
  132. <!-- <div class="page_prev disabled">&lt;</div>
  133. <div data-page="1" class="page_num selected">1</div>
  134. <div class="page_num">2</div>
  135. <div class="page_next">&gt;</div> -->
  136. </div>
  137. </div>
  138. <!-- 添加用户弹窗 -->
  139. <div
  140. class="modal fade"
  141. id="userAddModal"
  142. tabindex="-1"
  143. role="dialog"
  144. aria-labelledby="AddTitle"
  145. >
  146. <div class="modal-dialog" role="document">
  147. <div class="modal-content">
  148. <div class="modal-header">
  149. <button
  150. type="button"
  151. class="close"
  152. data-dismiss="modal"
  153. aria-label="Close"
  154. >
  155. <span aria-hidden="true">&times;</span>
  156. </button>
  157. <h4 class="modal-title" id="AddTitle">添加用户信息</h4>
  158. </div>
  159. <div class="modal-body">
  160. <form class="form-horizontal" id="UserAddForm">
  161. <div class="form-group">
  162. <label for="usernameInput" class="col-sm-2 control-label"
  163. >用户姓名</label
  164. >
  165. <div class="col-sm-10">
  166. <input
  167. type="text"
  168. class="form-control"
  169. id="usernameInput"
  170. name="username"
  171. placeholder="请输入用户姓名"
  172. />
  173. </div>
  174. </div>
  175. <div class="form-group">
  176. <label for="loginnameInput" class="col-sm-2 control-label"
  177. >登录账号</label
  178. >
  179. <div class="col-sm-10">
  180. <input
  181. type="text"
  182. class="form-control"
  183. id="loginnameInput"
  184. name="loginname"
  185. placeholder="请输入登录账号"
  186. />
  187. </div>
  188. </div>
  189. <div class="form-group">
  190. <label for="loginpwdInput" class="col-sm-2 control-label"
  191. >登录密码</label
  192. >
  193. <div class="col-sm-10">
  194. <input
  195. type="password"
  196. class="form-control"
  197. id="loginpwdInput"
  198. name="loginpwd"
  199. placeholder="请输入登录密码"
  200. />
  201. </div>
  202. </div>
  203. <div class="form-group">
  204. <label for="userphoneInput" class="col-sm-2 control-label"
  205. >手机号</label
  206. >
  207. <div class="col-sm-10">
  208. <input
  209. type="text"
  210. class="form-control"
  211. id="userphoneInput"
  212. name="userphone"
  213. placeholder="请输入手机号"
  214. />
  215. </div>
  216. </div>
  217. </form>
  218. </div>
  219. <div class="modal-footer">
  220. <div type="button" class="btn btn-default" data-dismiss="modal">
  221. 取消
  222. </div>
  223. <div type="button" class="btn btn-primary add_save">确定</div>
  224. </div>
  225. </div>
  226. </div>
  227. </div>
  228. <!-- 修改用户弹窗 -->
  229. <div
  230. class="modal fade"
  231. id="userModifyModal"
  232. tabindex="-1"
  233. role="dialog"
  234. aria-labelledby="modifyTitle"
  235. >
  236. <div class="modal-dialog" role="document">
  237. <div class="modal-content">
  238. <div class="modal-header">
  239. <button
  240. type="button"
  241. class="close"
  242. data-dismiss="modal"
  243. aria-label="Close"
  244. >
  245. <span aria-hidden="true">&times;</span>
  246. </button>
  247. <h4 class="modal-title" id="modifyTitle">修改用户信息</h4>
  248. </div>
  249. <div class="modal-body">
  250. <form class="form-horizontal" id="userModifyForm">
  251. <div class="form-group">
  252. <label for="m_usernameInput" class="col-sm-2 control-label"
  253. >用户姓名</label
  254. >
  255. <div class="col-sm-10">
  256. <input
  257. type="text"
  258. class="form-control"
  259. id="m_usernameInput"
  260. name="username"
  261. placeholder="请输入用户姓名"
  262. />
  263. </div>
  264. </div>
  265. <div class="form-group">
  266. <label for="m_loginnameInput" class="col-sm-2 control-label"
  267. >登录账号</label
  268. >
  269. <div class="col-sm-10">
  270. <input
  271. type="text"
  272. class="form-control"
  273. id="m_loginnameInput"
  274. name="loginname"
  275. placeholder="请输入登录账号"
  276. />
  277. </div>
  278. </div>
  279. <div class="form-group">
  280. <label for="m_loginpwdInput" class="col-sm-2 control-label"
  281. >登录密码</label
  282. >
  283. <div class="col-sm-10">
  284. <input
  285. type="password"
  286. class="form-control"
  287. id="m_loginpwdInput"
  288. name="loginpwd"
  289. placeholder="请输入登录密码"
  290. />
  291. </div>
  292. </div>
  293. <div class="form-group">
  294. <label for="m_userphoneInput" class="col-sm-2 control-label"
  295. >手机号</label
  296. >
  297. <div class="col-sm-10">
  298. <input
  299. type="text"
  300. class="form-control"
  301. id="m_userphoneInput"
  302. name="userphone"
  303. placeholder="请输入手机号"
  304. />
  305. </div>
  306. </div>
  307. </form>
  308. </div>
  309. <div class="modal-footer">
  310. <div type="button" class="btn btn-default" data-dismiss="modal">
  311. 取消
  312. </div>
  313. <div type="button" class="btn btn-primary modify_save">确定</div>
  314. </div>
  315. </div>
  316. </div>
  317. </div>
  318. <!-- 删除用户弹窗 -->
  319. <div
  320. class="modal fade"
  321. id="userDelModal"
  322. tabindex="-1"
  323. role="dialog"
  324. aria-labelledby="delTitle"
  325. >
  326. <div class="modal-dialog tip_modal" role="document">
  327. <div class="modal-content">
  328. <div class="modal-header">
  329. <button
  330. type="button"
  331. class="close"
  332. data-dismiss="modal"
  333. aria-label="Close"
  334. >
  335. <span aria-hidden="true">&times;</span>
  336. </button>
  337. <h4 class="modal-title" id="delTitle">提示</h4>
  338. </div>
  339. <div class="modal-body">确定删除选中信息?</div>
  340. <div class="modal-footer">
  341. <div type="button" class="btn btn-default" data-dismiss="modal">
  342. 取消
  343. </div>
  344. <div type="button" class="btn btn-primary del_save">保存</div>
  345. </div>
  346. </div>
  347. </div>
  348. </div>
  349. <script src="./librarys/jquery@1.12.4/jquery.min.js"></script>
  350. <script src="./librarys/bootstrap@3.4.1/bootstrap.js"></script>
  351. <script src="./librarys/bootstrapValidator@0.5.3/bootstrapValidator.js"></script>
  352. <script src="./utils/index.js"></script>
  353. <script>
  354. $(function () {
  355. let page_url = $(".top_header_root").data("header_page");
  356. $(
  357. '.header_html_root .header_html_item[data-url="' + page_url + '"]'
  358. ).addClass("selected");
  359. $(".header_html_root").on("click", ".header_html_item", function () {
  360. let _url = $(this).data("url");
  361. if (_url === "index") {
  362. window.location.href = "/index.html";
  363. } else {
  364. window.location.href = "/sections/" + _url + ".html";
  365. }
  366. });
  367. if (!$.isLogin()) {
  368. window.location.href = "/sections/login.html";
  369. return;
  370. }
  371. let userSearch = {
  372. page: Number($.getQueryletiable("page")) || 1,
  373. size: 10,
  374. userstate: Number($.getQueryletiable("userstate")) || 0,
  375. username: $.getQueryletiable("username") || "",
  376. total: 0,
  377. list: []
  378. };
  379. $('.header_left input:radio[name="user_radio"]').each(function (
  380. _index,
  381. radioItem
  382. ) {
  383. if (Number($(radioItem).val()) === userSearch.userstate) {
  384. $(radioItem).attr("checked", true);
  385. } else {
  386. $(radioItem).attr("checked", false);
  387. }
  388. });
  389. // 获取用户列表
  390. function getUserList() {
  391. $.ajax({
  392. type: "POST",
  393. url: $.baseUrl + "user/list",
  394. dataType: "json",
  395. contentType: "application/json; charset=utf-8",
  396. data: JSON.stringify({
  397. page: userSearch.page,
  398. size: userSearch.size,
  399. userstate: userSearch.userstate,
  400. username: userSearch.username
  401. }),
  402. success: function (data) {
  403. if (data.code === 0) {
  404. userSearch.total = data.obj.total;
  405. userSearch.list = data.obj.list;
  406. setTableHtml();
  407. setPageList();
  408. } else {
  409. userSearch.total = 0;
  410. userSearch.list = [];
  411. alert(data.msg);
  412. }
  413. }
  414. });
  415. }
  416. // 设置页码信息
  417. function setPageList() {
  418. let pageBoxHtml =
  419. '<div class="page_prev ' +
  420. (userSearch.page === 1 ? "disabled" : "") +
  421. '">&lt;</div>';
  422. for (
  423. let _pageIndex = 0;
  424. _pageIndex < Math.ceil(userSearch.total / userSearch.size);
  425. _pageIndex++
  426. ) {
  427. pageBoxHtml +=
  428. '<div data-page="' +
  429. (_pageIndex + 1) +
  430. '" class="page_num ' +
  431. (_pageIndex + 1 === userSearch.page ? "selected" : "") +
  432. '">' +
  433. (_pageIndex + 1) +
  434. "</div>";
  435. }
  436. pageBoxHtml +=
  437. '<div class="page_next ' +
  438. (userSearch.page === Math.ceil(userSearch.total / userSearch.size)
  439. ? "disabled"
  440. : "") +
  441. '">&gt;</div>';
  442. if (userSearch.total > 0) {
  443. $(".user_page.page_box").html(pageBoxHtml);
  444. $(".user_page.page_box").on("click", ".page_prev", function () {
  445. if (userSearch.page > 1) {
  446. userSearch.page--;
  447. window.location.href =
  448. "/index.html?page=" +
  449. userSearch.page +
  450. "&userstate=" +
  451. userSearch.userstate +
  452. "&username=" +
  453. userSearch.username;
  454. }
  455. });
  456. $(".user_page.page_box").on("click", ".page_num", function () {
  457. userSearch.page = $(this).data("page");
  458. window.location.href =
  459. "/index.html?page=" +
  460. userSearch.page +
  461. "&userstate=" +
  462. userSearch.userstate +
  463. "&username=" +
  464. userSearch.username;
  465. });
  466. $(".user_page.page_box").on("click", ".page_next", function () {
  467. if (
  468. userSearch.page < Math.ceil(userSearch.total / userSearch.size)
  469. ) {
  470. userSearch.page++;
  471. window.location.href =
  472. "/index.html?page=" +
  473. userSearch.page +
  474. "&userstate=" +
  475. userSearch.userstate +
  476. "&username=" +
  477. userSearch.username;
  478. }
  479. });
  480. } else {
  481. $(".user_page.page_box").html("");
  482. }
  483. }
  484. // 设置表格信息
  485. function setTableHtml() {
  486. let userTableBodyHtml = "";
  487. $.each(userSearch.list, function (_userIndex, _userItem) {
  488. userTableBodyHtml +=
  489. "<tr><td>" +
  490. (_userIndex + 1 + (userSearch.page - 1) * userSearch.size) +
  491. "</td><td>" +
  492. (_userItem.username ? _userItem.username : "") +
  493. "</td><td>" +
  494. _userItem.loginname +
  495. "</td><td>" +
  496. (_userItem.userphone ? _userItem.userphone : "") +
  497. "</td><td>" +
  498. (_userItem.userstate === 1 ? "正常" : "已删除") +
  499. "</td><td>" +
  500. (_userItem.createname ? _userItem.createname : "") +
  501. "</td><td>" +
  502. $.dateFormat(_userItem.createtime) +
  503. '</td><td><div class="' +
  504. (_userItem.userstate === 1 ? "action_show" : "action_hide") +
  505. '"><span class="my_theme_color action_btn modify_btn" data-userid="' +
  506. _userItem.userid +
  507. '">修改</span><span class="my_theme_color">|</span><span class="del_color action_btn del_btn" data-userid="' +
  508. _userItem.userid +
  509. '">删除</span></div></td></tr>';
  510. });
  511. $(".userTableBody").html(userTableBodyHtml);
  512. let del_userid = null;
  513. $(".userTableBody").on("click", ".del_btn", function () {
  514. $("#userDelModal").modal("show");
  515. del_userid = $(this).data("userid");
  516. });
  517. $("#userDelModal .del_save").on("click", function () {
  518. $.ajax({
  519. type: "POST",
  520. url: $.baseUrl + "user/del",
  521. dataType: "json",
  522. contentType: "application/json; charset=utf-8",
  523. data: JSON.stringify({
  524. userid: del_userid
  525. }),
  526. success: function (data) {
  527. $("#userDelModal").modal("hide");
  528. if (data.code === 0) {
  529. window.location.href =
  530. "/index.html?page=" +
  531. userSearch.page +
  532. "&userstate=" +
  533. userSearch.userstate +
  534. "&username=" +
  535. userSearch.username;
  536. } else {
  537. alert(data.msg);
  538. }
  539. }
  540. });
  541. });
  542. }
  543. $(".user_main .header_box .user_add_btn").click(function () {
  544. $("#userAddModal").modal("show");
  545. });
  546. $("#userAddModal .add_save").on("click", function () {
  547. // 添加表单验证
  548. $("#UserAddForm").bootstrapValidator({
  549. // 默认的提示消息
  550. message: "请输入内容",
  551. // 表单框里右侧的icon
  552. feedbackIcons: {
  553. valid: "glyphicon glyphicon-ok",
  554. invalid: "glyphicon glyphicon-remove",
  555. validating: "glyphicon glyphicon-refresh"
  556. },
  557. fields: {
  558. username: {
  559. validators: {
  560. notEmpty: {
  561. message: "请输入用户姓名"
  562. }
  563. }
  564. },
  565. loginname: {
  566. validators: {
  567. notEmpty: {
  568. message: "请输入登录账号"
  569. },
  570. stringLength: {
  571. //长度限制
  572. min: 4,
  573. max: 18,
  574. message: "登录账号长度必须在4~18个字符之间"
  575. }
  576. }
  577. },
  578. loginpwd: {
  579. validators: {
  580. notEmpty: {
  581. message: "请输入登录密码"
  582. },
  583. stringLength: {
  584. //长度限制
  585. min: 6,
  586. max: 16,
  587. message: "登录密码长度必须在6~16个字符之间"
  588. }
  589. }
  590. },
  591. userphone: {
  592. validators: {
  593. // notEmpty: {
  594. // message: "请输入手机号",
  595. // },
  596. regexp: {
  597. regexp: /^1\d{10}$/,
  598. message: "请输入正确的11位手机号"
  599. }
  600. }
  601. }
  602. }
  603. });
  604. //先校验,在调是否通过校验的方法
  605. $("#UserAddForm").data("bootstrapValidator").validate();
  606. //校验表单是否通过
  607. let flag = $("#UserAddForm").data("bootstrapValidator").isValid();
  608. if (flag) {
  609. let _url = $.baseUrl + "user/save";
  610. $.ajax({
  611. type: "POST",
  612. url: _url,
  613. dataType: "json",
  614. contentType: "application/json; charset=utf-8",
  615. data: JSON.stringify({
  616. username: $("#UserAddForm #usernameInput").val(),
  617. loginname: $("#UserAddForm #loginnameInput").val(),
  618. loginpwd: $("#UserAddForm #loginpwdInput").val(),
  619. createid: $.userInfo.userid,
  620. userphone: $("#UserAddForm #userphoneInput").val()
  621. }),
  622. success: function (data) {
  623. if (data.code === 0) {
  624. window.location.href =
  625. "/index.html?page=1&userstate=" +
  626. userSearch.userstate +
  627. "&username=" +
  628. userSearch.username;
  629. } else {
  630. alert(data.msg);
  631. }
  632. }
  633. });
  634. }
  635. });
  636. let modify_userid = null;
  637. $(".userTableBody").on("click", ".modify_btn", function () {
  638. modify_userid = $(this).data("userid");
  639. $("#userModifyModal").modal("show");
  640. $.each(userSearch.list, function (_index, _userItem) {
  641. if (_userItem.userid === modify_userid) {
  642. console.log("modify_userid", _userItem);
  643. $("#userModifyForm #m_usernameInput").val(_userItem.username);
  644. $("#userModifyForm #m_loginnameInput").val(_userItem.loginname);
  645. $("#userModifyForm #m_loginpwdInput").val(_userItem.loginpwd);
  646. $("#userModifyForm #m_userphoneInput").val(_userItem.userphone);
  647. }
  648. });
  649. });
  650. $("#userModifyModal .modify_save").on("click", function () {
  651. // 添加表单验证
  652. $("#userModifyForm").bootstrapValidator({
  653. // 默认的提示消息
  654. message: "请输入内容",
  655. // 表单框里右侧的icon
  656. feedbackIcons: {
  657. valid: "glyphicon glyphicon-ok",
  658. invalid: "glyphicon glyphicon-remove",
  659. validating: "glyphicon glyphicon-refresh"
  660. },
  661. fields: {
  662. username: {
  663. validators: {
  664. notEmpty: {
  665. message: "请输入用户姓名"
  666. }
  667. }
  668. },
  669. loginname: {
  670. validators: {
  671. notEmpty: {
  672. message: "请输入登录账号"
  673. },
  674. stringLength: {
  675. //长度限制
  676. min: 4,
  677. max: 18,
  678. message: "登录账号长度必须在4~18个字符之间"
  679. }
  680. }
  681. },
  682. loginpwd: {
  683. validators: {
  684. notEmpty: {
  685. message: "请输入登录密码"
  686. },
  687. stringLength: {
  688. //长度限制
  689. min: 6,
  690. max: 16,
  691. message: "登录密码长度必须在6~16个字符之间"
  692. }
  693. }
  694. },
  695. userphone: {
  696. validators: {
  697. // notEmpty: {
  698. // message: "请输入手机号",
  699. // },
  700. regexp: {
  701. regexp: /^1\d{10}$/,
  702. message: "请输入正确的11位手机号"
  703. }
  704. }
  705. }
  706. }
  707. });
  708. //先校验,在调是否通过校验的方法
  709. $("#userModifyForm").data("bootstrapValidator").validate();
  710. //校验表单是否通过
  711. let flag = $("#userModifyForm").data("bootstrapValidator").isValid();
  712. if (flag) {
  713. let _url = $.baseUrl + "user/update";
  714. $.ajax({
  715. type: "POST",
  716. url: _url,
  717. dataType: "json",
  718. contentType: "application/json; charset=utf-8",
  719. data: JSON.stringify({
  720. username: $("#userModifyForm #m_usernameInput").val(),
  721. loginname: $("#userModifyForm #m_loginnameInput").val(),
  722. loginpwd: $("#userModifyForm #m_loginpwdInput").val(),
  723. userid: modify_userid,
  724. userphone: $("#userModifyForm #m_userphoneInput").val()
  725. }),
  726. success: function (data) {
  727. if (data.code === 0) {
  728. window.location.href =
  729. "/index.html?page=" +
  730. userSearch.page +
  731. "&userstate=" +
  732. userSearch.userstate +
  733. "&username=" +
  734. userSearch.username;
  735. } else {
  736. alert(data.msg);
  737. }
  738. }
  739. });
  740. }
  741. });
  742. $(".header_left").on(
  743. "click",
  744. 'input:radio[name="user_radio"]',
  745. function () {
  746. window.location.href =
  747. "/index.html?page=" +
  748. userSearch.page +
  749. "&userstate=" +
  750. $('.header_left input:radio[name="user_radio"]:checked').val() +
  751. "&username=" +
  752. userSearch.username;
  753. }
  754. );
  755. $("#searchUserName").val(userSearch.username);
  756. $("#searchUserName").on("change", function () {
  757. userSearch.username = $(this).val();
  758. });
  759. $(".header_left .searchBtn").click(function () {
  760. window.location.href =
  761. "/index.html?page=" +
  762. userSearch.page +
  763. "&userstate=" +
  764. userSearch.userstate +
  765. "&username=" +
  766. userSearch.username;
  767. });
  768. getUserList();
  769. });
  770. </script>
  771. </body>
  772. </html>