商丘市柘城县——前端

Use-personset.html 13KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title>Hello MUI</title>
  6. <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
  7. <meta name="apple-mobile-web-app-capable" content="yes">
  8. <meta name="apple-mobile-web-app-status-bar-style" content="black">
  9. <link rel="stylesheet" href="../css/mui.min.css">
  10. <link href="../css/mui.picker.css" rel="stylesheet" />
  11. <link href="../css/mui.poppicker.css" rel="stylesheet" />
  12. <link href="../css/feedback-page.css" rel="stylesheet" />
  13. <style>
  14. html,
  15. body {
  16. background-color: #efeff4;
  17. font-size: 14px;
  18. }
  19. .mui-views,
  20. .mui-view,
  21. .mui-pages,
  22. .mui-page,
  23. .mui-page-content {
  24. position: absolute;
  25. left: 0;
  26. right: 0;
  27. top: 0;
  28. bottom: 0;
  29. width: 100%;
  30. height: 100%;
  31. background-color: #efeff4;
  32. }
  33. .mui-pages {
  34. top: 46px;
  35. height: auto;
  36. }
  37. .mui-scroll-wrapper,
  38. .mui-scroll {
  39. background-color: #efeff4;
  40. }
  41. .mui-page.mui-transitioning {
  42. -webkit-transition: -webkit-transform 300ms ease;
  43. transition: transform 300ms ease;
  44. }
  45. .mui-page-left {
  46. -webkit-transform: translate3d(0, 0, 0);
  47. transform: translate3d(0, 0, 0);
  48. }
  49. .mui-ios .mui-page-left {
  50. -webkit-transform: translate3d(-20%, 0, 0);
  51. transform: translate3d(-20%, 0, 0);
  52. }
  53. .mui-navbar {
  54. position: fixed;
  55. right: 0;
  56. left: 0;
  57. z-index: 10;
  58. height: 44px;
  59. background-color: #f7f7f8;
  60. }
  61. .mui-navbar .mui-bar {
  62. position: absolute;
  63. background: transparent;
  64. text-align: center;
  65. }
  66. .mui-android .mui-navbar-inner.mui-navbar-left {
  67. opacity: 0;
  68. }
  69. .mui-ios .mui-navbar-left .mui-left,
  70. .mui-ios .mui-navbar-left .mui-center,
  71. .mui-ios .mui-navbar-left .mui-right {
  72. opacity: 0;
  73. }
  74. .mui-navbar .mui-btn-nav {
  75. -webkit-transition: none;
  76. transition: none;
  77. -webkit-transition-duration: .0s;
  78. transition-duration: .0s;
  79. }
  80. .mui-navbar .mui-bar .mui-title {
  81. display: inline-block;
  82. width: auto;
  83. }
  84. .mui-page-shadow {
  85. position: absolute;
  86. right: 100%;
  87. top: 0;
  88. width: 16px;
  89. height: 100%;
  90. z-index: -1;
  91. content: '';
  92. }
  93. .mui-page-shadow {
  94. background: -webkit-linear-gradient(left, rgba(0, 0, 0, 0) 0, rgba(0, 0, 0, 0) 10%, rgba(0, 0, 0, .01) 50%, rgba(0, 0, 0, .2) 100%);
  95. background: linear-gradient(to right, rgba(0, 0, 0, 0) 0, rgba(0, 0, 0, 0) 10%, rgba(0, 0, 0, .01) 50%, rgba(0, 0, 0, .2) 100%);
  96. }
  97. .mui-navbar-inner.mui-transitioning,
  98. .mui-navbar-inner .mui-transitioning {
  99. -webkit-transition: opacity 300ms ease, -webkit-transform 300ms ease;
  100. transition: opacity 300ms ease, transform 300ms ease;
  101. }
  102. .mui-page {
  103. display: none;
  104. }
  105. .mui-pages .mui-page {
  106. display: block;
  107. }
  108. .mui-page .mui-table-view:first-child {
  109. margin-top: 15px;
  110. }
  111. .mui-page .mui-table-view:last-child {
  112. margin-bottom: 30px;
  113. }
  114. .mui-table-view {
  115. margin-top: 20px;
  116. }
  117. .mui-table-view span.mui-pull-right {
  118. color: #999;
  119. }
  120. .mui-table-view-divider {
  121. background-color: #efeff4;
  122. font-size: 14px;
  123. }
  124. .mui-table-view-divider:before,
  125. .mui-table-view-divider:after {
  126. height: 0;
  127. }
  128. .head {
  129. height: 40px;
  130. }
  131. #head {
  132. line-height: 40px;
  133. }
  134. .head-img {
  135. width: 40px;
  136. height: 40px;
  137. }
  138. #head-img1 {
  139. position: absolute;
  140. bottom: 10px;
  141. right: 40px;
  142. width: 40px;
  143. height: 40px;
  144. }
  145. .update {
  146. font-style: normal;
  147. color: #999999;
  148. margin-right: -25px;
  149. font-size: 15px
  150. }
  151. .mui-fullscreen {
  152. position: fixed;
  153. z-index: 20;
  154. background-color: #000;
  155. }
  156. .mui-ios .mui-navbar .mui-bar .mui-title {
  157. position: static;
  158. }
  159. /*问题反馈在setting页面单独的css*/
  160. #feedback .mui-popover {
  161. position: fixed;
  162. }
  163. #feedback .mui-table-view:last-child {
  164. margin-bottom: 0px;
  165. }
  166. #feedback .mui-table-view:first-child {
  167. margin-top: 0px;
  168. }
  169. /*问题反馈在setting页面单独的css==end*/
  170. .mui-bar-nav {
  171. background-color: #00a1cb!important;
  172. }
  173. p {
  174. font-size: 16px;
  175. color: #000;
  176. padding: 10px;
  177. margin-bottom: 0px;
  178. }
  179. .Img-box {
  180. line-height: 15px;
  181. }
  182. .Img {
  183. width: 20px;
  184. height: 19px;
  185. vertical-align: sub;
  186. margin-right: 5px;
  187. }
  188. .prompt_div {
  189. width: 80%;
  190. height: 180px;
  191. position: fixed;
  192. top: 0px;
  193. left: 0px;
  194. right: 0px;
  195. bottom: 0px;
  196. margin: auto;
  197. text-align: center;
  198. display: none;
  199. z-index: 99999;
  200. background: #FFFFFF;
  201. border-radius: 5px;
  202. -moz-border-radius: 5px;
  203. -webkit-border-radius: 5px;
  204. -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  205. -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  206. text-shadow: 0 -1px 1px rgba(0, 0, 0, 0.25);
  207. }
  208. .prompt_div .title {
  209. width: 100%;
  210. height: 50px;
  211. text-align: center;
  212. line-height: 50px;
  213. margin-top: 10px;
  214. }
  215. .prompt_div .content {
  216. width: 90%;
  217. margin-left: 5%;
  218. margin-top: 10px;
  219. }
  220. .prompt_div .content input {
  221. width: 100%;
  222. height: 30px;
  223. line-height: 30px;
  224. }
  225. .prompt_div .botdiv {
  226. margin-top: 20px;
  227. position: relative;
  228. }
  229. .prompt_div .botdiv .btn_confi {
  230. padding: 6px 12px;
  231. color: #007aff;
  232. /*background: #007aff;*/
  233. font-size: 14px;
  234. display: inline;
  235. position: absolute;
  236. left: 20px;
  237. }
  238. .prompt_div .botdiv .btn_cancel {
  239. padding: 6px 12px;
  240. color: #007aff;
  241. /*background: #007aff;*/
  242. font-size: 14px;
  243. display: inline;
  244. position: absolute;
  245. right: 20px;
  246. }
  247. .body_bj {
  248. width: 100%;
  249. height: 100%;
  250. background: #000000;
  251. position: fixed;
  252. top: 0px;
  253. z-index: 99998;
  254. display: none;
  255. filter: alpha(opacity=60);
  256. -moz-opacity: 0.6;
  257. -khtml-opacity: 0.6;
  258. opacity: 0.6;
  259. }
  260. .perlist{
  261. border: none;
  262. text-align: right;
  263. width: 50%;
  264. color: #999999;
  265. font-size: 14px;
  266. }
  267. </style>
  268. </head>
  269. <body class="mui-fullscreen">
  270. <header class="mui-bar" style="padding-right: 15px;color: #fff; background: #000000;">
  271. <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
  272. <h1 class="mui-center mui-title"><span class="Totle-box">个人中心</span></h1>
  273. </header>
  274. <div class="mui-scroll-wrapper" style="margin-top: 44px;">
  275. <div class="mui-scroll percoent">
  276. <ul class="mui-table-view">
  277. <li class="mui-table-view-cell">
  278. <a>昵称<input class="mui-pull-right nameclick perlist" placeholder="请输入昵称"></input><i class="mui-pull-right "></i></a>
  279. </li>
  280. <li class="mui-table-view-cell">
  281. <a>手机号<input class="mui-pull-right telclick perlist" placeholder="请输入手机号"></input>
  282. </a>
  283. </li>
  284. <li class="mui-table-view-cell" id='showUserPicker1'>
  285. <a>性别<span class="mui-pull-right perlist" id='userResult1'>男</span></a>
  286. </li>
  287. <li class="mui-table-view-cell">
  288. <a>省市<span class="mui-pull-right">河南商丘市</span></a>
  289. </li>
  290. <li class="mui-table-view-cell" id='showUserPicker'>
  291. <a>区县<span class="mui-pull-right" id='userResult'>请输入区县</span></a>
  292. </li>
  293. <li class="mui-table-view-cell">
  294. <a>所在地区<input class="mui-pull-right addressclick perlist" placeholder="请输入详细地址"></input>
  295. </a>
  296. </li>
  297. </ul>
  298. <button type="button" class="order_remind mui-btn mui-btn-primary btn_info" style="display: block; margin-left: 43%; margin-top: 15px;">保存</button>
  299. </div>
  300. </div>
  301. <!--修改昵称-->
  302. <div class="prompt_div namediv">
  303. <div class="title">提示</div>
  304. <div class="content"><input type="text" name="" id="nameval" placeholder="请输入昵称" /></div>
  305. <div class="botdiv">
  306. <div class="btn_confi name_true">确定</div>
  307. <div class="btn_cancel name_cancel">取消</div>
  308. </div>
  309. </div>
  310. <!--修改手机号-->
  311. <div class="prompt_div teldiv">
  312. <div class="title">提示</div>
  313. <div class="content"><input type="number" name="" id="telval" placeholder="请输入手机号" /></div>
  314. <div class="botdiv">
  315. <div class="btn_confi tel_true">确定</div>
  316. <div class="btn_cancel tel_cancel">取消</div>
  317. </div>
  318. </div>
  319. <!--修改地区-->
  320. <div class="prompt_div addresdiv">
  321. <div class="title">提示</div>
  322. <div class="content"><input type="text" name="" id="adresval" placeholder="请输入地区" /></div>
  323. <div class="botdiv">
  324. <div class="btn_confi addres_true">确定</div>
  325. <div class="btn_cancel addres_cancel">取消</div>
  326. </div>
  327. </div>
  328. <div class="body_bj"></div>
  329. </body>
  330. <script src="../js/mui.min.js "></script>
  331. <script src="../js/zepto.js"></script>
  332. <script src="../js/feedback-page.js"></script>
  333. <script src="../js/mui.picker.js"></script>
  334. <script src="../js/mui.poppicker.js"></script>
  335. <script src="../js/huayi.config.js"></script>
  336. <script src="../js/mui.view.js "></script>
  337. <script>
  338. //mui.init();
  339. (function($, doc) {
  340. $.init();
  341. $.ready(function() {
  342. var _getParam = function(obj, param) {
  343. return obj[param] || '';
  344. };
  345. //省市
  346. var userPicker = new $.PopPicker();
  347. userPicker.setData([{
  348. value: 'ywj',
  349. text: '睢阳区'
  350. }, {
  351. value: 'aaa',
  352. text: '梁园区'
  353. }, {
  354. value: 'lj',
  355. text: '永城市'
  356. }, {
  357. value: 'ymt',
  358. text: '民权县'
  359. }, {
  360. value: 'shq',
  361. text: '睢县'
  362. }, {
  363. value: 'zhbh',
  364. text: '宁陵县'
  365. }, {
  366. value: 'zhy',
  367. text: '柘城'
  368. }, {
  369. value: 'gyf',
  370. text: '虞城'
  371. }, {
  372. value: 'zhz',
  373. text: '夏邑县'
  374. }, {
  375. value: 'gezh',
  376. text: '城乡一体化示范区'
  377. }]);
  378. var showUserPickerButton = doc.getElementById('showUserPicker');
  379. var userResult = doc.getElementById('userResult');
  380. showUserPickerButton.addEventListener('tap', function(event) {
  381. userPicker.show(function(items) {
  382. //userResult.innerText = JSON.stringify(items[0]);
  383. userResult.innerText = items[0].text;
  384. //返回 false 可以阻止选择框的关闭
  385. //return false;
  386. });
  387. }, false);
  388. //-----------------------------------------
  389. var sexPicker = new $.PopPicker();
  390. sexPicker.setData([{
  391. value: 'ywj',
  392. text: '男'
  393. }, {
  394. value: 'aaa',
  395. text: '女'
  396. }]);
  397. var showUserPickerButton1 = doc.getElementById('showUserPicker1');
  398. var userResult1 = doc.getElementById('userResult1');
  399. showUserPickerButton1.addEventListener('tap', function(event) {
  400. sexPicker.show(function(items) {
  401. //userResult.innerText = JSON.stringify(items[0]);
  402. userResult1.innerText = items[0].text;
  403. //返回 false 可以阻止选择框的关闭
  404. //return false;
  405. });
  406. }, false);
  407. });
  408. })(mui, document);
  409. var usercode = localStorage.getItem("user"); //获取本地存储
  410. $.ajax({
  411. type: "get",
  412. dataType: 'json',
  413. url: huayi.config.callcenter_url + '/APP/GetUserInfo',
  414. data: {
  415. usercode: usercode
  416. },
  417. success: function(data) {
  418. if(data.state = "success") {
  419. $(".nameclick").val(data.data.F_Name);
  420. $(".telclick").val(data.data.F_Telphone);
  421. $("#userResult").html(data.data.F_County);
  422. $(".addressclick").val(data.data.F_Address);
  423. if(data.data.F_Sex==1){
  424. $("#userResult1").html('男');
  425. }else{
  426. $("#userResult1").html('女');
  427. }
  428. }else {
  429. mui.alert(data.message);
  430. }
  431. }
  432. });
  433. if($('#userResult1').html() == "男") {
  434. sex = 1
  435. } else {
  436. sex = 2
  437. }
  438. $(".btn_info").click(function() {
  439. var myreg = /^[1][3,4,5,7,8][0-9]{9}$/;
  440. var str = $(".telclick").val();
  441. if($(".nameclick").val() =='') {
  442. mui.alert('请输入昵称!');
  443. } else if($(".telclick").val()=='') {
  444. mui.alert('请输入手机号!');
  445. } else if(!myreg.test(str)) {
  446. mui.alert('手机号格式不正确!');
  447. } else if($("#userResult1").html()=='') {
  448. mui.alert('请输入性别!');
  449. } else if($("#userResult").html() =='') {
  450. mui.alert('请输入区县!');
  451. } else if($(".addressclick").val()=='') {
  452. mui.alert('请输入详情地址!');
  453. } else {
  454. $.ajax({
  455. type: "post",
  456. dataType: 'json',
  457. url: huayi.config.callcenter_url + '/APP/EditUser',
  458. data: {
  459. usercode: usercode,
  460. name: $('.nameclick').val(), //投诉人昵称
  461. phone: $('.telclick').val(), //手机号
  462. sex: sex, //性别
  463. county: $('#userResult').html(), //区县
  464. address: $('.addressclick').val() //详细地址
  465. },
  466. success: function(data) {
  467. if(data.state = "success") {
  468. mui.toast('保存成功!');
  469. }
  470. }
  471. });
  472. }
  473. })
  474. // $(document).ready(function() {
  475. // window.addEventListener('事件名称', function(msg) {
  476. // //自定义方法,刷新数据,不刷新页面
  477. // window.location.reload();
  478. // })
  479. // });
  480. </script>
  481. </html>