Authored by 陈轩

登录页 与 短信登录 添加埋点

require('js/common');
require('./login/login');
(function() {
var yas = window._yas;
var channel = window.cookies('_Channel');
var channelMap = {
boys: 1,
girls: 2,
kids: 3,
lifestyle: 4
};
var param;
channel = channelMap[channel] || 1;
param = JSON.stringify({C_ID: channel});
if (!(yas && yas.sendCustomInfo)) {
return false;
}
// when js run
yas.sendCustomInfo({
op: 'YB_LOGIN_L',
param: param
});
$(function() {
var $smsLogin = $('.sms-login');
// when jump sms-login
$smsLogin.on('click', function() {
yas.sendCustomInfo({
op: 'YB_MOBILE_QUICK_LOGIN_C',
param: param
});
});
});
}());
... ...
var tip = require('plugin/tip');
'use strict';
var tip, checkPoint;
var $resendBtn,
$nextBtn,
$smsCode,
$resetBtn,
mobile, area;
var page;
var page = {
require('js/common');
tip = require('plugin/tip');
checkPoint = require('./smslogin/check-point');
page = {
disableAjax: false,
time: 60,
... ... @@ -131,6 +137,7 @@ var page = {
})
.done(function(res) {
if (res.code === 200) {
checkPoint('YB_MOBILE_LOGIN_C'); // 埋点
location.href = res.redirect;
$nextBtn.off();
return;
... ...
'use strict';
var tip = require('plugin/tip');
var api = require('./api');
var tip, api, checkPoint;
var $countrySelect,
$areaCode,
$nextBtn,
$resetBtn,
$phoneNum;
var page;
require('js/common');
tip = require('plugin/tip');
api = require('./api');
checkPoint = require('./smslogin/check-point');
var page = {
page = {
init: function() {
this.domInit();
this.bindEvent();
... ... @@ -76,6 +80,7 @@ var page = {
})
.done(function(data) {
if (data.code === 200) {
checkPoint('YB_MOBILE_NEXT_C'); // 埋点
$nextBtn.off();
location.href = data.redirect;
} else {
... ... @@ -88,9 +93,6 @@ var page = {
.always(function() {
$nextBtn.prop('disabled', false);
});
}
};
... ...
var tip = require('plugin/tip');
'use strict';
var tip, checkPoint;
var $eyeBtn,
$pwd,
$nextBtn;
var page = {
var page;
require('js/common');
tip = require('plugin/tip');
checkPoint = require('./smslogin/checkPoint');
checkPoint('YB_SET_PASSWORD_L');
page = {
init: function() {
this.domInit();
this.bindEvent();
... ... @@ -56,6 +65,7 @@ var page = {
})
.done(function(res) {
if (res.code === 200) {
checkPoint('YB_SET_PASSWORD_ENSURE_C'); // 埋点
$nextBtn.off();
location.href = res.redirect;
return;
... ... @@ -72,6 +82,7 @@ var page = {
}
};
$(function() {
page.init();
});
... ...
var sendInfo = function(eventName) {
var yas = window._yas;
var channel = window.cookies('_Channel');
var channelMap = {
boys: 1,
girls: 2,
kids: 3,
lifestyle: 4
};
var param;
channel = channelMap[channel] || 1;
param = JSON.stringify({C_ID: channel});
if (!(yas && yas.sendCustomInfo)) {
return false;
}
yas.sendCustomInfo({
op: eventName,
param: param
}, true);
};
module.exports = sendInfo;
... ...
... ... @@ -41,6 +41,7 @@ module.exports = {
},
resolve: {
alias: {
js: path.join(__dirname, './js'),
common: path.join(__dirname, 'js/common'),
plugin: path.join(__dirname, 'js/plugin')
}
... ...