my_wallet.html 10.4 KB
<!DOCTYPE html>
<html lang="en">

<head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
    <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0;" name="viewport" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <title>学考无忧-我的钱包</title>
    <link rel="stylesheet" href="__TMPL__/public/assets/css/reset.css" />
    <link rel="stylesheet" href="__TMPL__/public/assets/css/log.css" />
</head>
<style>
    .tx_maskPhone {
        display: none;
        z-index: 2;
        width: 100%;
        height: 100%;
        position: fixed;
        background-color: rgba(0, 0, 0, 0.5);
    }
    .btn{
        margin-top: 0.15rem;
        background: #fff;
        color: #0090FF;
    }
</style>
<body>
<!-- 弹窗 -->
<div class="tx_mask">
    <div class="tx_maskCon">
        <div class="tx_maskConImg">
            <img src="__TMPL__/public/assets/images/70.png" alt="" />
        </div>
        <div class="tx_maskCon2">
            <!-- 输入金额 -->
            <input class="tx_maskInput" type="text" placeholder="输入提现金额" id="money" onblur="messagess()"/>
            <!-- 确定 -->
            <div class="tx_maskOk tx_maskYeah" onclick="sure_to()">确定</div>
            <!-- 提现说明 -->
            <div class="tx_maskTxt">
                <div class="tx_maskTxt1">
                    <div class="tx_maskConImg2">
                        <img src="__TMPL__/public/assets/images/69.png" alt="" />
                    </div>
                    <span>提现说明</span>
                </div>
                <p class="tx_maskTxt2">满1元可提现,提现将扣取0.06%的手续费</p>
            </div>
        </div>
    </div>
</div>

<div class="tx_maskPhone">
    <div class="tx_maskCon">
        <div class="tx_maskConImg">
            <img src="__TMPL__/public/assets/images/70.png" alt="" />
        </div>
        <div class="tx_maskCon2">
            <!-- 输入手机号 -->
            <input  class="tx_maskInput" style="margin-bottom: 0.25rem;" type="text" placeholder="请输入手机号" maxlength="11" id="phone" onblur="checkPhone()" />
            <input class="tx_maskInput" style="margin-bottom: 0.25rem;" id="Ver_code" type="text" placeholder="请输入验证码" />
            <input type="button" class="btn" id="code" value="获取验证码" onclick="codeButton()">
            <!-- 确定 -->
            <div class="tx_maskOk tx_maskYes" onclick="Message_validation()">确定</div>
        </div>
    </div>
</div>



<div class="log_nine_top">
    <div class="log_top_co">
        <!-- 顶部 -->
        <div class=" order_top log_nine_top">
            <a href="javascript:history.back(-1)">
                <img src="__TMPL__/public/assets/images/left2.png" alt="" />
            </a>
            <p style="color:white">我的钱包</p>
        </div>
    </div>
    <!-- 账户余额 -->
    <div class="log_nine_money">
        <div class="nine_money_one">账户余额(元)</div>
        <div class="nine_money_two">{$balance}</div>
    </div>
    <div class="nine_money_explain">
        <div class="nine_money_explain_one">
            <div class="nine_money_explain_one_img">
                <img src="__TMPL__/public/assets/images/61.png" alt="" />
            </div>
            <div class="nine_money_explain_title">
                累计收益:{$cumulative_money}
            </div>
        </div>
        <div class="nine_money_explain_one">
            <div class="nine_money_explain_two_img">
                <img src="__TMPL__/public/assets/images/62.png" alt="" />
            </div>
            <div class="nine_money_explain_title">
                正在提现额度:<span id="tixian_money">{$money}</span>
            </div>
        </div>
    </div>
</div>
<!-- 其他信息 -->
<div class="log_nine_center">
    其他信息
