<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=750,user-scalable=no,target-densitydpi=device-dpi">
    <title>详细资料</title>
    <style type="text/css">
        html,
        body,
        span,
        div,
        button,
        img{
            padding: 0;
            margin: 0;
            -webkit-user-select: none;/*禁用手机浏览器的用户选择功能 */
            -moz-user-select: none;
        }
        html,body {
            height: 100%;
            max-height: 100%;
            overflow: hidden;
            font-size: 30px;
            color: #333333;
            background: #F7F7F7;
            font-family: "PingFang SC Light","Helvetica";
        }
        .header_img {
            width: 116px;
            height: 116px;
            border-radius: 5px;
            vertical-align: middle;
            margin-right: 40px;
        }
        .icon {
            display: inline-block;
            width: 27px;
            height: 27px;
            margin-left: 10px;
        }
        .name {
            font-size: 32px;
        }
        .icon_man {
            background: url("<?php echo RESOURCE_SITE_URL; ?>/mobile/fcode/images/man_icon.png") no-repeat;
            background-size: 100%;
        }
        .icon_lady {
            background: url("<?php echo RESOURCE_SITE_URL; ?>/mobile/fcode/images/lady_icon.png");
            background-size: 100%;
        }
        .cell {
            margin-left: 30px;
            position: relative;
            padding: 28px 0;
        }
        .cell:after {
            position: absolute;
            bottom: 0;
            left: 0;
            content: '';
            width: 100%;
            height: 1px;
            background: #DADADA;
            -webkit-transform:scale(1,0.5);
            transform:scale(1,0.5);
        }
        .group {
            margin-top: 22px;
            background: #fff;
            position: relative;
        }
        .group:before {
            position: absolute;
            top: 0;
            left: 0;
            content: '';
            width: 100%;
            height: 1px;
            background: #DADADA;
            -webkit-transform:scale(1,0.5);
            transform:scale(1,0.5);
        }
        .group:after {
            position: absolute;
            bottom: 0;
            left: 0;
            content: '';
            width: 100%;
            height: 1px;
            background: #DADADA;
            -webkit-transform:scale(1,0.5);
            transform:scale(1,0.5);
        }
        .cell_content {
            color: #7E7E7E;
            font-size: 22px;
        }
        .add_friend_btn {
            -webkit-appearance:none;
            display: inline-block;
            color: #fff;
            background: #FF4E4E;
            width: 632px;
            height: 82px;
            font-size: 36px;
            border: none;
            border-radius: 10px;
            -webkit-tap-highlight-color: rgba(240,240,240,0.7);
        }
        .cell_label {
            display: inline-block;
            margin-left: 12px;
            margin-right: 44px;
        }
        .submit {
            margin-top:32px;
            text-align: center;
        }
        .letter_pro {
            color: #FF4E4E;
        }
        .send_bonus_btn {
            -webkit-appearance:none;
            display: inline-block;
            color: #FF4E4E;
            background: #ffffff;
            width: 632px;
            height: 82px;
            font-size: 36px;
            border: none;
            border-radius: 10px;
            -webkit-tap-highlight-color: rgba(240,240,240,0.7);
        }
    </style>
</head>

<body>
<div class="maincontent">
    <div class="group">
        <div class="cell">
            <img src="<?php $minfo = $output['info']; echo $minfo->avatar();?>" alt="头像" class="header_img">
            <span class="name"><?php $minfo = $output['info']; echo $minfo->nickname();?></span><span class="icon icon_lady"></span>
        </div>
    </div>

    <div class="group">
        <?php
            $cout = new tpl_member($output);
            echo $cout->output_group();
        ?>
    </div>
    <?php
        $cout = new tpl_member($output);
        echo $cout->output_btn();
    ?>

    <div class="success" style="display: none">
        <p>恭喜您，您关注他成功了</p>
    </div>
</div>
<script 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/comm/bridge.js?<?php echo bonus_version(); ?>"></script>
<script>
    if(isMobile.iOS()) {
        init_ios_bridge(function(bridge) { });
    } else if (isMobile.Android) {
        init_android_bridge();
    } else {
    }
    var member_id = <?php
                        $minfo = $output['info'];
                        $member_id = $minfo->member_id();
                        echo $member_id; ?>;
    var enmember_id = '<?php
            $minfo = $output['info'];
            $member_id = $minfo->enmember_id();
            echo $member_id; ?>';

    var nickname = '<?php
        $minfo = $output['info'];
        $member_id = urlencode($minfo->nickname());
        echo $member_id; ?>';

    var url = '<?php
        $minfo = $output['info'];
        $member_id = $minfo->member_id();
        $vurl = BASE_SITE_URL . "/mobile/index.php?act=member_index&op=subscribe&userid={$member_id}";
        echo $vurl;
        ?>';

    window.onload = function ()
    {
        $("#btn_add_friend").click(function()
        {
            $.getJSON(url,function(result)
            {
                $(".submit").hide();
                $(".success").show();
            });
        });
        $("#btn_thief_bonus").click(function()
        {
            call_native_handler('on_native_click','{"action":"thief_bonus","params":{"enmember_id":"' + enmember_id + '"}}');
        });
        $("#btn_send_bonus").click(function()
        {
            call_native_handler('on_native_click','{"action":"send_bonus","params":{"member_id":' + member_id + ',"nickname":"' + nickname + '"}}');
        });
    }
</script>
</body>
</html>