Authored by whb

index.js css

... ... @@ -1647,10 +1647,14 @@ function actionLoopUpdCartNum() {
* @return {[type]} [description]
*/
function actionExeTemplate() {
var resulthtml = $('#goodcartempwarpper').html().replace(/\\/g, '');
$('#goodcartempwarpper').html(resulthtml);
vipInfoCombine = handlebars.compile($('#tmpl-my-login-new').html());
var $goodcartempwarpper = $('#goodcartempwarpper');
var resulthtml = '';
if ($goodcartempwarpper && $goodcartempwarpper.html()) {
resulthtml = $('#goodcartempwarpper').html().replace(/\\/g, '');
$('#goodcartempwarpper').html(resulthtml);
vipInfoCombine = handlebars.compile($('#tmpl-my-login-new').html());
}
}
/**
* 执行搜索
... ... @@ -1846,7 +1850,10 @@ define("js/product/entry", ["jquery","handlebars","source-map","lazyload"], func
require("js/product/list");
require("js/product/hotrank");
require("js/product/brand");
require("js/product/hotrank");
});
define("js/product/list", ["jquery","handlebars","source-map","lazyload"], function(require, exports, module){
/**
... ... @@ -2627,6 +2634,39 @@ module.exports = function($o, rowWidth) {
return pMouseHover;
};
});
define("js/product/brand", ["jquery"], function(require, exports, module){
/**
* 品牌页面
* @auhtor: bikai<kai.bi@yoho.cn>
* @date: 2016/1/21
*/
var $ = require("jquery");
$('#brand-favor').on('click', function() {
var $this = $(this),
uid = window.getUid();
if (!uid) {
location.href = '/signin.html?refer=' + location.href;
return;
}
$.ajax({
type: 'post',
url: '/product/index/favoriteBrand',
data: {
uid: uid,
brandId: $this.data('id')
}
}).then(function(res) {
if (res.code === 200) {
$this.addClass('favored');
}
});
});
});
define("js/product/hotrank", ["jquery","handlebars","source-map","lazyload"], function(require, exports, module){
/**
* 首页
... ... @@ -4364,7 +4404,8 @@ require("js/passport/reg");
require("js/passport/back");
require("js/passport/login");
require("js/passport/reset");
require("js/passport/vertification");
require("js/passport/vertification");
require("js/passport/thirdlogin");
});
define("js/passport/reg", ["jquery"], function(require, exports, module){
/*
... ... @@ -5995,3 +6036,115 @@ $('#captcha').keyup(function() {
$(this).removeClass('error');
});
});
define("js/passport/thirdlogin", ["jquery"], function(require, exports, module){
/**
* 登录
* @author: wq
* @date: 2016/1/21
*/
var $ = require("jquery");
function chooseProtocol() {
$('.choosetag').on('change', function() {
if ($(this).attr('checked')) {
$('.choosewrapper').css({
'background-image': 'url("http://webstatic.dev.yohobuy.com/img/passport/choosed.png")'
});
} else {
$('.choosewrapper').css({
'background-image': 'none'
});
}
})
}
function chooseAreaToogle() {
$('.optionshow').on('click', function() {
$('.optionslist').toggleClass('hide');
});
}
function cancelChooseArea() {
$(document).on('click', 'body', function(e) {
var $target = $(e.target);
if ($target.hasClass('yohoselectarea') || $target.hasClass('yohoselectarea') || $target.hasClass('areaname') || $target.hasClass('righttag') || $target.hasClass('optionslist') || $target.hasClass('optionitem')) {
return;
} else {
$('.optionslist').addClass('hide');
}
})
}
function chooseArea() {
$('.optionitem').on('click', function() {
var $option = $(this);
var areanum = $option.attr('areanum');
var areaname = $option.text();
$('#areaname').text(areaname);
$('#areanum').text(areanum);
$('#areacode').val(areanum);
$('.optionslist').addClass('hide');
})
}
function isagree() {
return $('.choosetag').attr('checked');
}
function nextStep() {
var openId = '';
var sourceType = '';
var mobile = '';
var areaCode = '';
$('#bindfirststep').on('click', function(e) {
e.preventDefault();
mobile = $('.phonenum').val();
areaCode = $('.areanum').text();
if (mobile === '') {
alert('手机号码不能为空');
return;
}
if (!isagree()) {
alert('请先同意我们的协议');
return;
}
openId = $('#openId').val() || '29803EC6D4AAC3AAB8ABDB6AE829D579';
sourceType = $('#sourceType').val() || 'qq';
$.ajax({
type: "post",
url: '/passport/autouserinfo/bindCheck',
data: {
mobile: mobile,
area: areaCode,
openId: openId,
sourceType: sourceType
},
dataType: 'json',
success: function(data) {
if (data.code === 200) {
if (data.data.isReg === 0) {
$('#bindmobileform').attr('action','/passport/thirdlogin/noregist');
$('#bindmobileform').submit();
} else {
}
} else {
alert(data.message);
}
}
});
})
}
function init() {
chooseProtocol();
chooseArea();
chooseAreaToogle();
cancelChooseArea();
nextStep();
}
init();
});
... ...
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.