personal.html 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. {extend name="layout:home" /}
  2. {block name="container"}
  3. <style>
  4. .information{
  5. margin-left: 100px;
  6. margin-top: 40px;
  7. }
  8. table{
  9. margin-left: 100px;
  10. margin-top: 10px;
  11. }
  12. .td_info{
  13. width: 150px;
  14. height: 60px;
  15. line-height: 60px;
  16. }
  17. .td_user_info{
  18. width: 240px;
  19. height: 60px;
  20. line-height: 60px;
  21. }
  22. table .user_info>input{
  23. border: 1px #aaa solid;
  24. border-radius: 2px;
  25. height: 30px;
  26. width: 210px;
  27. line-height:30px ;
  28. }
  29. .picture td{
  30. /*height: 180px;*/
  31. }
  32. .images{
  33. width: 200px;
  34. /*height: 150px;*/
  35. border: 1px #aaa solid;
  36. }
  37. </style>
  38. <div class="layui-tab layui-tab-card">
  39. <form method="post" enctype="multipart/form-data">
  40. <div class="information">
  41. <div style="color:dodgerblue;">请务必保证您填写的信息准确无误,否则有可能造成认证失败</div>
  42. <!--<div style="margin-top: 10px;font-size: 11px;">当前内容适用大陆客户,若您非大陆用户,请点击 <a href="">非大陆客户</a></div>-->
  43. </div>
  44. <div class="info">
  45. <table>
  46. <tr>
  47. <td class="td_info">真实姓名</td>
  48. <td class="td_user_info user_info"><input type="text" name="name" placeholder="请输入姓名" value="{$userinfo['userInfo_name']}"></td>
  49. <td class="td_user_info"></td>
  50. </tr>
  51. <tr>
  52. <td class="td_info">身份证号码</td>
  53. <td class="td_user_info user_info"><input type="text" name="identity" placeholder="请身份证号码" value="{$userinfo['userInfo_identity']}"></td>
  54. <td class="td_user_info"></td>
  55. </tr>
  56. <tr>
  57. <td class="td_info">财务信息类型</td>
  58. <td class="td_user_info user_info"><input type="text" name="bank_card" placeholder="银行账号" value="{$userinfo['userInfo_bank_card']}"></td>
  59. <td class="td_user_info"></td>
  60. </tr>
  61. <tr>
  62. <td class="td_info">开户银行账号</td>
  63. <td class="td_user_info user_info"><input type="text" name="debit_card" placeholder="请输入借记卡卡号" value="{$userinfo['userInfo_debit_card']}"></td>
  64. <td class="td_user_info"></td>
  65. </tr>
  66. <tr class="picture">
  67. <td class="td_info"><div style="margin-top: -90px;">证件上传</div></td>
  68. <td class="td_user_info user_info">
  69. <input type="file" id="img_front" name="img_front" style="border: none;"/>
  70. <div class="images">
  71. <img id="onFileFront" src="" style="width: 180px;">
  72. </div>
  73. <div style="width:180px;height: 20px;margin-top: -20px;text-align: center;font-size: 10px;color: #AAA;">证件正面</div>
  74. </td>
  75. <td class="td_user_info">
  76. <input type="file" id="img_back" name="img_back">
  77. <div class="images">
  78. <img id="onFileBack" src="" style="width: 180px;">
  79. </div>
  80. <div style="width:180px;height: 20px;margin-top: -20px;text-align: center;font-size: 10px;color: #AAA;">证件反面</div>
  81. </td>
  82. </tr>
  83. <!--<tr>-->
  84. <!--<td class="td_info"></td>-->
  85. <!--<td class="td_user_info"><input type="checkbox" name="ch_box" id="ch_box" onclick="c_box()" /><span>同意 <a href="shenming.html" target="_blank"> 真实性声明</a></span></td>-->
  86. <!--<td class="td_user_info"></td>-->
  87. <!--</tr>-->
  88. <tr style="height: 120px;">
  89. <td class="td_info"></td>
  90. <td class="td_user_info user_info">
  91. <input type="submit" value="确认" style="width: 70px;cursor:pointer;">&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp<input type="button" id="cancel" value="取消" style="width: 70px;cursor:pointer;">
  92. </td>
  93. <td class="td_user_info"></td>
  94. </tr>
  95. </table>
  96. </div>
  97. </form>
  98. </div>
  99. <script>
  100. $("#cancel").click(function(){
  101. window.history.back(-1);
  102. });
  103. </script>
  104. <script type="text/javascript">
  105. layui.use('laydate', function(){
  106. var laydate = layui.laydate;
  107. //执行一个laydate实例
  108. laydate.render({
  109. elem: '#creatTime' //指定元素
  110. });
  111. laydate.render({
  112. elem:'#timeRang',
  113. range:true,
  114. format: 'yyyy/MM/dd',
  115. done: function(value, date){
  116. /* 时间选择完成后的回调 */
  117. }
  118. })
  119. });
  120. $(function() {
  121. $("#img_front").change(function(e) {
  122. var imgfront = e.target;
  123. uploadImgFront(imgfront)
  124. });
  125. $("#img_back").change(function(e) {
  126. var imgback = e.target;
  127. uploadImgBack(imgback)
  128. });
  129. function uploadImgFront(tag) {
  130. var file = tag.files[0];
  131. var imgSrc;
  132. if (!/image\/\w+/.test(file.type)) {
  133. alert("您选择的图片格式错误");
  134. let fileIput = $("#img_front").val("");
  135. //fileIput.after(fileIput.clone().val(""));
  136. $("#onFileFront").attr("src", '/static/user/images/header.png');
  137. //fileIput.remove();
  138. return false;
  139. }
  140. var reader = new FileReader();
  141. reader.readAsDataURL(file);
  142. reader.onload = function() {
  143. imgSrc = this.result;
  144. $("#onFileFront").attr("src", imgSrc);
  145. };
  146. }
  147. function uploadImgBack(tag) {
  148. var file = tag.files[0];
  149. var imgSrc;
  150. if (!/image\/\w+/.test(file.type)) {
  151. alert("您选择的图片格式错误");
  152. let fileIput = $("#img_back").val("");
  153. //fileIput.after(fileIput.clone().val(""));
  154. $("#onFileBack").attr("src", '/static/user/images/header.png');
  155. //fileIput.remove();
  156. return false;
  157. }
  158. var reader = new FileReader();
  159. reader.readAsDataURL(file);
  160. reader.onload = function() {
  161. imgSrc = this.result;
  162. $("#onFileBack").attr("src", imgSrc);
  163. };
  164. }
  165. })
  166. </script>
  167. {/block}