<!doctype html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>registration</title>
    <link rel="stylesheet" href="/uploads/css/style.css">
    <link rel="stylesheet" href="/uploads/css/register.css">
</head>

<body>

<div style="margin-bottom: -40px;float:right;">
    <a href="{{ $info->StatusString}}">
        <img src="/uploads/sign/kefu.png" alt="" style="margin: 2px 6px -4px 1px;">
        <div style="color: white">AYUDA</div>
    </a>
</div>

{{--<div class="xxx" style="float:right">--}}

{{--    <a href="{{ $info->StatusString}}" target="">--}}
{{--        <div>--}}
{{--            <img src="/uploads/sign/kefu.png" alt="">--}}
{{--        </div>--}}
{{--        <div style="color: white">--}}
{{--            AYUDA--}}
{{--        </div>--}}
{{--    </a>--}}
{{--</div>--}}
{{--<div style="float: right;">--}}
{{--<div style="float: right">--}}


{{--</div>--}}
<div style="clear: both"></div>
<header>
    {{--    <a href="{{ $info->StatusString}}" target="true">--}}
    {{--        <div class="whatsapp">--}}
    {{--            <div style="color: white;margin-top: 57px">AYUDA</div>--}}
    {{--        </div>--}}
    {{--    </a>--}}


    <img src="https://d3rgufauva6fuc.cloudfront.net/web-images/icon.png" style="width: auto;margin: 70px auto">
</header>

<div class="tel">
    <svg t="1574666664432" class="icon" viewBox="0 0 1200 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"
         p-id="1961" width="200" height="200">
        <path
            d="M353.7609 781.237718l-0.188774-581.515716c0-14.91308 11.420776-27.655268 20.859435-27.655268H807.94912c10.193751 0 23.407872 13.308508 23.502258 27.466495l-0.471933 581.704489h42.285188l0.471933-581.610103c0-34.639875-30.203705-66.259379-64.560421-67.014471H373.204535c-33.129689 0.660706-59.935478 30.298092-61.82321 63.427781v46.815744l0.094387 538.381049h42.285188z"
            p-id="1962" fill="#858585"></path>
        <path
            d="M353.666513 755.470182l-0.188773 81.266844c0 14.91308 11.420776 27.655268 20.859434 27.655268h433.517559c10.193751 0 23.407872-13.308508 23.502258-27.466494l-0.471932-81.455618H873.07586l0.471932 81.361231c0 34.639875-30.203705 66.259379-64.56042 67.014471H373.110148c-33.129689-0.660706-59.935478-30.298092-61.823209-63.427781v-46.815743l0.094386-38.132178h42.285188zM331.580053 263.904876h521.957785v42.379574h-521.957785zM331.485667 682.603742h521.957784v42.379574h-521.957784z"
            p-id="1963" fill="#858585"></path>
        <path
            d="M592.464559 796.33957m-37.754632 0a37.754632 37.754632 0 1 0 75.509264 0 37.754632 37.754632 0 1 0-75.509264 0Z"
            p-id="1964" fill="#858585"></path>
    </svg>
    <span style="line-height: 44px; margin: 0px 8px 0px -7px;">+55</span>
    <input id="txtTelNumber" type="text" class="telNumber" maxlength="11"
           oninput="value=value.replace(/[^\d]/g,&#39;&#39;)" placeholder="Teléfono">
</div>
<!--滑块-->

