Authored by biao

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

... ... @@ -358,7 +358,7 @@
{
picLink: {
//图片导航
title: 'AA', //图片导航标题
picTitle: 'AA', //图片导航标题
list: [
{
href: '',
... ... @@ -621,6 +621,20 @@
//路径导航
pathNav: [...],
//品牌入口
shopEntry: {
home: '',
logo: '',
shopName: '',
sort: [
{
href: '',
name: '上衣'
},
...
]
},
..//标准页面内容,见上
}
}
... ... @@ -641,20 +655,6 @@
brandAbout: '', //品牌介绍页传HTML文本,非品牌介绍页则不传
leftContent: [], //...
//品牌入口
shopEntry: {
home: '',
logo: '',
shopName: '',
sort: [
{
href: '',
name: '上衣'
},
...
]
},
//分类介绍
sortIntro: {
name: '',
... ...
... ... @@ -3,7 +3,6 @@
{{# passport}}
{{> passport/cover}}
<div class="content">
<form id="login-form" method="POST" action="/passport/login/login">
<ul class="login-ul">
<li class="relative clearfix">
<h2 class="title">会员登录</h2>
... ... @@ -26,7 +25,7 @@
</span>
</li>
<li class="relative">
<input id="password" class="password input va" name="password" type="text" placeholder="密码" autocomplete="off" maxlength="20">
<input id="password" class="password input va" name="password" type="password" placeholder="密码" autocomplete="off" maxlength="20">
<span id="caps-lock" class="caps-lock hide">大写状态开启</span>
<span class="err-tip hide">
<i></i>
... ... @@ -69,7 +68,6 @@
</li>
</ul>
<input id="country-code-hide" name="countryCode" type="hidden" value="{{countryCode}}">
</form>
</div>
{{/ passport}}
</div>
... ...
... ... @@ -34,32 +34,6 @@
{{> product/left-content}}
</div>
<div class="list-right pull-right">
{{# shopEntry}}
<div class="shop-entry clearfix">
<a class="pull-left" href="{{home}}">
<img class="logo" src="{{logo}}">
</a>
<div class="name pull-left">
<a class="shop-name" href="{{home}}">{{shopName}}</a>
<p class="sorts">
{{#each sort}}
<a href="{{href}}">{{name}}</a>
{{#unless @last}}
/
{{/unless}}
{{/each}}
</p>
</div>
<a class="entry-btn pull-right" href="{{home}}">
进入品牌店铺
<span class="iconfont">&#xe601;</span>
</a>
</div>
{{/ shopEntry}}
{{> product/standard-content}}
{{> product/latest-walk}}
... ...
... ... @@ -3,6 +3,32 @@
{{# search}}
{{> layout/path-nav}}
{{# shopEntry}}
<div class="shop-entry clearfix">
<a class="pull-left" href="{{home}}">
<img class="logo" src="{{logo}}">
</a>
<div class="name pull-left">
<a class="shop-name" href="{{home}}">{{shopName}}</a>
<p class="sorts">
{{#each sort}}
<a href="{{href}}">{{name}}</a>
{{#unless @last}}
/
{{/unless}}
{{/each}}
</p>
</div>
<a class="entry-btn pull-right" href="{{home}}">
进入品牌店铺
<span class="iconfont">&#xe601;</span>
</a>
</div>
{{/ shopEntry}}
{{> product/standard-content}}
{{> product/latest-walk}}
... ...
<p class="path-nav">
{{#if pathNav}}
<p class="path-nav">
{{#each pathNav}}
{{#if href}}
<a href="{{href}}">
... ... @@ -18,4 +19,5 @@
</span>
{{/if}}
{{/each}}
</p>
\ No newline at end of file
</p>
{{/if}}
\ No newline at end of file
... ...
... ... @@ -67,8 +67,8 @@
{{!-- 图片链接 --}}
{{# picLink}}
{{#if title}}
<h2 class="nav-pic-title">{{title}}</h2>
{{#if picTitle}}
<h2 class="nav-pic-title">{{picTitle}}</h2>
{{/if}}
<ul class="pic-nav">
{{#each list}}
... ...
... ... @@ -31,6 +31,8 @@ var checkbox = {
unchecked: '&#xe613;'
};
var authing = false;
var emailAcTime;
require('yoho.placeholder');
... ... @@ -46,7 +48,7 @@ function validateAccount() {
if (/^[0-9]+$/.test(account)) {
//如果是纯数字,则作为手机号码处理
if (mailPhoneRegx.phoneRegx['+' + $countryCodeHide.val()].test(account)) {
if (mailPhoneRegx.phoneRegx[$countryCodeHide.val()].test(account)) {
pass = true;
} else {
pass = false;
... ... @@ -97,6 +99,7 @@ function validatePassword() {
$passwordTip.removeClass('hide').children('em').text(err);
$password.addClass('error');
}
return pass;
}
//验证
... ... @@ -254,7 +257,29 @@ $('.va').on('focus', function() {
$('#login-btn').on('click', function() {
var pass = validate();
if (pass) {
$('#login-form').submit();
if (pass && authing === false) {
authing = true;
$.ajax({
url: '/passport/login/auth',
type: 'POST',
data: {
areaCode: $countryCodeHide.val().replace('+', ''),
account: $.trim($account.val()),
password: $.trim($password.val())
},
success: function(data) {
if (data.code === 400) {
$passwordTip.removeClass('hide').children('em').text(data.message);
$password.addClass('error');
return;
} else {
location.href = data.data.href;
}
},
complete: function() {
authing = false;
}
});
}
});
\ No newline at end of file
... ...