<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>熊猫美妆红包</title>
    <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport">
    <link rel="stylesheet" href="<?php echo RESOURCE_SITE_URL; ?>/mobile/bonus/css/common.css?<?php echo bonus_version(); ?>"/>
    <script src="<?php echo RESOURCE_SITE_URL; ?>/mobile/bonus/js/zepto.min.js?<?php echo bonus_version(); ?>"></script>
</head>

<body>
    <div class="maincontent">
        <div class="bg_position cloud_left"></div>
        <div class="bg_position cloud_right"></div>
        <div class="bg_position dot_left"></div>
        <div class="bg_position dot_right"></div>
        <div class="content center">
            <div class="logo"></div>
                <div class="msg_box">
                    <p class="name"><?php echo($output['type_info']['sender_name']); ?></p>
                    <p class="msg"><?php
                        $type_info = $output['type_info'];
                        $type = \bonus\type::create_by_paramer($type_info);
                        if($type->isRandomAmount()) {
                            $str = '发了一个红包，金额随机';
                        } else {
                            $str = '发了一个红包，金额固定';
                        }
                        echo($str); ?></p>
                </div>
                <div class="msg_bottom">
                    <p><?php echo($output['type_info']['type_bless']); ?></p>
                </div>
            <div>
                <a href="javascript:void(0)" target="_self" class="open"></a>
            </div>
            <div class="coin_f">
                <div class="coin" id="coin"></div>
            </div>
        </div>
        <input type="hidden" id="grab_url" value="<?php echo(bonus_output_graburl($output)); ?>">

        <div class="bottom_pro center">
            <p class="">独家运营70多个知名化妆品品牌的天猫官方旗舰店</p>
            <p><s class="icon_logo"></s>上海丽人丽妆化妆品股份有限公司</p>
        </div>
        <input type="hidden" value="<?php echo($_SESSION['MPHPSESSID']); ?>" id="sessionId">
    </div>
    <script>
        $(function(){
            $('.open').on('tap',function(){
                var sId=$('#sessionId').val();
                $(this).hide();
                $('#coin').addClass('gold_coin');
               var grab_url=$('#grab_url').val();
                setTimeout(function(){
                     window.location.href=grab_url;
                },500)
            })
        });
    </script>

    <script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js?<?php echo bonus_version(); ?>"></script>
    <script type="text/javascript" src="<?php echo RESOURCE_SITE_URL; ?>/mobile/comm/wx_share.js?<?php echo bonus_version(); ?>"></script>
    <script type="text/javascript" src="http://qzonestyle.gtimg.cn/qzone/qzact/common/share/share.js?<?php echo bonus_version(); ?>"></script>
    <script>
        var url         = "<?php echo share_url($output); ?>";
        var bonus_title = "<?php echo share_title($output); ?>";
        var img_url     = "<?php echo share_image($output); ?>";
        var sub_title   = "<?php echo share_subtitle($output); ?>\n\n点击领取";

        weiXinShare.init({
            title:bonus_title,
            desc:sub_title,
            link:url,
            imgUrl:img_url
        });
    </script>
</body>
</html>