(function(){
    X.pageLogic['updatapassword'] = {
        init : function(){
            
            $(document).on("click",'.updatapassword-top-box',function(){
                layer.closeAll();
            })

            $(document).on("click",".updatapassword-qx",function(){
                layer.closeAll();
            })

            $(document).on("click",".updatapassword-qd",function(){
                var data = layui.form.val('updatapasswordexample');
                if(data.newpassword != data.reppassword){
                    layer.msg('两次密码不一致');
                    return;
                }
                X.api('user/reset_my_password',"post",{password:data.newpassword},function(d){
                    layer.closeAll();
                    layer.msg('修改成功');
                })
            })

        }
    };
})();