Authored by lore-w

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

... ... @@ -21,6 +21,7 @@ var $addressForm = $('.edit-address'),
isSubmiting,
currentPage = 'edit',
newArea = [],
chinaAddressList,
queryString = $.queryString();
$($editAddressPage, $addressListPage).css('min-height', function() {
... ... @@ -118,12 +119,7 @@ $submit.on('touchend', function() {
$(this).removeClass('highlight');
});
// 省市区列表异步加载
$.ajax({
method: 'GET',
url: '/home/locationList',
timeout: 60000
}).then(function(html) {
function bindAddressListEvent(html) {
$addressListPage.html(html);
// 省市区
... ... @@ -185,6 +181,27 @@ $.ajax({
}).on('touchend touchcancel', 'li', function() {
$(this).removeClass('highlight');
});
}).fail(function() {
tip.show('获取省市区列表失败');
});
}
// 读取省市区列表缓存
if (window.localStorage && window.localStorage.getItem) {
chinaAddressList = window.localStorage.getItem('chinaAddressList');
}
if (chinaAddressList) {
bindAddressListEvent(chinaAddressList);
} else {
// 省市区列表异步加载
$.ajax({
method: 'GET',
url: '/home/locationList',
timeout: 60000
}).then(function(html) {
bindAddressListEvent(html);
if (window.localStorage && window.localStorage.setItem) {
window.localStorage.setItem('chinaAddressList', html);
}
}).fail(function() {
tip.show('获取省市区列表失败');
});
}
... ...
... ... @@ -15,6 +15,7 @@
<script src="http://cdn.yoho.cn/yohobuy/respond/respond.min.js"></script>
<link href="http://cdn.yoho.cn/yohobuy/respond/respond-proxy.html" id="respond-proxy" rel="respond-proxy" />
<script src="http://cdn.yoho.cn/yohobuy/respond/respond.proxy.js"></script>
<link href="http://cdn.yoho.cn/yohobuy/respond/respond.proxy.gif" id="respond-redirect" rel="respond-redirect" />
<![endif]-->
{{/if}}
{{#if preEnv}}
... ... @@ -23,6 +24,7 @@
<script src="http://cdn.yoho.cn/yohobuy/respond/respond.min.js"></script>
<link href="http://cdn.yoho.cn/yohobuy/respond/respond-proxy.html" id="respond-proxy" rel="respond-proxy" />
<script src="http://cdn.yoho.cn/yohobuy/respond/respond.proxy.js"></script>
<link href="http://cdn.yoho.cn/yohobuy/respond/respond.proxy.gif" id="respond-redirect" rel="respond-redirect" />
<![endif]-->
{{/if}}
{{#if testEnv}}
... ... @@ -31,6 +33,7 @@
<script src="http://static.buy.test.yoho.cn/dist/yohobuy/respond/respond.min.js"></script>
<link href="http://static.buy.test.yoho.cn/dist/yohobuy/respond/respond-proxy.html" id="respond-proxy" rel="respond-proxy" />
<script src="http://static.buy.test.yoho.cn/dist/yohobuy/respond/respond.proxy.js"></script>
<link href="http://static.buy.test.yoho.cn/dist/yohobuy/respond/respond.proxy.gif" id="respond-redirect" rel="respond-redirect" />
<![endif]-->
{{/if}}
{{#if devEnv}}
... ... @@ -39,11 +42,9 @@
<script src="http://webstatic.dev.yohobuy.com/plugin/page/respond/respond.min.js"></script>
<link href="http://webstatic.dev.yohobuy.com/plugin/page/respond/respond-proxy.html" id="respond-proxy" rel="respond-proxy" />
<script src="http://webstatic.dev.yohobuy.com/plugin/page/respond/respond.proxy.js"></script>
<link href="http://webstatic.dev.yohobuy.com/plugin/page/respond/respond.proxy.gif" id="respond-redirect" rel="respond-redirect" />
<![endif]-->
{{/if}}
<!--[if lt IE 9]>
<link href="proxy/respond.proxy.gif" id="respond-redirect" rel="respond-redirect" />
<![endif]-->
</head>
<body>
{{> layout/page-header}}
\ No newline at end of file
... ...
... ... @@ -80,9 +80,9 @@ class CommonController extends WebAction
public function getbannerAction()
{
$url = 'http://service.api.yohobuy.com/operations/api/v4/resource/get?';
$content_code = $this->_get('content_code', '');
$client_type = $this->_get('client_type', 'web');
$callback = $this->_get('callback', '');
$content_code = $this->get('content_code', '');
$client_type = $this->get('client_type', 'web');
$callback = $this->get('callback', '');
$params = array(
'content_code' => $content_code,
'client_type' => $client_type
... ...
... ... @@ -3,6 +3,7 @@ use Action\WebAction;
use LibModels\Web\Passport\RegData;
use Passport\PassportModel;
use Plugin\Helpers;
use LibModels\Wap\Passport\BackData;
class BackController extends WebAction
{
... ... @@ -37,12 +38,15 @@ class BackController extends WebAction
public function emailAction()
{
$phoneNum = $this->post('phoneNum','');
$area = $this->post('area','86');
$captcha = $this->post('captcha','');
if(Helpers::verifyEmail($phoneNum)){ //验证邮箱
$email = $phoneNum;
BackData::sendCodeToEmail($email);
$this->redirect('sendemail');
} else if(Helpers::verifyMobile($phoneNum)) {//验证手机号
$mobile = $phoneNum;
BackData::sendCodeToMobile($mobile);
$this->redirect('verification');
}
}
... ...