作者 吴孟雨
1 个管道 的构建 通过 耗费 5 秒

添加生日

@@ -6,6 +6,10 @@ @@ -6,6 +6,10 @@
6 <title>十方台公众号</title> 6 <title>十方台公众号</title>
7 <script src="__TMPL__/public/assets/js/jquery-2.1.0.js"></script> 7 <script src="__TMPL__/public/assets/js/jquery-2.1.0.js"></script>
8 <script src="__TMPL__/public/assets/js/fontsize.js"></script> 8 <script src="__TMPL__/public/assets/js/fontsize.js"></script>
  9 + <script src="__TMPL__/public/assets/js/weui.js"></script>
  10 + <script src="__TMPL__/public/assets/js/myweui.js"></script>
  11 + <link href="__TMPL__/public/assets/css/weui.css" rel="stylesheet">
  12 + <link href="__TMPL__/public/assets/css/myweui.css" rel="stylesheet">
9 <link href="__TMPL__/public/assets/css/personal-info.css" rel="stylesheet"> 13 <link href="__TMPL__/public/assets/css/personal-info.css" rel="stylesheet">
10 </head> 14 </head>
11 <body> 15 <body>
@@ -24,6 +28,12 @@ @@ -24,6 +28,12 @@
24 id="age" value="" bindinput="inputName"/> 28 id="age" value="" bindinput="inputName"/>
25 </div> 29 </div>
26 </div> 30 </div>
  31 + <div class="age-box">
  32 + <div class="input-box">
  33 + <text>生日</text>
  34 + <input type="text" id='showDatePicker'/>
  35 + </div>
  36 + </div>
27 <div class="sex-box"> 37 <div class="sex-box">
28 <div class="input-box"> 38 <div class="input-box">
29 <text>性别</text> 39 <text>性别</text>
@@ -46,6 +56,18 @@ @@ -46,6 +56,18 @@
46 </div> 56 </div>
47 </body> 57 </body>
48 <script> 58 <script>
  59 + $('#showDatePicker').on('click', function () {
  60 + weui.datePicker({
  61 + start: 1990,
  62 + end: new Date().getFullYear(),
  63 + onChange: function (result) {
  64 + // console.log(result);
  65 + },
  66 + onConfirm: function (result) {
  67 + $('#showDatePicker').val(result[0].label + '' + result[1].label + '' + result[2].label)
  68 + }
  69 + });
  70 + });
49 $(".man").click(function () { 71 $(".man").click(function () {
50 $(".man").addClass('active'); 72 $(".man").addClass('active');
51 $(".women").removeClass('active'); 73 $(".women").removeClass('active');