profile.html 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8"/>
  5. <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0"/>
  6. <title>修改个人资料</title>
  7. <link rel="stylesheet" href="http://res.wx.qq.com/open/libs/weui/1.0.0/weui.min.css"/>
  8. <style>
  9. body{
  10. background-color: #fba000;
  11. padding: 15px;
  12. }
  13. .page__hd {
  14. padding: 20px;
  15. }
  16. .page__desc {
  17. margin-top: 5px;
  18. color: #888;
  19. text-align: left;
  20. font-size: 14px;
  21. padding-left:20px;
  22. }
  23. .wrapper{
  24. background-color: #fff;
  25. border-radius: 8px;
  26. padding:10px 0px;
  27. }
  28. .bottom__padding{
  29. padding-bottom: 80px;
  30. }
  31. .style-btn2{
  32. background-color: #fff!important;
  33. color: #fba000!important;
  34. border: 1px solid #fba000;
  35. }
  36. .page_foot_ft{
  37. color: #fff!important;
  38. }
  39. .weui-pl{
  40. padding: 10px 45px!important;
  41. }
  42. .weui-label{
  43. color: #fba000;
  44. }
  45. .weui-cell{
  46. padding-left: 45px;
  47. }
  48. .weui-cell:before{
  49. border-top:0px!important;
  50. border-bottom: 1px solid #d9d9d9;
  51. left:0;
  52. }
  53. .weui-cells:before{
  54. border-top:0px!important;
  55. }
  56. .weui-btn:after{
  57. border:0px!important;
  58. }
  59. .weui-footer{
  60. color:#fff;
  61. }
  62. .porl{
  63. position: relative;
  64. height: 24px;
  65. }
  66. .updateFile{
  67. position: absolute;;
  68. opacity: 0;
  69. left: 0px;
  70. top: 0px;
  71. width: 100%;
  72. }
  73. .ft_orange{
  74. color: #fba000;
  75. }
  76. </style>
  77. </head>
  78. <body ontouchstart><form id="theform" action="/cust/profile.htm" method="post">
  79. <div class="wrapper bottom__padding">
  80. <form id="theform" action="/cust/profile.htm" method="post">
  81. <input type="hidden" name="custId" id="custId"/>
  82. <input type="hidden" name="operType" id="operType" value="1"/>
  83. <input type="hidden" name="openId" id="openId"/>
  84. <input type="hidden" name="demo" id="demo"/>
  85. <input type="hidden" name="park_id" id="park_id"/>
  86. <input type="hidden" name="terminal_id" id="terminal_id"/>
  87. <div class="container">
  88. <div class="page__bd">
  89. <div class="weui-cells">
  90. <div class="weui-cell">
  91. <div class="weui-cell__hd"><label for="custName" class="weui-label">姓名</label></div>
  92. <div class="weui-cell__bd">
  93. <input id="custName" name="custName" class="weui-input" type="text" placeholder="请输入姓名">
  94. </div>
  95. </div>
  96. <!--
  97. <div class="weui-cell weui-cell_vcode">
  98. <div class="weui-cell__hd">
  99. <label class="weui-label">手机号</label>
  100. </div>
  101. <div class="weui-cell__bd">
  102. <input class="weui-input" type="number" pattern="[0-9]*" placeholder="请输入手机号">
  103. </div>
  104. <div class="weui-cell__ft">
  105. <button class="weui-vcode-btn">获取验证码</button>
  106. </div>
  107. </div>
  108. -->
  109. <div class="weui-cell">
  110. <div class="weui-cell__hd"><label for="mobile" class="weui-label">手机号</label></div>
  111. <div class="weui-cell__bd">
  112. <input name="mobile" id="mobile" class="weui-input" type="number" pattern="[0-9]*"
  113. placeholder="请输入手机号">
  114. </div>
  115. </div>
  116. <div class="weui-cell">
  117. <div class="weui-cell__hd"><label for="birthday" class="weui-label">生日</label></div>
  118. <div class="weui-cell__bd">
  119. <input id="birthday" name="birthday" class="weui-input" type="date" value="">
  120. </div>
  121. </div>
  122. <div class="weui-cell weui-cell_select weui-cell_select-after">
  123. <div class="weui-cell__hd"><label for="custSex" class="weui-label">性别</label></div>
  124. <div class="weui-cell__bd">
  125. <select id="custSex" class="weui-select" name="custSex">
  126. <option value="男">男孩</option>
  127. <option value="女">女孩</option>
  128. </select>
  129. </div>
  130. </div>
  131. <div class="weui-cell">
  132. <div class="weui-cell__hd"><label for="birthday" class="weui-label">头像</label></div>
  133. <div class="weui-cell__bd porl">
  134. 浏览
  135. <input id="updateFile" name="updateFile" class="weui-input updateFile" type="file" accept="image/*" value="">
  136. </div>
  137. <!-- 上传为提交图片 -->
  138. <div class="weui-cell__bd ft_orange">
  139. 上传
  140. </div>
  141. </div>
  142. </div>
  143. <div class="weui-btn-area">
  144. <button type="submit" class="weui-btn weui-btn_primary" href="javascript:" id="save">保存修改</button>
  145. <a href="/cust/qr_src.htm?custId=A0528I002" class="weui-btn weui-btn_default style-btn2">亲友分享</a>
  146. <a id="jiechu" href="javascript:;" class="weui-btn weui-btn_mini weui-btn_warn">解除绑定</a>
  147. </div>
  148. </div>
  149. <!-- page__bd -->
  150. </div>
  151. </form>
  152. </div>
  153. <div class="weui-msg__extra-area">
  154. <div class="weui-footer">
  155. <p class="weui-footer__links">
  156. <span class="weui-footer__link">森林侠</span>
  157. </p>
  158. <p class="weui-footer__text">Copyright © 2017-2020</p>
  159. </div>
  160. </div>
  161. </div>
  162. <script src="https://res.wx.qq.com/open/libs/weuijs/1.0.0/weui.min.js"></script>
  163. <script src="http://apps.bdimg.com/libs/jquery/2.1.1/jquery.min.js"></script>
  164. </body>
  165. </html>
  166. <script type="text/javascript">
  167. $(document).ready(function () {
  168. $('#openId').val('oQkxG0WYA7pSUP3UKAEuOLOclHdE');
  169. $('#custId').val('A0528I002');
  170. $('#custName').val('罗帅帅');
  171. $('#mobile').val('');
  172. $('#park_id').val('');
  173. $('#terminal_id').val('');
  174. var birthday = '2013-12-18';
  175. if (birthday !== null || birthday !== undefined || birthday !== '') {
  176. $('#birthday').val(parserDate(birthday).format("yyyy-MM-dd"));
  177. }
  178. var custSex = '男';
  179. if (custSex !== null || custSex !== undefined || custSex !== '') {
  180. $('#custSex').val(custSex);
  181. }
  182. $('#jiechu').click(function () {
  183. weui.dialog({
  184. title: '确认解除',
  185. content: '解除绑定之后,您就不会再收到有关罗帅帅的消息了,确定这样做?',
  186. buttons: [{
  187. label: '取消',
  188. type: 'primary',
  189. }, {
  190. label: '确定',
  191. type: 'default',
  192. onClick: function () {
  193. $('#operType').val(2);
  194. $("#theform").submit();
  195. }
  196. }]
  197. });
  198. });
  199. });
  200. var parserDate = function (date) {
  201. var t = Date.parse(date);
  202. if (!isNaN(t)) {
  203. return new Date(Date.parse(date.replace(/-/g, "/")));
  204. } else {
  205. return new Date();
  206. }
  207. };
  208. Date.prototype.format = function (fmt) {
  209. var o = {
  210. "M+": this.getMonth() + 1, //月份
  211. "d+": this.getDate(), //日
  212. "h+": this.getHours(), //小时
  213. "m+": this.getMinutes(), //分
  214. "s+": this.getSeconds(), //秒
  215. "q+": Math.floor((this.getMonth() + 3) / 3), //季度
  216. "S": this.getMilliseconds() //毫秒
  217. };
  218. if (/(y+)/.test(fmt)) {
  219. fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
  220. }
  221. for (var k in o) {
  222. if (new RegExp("(" + k + ")").test(fmt)) {
  223. fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
  224. }
  225. }
  226. return fmt;
  227. }
  228. </script>