虞城12345_前端

Setting-FabKui.html 4.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  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. <!--标准mui.css-->
  10. <link rel="stylesheet" href="../css/mui.min.css">
  11. <!--App自定义的css-->
  12. <!--<link rel="stylesheet" type="text/css" href="css/app.css" />-->
  13. <style>
  14. .mui-table h4,
  15. .mui-table h5,
  16. .mui-table .mui-h5,
  17. .mui-table .mui-h6,
  18. .mui-table p {
  19. margin-top: 0;
  20. }
  21. .mui-table h4 {
  22. line-height: 21px;
  23. font-weight: 500;
  24. }
  25. .mui-table .oa-icon {
  26. position: absolute;
  27. right: 0;
  28. bottom: 0;
  29. }
  30. .mui-table .oa-icon-star-filled {
  31. color: #f14e41;
  32. }
  33. .mui-bar-nav {
  34. background-color: #00a1cb;
  35. }
  36. #title{
  37. color: #fff;
  38. }
  39. .mui-table-view-cell{
  40. padding: 5px 15px;
  41. }
  42. h4{
  43. color: inherit;
  44. font-weight: 500;
  45. }
  46. p {
  47. font-size: 14px;
  48. color: #000;
  49. padding: 10px;
  50. margin-bottom: 0px;
  51. }
  52. textarea{
  53. font-size: 14px;
  54. }
  55. #send{
  56. background-color: #00a1cb;
  57. color: #fff;
  58. font-size: 14px;
  59. }
  60. </style>
  61. </head>
  62. <body>
  63. <header class="mui-bar mui-bar-nav">
  64. <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left" style="color: #fff;"></a>
  65. <h1 id="title" class="mui-title">常见问题</h1>
  66. </header>
  67. <div class="mui-content" id="pullrefresh">
  68. <div class="mui-navbar-inner mui-bar mui-bar-nav">
  69. <button type="button" class="mui-left mui-action-back mui-btn mui-btn-link mui-btn-nav mui-pull-left">
  70. <span class="mui-icon mui-icon-left-nav" style="color:#fff"></span>
  71. </button>
  72. <h1 class="mui-center mui-title" style="color:#fff">问题反馈</h1>
  73. </div>
  74. <div class="mui-page-content">
  75. <p>联系方式</p>
  76. <div class="row mui-input-row">
  77. <input type="number" id="mobile" />
  78. </div>
  79. <p>反馈标题</p>
  80. <div class="row mui-input-row">
  81. <input type="text" id="titles" />
  82. </div>
  83. <p>反馈内容</p>
  84. <div class="row mui-input-row">
  85. <textarea id='content' class="mui-input-clear question" placeholder="请详细描述你的问题和意见..."></textarea>
  86. </div>
  87. <ul class="mui-table-view">
  88. <li class="mui-table-view-cell" style="text-align: center;">
  89. <a id='send' style=" line-height:45px;padding: 11px 15px;">发送</a>
  90. </li>
  91. </ul>
  92. </div>
  93. </div>
  94. </body>
  95. <script src="../js/mui.min.js"></script>
  96. <script src="../js/zepto.js"></script>
  97. <script src="../js/huayi.config.js"></script>
  98. <script>
  99. mui.plusReady(function() {
  100. var token =localStorage.getItem("token"); //获取本地存储
  101. mui.init();
  102. //意见反馈
  103. document.getElementById("send").addEventListener('tap', function() {
  104. var myreg = /^[1][3,4,5,7,8][0-9]{9}$/;
  105. var str = $("#mobile").val();
  106. if(!$("#mobile").val()) {
  107. mui.toast("联系方式不能为空");
  108. } else if(!myreg.test(str)) {
  109. mui.toast("你输入的手机号有误");
  110. } else if(!$("#titles").val()) {
  111. mui.toast("反馈标题不能为空");
  112. } else if(!$("#content").val()) {
  113. mui.toast("反馈内容不能为空");
  114. } else{
  115. mui.ajax(huayi.config.callcenter_url + 'UserFeedback/AddInfo', {
  116. data: {
  117. id: 0,
  118. mobile: $("#mobile").val(),
  119. title: $("#titles").val(),
  120. content: $("#content").val(),
  121. token: token
  122. },
  123. dataType: 'json', //服务器返回json格式数据
  124. type: 'post', //HTTP请求类型
  125. timeout: 10000, //超时时间设置为10秒;
  126. headers: {
  127. 'Content-Type': 'application/x-www-form-urlencoded; charset=utf-8'
  128. },
  129. success: function(data) {
  130. if(data.state == "success") {
  131. mui.toast("问题已提交");
  132. Clean();
  133. var wobj = plus.webview.getWebviewById("personal");
  134. wobj.reload(true);
  135. }
  136. },
  137. error: function(data) {
  138. //异常处理;
  139. }
  140. })
  141. }
  142. });
  143. function Clean() {
  144. $("#mobile").val('');
  145. $("#titles").val('');
  146. $("#content").val('');
  147. }
  148. });
  149. </script>
  150. </html><!DOCTYPE html>
  151. <html>
  152. <head>
  153. <meta charset="UTF-8">
  154. <title></title>
  155. </head>
  156. <body>
  157. </body>
  158. </html>