<!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="token" value="{{ csrf_token() }}">
    <title>阿拉德之怒</title>
    <script>
        function reSizeRem() {
            var ClientWidth = document.documentElement.clientWidth > 540 ? 540 : document.documentElement.clientWidth,
                UiWidth = 1080,
                FontSize = ClientWidth / UiWidth * 100;
            document.documentElement.style.fontSize = FontSize + 'px';
        }
        reSizeRem();
        window.onresize = function () {
            reSizeRem();
        }
    </script>
    <link rel="stylesheet" href="{{ asset('postcard/css/style.css') }}">
    <script src="{{ asset('js/jquery.2.1.3.min.js') }}"></script>
    <script src="{{ asset('postcard/js/main.js') }}"></script>
</head>
<body>
<div class="container home-container">
    <div class="header-avatar">
        <span></span>
        <img src="{{ asset('postcard/images/default_img.png') }}" alt="">
    </div>
    <a href="javascript:" class="btn-start"></a>

    <div class="dialog dialog-server hide">
        <div class="content">
            <a href="javascript:" class="close"></a>
            <ul>
                <li>
                    <select name="" id="serve" class="server-select">
                    </select>
                </li>
                <li>
                    <select name="" id="role" class="role-select">
                    </select>
                </li>
            </ul>
            <a href="javascript:" class="btn-card-bind-role"></a>
        </div>
    </div>
</div>
<script type="text/javascript" src="//res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
<script>
    $(function(){
        $('.close').click(function (){
            $('.dialog').fadeOut();
        });
        $('.btn-start').click(function (){
            card.handleGetServer();
        });
        $.ajax({
            url : "/wx/config",
            data : {
                url:location.href.split('#')[0]
            },
            type:'GET',
            dataType : "json",
            async: false,
            timeout : 5000,
            error : function(XMLHttpRequest, textStatus, errorThrown) {
                if (textStatus == "timeout") { // 请求超时
                } else {
                }
            },
            success : function(res) {
                var data = res.data;
                wx.config({
                    debug : true,
                    appId : data.appId,
                    timestamp : data.timestamp,
                    nonceStr : data.nonceStr,
                    signature : data.signature,
                    url:location.href.split('#')[0],
                    jsApiList : [ 'onMenuShareAppMessage', 'onMenuShareTimeline' ]
                });

                wx.ready(function () {
                    wx.onMenuShareAppMessage({
                        title: '阿拉德之怒', // 分享标题
                        desc: '阿拉德之怒', // 分享描述
                        link: 'http://uc-signin2.srccwl.com', // 分享链接，该链接域名或路径必须与当前页面对应// 分享图标的公众号JS安全域名一致
                        imgUrl: 'https://static-platform.srccwl.com/ucSign/ald/sign/images/wx.png',
                    });
                });
            }
        });
        $('.btn-share').click(function(){
            wx.ready(function () {
                wx.onMenuShareAppMessage({
                    title: '阿拉德之怒', // 分享标题
                    desc: '阿拉德之怒', // 分享描述
                    link: 'http://uc-signin2.srccwl.com', // 分享链接，该链接域名或路径必须与当前页面对应// 分享图标的公众号JS安全域名一致
                    imgUrl: 'https://static-platform.srccwl.com/ucSign/ald/sign/images/wx.png',
                });
            });
        })
    })
</script>
</body>
</html>