Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
 
 
 
 
 
 

143 строки
4.6 KiB

  1. <!doctype html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <title></title>
  6. <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
  7. <link href="css/mui.min.css" rel="stylesheet" />
  8. <link href="css/style.css" rel="stylesheet" />
  9. <script src="js/mui.min.js"></script>
  10. <script src="js/serverurl.js"></script>
  11. <script src="js/userinfos.js"></script>
  12. <script type="text/javascript">
  13. function GetData(id) {
  14. var xhr = new plus.net.XMLHttpRequest();
  15. xhr.responseType = "json";
  16. xhr.onreadystatechange = function() {
  17. switch(xhr.readyState) {
  18. case 4:
  19. if(xhr.status == 200) {
  20. plus.nativeUI.closeWaiting();
  21. if(xhr.response != null) {
  22. document.getElementById("bankName").value=xhr.response.BANK_NAME;
  23. document.getElementById("bankNumber").value=xhr.response.BANK_NUMBER;
  24. } else {
  25. plus.nativeUI.toast("获取失败,请重试。");
  26. }
  27. } else {
  28. plus.nativeUI.closeWaiting();
  29. plus.nativeUI.toast('您的网络不给力');
  30. }
  31. break;
  32. default:
  33. break;
  34. }
  35. }
  36. xhr.open("GET", encodeURI(serverdomain + "/WebService/UserService.ashx?Action=getBackCardInfo&content={'userID':'" + users.ID + "'}"));
  37. xhr.send();
  38. plus.nativeUI.showWaiting("加载中...");
  39. }
  40. var id;
  41. mui.plusReady(function() {
  42. CheckLogin();
  43. id = plus.webview.currentWebview().id;
  44. if(id != undefined && id != null && id != '') {
  45. GetData(id);
  46. }
  47. document.getElementById("username").value = users.username;
  48. document.getElementById("btsave").addEventListener("tap", function() {
  49. if(document.getElementById("bankName").value == "" || document.getElementById("bankNumber").value == "" || document.getElementById("bankNumber2").value == "") {
  50. plus.nativeUI.toast('请填写完整表单。');
  51. return;
  52. }
  53. if(document.getElementById("bankNumber").value != document.getElementById("bankNumber2").value) {
  54. plus.nativeUI.toast('修改失败!两次输入的卡号不相同。');
  55. return;
  56. }
  57. //更新服务端
  58. var xhr = new plus.net.XMLHttpRequest();
  59. xhr.responseType = "json";
  60. xhr.onreadystatechange = function() {
  61. switch(xhr.readyState) {
  62. case 4:
  63. if(xhr.status == 200) {
  64. plus.nativeUI.closeWaiting();
  65. if(xhr.response.result == "ok") {
  66. plus.webview.currentWebview().opener().evalJS("GetData();");
  67. plus.webview.currentWebview().close();
  68. plus.nativeUI.toast('绑定成功。');
  69. } else {
  70. plus.nativeUI.toast("绑定失败,请重试。");
  71. }
  72. } else {
  73. plus.nativeUI.closeWaiting();
  74. plus.nativeUI.toast('您的网络不给力');
  75. }
  76. break;
  77. default:
  78. break;
  79. }
  80. }
  81. xhr.open("GET", encodeURI(serverdomain + "/WebService/UserService.ashx?Action=setBacks&content={'userID':'" + users.ID + "','bankNumber':'" + document.getElementById("bankNumber").value + "','bankName':'" + document.getElementById("bankName").value + "'}"));
  82. xhr.send();
  83. plus.nativeUI.showWaiting("加载中...");
  84. });
  85. });
  86. </script>
  87. <style>
  88. .mui-btn-primary {
  89. width: 90%;
  90. margin: 10px;
  91. }
  92. .mui-content p {
  93. color: #c70f1a;
  94. width: 96%;
  95. text-align: center;
  96. line-height: 40px;
  97. font-size: 15px;
  98. margin: auto;
  99. }
  100. </style>
  101. </head>
  102. <body>
  103. <header class="mui-bar mui-bar-nav">
  104. <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
  105. <h1 class="mui-title">绑定银行卡</h1>
  106. </header>
  107. <div class="mui-content">
  108. <p>为保证提现成功,请确认该银行卡开户姓名必须为您的姓名</p>
  109. <form class="mui-input-group">
  110. <div class="mui-input-row">
  111. <label>持卡人</label>
  112. <input type="text" class="mui-input-clear" id="username" disabled="disabled">
  113. </div>
  114. <div class="mui-input-row">
  115. <label>所属银行</label>
  116. <input type="text" class="mui-input-clear" placeholder="请输入银行" id="bankName">
  117. </div>
  118. <div class="mui-input-row">
  119. <label>银行卡号</label>
  120. <input class="mui-input-clear mui-input-numbox" type="number" placeholder="请输入您的银行卡号" id="bankNumber">
  121. </div>
  122. <div class="mui-input-row">
  123. <label>确认卡号</label>
  124. <input class="mui-input-clear mui-input-numbox" type="number" placeholder="请输入您的银行卡号" id="bankNumber2">
  125. </div>
  126. </form>
  127. <div class="mui-button-row">
  128. <button type="button" class="mui-btn mui-btn-primary" id="btsave">确认绑定</button>
  129. </div>
  130. </div>
  131. </body>
  132. </html>