/**
 * [OElove] (C)2010-2099 oelove.com  biz
 * Email: service@phpcoo.com ,phpcoo@qq.com
 * This is NOT a freeware, use is subject to license terms
 * $ Last update 2018/06/25 by CL $
*/
$(function(){
    
    //升级vip提醒
    $(document).on("click", "[f='but_vip_tips']", function(){
        $backurl = $(this).attr("data-backurl");
        if (typeof($backurl) == "undefined") {
            $backurl = "";
        }
        layer.confirm("您没有权限，请先升级会员<br />点击“确定”去升级", {
                icon: 4,
                title: "温馨提示",
                btn: ['确定', '知道了']
            }, 
            function(){
                //点击确定
                if ($backurl.length > 0) {
                    window.location.href = _ROOT_PATH+"index.php?m=user&c=vip&fromurl="+encodeURIComponent($backurl);
                }
                else {
                    window.location.href = _ROOT_PATH+"index.php?m=user&c=vip&nofollow=1";
                }
            }, 
            function(){
                //点击知道了.
            }
        );

    });
    
    //资料未审核 提醒
    $(document).on("click", "[f='but_mydata_tips']", function(){
        $tips_type = $(this).attr("data-type");
        if (typeof($tips_type) == "undefined") {
            $tips_type = "1";
        }
        if ($tips_type == "2") {
            $tips = "您的资料审核未通过，无法进行操作。<br />点击“确定”去修改资料。";
        }
        else {
            $tips = "您的资料审核中，无法进行操作。<br />点击“确定”去修改资料。";
        }
        layer.confirm($tips, {
                icon: 2,
                title: "温馨提示",
                btn: ['确定', '知道了']
            }, 
            function(){
                //点击确定
                window.location.href = _ROOT_PATH+"index.php?m=user&c=profile&nofollow=1";
            }, 
            function(){
                //点击知道了.
            }
        );
    });
    
    //没有实名认证提醒...8.06.25
    $(document).on("click", "[f='but_idrz_tips']", function(){
        $backurl = $(this).attr("data-backurl");
        if (typeof($backurl) == "undefined") {
            $backurl = "";
        }
        layer.confirm("你还没实名认证<br />点击“确定”去认证", {
                icon: 4,
                title: "温馨提示",
                btn: ['确定', '知道了']
            }, 
            function(){
                //点击确定
                if ($backurl.length > 0) {
                    window.location.href = _ROOT_PATH+"index.php?m=user&c=rz&forward="+encodeURIComponent($backurl);
                }
                else {
                    window.location.href = _ROOT_PATH+"index.php?m=user&c=rz&nofollow=1";
                }
            }, 
            function(){
                //点击知道了.
            }
        );
    });
    
    //没有手机认证提醒...8.06.25
    $(document).on("click", "[f='but_mobilerz_tips']", function(){
        $backurl = $(this).attr("data-backurl");
        if (typeof($backurl) == "undefined") {
            $backurl = "";
        }
        layer.confirm("你的手机号还没认证<br />点击“确定”去认证", {
                icon: 4,
                title: "温馨提示",
                btn: ['确定', '知道了']
            }, 
            function(){
                //点击确定
                if ($backurl.length > 0) {
                    window.location.href = _ROOT_PATH+"index.php?m=user&c=rz&forward="+encodeURIComponent($backurl);
                }
                else {
                    window.location.href = _ROOT_PATH+"index.php?m=user&c=rz&nofollow=1";
                }
            }, 
            function(){
                //点击知道了.
            }
        );
    });    

});


