perinfo_coach.html 2.6 KB
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta content="yes" name="apple-mobile-web-app-capable">
    <meta content="yes" name="apple-touch-fullscreen">
    <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,maximum-scale=1, minimum-scale=1, user-scalable=no">
    <title>个人信息</title>
    <link rel="stylesheet" href="css/common.css">
    <link rel="stylesheet" href="css/style.css">
</head>
<body style="background-color: #f6f6f6">
<div class="box">
    <div class="perInfo">
        <div class="headImg">
            <b>头像</b>
            <i></i>
            <div class="genggai_head">
                <input type="file" class="shangchuan_head" id='file' onchange="c()">
                <img src="{$data.headimgurl}" id="show"/>
            </div>
        </div>
    </div>
    <div class="perInfo">
        <div class="headImg">
            <b>真实姓名:</b>
            <input type="text" value="{$data.user_nickname}"  class="xiugaiName">
        </div>
    </div>
    <div class="perInfo">
        <div class="headImg">
            <b>手机号码:</b>
            <input type="tel" value="{$data.mobile}"  class="xiugaiName">
        </div>
    </div>
    <div class="perInfo">
        <div class="headImg">
            <b>验证码:</b>
            <input type="number" value=""  class="user_code">
            <u class="get_code">获取验证码</u>
        </div>
    </div>
    <div class="btn_keep">
        <img src="image/keep.png"/>
    </div>
</div>

<script type="text/javascript" src="js/jquery-1.11.0.min.js"></script>
<script type="text/javascript" src="js/common.js"></script>
<script>
    function c () {
        var r= new FileReader();
        f=document.getElementById('file').files[0];
        r.readAsDataURL(f);
        r.onload=function  (e) {
            document.getElementById('show').src=this.result;
        };
    };
    //获取短信验证码
    var validCode=true;
    $(".get_code").click (function  () {
        var time=60;
        var code=$(this);
        if (validCode) {
            validCode=false;
            code.addClass("msgs1");
            var t=setInterval(function  () {
                time--;
                code.html(time+"秒");
                if (time==0) {
                    clearInterval(t);
                    code.html("重新获取");
                    validCode=true;
                    code.removeClass("msgs1");
                }
            },1000)
        }
    })
</script>
</body>
</html>