Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOBUYPC
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
2
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Plain Diff
Browse Files
Authored by
biao
9 years ago
Commit
674f56b8c179b35a18fd4d937594f6392f53d9b8
2 parents
7d38f4ea
75401405
Merge branch 'develop' of
http://git.dev.yoho.cn/web/yohobuy
into fix/issue
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
215 additions
and
190 deletions
docs/web-data-structure.md
template/www.yohobuy.com/actions/passport/login/index.phtml
template/www.yohobuy.com/actions/product/list/list.phtml
template/www.yohobuy.com/actions/product/list/search.phtml
template/www.yohobuy.com/partials/layout/path-nav.phtml
template/www.yohobuy.com/partials/product/left-content.phtml
web-static/js/passport/login.js
docs/web-data-structure.md
View file @
674f56b
...
...
@@ -358,7 +358,7 @@
{
picLink: {
//图片导航
t
itle: 'AA', //图片导航标题
picT
itle: '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: '',
...
...
template/www.yohobuy.com/actions/passport/login/index.phtml
View file @
674f56b
...
...
@@ -3,73 +3,71 @@
{
{#
passport
}
}
{
{>
passport/cover
}
}
<div
class=
"content"
>
<form
id=
"login-form"
method=
"POST"
action=
"/passport/login/login"
>
<ul
class=
"login-ul"
>
<li
class=
"relative clearfix"
>
<h
2
class=
"title"
>会员登录</h
2
>
<span
id=
"country-code"
class=
"country-code right"
>
<em>
{
{countryName
}
}
{
{countryCode
}
}</em>
<i
class=
"iconfont"
>
600
;</i>
<ul
id=
"country-list"
class=
"country-list"
>
{
{#each
countryList
}
}
<li
data-cc=
"{{areaCode}}"
>
{
{name
}
}
{
{areaCode
}
}</li>
{
{/each
}
}
</ul>
</span>
</li>
<li
class=
"relative"
>
<input
id=
"account"
class=
"account input va"
name=
"account"
type=
"text"
placeholder=
"邮箱/手机号码"
autocomplete=
"off"
>
<ul
id=
"email-autocomplete"
class=
"email-autocomplete hide"
></ul>
<span
class=
"err-tip hide"
>
<i></i>
<em></em>
</span>
</li>
<li
class=
"relative"
>
<input
id=
"password"
class=
"password input va"
name=
"password"
type=
"text"
placeholder=
"密码"
autocomplete=
"off"
maxlength=
"20"
>
<span
id=
"caps-lock"
class=
"caps-lock hide"
>大写状态开启</span>
<span
class=
"err-tip hide"
>
<i></i>
<em>请输入密码</em>
</span>
</li>
<li>
<span
id=
"login-btn"
class=
"login-btn btn"
>登录</span>
</li>
<li
class=
"other-opts"
>
<span
class=
"remeber-me"
>
<i
class=
"iconfont"
>
613
;</i>
记住登录状态
</span>
<span
class=
"right"
>
<a
class=
"forget-password"
href=
"{{forgetPwd}}"
>忘记密码?</a>
|
<a
class=
"fast-reg"
href=
"{{fastReg}}"
>快速注册</a>
</span>
</li>
<li
class=
"third-party-login"
>
<a
href=
"{{weixinLogin}}"
>
<span
class=
"icon weixin"
></span>
</a>
<a
href=
"{{qqLogin}}"
>
<span
class=
"icon qq"
></span>
</a>
<a
href=
"{{weiboLogin}}"
>
<span
class=
"icon weibo"
></span>
</a>
<a
href=
"{{alipayLogin}}"
>
<span
class=
"icon alipay"
></span>
</a>
<a
href=
"{{doubanLogin}}"
>
<span
class=
"icon douban"
></span>
</a>
<a
href=
"{{renrenLogin}}"
>
<span
class=
"icon renren"
></span>
</a>
</li>
</ul>
<input
id=
"country-code-hide"
name=
"countryCode"
type=
"hidden"
value=
"{{countryCode}}"
>
</form>
<ul
class=
"login-ul"
>
<li
class=
"relative clearfix"
>
<h
2
class=
"title"
>会员登录</h
2
>
<span
id=
"country-code"
class=
"country-code right"
>
<em>
{
{countryName
}
}
{
{countryCode
}
}</em>
<i
class=
"iconfont"
>
600
;</i>
<ul
id=
"country-list"
class=
"country-list"
>
{
{#each
countryList
}
}
<li
data-cc=
"{{areaCode}}"
>
{
{name
}
}
{
{areaCode
}
}</li>
{
{/each
}
}
</ul>
</span>
</li>
<li
class=
"relative"
>
<input
id=
"account"
class=
"account input va"
name=
"account"
type=
"text"
placeholder=
"邮箱/手机号码"
autocomplete=
"off"
>
<ul
id=
"email-autocomplete"
class=
"email-autocomplete hide"
></ul>
<span
class=
"err-tip hide"
>
<i></i>
<em></em>
</span>
</li>
<li
class=
"relative"
>
<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>
<em>请输入密码</em>
</span>
</li>
<li>
<span
id=
"login-btn"
class=
"login-btn btn"
>登录</span>
</li>
<li
class=
"other-opts"
>
<span
class=
"remeber-me"
>
<i
class=
"iconfont"
>
613
;</i>
记住登录状态
</span>
<span
class=
"right"
>
<a
class=
"forget-password"
href=
"{{forgetPwd}}"
>忘记密码?</a>
|
<a
class=
"fast-reg"
href=
"{{fastReg}}"
>快速注册</a>
</span>
</li>
<li
class=
"third-party-login"
>
<a
href=
"{{weixinLogin}}"
>
<span
class=
"icon weixin"
></span>
</a>
<a
href=
"{{qqLogin}}"
>
<span
class=
"icon qq"
></span>
</a>
<a
href=
"{{weiboLogin}}"
>
<span
class=
"icon weibo"
></span>
</a>
<a
href=
"{{alipayLogin}}"
>
<span
class=
"icon alipay"
></span>
</a>
<a
href=
"{{doubanLogin}}"
>
<span
class=
"icon douban"
></span>
</a>
<a
href=
"{{renrenLogin}}"
>
<span
class=
"icon renren"
></span>
</a>
</li>
</ul>
<input
id=
"country-code-hide"
name=
"countryCode"
type=
"hidden"
value=
"{{countryCode}}"
>
</div>
{
{/
passport
}
}
</div>
...
...
template/www.yohobuy.com/actions/product/list/list.phtml
View file @
674f56b
{
{>
layout/header
}
}
<div
class=
"product-list-page product-page yoho-page"
>
{
{#
list
}
}
{
{#
brandBanner
}
}
<div
class=
"brand-banner"
>
<div
class=
"banner-img"
style=
"height: {{bannerHeight}}px;background: url({{banner}})"
></div>
<div
class=
"opt-wrap"
>
<p
class=
"opt center-content"
>
<a
href=
"{{brandHome}}"
>
<i
class=
"iconfont"
>
617
;</i>
品牌首页
</a>
<a
href=
"{{brandIntro}}"
>
<i
class=
"iconfont"
>
618
;</i>
品牌介绍
</a>
{
{#
brandBanner
}
}
<div
class=
"brand-banner"
>
<div
class=
"banner-img"
style=
"height: {{bannerHeight}}px;background: url({{banner}})"
></div>
<div
class=
"opt-wrap"
>
<p
class=
"opt center-content"
>
<a
href=
"{{brandHome}}"
>
<i
class=
"iconfont"
>
617
;</i>
品牌首页
</a>
<a
href=
"{{brandIntro}}"
>
<i
class=
"iconfont"
>
618
;</i>
品牌介绍
</a>
<span
id=
"brand-favor"
class=
"brand-favor"
>
<i
class=
"iconfont{{#if coled}} coled{{/if}}"
>
616
;</i>
</span>
</p>
</div>
</div>
{
{/
brandBanner
}
}
<div
class=
"center-content clearfix"
>
{
{>
layout/path-nav
}
}
{
{#
brandAbout
}
}
<div
class=
"brand-about"
>
{
{{brandIntro
}
}}
</div>
{
{^
}
}
<div
class=
"list-left pull-left"
>
{
{>
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"
>
601
;</span>
</a>
</div>
{
{/
shopEntry
}
}
{
{/
brandBanner
}
}
<div
class=
"center-content clearfix"
>
{
{>
layout/path-nav
}
}
{
{>
product/standard-content
}
}
{
{#
brandAbout
}
}
<div
class=
"brand-about"
>
{
{{brandIntro
}
}}
</div>
{
{^
}
}
<div
class=
"list-left pull-left"
>
{
{>
product/left-content
}
}
</div>
<div
class=
"list-right pull-right"
>
{
{>
product/standard-content
}
}
{
{>
product/latest-walk
}
}
{
{>
product/latest-walk
}
}
</div>
{
{/
brandAbout
}
}
</div>
{
{/
brandAbout
}
}
</div>
{
{/
list
}
}
</div>
{
{>
layout/footer
}
}
\ No newline at end of file
...
...
template/www.yohobuy.com/actions/product/list/search.phtml
View file @
674f56b
{
{>
layout/header
}
}
<div
class=
"product-search-page product-page yoho-page center-content"
>
{
{#
search
}
}
{
{>
layout/path-nav
}
}
{
{>
layout/path-nav
}
}
{
{>
product/standard-content
}
}
{
{#
shopEntry
}
}
<div
class=
"shop-entry clearfix"
>
<a
class=
"pull-left"
href=
"{{home}}"
>
<img
class=
"logo"
src=
"{{logo}}"
>
</a>
{
{>
product/latest-walk
}
}
<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"
>
601
;</span>
</a>
</div>
{
{/
shopEntry
}
}
{
{>
product/standard-content
}
}
{
{>
product/latest-walk
}
}
{
{/
search
}
}
</div>
{
{>
layout/footer
}
}
\ No newline at end of file
...
...
template/www.yohobuy.com/partials/layout/path-nav.phtml
View file @
674f56b
<p class="path-nav">
{{#each pathNav}}
{{#if href}}
<a href="{{href}}">
{{name}}
{
{#if
pathNav
}
}
<p
class=
"path-nav"
>
{
{#each
pathNav
}
}
{
{#if
href
}
}
<a
href=
"{{href}}"
>
{
{name
}
}
{{#unless @last}}
<span class="iconfont"></span>
{{/unless}}
</a>
{{^}}
<span>
{{name}}
{
{#unless
@last
}
}
<span
class=
"iconfont"
>
601
;</span>
{
{/unless
}
}
</a>
{
{^
}
}
<span>
{
{name
}
}
{{#unless @last}}
<i class="iconfont"></i>
{{/unless}}
</span>
{{/if}}
{{/each}}
</p>
\ No newline at end of file
{
{#unless
@last
}
}
<i
class=
"iconfont"
>
601
;</i>
{
{/unless
}
}
</span>
{
{/if
}
}
{
{/each
}
}
</p>
{
{/if
}
}
\ No newline at end of file
...
...
template/www.yohobuy.com/partials/product/left-content.phtml
View file @
674f56b
...
...
@@ -38,37 +38,37 @@
{
{!--
全部品类--
}
}
{
{#
allSort
}
}
<div
class=
"sort-container"
>
<h
2
>
全部品类
<span>
{
{updateNum
}
}</span>
</h
2
>
<ul>
{
{#each
list
}
}
<li
class=
"product-list-nav {{#if active}}active{{/if}}"
>
<h
3
>
<span
class=
"icon-triangle"
></span>
{
{name
}
}
<span>
{
{num
}
}</span>
</h
3
>
<ul
class=
"sort-child-list"
>
{
{#each
childList
}
}
<li
class=
"{{#if childActive}}active{{/if}}"
>
<a
href=
"{{href}}"
>
{
{name
}
}</a>
<span>
{
{num
}
}</span>
</li>
{
{/each
}
}
</ul>
</li>
{
{/each
}
}
</ul>
</div>
<div
class=
"sort-container"
>
<h
2
>
全部品类
<span>
{
{updateNum
}
}</span>
</h
2
>
<ul>
{
{#each
list
}
}
<li
class=
"product-list-nav {{#if active}}active{{/if}}"
>
<h
3
>
<span
class=
"icon-triangle"
></span>
{
{name
}
}
<span>
{
{num
}
}</span>
</h
3
>
<ul
class=
"sort-child-list"
>
{
{#each
childList
}
}
<li
class=
"{{#if childActive}}active{{/if}}"
>
<a
href=
"{{href}}"
>
{
{name
}
}</a>
<span>
{
{num
}
}</span>
</li>
{
{/each
}
}
</ul>
</li>
{
{/each
}
}
</ul>
</div>
{
{/
allSort
}
}
{
{!--
图片链接
--
}
}
{
{#
picLink
}
}
{
{#if
title
}
}
<h
2
class=
"nav-pic-title"
>
{
{title
}
}</h
2
>
{
{#if
picTitle
}
}
<h
2
class=
"nav-pic-title"
>
{
{picTitle
}
}</h
2
>
{
{/if
}
}
<ul
class=
"pic-nav"
>
{
{#each
list
}
}
...
...
web-static/js/passport/login.js
View file @
674f56b
...
...
@@ -31,6 +31,8 @@ var checkbox = {
unchecked
:
''
};
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
...
...
Please
register
or
login
to post a comment