</div>
<!-- 列表 -->
<div class="log_nine_list">
    <a href="{:url('Personalcenter/invitation_list')}">
        <div class="log_nine_list_one">
            <div class="log_nine_list_one_left">
                <div class="log_nine_list_one_left_img">
                    <img src="__TMPL__/public/assets/images/63.png" alt="" />
                </div>
                <div class="log_nine_list_one_left_title">
                    邀请名单
                </div>
            </div>
            <div class="log_nine_list_one_right">
                <img src="__TMPL__/public/assets/images/29.png" alt="" />
            </div>
        </div>
    </a>
    <a href="{:url('Personalcenter/withdrawal_subsidiary')}">
        <div class="log_nine_list_one">
            <div class="log_nine_list_one_left">
                <div class="log_nine_list_one_left_img">
                    <img src="__TMPL__/public/assets/images/65.png" alt="" />
                </div>
                <div class="log_nine_list_one_left_title">
                    提现明细
                </div>
            </div>
            <div class="log_nine_list_one_right">
                <img src="__TMPL__/public/assets/images/29.png" alt="" />
            </div>
        </div>
    </a>
    <if condition="$status eq 3">
        <a href="{:url('Personalcenter/income_record')}">
            <div class="log_nine_list_one">
                <div class="log_nine_list_one_left">
                    <div class="log_nine_list_one_left_img">
                        <img src="__TMPL__/public/assets/images/65.png" alt="" />
                    </div>
                    <div class="log_nine_list_one_left_title">
                        收益记录
                    </div>
                </div>
                <div class="log_nine_list_one_right">
                    <img src="__TMPL__/public/assets/images/29.png" alt="" />
                </div>
            </div>
        </a>
    </if>
    <if condition="$status eq 2">
        <a href="{:url('Personalcenter/mall_profit')}">
            <div class="log_nine_list_one">
                <div class="log_nine_list_one_left">
                    <div class="log_nine_list_one_left_img">
                        <img src="__TMPL__/public/assets/images/72.png" alt="" />
                    </div>
                    <div class="log_nine_list_one_left_title">
                        商城盈利
                    </div>
                    <div class="log_nine_list_one_left_title_add">
                        (服务费扣点{$money_ratio.platform_ratio})
                    </div>
                </div>
                <div class="log_nine_list_one_right">
                    <img src="__TMPL__/public/assets/images/29.png" alt="" />
                </div>
            </div>
        </a>
    </if>





</div>
<!-- 按钮 -->
<div class="log_seven_btn">
    <div class="log_seven_btn_contant">
        提现
    </div>
</div>

<script src="__TMPL__/public/assets/js/jquery.js"></script>
<script src="__TMPL__/public/assets/js/base.js"></script>
<script>
    /**
     *手机号验证点击确定时
     */
    function Message_validation(){
        yzm = $('#Ver_code').val();
        phone = $('#phone').val();
        if(yzm == ''){
            alert('请输入验证码');
        }else if(phone == ''){
            alert('请输入手机号');
        }else{
            $.post("{:url('Personalcenter/is_money_code')}",{yzm:yzm},function(data){
                if(data){

                }else{
                    alert('验证码错误!');

                }
            });
        }
    }
</script>
<script>
    /**
     *当光标离开
     */
    function messagess(){
        money = $('#money').val();
        if(money < 0){
            alert('提现金额错误');
        }else if(money>{$balance}){
            alert('提现金额超出余额');
        }
    }

    /**
     *点击确认时
     */
    function sure_to(){
        money = $('#money').val();
        if(money == ''){
            alert('提现不能为空');
        }else if(money < 0){
            alert('提现金额错误');
        }else if(money>{$balance}){
            alert('提现金额额超出余额');
        }else{
            $.post("{:url('Personalcenter/add_money_expend')}",{money:money},function(data){
                if(data){
                    $('#tixian_money').text(data);
                }else{
                    alert('提交提现失败!');
                }
            });
        }
    }
</script>
<script>
    <!--验证弹窗-->
    var state;
    $.post("{:url('Personalcenter/id_first_withdrawal')}",{},function(data){
        state = data
    });
    $(".log_seven_btn_contant").click(function() {
        if(state != false){
            $(".tx_maskPhone").css("display","block");
        }else{
            $(".tx_mask").css("display","block");
            return false;
        }
    });
//    提现弹窗
    $(".tx_maskYeah").click(function () {

        $(".tx_mask").css("display","none");
        $(".tx_maskPhone").css("display","none");

    });

//    手机验证弹窗
    $(".tx_maskYes").click(function(){
        var one = $("#phone").val();
        var two = $("#Ver_code").val();
        if(one!=""&&two!=""){
            $(".tx_maskPhone").css("display","none");
            $(".tx_mask").css("display","block")
        }else{
            return false;
            console.log(123)
        }


    });
    function checkPhone() {
        var phone = document.getElementById('phone').value;
        if(!(/^1[34578]\d{9}$/.test(phone))) {
            alert("手机号码有误,请重填");
            return false;
        }
    }
    //短信验证码
    function codeButton() {
        var code = $("#code");
        code.attr("disabled", "disabled");
        phone = $('#phone').val();
        if(phone == ''){
            alert('手机号不能为空');
        }else{
            $.post("{:url('Personalcenter/send_message')}",{phone:phone},function(data){
                if(data){
                    setTimeout(function() {
                        code.css("opacity", "0.8");
                    }, 1000);
                    var time = 60;
                    var set = setInterval(function() {
                        code.val("(" + --time + ")秒后重新获取");
                    }, 1000);
                    setTimeout(function() {
                        code.attr("disabled", false).val("重新获取验证码");
                        clearInterval(set);
                    }, 60000);
                }else{
                    alert('发送失败!');
                }
            });
        }

    }

</script>
</body>

</html>