<div id="slidingBlock" class=" tel nc-container " style="display:none;" data-nc-idx="1">
    <div id="nc_1_wrapper" class="nc_wrapper">
        <div id="nc_1_n1t" class="nc_scale">
            <div id="nc_1__bg" class="nc_bg"></div>
            <span id="nc_1_n1z" class="nc_iconfont btn_slide"></span>
            <div id="nc_1__scale_text" class="scale_text slidetounlock">
                <span class="nc-lang-cnt"
                      data-nc-lang="_startTEXT">Press and hold the slider and drag to the far right</span>
            </div>
            <div id="nc_1_clickCaptcha" class="clickCaptcha">
                <div class="clickCaptcha_text">
                    <b id="nc_1__captcha_text" class="nc_captch_text"></b>
                    <i id="nc_1__btn_2" class="nc_iconfont nc_btn_2 btn_refresh"></i>
                </div>
                <div class="clickCaptcha_img"></div>
                <div class="clickCaptcha_btn"></div>
            </div>
            <div id="nc_1_imgCaptcha" class="imgCaptcha">
                <div class="imgCaptcha_text"><input id="nc_1_captcha_input" maxlength="6" type="text"
                                                    style="ime-mode:disabled"></div>
                <div class="imgCaptcha_img" id="nc_1__imgCaptcha_img"></div>
                <i id="nc_1__btn_1" class="nc_iconfont nc_btn_1 btn_refresh"
                   onclick="document.getElementById(&#39;nc_1__imgCaptcha_img&#39;).children[0].click()"></i>
                <div class="imgCaptcha_btn">
                    <div id="nc_1__captcha_img_text" class="nc_captcha_img_text"></div>
                    <div id="nc_1_scale_submit" class="nc_scale_submit"></div>
                </div>
            </div>
            <div id="nc_1_cc" class="nc-cc"></div>
            <i id="nc_1__voicebtn" tabindex="0" role="button" class="nc_voicebtn nc_iconfont" style="display:none"></i>
            <b id="nc_1__helpbtn" class="nc_helpbtn"><span class="nc-lang-cnt" data-nc-lang="_learning">Learn about new features</span></b>
        </div>
        <div id="nc_1__voice" class="nc_voice"></div>
    </div>
</div>
<input id="hidcsessionid" name="hidcsessionid" type="hidden" value="">

<div class="verificationCode" style="height:3rem;">
    <div class="verification">
        <svg t="1574666920744" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"
             p-id="12708" width="200" height="200">
            <path
                d="M791.589047 224.121527l-567.979212 0c-30.189886 0-54.751149 24.561263-54.751149 54.751149l0 369.442335c0 30.189886 24.561263 54.751149 54.751149 54.751149l361.357585 0 140.203878 101.008195c5.423946 4.605237 12.178293 6.959025 19.034979 6.959025 3.786528 0 7.675395-0.71637 11.359584-2.251449 11.052568-4.605237 18.113932-15.248451 18.113932-27.222067L773.679792 703.06616l17.909254 0c30.189886 0 54.751149-24.561263 54.751149-54.751149l0-369.442335C846.340196 248.68279 821.778933 224.121527 791.589047 224.121527zM801.311213 648.315011c0 5.219268-4.502898 9.722167-9.722167 9.722167L728.65081 658.037178l0 45.028983 0 0 0 47.996802-129.560664-93.3328-0.409354 0.511693L598.680792 658.037178 223.609834 658.037178c-5.219268 0-9.722167-4.502898-9.722167-9.722167l0-369.442335c0-5.219268 4.502898-9.722167 9.722167-9.722167l567.979212 0c5.219268 0 9.722167 4.502898 9.722167 9.722167L801.311213 648.315011z"
                p-id="12709" fill="#858585"></path>
            <path
                d="M380.69958 429.822107l-40.935439 0c-5.628623 0-10.23386 4.605237-10.23386 10.23386l0 40.935439c0 5.628623 4.605237 10.23386 10.23386 10.23386l40.935439 0c5.628623 0 10.23386-4.605237 10.23386-10.23386l0-40.935439C390.93344 434.427344 386.328203 429.822107 380.69958 429.822107z"
                p-id="12710" fill="#858585"></path>
            <path
                d="M536.254247 439.03258c0-5.628623-4.605237-10.23386-10.23386-10.23386l-40.935439 0c-5.628623 0-10.23386 4.605237-10.23386 10.23386l0 40.935439c0 5.628623 4.605237 10.23386 10.23386 10.23386l40.935439 0c5.628623 0 10.23386-4.605237 10.23386-10.23386L536.254247 439.03258z"
                p-id="12711" fill="#858585"></path>
            <path
                d="M683.621827 439.03258c0-5.628623-4.605237-10.23386-10.23386-10.23386l-40.935439 0c-5.628623 0-10.23386 4.605237-10.23386 10.23386l0 40.935439c0 5.628623 4.605237 10.23386 10.23386 10.23386l40.935439 0c5.628623 0 10.23386-4.605237 10.23386-10.23386L683.621827 439.03258z"
                p-id="12712" fill="#858585"></path>
        </svg>
        <input id="txtPhoneCode" type="text" placeholder="Código">
    </div>
    <div class="button">
        <button id="numbtn" style="background-color: rgb(227, 193, 132);">comprobar</button>
    </div>
