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
d263c6df717532f9d59d13f280de27f077ace1d9
1 parent
0bee7e33
修改列表页bug
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
15 additions
and
8 deletions
apps/product/controllers/list.js
apps/product/controllers/query.js
apps/product/controllers/shop.js
apps/product/models/helpers.js
apps/product/views/partial/list/order-area.hbs
public/js/product/list/list-search.js
apps/product/controllers/list.js
View file @
d263c6d
...
...
@@ -10,7 +10,7 @@ const list = {
index
:
(
req
,
res
,
next
)
=>
{
let
q
=
req
.
query
;
q
.
page
=
q
.
page
||
1
;
q
.
page
=
parseInt
(
q
.
page
||
1
,
10
)
;
let
retData
=
{
module
:
'product'
,
...
...
@@ -54,7 +54,7 @@ const list = {
newPage
:
(
req
,
res
,
next
)
=>
{
let
q
=
req
.
query
;
q
.
page
=
q
.
page
||
1
;
q
.
page
=
parseInt
(
q
.
page
||
1
,
10
)
;
let
retData
=
{
module
:
'product'
,
...
...
apps/product/controllers/query.js
View file @
d263c6d
...
...
@@ -17,7 +17,7 @@ const Query = {
index
:
(
req
,
res
,
next
)
=>
{
let
q
=
req
.
query
;
q
.
page
=
q
.
page
||
1
;
q
.
page
=
parseInt
(
q
.
page
||
1
,
10
)
;
let
retData
=
{
module
:
'product'
,
...
...
apps/product/controllers/shop.js
View file @
d263c6d
...
...
@@ -57,11 +57,16 @@ const shop = {
let
uid
=
cookie
.
getUid
(
req
);
let
q
=
req
.
query
;
q
.
page
=
q
.
page
||
1
;
q
.
page
=
parseInt
(
q
.
page
||
1
,
10
)
;
ShopData
.
getShopHeadData
(
domain
,
uid
).
then
(
result
=>
{
data
.
banner
=
result
;
if
(
data
.
banner
.
banner
)
{
data
.
banner
.
banner
=
data
.
banner
.
banner
.
split
(
'?'
)[
0
];
}
if
(
result
.
brandId
)
{
q
.
brand
=
result
.
brandId
;
q
.
shop_id
=
result
.
shopId
;
...
...
apps/product/models/helpers.js
View file @
d263c6d
...
...
@@ -166,7 +166,9 @@ const helpers = {
return
b
.
brandName
;
}).
join
(
'、'
);
filters
.
push
(
this
.
newFilter
(
'brand'
,
q
.
brand
,
brandNames
));
if
(
brandNames
)
{
filters
.
push
(
this
.
newFilter
(
'brand'
,
q
.
brand
,
brandNames
));
}
}
if
(
q
.
color
)
{
...
...
apps/product/views/partial/list/order-area.hbs
View file @
d263c6d
...
...
@@ -13,7 +13,7 @@
共
<span>
{{
total
}}
</span>
件商品
</label>
<label
class=
"page-info"
><span
class=
"cur-page"
>
{{
page
}}
</span>
/
<span
class=
"total-page"
>
{{
pageTotal
}}
</span></label>
{{#
isEqual
page
1
}}
{{#
isEqual
page
'1'
}}
<span
class=
"iconfont page disable page-pre"
>

</span>
{{^}}
<span
class=
"iconfont page page-pre"
>

</span>
...
...
public/js/product/list/list-search.js
View file @
d263c6d
...
...
@@ -176,11 +176,11 @@ var YohoListPage = {
if
(
!
$
(
this
).
hasClass
(
'disable'
))
{
if
(
$
(
this
).
hasClass
(
'page-pre'
))
{
YohoListPage
.
go
({
page
:
YohoListPage
.
page
-
1
page
:
parseInt
(
YohoListPage
.
page
,
10
)
-
1
});
}
else
{
YohoListPage
.
go
({
page
:
YohoListPage
.
page
+
1
page
:
parseInt
(
YohoListPage
.
page
,
10
)
+
1
});
}
}
...
...
Please
register
or
login
to post a comment