myinfo.html 3.9 KB
<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="stylesheet" href="../assets/css/swiper-3.4.2.min.css">
    <link rel="stylesheet" href="//at.alicdn.com/t/font_724456_0m7h09j73i3.css">
    <script type="text/javascript" src="../assets/js/fontsize.js"></script>
    <link rel="stylesheet" href="../assets/css/style.css">
    <title>个人信息</title>
    <style>
        body{
            background-color: #f6f6f6;
        }
    </style>
</head>
<body>
<div class="info_item">
    <div class="info_itemleft">
        <div>头像</div>
        <div class="info_input" style="position: relative;">
            <span>点击更换</span>
            <!--<input type="text" placeholder="点击更换">-->
            <!--<input style="display: none"  id="upload" name="file" accept="image/*" type="file" >-->
            <input type="file" id="doc" name="pic" class="upload_img" style="opacity: 0;position:absolute;width: 100%;height: 100%;" >
        </div>
    </div>
    <div class="info_itemright">
        <div class="info_img" id="localImag">
            <img src="../assets/imgs/bg1.png" alt="" id="preview">
        </div>
        <div class="iconfont icon-icon-test3"></div>
    </div>
</div>
<div class="info_box">
    <div class="info_itemmain">
            <div>微信昵称</div>
            <div class="info_input">
                <input type="text" placeholder="请输入微信昵称" id="weixin">
            </div>
        <div class="iconfont icon-quxiao"></div>

    </div>
    <div class="info_itemmain">
        <div>联系电话</div>
        <div class="info_input">
            <input type="number" placeholder="请输入电话号码" id="tel">
        </div>
    </div>
    <div class="item">
        <div class="name">验证码</div>
        <div class="input_box">
            <input type="text" placeholder="请输入短信验证码" id="code">
            <span class="register_code"><input type="button" id="btn" value="获取验证码" class="codeinput" /></span>
        </div>
    </div>
</div>
<div class="my_info_btn">确定</div>
<!--toast-->
<div id="toast" style="display: none;">
    <div class="weui-mask_transparent"></div>
    <div class="weui-toast">
        <p class="weui-toast__content">已完成</p>
    </div>
</div>
</body>
<script type="text/javascript" src="../assets/js/jquery-2.1.0.js"></script>
<script type="text/javascript" src="../assets/js/weui.min.js"></script>
<script type="text/javascript" src="../assets/js/Augly_Verification.js"></script>
<script type="text/javascript" src="../assets/js/common.js"></script>
<script>
    $(function(){
        $('.info_input').click(function () {
            $("input[name='pic']").on('change',function(){
                var file = $(this).val();
                setImagePreview(file);
            });
        })
        $('.icon-quxiao').click(function () {
            $('#weixin').val('');
        })
    });
$('.my_info_btn').click(function () {

    var weixin=$('#weixin').val();
    var tel=$('#tel').val();
    var code=$('#code').val();
    alert(weixin + tel +code);
    if(weixin==''){
        toast("微信昵称不能为空");
    }else if(tel==''){
        toast("电话号码不能为空")
    }else if(! AuglyTest_phone.test(tel)){
        toast("电话号码输入不正确")
    }else if(code == ''){
        toast("验证码不能为空")
    }else{
        alert('验证通过')
        window.location.href="login.html"
    }
    })
    $('#btn').click(function () {
        var tel=$('#tel').val();
    if(tel==''){
            toast("电话号码不能为空")
        }else if(! AuglyTest_phone.test(tel)){
            toast("电话号码输入不正确")
        }else{
        settime(this)
    }

    })
</script>
</html>