</div>
<div class="pswd" style="margin-top:20px;">
    <svg t="1574817177368" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"
         p-id="1874" width="48" height="48">
        <path
            d="M860.8 448l-9.6 0c3.2-19.2 6.4-41.6 6.4-64 0-188.8-153.6-336-345.6-336s-345.6 147.2-345.6 336c0 22.4 3.2 41.6 6.4 64l-12.8 0c-54.4 0-96 41.6-96 96l0 320c0 54.4 41.6 96 96 96l700.8 0c54.4 0 96-41.6 96-96l0-320C956.8 489.6 915.2 448 860.8 448zM220.8 444.8c-3.2-19.2-6.4-38.4-6.4-60.8 0-163.2 131.2-288 294.4-288s294.4 128 294.4 288c0 22.4-3.2 44.8-6.4 64l-32 0L224 448 220.8 444.8zM908.8 864c0 25.6-22.4 48-48 48L160 912c-25.6 0-48-22.4-48-48l0-320c0-25.6 22.4-48 48-48l608 0 89.6 0c25.6 0 48 22.4 48 48L905.6 864z"
            p-id="1875" fill="#858585"></path>
        <path
            d="M512 592c-12.8 0-25.6 9.6-25.6 25.6l0 195.2c0 12.8 9.6 25.6 25.6 25.6s25.6-9.6 25.6-25.6l0-195.2C537.6 604.8 524.8 592 512 592z"
            p-id="1876" fill="#858585"></path>
    </svg>
    <input id="txtPswdNumber" type="password" class="pswdNumber" placeholder="digite a senha">
</div>
<div class="pswd pwagain">
    <svg t="1574817177368" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"
         p-id="1874" width="48" height="48">
        <path
            d="M860.8 448l-9.6 0c3.2-19.2 6.4-41.6 6.4-64 0-188.8-153.6-336-345.6-336s-345.6 147.2-345.6 336c0 22.4 3.2 41.6 6.4 64l-12.8 0c-54.4 0-96 41.6-96 96l0 320c0 54.4 41.6 96 96 96l700.8 0c54.4 0 96-41.6 96-96l0-320C956.8 489.6 915.2 448 860.8 448zM220.8 444.8c-3.2-19.2-6.4-38.4-6.4-60.8 0-163.2 131.2-288 294.4-288s294.4 128 294.4 288c0 22.4-3.2 44.8-6.4 64l-32 0L224 448 220.8 444.8zM908.8 864c0 25.6-22.4 48-48 48L160 912c-25.6 0-48-22.4-48-48l0-320c0-25.6 22.4-48 48-48l608 0 89.6 0c25.6 0 48 22.4 48 48L905.6 864z"
            p-id="1875" fill="#858585"></path>
        <path
            d="M512 592c-12.8 0-25.6 9.6-25.6 25.6l0 195.2c0 12.8 9.6 25.6 25.6 25.6s25.6-9.6 25.6-25.6l0-195.2C537.6 604.8 524.8 592 512 592z"
            p-id="1876" fill="#858585"></path>
    </svg>
    <input id="txtPswdNumberAgain" type="password" class="pswdNumberAgain"
           placeholder="Digite a senha novamente">
