getSev_f.html 3.7 KB
<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title></title>
    <script src="../../assets/js/fontsize.js"></script>
    <!--<link rel="stylesheet" href="../../assets/css/weui.min.css">-->
    <link rel="stylesheet" href="../../assets/icon/iconfont.css">
    <style>

        html {
            font-family: sans-serif;
        }

        html, body, header, section, footer, div, ul, ol, li, img, a, span, em, del, legend, center, strong, var, fieldset, form, label, dl, dt, dd, cite, input, hr, time, mark, code, figcaption, figure, textarea, h1, h2, h3, h4, h5, h6, p {
            margin: 0;
            border: 0;
            padding: 0;
            font-style: normal;
            /*touch-action: none;*/
            touch-action: manipulation
        }

        html, body {
            -webkit-touch-callout: none;
            -webkit-text-size-adjust: none;
            -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
            -webkit-user-select: none;
            background: none;
            height: 100%;
        }

        .meal {
            display: flex;
            flex-direction: column;
            justify-content: flex-end;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: 100;
            background: none;
        }

    </style>
</head>
<body>
<div id="app" v-cloak>
    <div class="meal" @click="close">
        <div id="sever" >1</div>
    </div>
</div>
</body>
</html>
<script type="text/javascript" src="../../assets/js/api.js"></script>
<script type="text/javascript" src="../../assets/js/public.js"></script>
<script type="text/javascript" src="../../assets/js/fastclick.js"></script>
<script>
    new FastClick(document.body);
</script>
<script type="text/javascript" src="../../assets/js/vue.min.js"></script>
<script type="text/javascript" src="../../assets/js/datePicker.js"></script>
<script>
    document.getElementById("sever").click();
    var app = new Vue({
        el: '#app',
        data: {
            pickerValue_sev: '',
            endDate_sev: new Date(),
            startDate_sev: new Date('2019-01-22')
        },
        created: function () {
            apiready = function () {
                api.addEventListener({
                    name: 'choose_sev'
                }, function(ret, err) {
                   if(ret){
                       app.choose_sev()
                   }
                });
            }
        },
        methods: {
            close: function () {
                // api.closeWin({
                //     name: 'choose_meal_w'
                // });
                api.closeWin();
            },
            choose_sev: function () {
                var calendar = new datePicker();
                calendar.init({
                    'trigger': '#sever', /*按钮选择器,用于触发弹出插件*/
                    'type': 'datetime', /*模式:date日期;datetime日期时间;time时间;ym年月;*/
                    'minDate': '1900-1-1', /*最小日期*/
                    'maxDate': formatDate(new Date()), /*最大日期*/
                    'onSubmit': function () {/*确认时触发事件*/
                        console.log(calendar.value);
                    },
                    'onClose': function () {/*取消时触发事件*/
                    }
                });
            },
        }
    })
</script>