reg-success.page.js 619 Bytes
require('../common');

var $ = require('yoho-jquery'),  // eslint-disable-line
    yas = require('../common/data-yas');

var $countDown = $('#count-down'), // eslint-disable-line
    $successBtn = $('.success-btn'),
    countDown = 5,
    clearT; // 注册成功页面5秒后跳转

if ($('.success-box').length > 0) {
    clearT = setInterval(function() {

        if (countDown === 0) {

            window.location.href = $successBtn.attr('data-url');

            clearInterval(clearT);
        }
        $countDown.text(countDown--);
    }, 1000);
}

$(function() {
    yas.givePoint('YB_REGISTER_SUCCESS_L');
});