</div>
<div class="tel" id="RegisterDiv" style="display: none;margin-top:20px;">
    <input id="imgRegisterInput" type="text" placeholder="Reintroducir la contraseña" style="height:45px">
    <img id="imgRegister" src="https://register007.fsprm.com/index.html?userid=752409436&amp;channelCode=007"
         height="45" style="margin-bottom: -17px; ">
</div>

{{--<div class="recommendid">--}}
{{--    <input id="txtSpreadId" unselectable="on" onfocus="this.blur();" type="text" readonly="" value="recommend ID：0">--}}
{{--    --}}{{--    <span id="txtSpreadId" unselectable="on" onfocus="this.blur();" type="text" readonly="" >recommend ID：0</span>--}}
{{--</div>--}}
<div class="already" style="margin-bottom:30px;">
    <span href="javascript:void(0)" id="txtSpreadId" unselectable="on" onfocus="this.blur();" type="text" readonly="">Convidar ID：0</span>
</div>


<button class="immediately" style="background-color: rgb(227, 193, 132);">Registrador</button>
<div class="already">Já registrado?
    <a id="btnAlready" href="javascript:void(0)">Clique aqui para baixar</a>
</div>
<div>
    &nbsp;
</div>
{{--<div class="cover">{{ __('auto.请先移动滑块') }}</div>--}}
<div class="cover"></div>
<script src="/uploads/js/um.js" id="AWSC_umidPCModule"></script>
<script src="/uploads/js/collina.js" id="AWSC_uabModule"></script>
<script type="text/javascript" class="nc-required-js-1 nc-awsc-script" src="/uploads/js/awsc.js"></script>
<script src="/uploads/js/initialize.jsonp"></script>
<script src="/uploads/js/jquery-2.1.4.min.js"></script>
<script src="/uploads/js/mobile-detect.min.js"></script>
<script type="text/javascript" charset="utf-8" src="/uploads/js/nc.js"></script>
<style type="text/css" class="nc-style">
    .nc-container #nc_1_wrapper, .nc-container.tb-login #nc_1_wrapper {
        width: 300px
    }

    .nc-container .imgCaptcha, .nc-container .clickCaptcha {
        width: 298px;
    }

    .nc-container.tb-login .imgCaptcha, .nc-container.tb-login .clickCaptcha {
        width: 300px;
    }

    .nc-container.tb-login .imgCaptcha .captcha-error, .nc-container.tb-login .clickCaptcha .captcha-error {
        width: 292px;
    }

    .nc-container.tb-login .errloading, .nc-container .errloading {
        width: 290px;
    }
