<!DOCTYPE html>
<html lang="en">
<head>
    <%include("/common/_head.html"){}%>
    <title>邮箱激活 -飞趣</title>
    <style>
    </style>
</head>
<body>
<%
var user = c.currentUser(request, servlet.response);
var isLogin = false;
if(user != null){
isLogin=true;
}
include("/common/_headwithlogin.html",{user:user,isLogin:isLogin}){}
%>
<div class="layui-container topToFix c-user-main">
    <%include("/common/_user_menu.html",{user:user}){}%>
    <div class="c-panel fly-panel-user detail-box">
        <div class="layui-tab layui-tab-brief" lay-filter="user">
            <ul class="layui-tab-title">
                <li class="layui-this"> <a href="/user/activate/">激活邮箱</a> </li> </ul>
            <div class="layui-tab-content" id="LAY_ucm" style="padding: 20px 0;">
                <ul class="layui-form">
                    <%if(user.isMailBind == 1){%>
                    <li class="layui-form-li"> <labe>您的邮箱：</labe>
                        <span class="layui-form-text">${user.username}
                            <em style="color:#999;">（已成功激活）</em> </span> </li>
                    <%}else{%>
                    <li class="layui-form-li"> <label>您的邮箱：</label>
                        <span class="layui-form-text">${user.username}
                            <em style="color:#c00;">（尚未激活）</em> </span> </li>
                    <li class="layui-form-li" style="margin-top: 20px; line-height: 26px;">
                        <div> 1. 如果您未收到邮件，或激活链接失效，您可以 <a class="layui-form-a" style="color:#4f99cf;" id="fq-activate" href="javascript:;">重新发送邮件</a>，或者 <a class="layui-form-a" style="color:#4f99cf;" href="${ctxPath}/u/set/">更换邮箱</a>； </div>
                        <div> 2. 如果您始终没有收到 FlyFun 发送的邮件，请注意查看您邮箱中的垃圾邮件； </div> <div> 3. 如果你实在无法激活邮件，您还可以联系：573047307@qq.com </div> </li>
                    <%}%>
                </ul> </div> </div>
    </div>
</div>
<%include("/common/_footor.html"){}%>
</body>
<%include("/common/_scripts.html",{user:user}){}%>
<script>

    layui.use(['layer','laypage'], function() {
        var layer = layui.layer
            , laypage = layui.laypage;
        $("#fq-activate").click(function () {
           $.ajax({
               url:'${ctxPath}/u/reSendEmail',
               dataType:'json',
               success:function (result) {
                   if (result && result.code == '0000'){
                       layer.msg('邮箱重新发送成功')
                   }else {
                       layer.msg('邮箱重新发送失败')
                   }
               }
           })

        })
    })
</script>
</html>