Authored by 周少峰

Merge branch 'develop' of git.dev.yoho.cn:web/yohobuy into feature/web-list

... ... @@ -473,7 +473,8 @@ class WebAction extends Controller_Abstract
$header = array(
'navbars'=> \Index\HomeModel::getNavBars($channel),
'gobytype'=> 'gobuy'.$channel,
'searchcate'=>'searchcate'.$channel
'searchcate'=>'searchcate'.$channel,
'header'=> true,
);
$this->_view->assign('headerdata', $header);
}
... ...
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
... ... @@ -10,11 +10,6 @@ $('#brand-favor').on('click', function() {
var $this = $(this),
uid = window.getUid();
if (!uid) {
location.href = '/signin.html?refer=' + encodeURIComponent(location.href);
return;
}
$.ajax({
type: 'post',
url: '/product/index/favoriteBrand',
... ... @@ -29,6 +24,8 @@ $('#brand-favor').on('click', function() {
} else {
$this.find('i').removeClass('coled');
}
} else if (res.code === 403) {
location.href = '/signin.html?refer=' + encodeURIComponent(location.href);
}
});
});
... ...
... ... @@ -95,11 +95,6 @@ exports.init = function(num) {
wrapperPt, //鼠标移入时弹层的上内边距
containerPt; //商品列表容器的上内边距
// 获取图片之前,先把获取上一张图片的ajax请求取消。 网络差的时候会出现错误
// if (getProductAjax && getProductAjax.readyState!= 4) {
// getProductAjax.abort();
// }
$.ajax({
type: 'POST',
url: '/product/list/getProductPic',
... ... @@ -174,11 +169,6 @@ $(document).on('hover', '.good-select-color li', function() {
$goodInfoMain.on('click', '.col-btn', function() {
var $this = $(this);
if (!window.getUid()) {
location.href = '/signin.html?refer=' + encodeURIComponent(location.href);
return;
}
$.ajax({
type: 'POST',
url: '/product/list/changeFavorite',
... ... @@ -189,6 +179,8 @@ $goodInfoMain.on('click', '.col-btn', function() {
}).then(function(res) {
if (res.code === 200) {
$this.toggleClass('coled');
} else if (res.code === 403) {
location.href = '/signin.html?refer=' + encodeURIComponent(location.href);
}
});
});
... ...
... ... @@ -36,7 +36,7 @@ class PassportModel
'orderHref' => Helpers::url('/home/orders?t=' . time()), //订单中心连接
'helpHref' => Helpers::url('/help'),
);
$tool+=array(
$tool += array(
'loginHref' => Helpers::url('/signin.html'), //登录链接,已登录不传
'registerHref' => Helpers::url('/reg.html'), //注册链接,已登录不传
);
... ... @@ -45,7 +45,8 @@ class PassportModel
'img' => 'http://static.yohobuy.com/newheader/img/logo_e.png',
'url' => SITE_MAIN
),
'tool' => $tool
'tool' => $tool,
'simpleHeader' => true,
);
return $simpleHeader;
}
... ... @@ -110,7 +111,7 @@ class PassportModel
$ret = current($data['data']);
}
}
return $ret;
return array();
}
/**
... ...
... ... @@ -20,7 +20,7 @@ class BackController extends WebAction {
'coverImg' => $banner ['img'],
'countryCode' => '86',
'countryName' => '中国',
'captchaUrl' => SITE_MAIN.'/passport/images?t=1449799445',
'captchaUrl' => Helpers::url('/passport/images?t='.time()),
'countryList' => RegData::getAreasData()
)
);
... ... @@ -282,7 +282,7 @@ class BackController extends WebAction {
$area = $this->post ( 'area' );
$verifyCode = $this->post ( 'verifyCode' );//图形验证码
$code = $this->post ( 'code' ); //手机验证码
$data = array('code'=> 400, 'message' => '验证码错误!','data' => SITE_MAIN.'/passport/back/index');
$data = array('code'=> 400, 'message' => '验证码错误!','data' => Helpers::url('/passport/back/index'));
if ($this->getSession ( 'mobile' ) == $mobile && $this->getSession ( 'area' ) == $area && ! empty($code)
&& PassportModel::verifyCode($verifyCode)) {
$result = BackData::validateMobileCode ( $mobile, $code, $area );
... ... @@ -297,7 +297,7 @@ class BackController extends WebAction {
$url = '/passport/back/backcode?code=' . base64_encode ( $code );
$data ['code'] = 200;
$data['message'] = '验证成功';
$data['data'] = SITE_MAIN . $url;
$data['data'] = Helpers::url($url);
}
}
$this->echoJson($data);
... ...
... ... @@ -19,13 +19,13 @@ class RegisterController extends WebAction
'registerPage' => true,
'simpleHeader' => PassportModel::getSimpleHeader(),
'passport' => array(
'actionUrl' => SITE_MAIN.'/passport/register/mobileregister',
'actionUrl' => Helpers::url('/passport/register/mobileregister'),
'region' => RegData::getAreasData(),
'location' => '+86',
'captchaUrl' => SITE_MAIN.'/passport/images?t=1449799445',
'itemUrl' => 'http://www.yohobuy.com/help/?category_id=9',
'captchaUrl' => Helpers::url('/passport/images?t='.time()),
'itemUrl' => Helpers::url('/help/?category_id=9'),
'referUrl' => $refer,
'loginUrl' => SITE_MAIN.'/signin.html?refer='.$refer,
'loginUrl' => Helpers::url('/signin.html?refer='.$refer),
'coverHref' => $cover['url'],
'coverImg' => $cover['img'],
'regBtnText' => '立即注册'
... ... @@ -131,9 +131,12 @@ class RegisterController extends WebAction
break;
}
//发送代码
$send_code_key = md5('send_code_' .$area.'_'.$mobile);
$send_code_times = Cache::increment($send_code_key, 1, 0, 3600);
if($send_code_times > 50) {
$sendCodeKey = md5('send_code_' . $area . '_' . $mobile);
if (!Cache::get($sendCodeKey)) {
Cache::set($sendCodeKey, 0);
}
$sendCodeTimes = Cache::increment($sendCodeKey, 1, 0, 3600);
if ($sendCodeTimes > 50) {
$data['message'] = '发送验证码太多';
break;
}
... ...
... ... @@ -25,3 +25,11 @@ routes.searchsuggest.match = "/api/suggest"
routes.searchsuggest.route.module = Product
routes.searchsuggest.route.controller = Search
routes.searchsuggest.route.action = suggest
;about(品牌介绍)
routes.brandabout.type = "rewrite"
routes.brandabout.match = "/about"
routes.brandabout.route.module = Product
routes.brandabout.route.controller = Index
routes.brandabout.route.action = brandIntro
\ No newline at end of file
... ...