| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <title>Hello MUI</title>
- <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
- <meta name="apple-mobile-web-app-capable" content="yes">
- <meta name="apple-mobile-web-app-status-bar-style" content="black">
- <link rel="stylesheet" href="../css/mui.min.css">
- <link href="../css/mui.picker.css" rel="stylesheet" />
- <link href="../css/mui.poppicker.css" rel="stylesheet" />
- <link href="../css/feedback-page.css" rel="stylesheet" />
- <style>
- html,
- body {
- background-color: #efeff4;
- font-size: 14px;
- }
-
- .mui-views,
- .mui-view,
- .mui-pages,
- .mui-page,
- .mui-page-content {
- position: absolute;
- left: 0;
- right: 0;
- top: 0;
- bottom: 0;
- width: 100%;
- height: 100%;
- background-color: #efeff4;
- }
-
- .mui-pages {
- top: 46px;
- height: auto;
- }
-
- .mui-scroll-wrapper,
- .mui-scroll {
- background-color: #efeff4;
- }
-
- .mui-page.mui-transitioning {
- -webkit-transition: -webkit-transform 300ms ease;
- transition: transform 300ms ease;
- }
-
- .mui-page-left {
- -webkit-transform: translate3d(0, 0, 0);
- transform: translate3d(0, 0, 0);
- }
-
- .mui-ios .mui-page-left {
- -webkit-transform: translate3d(-20%, 0, 0);
- transform: translate3d(-20%, 0, 0);
- }
-
- .mui-navbar {
- position: fixed;
- right: 0;
- left: 0;
- z-index: 10;
- height: 44px;
- background-color: #f7f7f8;
- }
-
- .mui-navbar .mui-bar {
- position: absolute;
- background: transparent;
- text-align: center;
- }
-
- .mui-android .mui-navbar-inner.mui-navbar-left {
- opacity: 0;
- }
-
- .mui-ios .mui-navbar-left .mui-left,
- .mui-ios .mui-navbar-left .mui-center,
- .mui-ios .mui-navbar-left .mui-right {
- opacity: 0;
- }
-
- .mui-navbar .mui-btn-nav {
- -webkit-transition: none;
- transition: none;
- -webkit-transition-duration: .0s;
- transition-duration: .0s;
- }
-
- .mui-navbar .mui-bar .mui-title {
- display: inline-block;
- width: auto;
- }
-
- .mui-page-shadow {
- position: absolute;
- right: 100%;
- top: 0;
- width: 16px;
- height: 100%;
- z-index: -1;
- content: '';
- }
-
- .mui-page-shadow {
- 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%);
- 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%);
- }
-
- .mui-navbar-inner.mui-transitioning,
- .mui-navbar-inner .mui-transitioning {
- -webkit-transition: opacity 300ms ease, -webkit-transform 300ms ease;
- transition: opacity 300ms ease, transform 300ms ease;
- }
-
- .mui-page {
- display: none;
- }
-
- .mui-pages .mui-page {
- display: block;
- }
-
- .mui-page .mui-table-view:first-child {
- margin-top: 15px;
- }
-
- .mui-page .mui-table-view:last-child {
- margin-bottom: 30px;
- }
-
- .mui-table-view {
- margin-top: 20px;
- }
-
- .mui-table-view span.mui-pull-right {
- color: #999;
- }
-
- .mui-table-view-divider {
- background-color: #efeff4;
- font-size: 14px;
- }
-
- .mui-table-view-divider:before,
- .mui-table-view-divider:after {
- height: 0;
- }
-
- .head {
- height: 40px;
- }
-
- #head {
- line-height: 40px;
- }
-
- .head-img {
- width: 40px;
- height: 40px;
- }
-
- #head-img1 {
- position: absolute;
- bottom: 10px;
- right: 40px;
- width: 40px;
- height: 40px;
- }
-
- .update {
- font-style: normal;
- color: #999999;
- margin-right: -25px;
- font-size: 15px
- }
-
- .mui-fullscreen {
- position: fixed;
- z-index: 20;
- background-color: #000;
- }
-
- .mui-ios .mui-navbar .mui-bar .mui-title {
- position: static;
- }
- /*问题反馈在setting页面单独的css*/
-
- #feedback .mui-popover {
- position: fixed;
- }
-
- #feedback .mui-table-view:last-child {
- margin-bottom: 0px;
- }
-
- #feedback .mui-table-view:first-child {
- margin-top: 0px;
- }
- /*问题反馈在setting页面单独的css==end*/
-
- .mui-bar-nav {
- background-color: #00a1cb!important;
- }
-
- p {
- font-size: 16px;
- color: #000;
- padding: 10px;
- margin-bottom: 0px;
- }
-
- .Img-box {
- line-height: 15px;
- }
-
- .Img {
- width: 20px;
- height: 19px;
- vertical-align: sub;
- margin-right: 5px;
- }
-
- .prompt_div {
- width: 80%;
- height: 180px;
- position: fixed;
- top: 0px;
- left: 0px;
- right: 0px;
- bottom: 0px;
- margin: auto;
- text-align: center;
- display: none;
- z-index: 99999;
- background: #FFFFFF;
- border-radius: 5px;
- -moz-border-radius: 5px;
- -webkit-border-radius: 5px;
- -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
- -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
- text-shadow: 0 -1px 1px rgba(0, 0, 0, 0.25);
- }
-
- .prompt_div .title {
- width: 100%;
- height: 50px;
- text-align: center;
- line-height: 50px;
- margin-top: 10px;
- }
-
- .prompt_div .content {
- width: 90%;
- margin-left: 5%;
- margin-top: 10px;
- }
-
- .prompt_div .content input {
- width: 100%;
- height: 30px;
- line-height: 30px;
- }
-
- .prompt_div .botdiv {
- margin-top: 20px;
- position: relative;
- }
-
- .prompt_div .botdiv .btn_confi {
- padding: 6px 12px;
- color: #007aff;
- /*background: #007aff;*/
- font-size: 14px;
- display: inline;
- position: absolute;
- left: 20px;
- }
-
- .prompt_div .botdiv .btn_cancel {
- padding: 6px 12px;
- color: #007aff;
- /*background: #007aff;*/
- font-size: 14px;
- display: inline;
- position: absolute;
- right: 20px;
- }
-
- .body_bj {
- width: 100%;
- height: 100%;
- background: #000000;
- position: fixed;
- top: 0px;
- z-index: 99998;
- display: none;
- filter: alpha(opacity=60);
- -moz-opacity: 0.6;
- -khtml-opacity: 0.6;
- opacity: 0.6;
- }
- .perlist{
- border: none;
- text-align: right;
- width: 50%;
- color: #999999;
- font-size: 14px;
- }
- </style>
- </head>
- <body class="mui-fullscreen">
- <header class="mui-bar" style="padding-right: 15px;color: #fff; background: #000000;">
- <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
- <h1 class="mui-center mui-title"><span class="Totle-box">个人中心</span></h1>
- </header>
- <div class="mui-scroll-wrapper" style="margin-top: 44px;">
- <div class="mui-scroll percoent">
- <ul class="mui-table-view">
- <li class="mui-table-view-cell">
- <a>昵称<input class="mui-pull-right nameclick perlist" placeholder="请输入昵称"></input><i class="mui-pull-right "></i></a>
- </li>
- <li class="mui-table-view-cell">
- <a>手机号<input class="mui-pull-right telclick perlist" placeholder="请输入手机号"></input>
- </a>
- </li>
- <li class="mui-table-view-cell" id='showUserPicker1'>
- <a>性别<span class="mui-pull-right perlist" id='userResult1'>男</span></a>
- </li>
- <li class="mui-table-view-cell">
- <a>省市<span class="mui-pull-right">河南商丘市</span></a>
- </li>
- <li class="mui-table-view-cell" id='showUserPicker'>
- <a>区县<span class="mui-pull-right" id='userResult'>请输入区县</span></a>
- </li>
- <li class="mui-table-view-cell">
- <a>所在地区<input class="mui-pull-right addressclick perlist" placeholder="请输入详细地址"></input>
- </a>
- </li>
- </ul>
- <button type="button" class="order_remind mui-btn mui-btn-primary btn_info" style="display: block; margin-left: 43%; margin-top: 15px;">保存</button>
- </div>
- </div>
- <!--修改昵称-->
- <div class="prompt_div namediv">
- <div class="title">提示</div>
- <div class="content"><input type="text" name="" id="nameval" placeholder="请输入昵称" /></div>
- <div class="botdiv">
- <div class="btn_confi name_true">确定</div>
- <div class="btn_cancel name_cancel">取消</div>
- </div>
- </div>
- <!--修改手机号-->
- <div class="prompt_div teldiv">
- <div class="title">提示</div>
- <div class="content"><input type="number" name="" id="telval" placeholder="请输入手机号" /></div>
- <div class="botdiv">
- <div class="btn_confi tel_true">确定</div>
- <div class="btn_cancel tel_cancel">取消</div>
- </div>
- </div>
- <!--修改地区-->
- <div class="prompt_div addresdiv">
- <div class="title">提示</div>
- <div class="content"><input type="text" name="" id="adresval" placeholder="请输入地区" /></div>
- <div class="botdiv">
- <div class="btn_confi addres_true">确定</div>
- <div class="btn_cancel addres_cancel">取消</div>
- </div>
- </div>
- <div class="body_bj"></div>
- </body>
- <script src="../js/mui.min.js "></script>
- <script src="../js/zepto.js"></script>
- <script src="../js/feedback-page.js"></script>
- <script src="../js/mui.picker.js"></script>
- <script src="../js/mui.poppicker.js"></script>
- <script src="../js/huayi.config.js"></script>
- <script src="../js/mui.view.js "></script>
- <script>
- //mui.init();
- (function($, doc) {
- $.init();
- $.ready(function() {
- var _getParam = function(obj, param) {
- return obj[param] || '';
- };
- //省市
- var userPicker = new $.PopPicker();
- userPicker.setData([{
- value: 'ywj',
- text: '睢阳区'
- }, {
- value: 'aaa',
- text: '梁园区'
- }, {
- value: 'lj',
- text: '永城市'
- }, {
- value: 'ymt',
- text: '民权县'
- }, {
- value: 'shq',
- text: '睢县'
- }, {
- value: 'zhbh',
- text: '宁陵县'
- }, {
- value: 'zhy',
- text: '柘城'
- }, {
- value: 'gyf',
- text: '虞城'
- }, {
- value: 'zhz',
- text: '夏邑县'
- }, {
- value: 'gezh',
- text: '城乡一体化示范区'
- }]);
- var showUserPickerButton = doc.getElementById('showUserPicker');
- var userResult = doc.getElementById('userResult');
- showUserPickerButton.addEventListener('tap', function(event) {
- userPicker.show(function(items) {
- //userResult.innerText = JSON.stringify(items[0]);
- userResult.innerText = items[0].text;
- //返回 false 可以阻止选择框的关闭
- //return false;
- });
- }, false);
- //-----------------------------------------
- var sexPicker = new $.PopPicker();
- sexPicker.setData([{
- value: 'ywj',
- text: '男'
- }, {
- value: 'aaa',
- text: '女'
- }]);
- var showUserPickerButton1 = doc.getElementById('showUserPicker1');
- var userResult1 = doc.getElementById('userResult1');
- showUserPickerButton1.addEventListener('tap', function(event) {
- sexPicker.show(function(items) {
- //userResult.innerText = JSON.stringify(items[0]);
- userResult1.innerText = items[0].text;
- //返回 false 可以阻止选择框的关闭
- //return false;
- });
- }, false);
- });
- })(mui, document);
- var usercode = localStorage.getItem("user"); //获取本地存储
-
- $.ajax({
- type: "get",
- dataType: 'json',
- url: huayi.config.callcenter_url + '/APP/GetUserInfo',
- data: {
- usercode: usercode
- },
- success: function(data) {
- if(data.state = "success") {
- $(".nameclick").val(data.data.F_Name);
- $(".telclick").val(data.data.F_Telphone);
- $("#userResult").html(data.data.F_County);
- $(".addressclick").val(data.data.F_Address);
- if(data.data.F_Sex==1){
- $("#userResult1").html('男');
- }else{
- $("#userResult1").html('女');
- }
- }else {
- mui.alert(data.message);
- }
- }
- });
-
- if($('#userResult1').html() == "男") {
- sex = 1
- } else {
- sex = 2
- }
-
- $(".btn_info").click(function() {
- var myreg = /^[1][3,4,5,7,8][0-9]{9}$/;
- var str = $(".telclick").val();
- if($(".nameclick").val() =='') {
- mui.alert('请输入昵称!');
- } else if($(".telclick").val()=='') {
- mui.alert('请输入手机号!');
- } else if(!myreg.test(str)) {
- mui.alert('手机号格式不正确!');
- } else if($("#userResult1").html()=='') {
- mui.alert('请输入性别!');
- } else if($("#userResult").html() =='') {
- mui.alert('请输入区县!');
- } else if($(".addressclick").val()=='') {
- mui.alert('请输入详情地址!');
- } else {
- $.ajax({
- type: "post",
- dataType: 'json',
- url: huayi.config.callcenter_url + '/APP/EditUser',
- data: {
- usercode: usercode,
- name: $('.nameclick').val(), //投诉人昵称
- phone: $('.telclick').val(), //手机号
- sex: sex, //性别
- county: $('#userResult').html(), //区县
- address: $('.addressclick').val() //详细地址
- },
- success: function(data) {
- if(data.state = "success") {
- mui.toast('保存成功!');
- }
- }
- });
- }
-
- })
- // $(document).ready(function() {
- // window.addEventListener('事件名称', function(msg) {
- // //自定义方法,刷新数据,不刷新页面
- // window.location.reload();
- // })
- // });
-
- </script>
- </html>
|