<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>熊猫美妆红包</title>
    <meta name="format-detection" content="telephone=no" />
    <script src="<?php echo RESOURCE_SITE_URL; ?>/mobile/comm/flexible.js?<?php echo bonus_version(); ?>"></script>
    <link rel="stylesheet" href="<?php echo RESOURCE_SITE_URL; ?>/mobile/bonus/css/common_rem.css?<?php echo bonus_version(); ?>"/>
    <link rel="stylesheet" href="<?php echo RESOURCE_SITE_URL; ?>/mobile/bonus/css/content_rem.css?<?php echo bonus_version(); ?>"/>
</head>
<body>
<div class="maincontent center">
    <div class="top">
        <div class="top_bg">
            <?php
            if($_SESSION['is_app'] == true) {
                echo '<img src="' . RESOURCE_SITE_URL . '/mobile/bonus/imgaes/content_bg_top.png">';
            }
            ?>
            <img src="<?php echo RESOURCE_SITE_URL; ?>/mobile/bonus/imgaes/content_bg.png">
        </div>

        <div class="sender_head">
            <img src="<?php echo bonus_output_sender_header($output); ?>"/>
        </div>
    </div>

    <?php bonus_output_type($output); ?>
    <?php bonus_output_mine($output); ?>
    <?php bonus_output_present($output); ?>
    <?php bonus_output_bindedinfo($output); ?>
    <?php bonnus_out_goods($output); ?>
    <?php bonus_out_rule(); ?>
    <?php bonus_out_download(); ?>
</div>

<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="<?php echo RESOURCE_SITE_URL; ?>/mobile/bonus/js/zepto.min.js?<?php echo bonus_version(); ?>"></script>
<script type="text/javascript" src="<?php echo RESOURCE_SITE_URL; ?>/mobile/bonus/js/tel.js?<?php echo bonus_version(); ?>"></script>
<script type="text/javascript" src="<?php echo RESOURCE_SITE_URL; ?>/mobile/comm/bridge.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>
    function app()
    {
        var app=navigator.userAgent.toLowerCase(),//判断设备
            app_nav=navigator.appVersion.toLowerCase(),
            href='';
        if (app_nav.indexOf('iphone')>-1&&app.indexOf('iphone')){
            href='http://a.app.qq.com/o/simple.jsp?pkgname=com.lrlz.beautyshop';
        } else if (app.indexOf('micromessenger')>-1 && app_nav.indexOf('android')>-1) {
            href = "http://p.lrlz.com/hfive/android_down/index.html";
        }
        else {
            href="javascript:void(0)";
        }

        return href;
    }

    $('#link').attr('href',app());
    var url         = "<?php echo share_url($output); ?>";
    var 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:title,
        desc:sub_title,
        link:url,
        imgUrl:img_url
    });

    if(isMobile.iOS()) {
        init_ios_bridge(function(bridge) { });
    } else if (isMobile.Android) {
        init_android_bridge();
    } else {
    }

    window.onload = function ()
    {
        var can_share = <?php echo bonus_canshare($output); ?>;
        var jsonobject = {
            action:"view_init",
            params: {
                can_share:can_share,
                title:title,
                sub_title:sub_title,
                img_url:img_url,
                url:url
            }
        };
        call_native_handler('on_native_click',JSON.stringify(jsonobject));
    }
</script>
</body>
</html>