<?php 
$huiyuan = $user = uid( $_SESSION['uid'],1 );
?>
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <title>游戏提现</title>
    <script src="/js/jQuery-2.1.4.min.js"></script>
    <script src="/js/fontsize.js"></script>
    <link rel="stylesheet" href="/css/reset.css">
    <link rel="stylesheet" href="/css/index.css">
    <script src='/js/layer.js'></script>
</head>

<body class="cz_box yxtx_box">
<div class="title"><span>余额兑换</span><span style="color: #fff3cf; border-color: #401a39;border-bottom-color: #fff3cf; ">佣金兑换</span></div>
<div class="down yxtx">
    <div class="qh" style="display: block;">
            <ul >
                <li>到账账户： 本微信号零钱</li>
                <li>现金余额： <span id="jine"><?php echo $user['jine'] ?></span> 元</li>
            </ul>
            <button type="submit" onclick="charge('duihuan')" style="padding: 0"> <div class="tip"  >确认提现</div></button>
    </div>
    <div class="qh">
            <ul >
                <li>到账账户： 本微信号零钱</li>
                <li>佣金余额： <span id="huobi"><?php echo $user['huobi'] ?></span> 元</li>
            </ul>
            <button type="submit" onclick="charge('duihuany')" style="padding: 0"> <div class="tip"  >确认提现</div></button>
    </div>
</div>
<div class="dl_box">
    <div class="title">温馨提示</div>
    <ul>
        <li>微信限制每天游戏可提现次数为100次。</li>
		<li>微信必须实名制,否则无法兑换成功。</li>
        <li>提现秒到账，资金随时提现安全有保障。</li>
        <li>当天提现满100次，请在第二天提现即可。</li>
        <li>用户余额每次兑换，最少必须是5元以上。</li>
    </ul>
</div>
<div class="nav" style="">
    <div class="nav_box">
        <a href="?action=index"><span><i class="iconfont">&#xe67a;</i>首页</span></a>
        <a href="?action=zhuye"><span><i class="iconfont">&#xe61b;</i>夺宝</span></a>
        <a href="?action=chongzhi"><span><i class="iconfont">&#xe65a;</i>充值</span></a>
        <a href="?action=orderlog"><span ><i class="iconfont">&#xe635;</i>明细</span></a>
    </div>
</div>
<div class="modle"></div>
<div class="models"  style="height: 8rem" data-modle='tk'>
    <div class="title">提示</div>
    <div class="td" id="msg"></div>
</div>
<script src='/tpl/home/yunding/js/index.js'></script>
<script src='/tpl/home/yunding/js/custom.js'></script>
<script>
    function accMul(arg1,arg2)
    {
        var m=0,s1=arg1.toString(),s2=arg2.toString();
        try{m+=s1.split(".")[1].length}catch(e){}
        try{m+=s2.split(".")[1].length}catch(e){}
        return Number(s1.replace(".",""))*Number(s2.replace(".",""))/Math.pow(10,m)
    }
    
    function charge(type) {
        $.ajax({
        	url:"?action=ajax",
            type:'post',
            dataType:'json',
            data:{
                action:type,
                token:'accb423bf1f72aa98908fc140cdcf0fb'
            },
            beforeSend: function(){
                loading()
            },
            success:function(res) {
                layer.closeAll();
                msgBox(res['msg'])
                if(res['o'] == 'yes') {
                    if(type=='duihuan') {
                        $("#jine").text('0');
                    }else{
                        $("#huobi").text('0');
                    }
                }
            }
        });
    }
</script>
</body>
</html>
