<!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">
    <script src="../../assets/js/fontsize.js"></script>
    <link rel="stylesheet" href="../../assets/css/api.css"/>
    <link rel="stylesheet" href="../../assets/css/style.css">
    <link rel="stylesheet" href="../../assets/css/pay.css">
    <link rel="stylesheet" href="../../assets/icon/iconfont.css">
    <title></title>
    <style>
        body, html {
            background-color: #f2f2f2;
            padding-bottom: 1rem;
        }
    </style>
</head>
<body>
<div id="app">
    <div class="pay_time">支付剩余时间:{{minute}}:{{second}}</div>
    <div class="pay_box">
        <div class="pay_item_title"><span class="pay_item_title_span">静脉采血1次</span><span>待付款</span></div>
        <div class="pay_detail">
            <div class="pay_detail_item"><span class="iconfont icon-yonghu"></span><span
                    class="pay_detail_label">服务对象</span><span>王大锤</span></div>
            <div class="pay_detail_item"><span class="iconfont icon-xingbie"></span><span
                    class="pay_detail_label">性别</span><span></span></div>
            <div class="pay_detail_item"><span class="iconfont icon-chuhangriqi"></span><span class="pay_detail_label">出生日期</span><span>2018-5-20</span>
            </div>
            <div class="pay_detail_item"><span class="iconfont icon-dianhua-1"></span><span
                    class="pay_detail_label">联系电话</span><span>13821452840</span></div>
            <div class="pay_detail_item"><span class="iconfont icon-shijian1"></span><span
                    class="pay_detail_label">上门时间</span><span>2018-5-20 5:20</span></div>
            <div class="pay_detail_item address"><span class="iconfont icon-dizhi"></span><span
                    class="pay_detail_label">服务地址</span><span>北京市 丰台区 总部基地六区2号楼A座层305丰台区 总部基地六区2</span></div>
        </div>
    </div>
    <div class="pay_box">
        <div class="pay_item_title"><span class="pay_item_title_span">病情描述</span></div>
        <div class="pay_detail">
            <div class="pay_detail_item"><span class="pay_detail_label">胃消化性溃疡,需上门采取化验</span></div>
        </div>
    </div>
    <div class="pay_box">
        <div class="pay_item_title"><span class="pay_item_title_span">就医证明</span></div>
        <div class="pay_detail">
            <div class="pay_detail_item">
                <div class="pay_detail_item_img"><img src="../../assets/image/nurse.png" alt=""></div>
                <div class="pay_detail_item_img"><img src="../../assets/image/price.png" alt=""></div>
                <div class="pay_detail_item_img"><img src="../../assets/image/nurse.png" alt=""></div>
                <div class="pay_detail_item_img"><img src="../../assets/image/nurse.png" alt=""></div>
            </div>
        </div>
    </div>
    <div class="pay_box">
        <div class="pay_detail">
            <div class="pay_price_item"><span>服务费</span><span>169元</span></div>
            <div class="pay_price_item"><span>耗材费</span><span>+25元</span></div>
            <div class="pay_price_item"><span>总服务费</span><span>194元</span></div>
        </div>
    </div>
    <div class="pay_order_num">
        订单号:010201800078
    </div>
    <div class="pay_btn_box" @click="pay_money">
        <span class="pay_btn">去支付</span>
    </div>
</div>
</body>
</html>
<script type="text/javascript" src="../../assets/js/api.js"></script>
<script type="text/javascript" src="../../assets/js/weui.min.js"></script>
<script type="text/javascript" src="../../assets/js/vue.min.js"></script>
<script type="text/javascript" src="../../assets/js/index.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/axios.min.js"></script>
<script type="text/javascript" src="../../assets/icon/iconfont.js"></script>
<script>
    var app = new Vue({
        el: '#app',
        data: {
            minutes: 30,
            seconds: 0
        },
        created: function () {
            apiready = function () {
                app.add()
            }
        },
        watch: {
            second: {
                handler(newVal) {
                    app.num(newVal)
                }
            },
            minute: {
                handler(newVal) {
                    this.num(newVal)
                }
            }
        },
        computed: {
            second: function () {
                return this.num(this.seconds)
            },
            minute: function () {
                return this.num(this.minutes)
            }
        },

        methods: {
            num: function (n) {
                return n < 10 ? "0" + n : "" + n
            },
            add: function () {
                var time = window.setInterval(function () {
                    if (app.seconds == 0 && app.minutes != 0) {
                        app.seconds = 59;
                        app.minutes -= 1;
                    } else if (app.minutes == 0 && app.seconds == 0) {
                        app.seconds = 0;
                        window.clearInterval(time);
                        // alert('完美')
                    } else {
                        app.seconds -= 1
                    }
                }, 1000);
            },
            pay_money: function () {
                openView('my_pay', 'my/my_pay', '订单支付','my_pay',false,false,false)
            }
        }
    })
</script>