<!DOCTYPE html>
<html lang=zh-cn>
<head>
    <meta charset=utf-8>
    <title>纵横计量支付系统</title>
    <meta name=description content=计量支付>
    <meta name=copyright content=smartcost.com.cn>
    <link rel=stylesheet href={{rootUrl}}global/css/bootstrap.css>
    <link rel=stylesheet href={{rootUrl}}global/css/style.css>
    <script src={{rootUrl}}global/js/jquery-1.9.1.min.js></script>
    <script src={{rootUrl}}global/js/bootstrap.js></script>
    <script src={{rootUrl}}global/js/jl.js></script>
</head>
<body>
<div class="wrapHeader">
    <h1 class="mainLogo" title="纵横计量支付"></h1>
    <div class="sysTools"><a title="返回首页" href="index.html"><i class="icon-circle-arrow-left icon-white"></i></a>&nbsp;&nbsp;&nbsp;<a
            title="纵横官网" target="_blank" href="http://smartcost.com.cn"><i class="icon-home icon-white"></i></a></div>
</div>
<!-- include "top" -->
<div class="warpAdmin">
    <!-- include "menu" -->
    <div class="adminContent">
        <div class="adminMain">
            <form class="form-horizontal">
                <fieldset>
                    <legend>短信通知</legend>
                    <div id="switchon" class="control-group <!-- if {{smsSwitch}}=='1' --> hide <!-- endif -->">
                        <label class="control-label">开启短信通知功能</label>
                        <div class="controls">
                            <div class="btn-group">
                                <input type="button" class="btn" id="smsOn" title="开启短信通知" value="开启"/>
                                <button class="btn btn-danger disabled" disabled="disabled">已关闭</button>
                            </div>
                        </div>
                    </div>
                    <div id="switchoff" class="control-group <!-- if {{smsSwitch}}=='0' --> hide <!-- endif -->">
                        <label class="control-label">开启短信通知功能</label>
                        <div class="controls">
                            <div class="btn-group">
                                <button class="btn btn-success  disabled" disabled="disabled">已开启</button>
                                <input type="button" class="btn" id="smsOff" title="关闭短信通知" value="关闭"/>
                            </div>
                        </div>
                    </div>
                    <div id="alert-open" class="alert alert-info hide">
                        初次开启，所有用户都必须进行手机验证才能正常接收短信通知。
                    </div>
                    <div id="alert-close" class="alert alert-error hide">
                        短信通知已关闭，所有用户都将不会再接收短信通知。
                    </div>
                </fieldset>
            </form>
        </div>
    </div>
</div>
<script type="text/javascript">autoFlashHeight();</script>
<script type="text/javascript">
    $(document).ready(function () {
        $("#smsOff").click(function () {
            $.ajax({
                type: "POST",
                dataType: "json",
                cache: false,
                data: {"switch": 'off'},
                url: "{{rootUrl}}manage/sys/sms/switch"
            }).done(function (data) {
                if (data['switch'] == 'off') {
                    $("#switchoff").fadeOut();
                    $("#switchon").fadeIn();
                    $("#alert-open").fadeOut();
                    $("#alert-close").fadeIn();
                }
            });
        });
        $("#smsOn").click(function () {
            $.ajax({
                type: "POST",
                dataType: "json",
                cache: false,
                data: {"switch": 'on'},
                url: "{{rootUrl}}manage/sys/sms/switch",
            }).done(function (data) {
                if (data['switch'] == 'on') {
                    $("#switchon").fadeOut();
                    $("#switchoff").fadeIn();
                    $("#alert-close").fadeOut();
                    $("#alert-open").fadeIn();
                }
            });
        });
    });

</script>
</body>