Authored by biao

Merge branch 'develop' of http://git.dev.yoho.cn/web/yohobuy into develop

{{> layout/header}}
<div class="new-sale-page product-page yoho-page">
{{# saleList}}
{{# saleBanner}}
<div class="sale-list-banner" style="height: {{bannerHeight}}px;">
<ul style="height: {{bannerHeight}}px;">
{{# list}}
<li class="banner-img" style="background:url({{img}}) no-repeat top center;"></li>
{{/ list}}
</ul>
</div>
{{/ saleBanner}}
{{> sale/sale-banner}}
<div class="center-content clearfix">
{{# saleTitle}}
<div class="header-title">
... ... @@ -31,4 +25,4 @@
</div>
{{/ saleList}}
</div>
{{> layout/footer}}
\ No newline at end of file
{{> layout/footer}}
... ...
{{# saleBanner}}
<div class="sale-list-banner" style="height: {{bannerHeight}}px;">
<ul style="height: {{bannerHeight}}px;">
{{# list}}
<li class="banner-img" style="background:url({{img}}) no-repeat top center;"></li>
{{/ list}}
</ul>
</div>
{{/ saleBanner}}
... ...
... ... @@ -486,7 +486,7 @@ function actionGoodsCart() {
}, function() {
$(this).css('background-color', '#fff');
});
}, 'json');
}, 'jsonp');
}
function getText(obj) {
... ... @@ -535,13 +535,11 @@ function actionGoodsCart() {
var params = '';
if (typeof (domain) === undefined || domain === '') {
console.log('请设置请求的api地址');
return false;
}
params = $.extend(defaults, options);
params.page = params.page || 1;
if (params.method === '') {
console.log('请设置请求的URL');
return false;
}
try {
... ... @@ -1082,7 +1080,8 @@ function actionTipPic() {
function closeCover(){
function closeCover() {
var $cover = $('#cover');
$cover.remove();
... ... @@ -1093,58 +1092,97 @@ function closeCover(){
*/
function actionCover() {
var gender = cookieMap._Gender;
var newMask = '';
var windowheight = '';
var selfheight = '';
var containertop;
var length = '';
setCookie('_Channel','boys',{path : '/',domain : '.yohobuy.com',expires : 7});
if(typeof gender == 'undefined' || gender == '' || gender == null){
$.get('http://www.yohobuy.com/index/guide', function(data){
var newMask = document.createElement("div");
window.setCookie('_Channel', 'boys', {
path: '/',
domain: '.yohobuy.com',
expires: 7
});
if (typeof gender === 'undefined' || gender === '' || gender === null) {
$.get('http://www.yohobuy.com/index/guide', function(data) {
newMask = document.createElement('div');
newMask.id = 'cover';
newMask.innerHTML=data;
newMask.innerHTML = data;
document.body.appendChild(newMask);
var window_height = $(window).height();
var self_height = $('.guide-box').height();
var container_top = window_height / 2 - self_height / 2;
var length=$('.guide-box .clear').find("li").length;
windowheight = $(window).height();
selfheight = $('.guide-box').height();
containertop = windowheight / 2 - selfheight / 2;
length = $('.guide-box .clear').find('li').length;
$('.guide-box').css({
width: (200 * length) + 'px',
top: container_top + 'px'
top: containertop + 'px'
});
$('#cover').bind('click', function(event){
setCookie('_Gender','1,3',{path : '/',domain : '.yohobuy.com',expires : 90});
setCookie('_Channel','boys',{path : '/',domain : '.yohobuy.com',expires : 7});
closeCover();
$('#cover').bind('click', function(event) {
window.setCookie('_Gender', '1,3', {
path: '/',
domain: '.yohobuy.com',
expires: 90
});
window.setCookie('_Channel', 'boys', {
path: '/',
domain: '.yohobuy.com',
expires: 7
});
closeCover();
});
$('#cover .guide-box .close').bind('click', function(event){
getSource('弹窗','CLOSE','homepage_man');
setCookie('_Gender','1,3',{path : '/',domain : '.yohobuy.com',expires : 90});
setCookie('_Channel','boys',{path : '/',domain : '.yohobuy.com',expires : 7});
analy('guide_close');
closeCover();
$('#cover .guide-box .close').bind('click', function(event) {
getSource('弹窗', 'CLOSE', 'homepage_man');
window.setCookie('_Gender', '1,3', {
path: '/',
domain: '.yohobuy.com',
expires: 90
});
window.setCookie('_Channel', 'boys', {
path: '/',
domain: '.yohobuy.com',
expires: 7
});
closeCover();
});
$('.boys img , .boys .go').bind('click', function(event){
getSource('弹窗','BOYS','homepage_man');
setCookie('_Gender','1,3',{path : '/',domain : '.yohobuy.com',expires : 90});
setCookie('_Channel','boys',{path : '/',domain : '.yohobuy.com',expires : 7});
analy( 'guide_boys');
closeCover();
$('.boys img , .boys .go').bind('click', function(event) {
getSource('弹窗', 'BOYS', 'homepage_man');
window.setCookie('_Gender', '1,3', {
path: '/',
domain: '.yohobuy.com',
expires: 90
});
window.setCookie('_Channel', 'boys', {
path: '/',
domain: '.yohobuy.com',
expires: 7
});
closeCover();
});
$('.girls img, .girls .go').bind('click', function(event){
getSource('弹窗','GIRLS','homepage_woman');
setCookie('_Gender','2,3',{path : '/',domain : '.yohobuy.com',expires : 90});
setCookie('_Channel','girls',{path : '/',domain : '.yohobuy.com',expires : 7});
analy( 'guide_girls');
$('.girls img, .girls .go').bind('click', function(event) {
getSource('弹窗', 'GIRLS', 'homepage_woman');
window.setCookie('_Gender', '2,3', {
path: '/',
domain: '.yohobuy.com',
expires: 90
});
window.setCookie('_Channel', 'girls', {
path: '/',
domain: '.yohobuy.com',
expires: 7
});
});
$('.lifestyle img, .lifestyle .go').bind('click', function(event){
setCookie('_Channel','lifestyle',{path : '/',domain : '.yohobuy.com',expires : 7});
getSource('弹窗','LIEFSTYLE','homepage_lifestyle');
analy( 'guide_lifestyle');
$('.lifestyle img, .lifestyle .go').bind('click', function(event) {
window.setCookie('_Channel', 'lifestyle', {
path: '/',
domain: '.yohobuy.com',
expires: 7
});
getSource('弹窗', 'LIEFSTYLE', 'homepage_lifestyle');
});
//防止冒泡事件
$('#cover .guide-box').bind('click', function(event){
$('#cover .guide-box').bind('click', function(event) {
event.stopPropagation();
});
});
});
}
}
/**
... ... @@ -1774,8 +1812,7 @@ function init() {
actionCover(); //初次登录弹框
}
init();
init();
});
define("js/product/entry", ["jquery","handlebars","source-map","lazyload"], function(require, exports, module){
/**
... ...
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.
... ... @@ -14,11 +14,10 @@ var $sc = $('#send-captcha'),
itime;
$sc.click(function() {
$.post('/passport/register/authcode', {
$.post('/passport/back/sendbackmobile', {
mobile: $('#mobile').val(),
area: $('#area').val(),
captcha: $('#captchaPic').val(),
project: 'repassword'
verifyCode: $('#captchaPic').val(),
}, function(jsonData) {
if (jsonData.code === 200) {
$errTip.hide();
... ...
... ... @@ -75,6 +75,23 @@ class BackController extends WebAction {
}
/**
* 发送找回手机号短信
*
* @return json
*/
public function sendbackmobileAction()
{
$mobile = $this->post ('mobile', '');
$area = intval ($this->post( 'area', '86' ));
$verifyCode = $this->post ('verifyCode', '');
$data = array('code' => 400, 'message' =>'验证失败');
if(Helpers::verifyMobile($mobile) && PassportModel::verifyCode($verifyCode)) { // 验证手机号
$data = BackData::sendCodeToMobile($mobile, $area);
}
echo $this->echoJson($data);
}
/**
* 发送邮件页面
*/
public function sendemailAction() {
... ... @@ -193,6 +210,7 @@ class BackController extends WebAction {
$area = $this->post ( 'area' );
$verifyCode = $this->post ( 'verifyCode' );
$code = $this->post ( 'code' ); // code
$data = array('code'=> 400, 'message' => '验证码错误!','data' => SITE_MAIN.'/passport/back/index');
if ($this->getSession ( 'mobile' ) == $mobile && $this->getSession ( 'area' ) == $area) {
$result = BackData::validateMobileCode ( $mobile, $code, $area );
if ($result ['code'] == 200) {
... ... @@ -204,12 +222,12 @@ class BackController extends WebAction {
) );
$code = AuthCode::encode ( $str, PassportModel::BACK_FIND_SECRET_KEY );
$url = '/passport/back/backcode?code=' . base64_encode ( $code );
$this->redirect ( SITE_MAIN . $url );
return true;
$data ['code'] = 200;
$data['message'] = '验证成功';
$data['data'] = SITE_MAIN . $url;
}
}
//出错直接跳到找回密码页
$this->redirect ('/passport/back/index');
$this->echoJson($data);
}
/**
... ...
... ... @@ -413,7 +413,32 @@ class Sale1Controller extends WebAction
'saleList' => array(
'saleBanner' => array(
'bannerHeight' => 350,
'img' => 'http://img12.static.yhbimg.com/couponImg/2015/12/10/08/02d4c26f19ca2e44359d69d5cff86167fb.jpg'
'list' => array(
array(
'bannerHeight' => 350,
'img' => 'http://img12.static.yhbimg.com/couponImg/2015/12/10/08/02d4c26f19ca2e44359d69d5cff86167fb.jpg'
),
array(
'bannerHeight' => 350,
'img' => 'http://img12.static.yhbimg.com/yhb-img01/2016/01/06/05/02062366574a01418596caa38a773f6beb.jpg'
),
array(
'bannerHeight' => 350,
'img' => 'http://img11.static.yhbimg.com/yhb-img01/2016/01/06/05/013341a0632177cc3425c3c6082845be57.jpg'
),
array(
'bannerHeight' => 350,
'img' => 'http://img12.static.yhbimg.com/couponImg/2015/12/10/08/02d4c26f19ca2e44359d69d5cff86167fb.jpg'
),
array(
'bannerHeight' => 350,
'img' => 'http://img12.static.yhbimg.com/yhb-img01/2016/01/06/05/02062366574a01418596caa38a773f6beb.jpg'
),
array(
'bannerHeight' => 350,
'img' => 'http://img11.static.yhbimg.com/yhb-img01/2016/01/06/05/013341a0632177cc3425c3c6082845be57.jpg'
)
)
),
'saleTitle' => array(
'name' => '全部商品',
... ... @@ -911,6 +936,7 @@ class Sale1Controller extends WebAction
'pager' => '<a href="" class="cur"><span>1</span></a><a href=""><span>2</span></a><a href="" title="下一页">下一页<span class="iconfont">&gt;</span></a>'
)
);
$this->setWebNavHeader();
$this->_view->display('sale-list', $data);
}
}
... ...