login.page.js 913 Bytes
require('js/common');
require('./login/qr-check');
require('./login/login');

(function() {
    var channel = window.cookie('_Channel');
    var channelMap = {
        boys: 1,
        girls: 2,
        kids: 3,
        lifestyle: 4
    };
    var param;

    channel = channelMap[channel] || 1;
    param = JSON.stringify({C_ID: channel});


    // when js run
    setTimeout(function() {
        var yas = window._yas;

        yas && yas.sendCustomInfo && yas.sendCustomInfo({
            op: 'YB_LOGIN_L',
            param: param
        });
    }, 3000);

    $(function() {
        var $smsLogin = $('.sms-login');

        // when jump sms-login
        $smsLogin.on('click', function() {
            var yas = window._yas;

            yas && yas.sendCustomInfo && yas.sendCustomInfo({
                op: 'YB_MOBILE_QUICK_LOGIN_C',
                param: param
            });
        });
    });
}());