Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yoho-blk
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
1
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
姜枫
9 years ago
Commit
25fa35667e04ce617649b939ffbaa75de91ad1b0
1 parent
2d1175bb
fix bug 1018
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
14 additions
and
9 deletions
apps/product/controllers/list.js
apps/product/controllers/query.js
apps/product/controllers/shop.js
apps/product/views/partial/list/shop-sort.hbs
config/common.js
public/js/me/setting.page.js
public/scss/product/_shop.css
apps/product/controllers/list.js
View file @
25fa356
...
...
@@ -17,7 +17,7 @@ const list = {
// 列表页
index
:
(
req
,
res
,
next
)
=>
{
let
q
=
req
.
query
;
let
channel
=
req
.
cookies
.
_Channel
||
req
.
query
.
_Channel
||
'men'
;
let
channel
=
req
.
query
.
_Channel
||
req
.
cookies
.
_Channel
||
'men'
;
q
.
page
=
parseInt
(
q
.
page
||
1
,
10
);
q
.
order
=
q
.
order
||
's_n_desc'
;
...
...
@@ -69,7 +69,7 @@ const list = {
// 新品到着
newPage
:
(
req
,
res
,
next
)
=>
{
let
q
=
req
.
query
;
let
channel
=
req
.
cookies
.
_Channel
||
req
.
query
.
_Channel
||
'men'
;
let
channel
=
req
.
query
.
_Channel
||
req
.
cookies
.
_Channel
||
'men'
;
q
.
page
=
parseInt
(
q
.
page
||
1
,
10
);
q
.
order
=
q
.
order
||
's_n_desc'
;
...
...
apps/product/controllers/query.js
View file @
25fa356
...
...
@@ -17,7 +17,7 @@ const Query = {
index
:
(
req
,
res
,
next
)
=>
{
let
q
=
req
.
query
;
let
query
=
q
.
query
||
''
;
let
channel
=
req
.
cookies
.
_Channel
||
req
.
query
.
_Channel
||
'men'
;
let
channel
=
req
.
query
.
_Channel
||
req
.
cookies
.
_Channel
||
'men'
;
q
.
page
=
parseInt
(
q
.
page
||
1
,
10
);
q
.
order
=
q
.
order
||
's_n_desc'
;
...
...
apps/product/controllers/shop.js
View file @
25fa356
...
...
@@ -91,7 +91,8 @@ const shop = {
page
:
'shop-list'
,
title
:
'店铺列表'
};
let
nav
=
[
DataHelper
.
getChannelNav
()];
let
channel
=
req
.
query
.
_Channel
||
req
.
cookies
.
_Channel
||
'men'
;
let
nav
=
[
DataHelper
.
getChannelNav
(
channel
)];
let
domain
=
req
.
params
.
domain
;
let
uid
=
req
.
user
.
uid
;
let
q
=
req
.
query
;
...
...
@@ -99,6 +100,7 @@ const shop = {
q
.
order
=
q
.
order
||
's_n_desc'
;
q
.
page
=
parseInt
(
q
.
page
||
1
,
10
);
q
.
channel
=
channel
;
ShopData
.
getShopHeadData
(
domain
,
uid
).
then
(
result
=>
{
data
.
banner
=
result
;
...
...
apps/product/views/partial/list/shop-sort.hbs
View file @
25fa356
<div
class=
"shop-sort"
>
<div
class=
"all"
>
所有商品
</div>
<div
class=
"sort-list"
>
<div><a
href=
"
{{
@root
.
mores
.
all
.
url
}}
?gender=2,3"
>
女装
</a></div>
<div><a
href=
"
{{
@root
.
mores
.
all
.
url
}}
?gender=1,3"
>
男装
</a></div>
<div><a
href=
"
{{
@root
.
mores
.
all
.
url
}}
?gender=1,3"
>
男士
</a></div>
<div><a
href=
"
{{
@root
.
mores
.
all
.
url
}}
?gender=2,3"
>
女士
</a></div>
<div><a
href=
"
{{
@root
.
mores
.
all
.
url
}}
?_Channel=lifestyle"
>
生活
</a></div>
{{#
each
banner
.
sorts
}}
<div><a
href=
"
{{
@root
.
mores
.
all
.
url
}}
?misort=
{{
sortId
}}
"
>
{{
sortName
}}
</a></div>
{{/
each
}}
...
...
config/common.js
View file @
25fa356
...
...
@@ -22,8 +22,8 @@ module.exports = {
},
cookieDomain
:
'yohoblk.com'
,
domains
:
{
api
:
'http://api-test1.yohops.com:9999/'
,
// devapi.yoho.cn:58078 testapi.yoho.cn:28078 devapi.yoho.cn:58078
service
:
'http://service-test1.yohops.com:9999/'
,
// testservice.yoho.cn:28077 devservice.yoho.cn:58077
api
:
'http://dev-api.yohops.com:9999/'
,
// devapi.yoho.cn:58078 testapi.yoho.cn:28078 devapi.yoho.cn:58078
service
:
'http://dev-service.yohops.com:9999/'
,
// testservice.yoho.cn:28077 devservice.yoho.cn:58077
search
:
'http://192.168.102.216:8080/yohosearch/'
},
useOneapm
:
false
,
...
...
public/js/me/setting.page.js
View file @
25fa356
...
...
@@ -34,7 +34,7 @@ var Bll = {
},
validate
:
function
(
info
)
{
var
regBirth
=
new
RegExp
(
/^
[
1-2
][
0-9
][
0-9
][
0-9
]
-
[
0-1
]{0,1}[
0-9
]
-
[
0-3
]{0,1}[
0-9
]
$/
);
var
regName
=
new
RegExp
(
/^
[\u
4e00-
\u
9fa5_
-a-zA-Z0-9
]
+$/
);
var
regName
=
new
RegExp
(
/^
[\u
4e00-
\u
9fa5_
a-zA-Z0-9-
]
+$/
);
var
regRealName
=
new
RegExp
(
/^
[\u
4e00-
\u
9fa5a-zA-Z
]{2,12}
$/
);
var
birthdayForm
=
$
(
'#birthday'
);
var
nickForm
=
$
(
'#nick_name'
);
...
...
public/scss/product/_shop.css
View file @
25fa356
...
...
@@ -233,6 +233,8 @@
float
:
left
;
height
:
30px
;
line-height
:
30px
;
width
:
1000px
;
overflow
:
hidden
;
div
{
float
:
left
;
margin
:
0
5px
;
...
...
Please
register
or
login
to post a comment