</style>
<script type="text/javascript">

    var webRequestUrl = 'http://'+window.location.host;

    //获取验证码 按钮初始灰色
    $("#numbtn").attr("disabled", "true");
    $("#numbtn").css({'background-color': 'gray'});


    //注册按钮 初始灰色
    $(".immediately").attr("disabled", "true");
    $(".immediately").css({'background-color': 'gray'});

    var Index_Global = {
        goUrl: webRequestUrl+'/api/rev/download',
        postUrl: '',
        downloadUrl: "",     // 正式
        webApiUrl: webRequestUrl,
        agentTypeStr: '007',
        slideKey: '',
        isFirst: 1,
        sendValidCode: '123_456',
        JwtSmsData: {
            JwtSecret: '',
            JwtTimeStamp: 0,
            JwtRandomKey: ''
        },
        spreadId: 0,
        quDao: '',
        SendSms: null,
        GetUrlParameterVal: function (parname) {
            var href = "?" + decodeURI(window.location.search.substr(1)).toLowerCase();
            parname = parname.toLowerCase();
            var reg = new RegExp("[&|?]" + parname + "=[^&]*&?");
            var par = href.match(reg);
            if (par != null) {
                par = unescape(par);
                par = par.substr((par.indexOf('=') + 1), (par.length - (par.indexOf('=') + 1))).replace("&", "").replace("?", "");
                return par;
            } else {
                return "";
            }
        },
        Init: null
    }
    //初始化
    Index_Global.Init = function () {

        //设置发送短信验证码 按钮可用
        var obj = $('#numbtn');
        obj.removeAttr("disabled");
        obj.css({'background-color': '#e3c184'});

        //设置注册验证 按钮可用
        obj = $('.immediately');
        obj.removeAttr("disabled");
        obj.css({'background-color': '#e3c184'});

        Index_Global.spreadId = Index_Global.GetUrlParameterVal('userId') || 0;

        $('#txtSpreadId').html('Invitar ID：' + Index_Global.spreadId);
    }
    //发短信
    Index_Global.SendSms = function () {
        var postData = {
            AgentName: Index_Global.agentTypeStr,
            JwtRandomKey: Index_Global.JwtSmsData.JwtRandomKey,
            JwtTimeStamp: Index_Global.JwtSmsData.JwtTimeStamp,
            JwtSecret: Index_Global.JwtSmsData.JwtSecret,
        };

        postData.Phone = $.trim($('#txtTelNumber').val());
        postData.WebRegister = 1;

        if (postData.Phone == '') {
            showTip('Falta el número de móvil');
        }

        $.extend(postData, Index_Global.JwtSmsData);
        $.ajax({
            url: Index_Global.webApiUrl + '/api/send_code/send',
            type: 'post',
            headers: {agentTypeStr: Index_Global.agentTypeStr},
            data: postData,
            dataType: 'json'
        }).then(function (val) {

            if (val.code == 200) {
                showTip('Código enviado com sucesso, confira')

            } else {
                showTip(val.msg);
            }
            settimeNumber = true;
        });
    }

    // 下载
    $('#btnAlready').click(function () {
        window.location.href = Index_Global.downloadUrl;
    });

    // 立即注册按钮
    var istrue = true;
    $('.immediately').on('click', function () {
        var device_type = navigator.userAgent;//获取userAgent信息  ;
        var md = new MobileDetect(device_type);//实例化mobile-detect
        var MobileBrand = md.mobile();   //手机型号
        var MobileModel = md.phone();    //手机品牌
        var device_type = md.os();       //设备类型

        // if (istrue) {
        var code = $.trim($("#hidcsessionid").val());
        var postData = {
            Phone: '',
            AgentName: Index_Global.agentTypeStr,
            PhoneCode: '',
            Password: '',
            SpreadID: Index_Global.spreadId,
            QuDao: Index_Global.quDao,
            JwtTimeStamp: Index_Global.JwtSmsData.JwtTimeStamp,
            JwtSecret: Index_Global.JwtSmsData.JwtSecret,
            MobileBrand: MobileBrand,   //手机型号
            MobileModel: MobileModel,   //手机品牌
            device_type: device_type    //设备类型
        };
        var tel = $.trim($('#txtTelNumber').val()),
            psw = $.trim($('#txtPswdNumber').val())
        pswa = $.trim($('#txtPswdNumberAgain').val()),
            securityCode = $.trim($('#txtPhoneCode').val());

        match = "^[A-Za-z0-9]+$";
        if (psw.match(match) == null) {
            showTip('A senha requer de 6 a 20 letras ou números')
            return;
        }

        if (psw.length < 6 || psw.length > 20) {
            showTip('A senha requer de 6 a 20 letras ou números')
            return;
        }

        postData.Password = psw;
        postData.PhoneCode = securityCode;
        postData.Phone = tel;
        postData.validatecode = code;

        if (!(psw == pswa)) {
            showTip('As duas senhas não são iguais');
            return;
        }
        if (tel && psw && pswa) { //&& securityCode) {
            istrue = false;

            $.ajax({
                url: Index_Global.webApiUrl + '/api/register/index',
                type: 'post',
                headers: {agentTypeStr: Index_Global.agentTypeStr},
                data: postData,
                dataType: "json"
            }).then(function (res) {
                if (res.code == 200) {
                    showTip(res.msg);
                    window.location.href = Index_Global.goUrl + '?userID=' + Index_Global.spreadId;
                } else {
                    showTip(res.msg);
                }
                istrue = true;
            })
        } else {
            showTip('Por favor complete');
        }
        // } else {
        //     showTip('Do not click repeatedly');
        // }

    })


    var countdown = 60;
    var settimeNumber = true;
    //获取验证码
    $('#numbtn').on('click', function () {

        var obj = $('#numbtn');

        // if (settimeNumber) {
        var postData = {

            phoneNum: $.trim($('#txtTelNumber').val()),

        };


        // if (postData.phoneNum.match("^[1-9]d*$") == null) {
        //     showTip('Incorrect phone format');
        //     return false;
        // }

        console.log(postData.phoneNum.length)

        if (postData.phoneNum.length < 5 || postData.phoneNum.length > 11) {
            console.log(postData.phoneNum.length)
            showTip('formato de telefone errado');
            return false;
        }

        if (postData.phoneNum == '') {

            showTip('Número de telefone ausente');
            return false;
        }


        if (!Index_Global.sendValidCode) {

            showTip();
        }

        $.ajax({
            url: Index_Global.webApiUrl + '/api/send_code/send_verify',
            type: 'post',
            headers: {agentTypeStr: Index_Global.agentTypeStr},
            data: postData,
            dataType: 'json'
        }).then(function (val) {

            console.log(val)
            if (val.code == 200) {
                $("#numbtn").attr("disabled", "true");
                $("#numbtn").css({'background-color': 'gray'});

                settime(obj);

                settimeNumber = false;

                Index_Global.SendSms();
            } else {
                showTip(val.msg);
            }
            settimeNumber = true;

        })
        // } else {
        //     showTip('Do not click repeatedly');
        // }

    });

    function settime(obj) { //发送验证码倒计时
        if (countdown == 0) {
            Index_Global.isFirst = 1;
            obj.attr('disabled', false);
            obj.removeAttr("disabled");
            obj.css({'background-color': '#e3c184'});
            obj.html('Obter Codigo');

            countdown = 120;
            return;
        } else {
            //obj.attr('disabled', true);
            obj.html('Resend(' + countdown + ')');
            countdown--;
        }
        setTimeout(function () {
                settime(obj)
            }
            , 1000)
    }

    var timer;

    function showTip(msg) {
        clearTimeout(timer);
        $(".cover").text(msg);
        $(".cover").fadeIn(300);
        timer = setTimeout(
            function () {
                $(".cover").fadeOut(300);
            }, 4000)
    }

    $('.telNumber').on('input, focus, keyup', function (ev) {

        // console.log($(this).val())
        ev.stopPropagation();
    });


    //滑块JS
    var csessionid = "";
    var sig = "";
    var nc_token = ["FFFF0N00000000009807", (new Date()).getTime(), Math.random()].join(':');
    var scene = "nc_message";


    var NC_Opt =
        {
            renderTo: "#slidingBlock",
            appkey: "FFFF0N00000000009807",
            scene: scene,
            token: nc_token,
            customWidth: 300,
            trans: {"key1": "code0"},
            elementID: ["usernameID"],
            is_Opt: 0,
            language: "cn",
            isEnabled: true,
            timeout: 3000,
            times: 5,
            apimap: {},
            callback: function (data) {

            }
        }
    var nc = new noCaptcha(NC_Opt)
    nc.upLang('cn', {
        _startTEXT: "Mantenga pulsado el control deslizante y arrástrelo hacia la derecha",
        _yesTEXT: "Verificación aprobada",
        _error300: "Ah, hay un error. Haga clic en<a href=\"javascript:__nc.reset()\">Atualizar</a>Una vez más",
        _errorNetwork: "La red apesta, por favor.<a href=\"javascript:__nc.reset()\">Atualizar</a>",
    })


    Index_Global.Init();
</script>


<script></script>
</body>
</html>
