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
cef27554e36519ab21fa6818182e4920f87c92d5
1 parent
55e9cfee
fix bugs
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
33 additions
and
26 deletions
apps/product/controllers/list.js
apps/product/models/search.js
apps/product/models/shop-service.js
apps/product/views/partial/list/filter.hbs
public/js/product/list/list-search.js
apps/product/controllers/list.js
View file @
cef2755
...
...
@@ -103,8 +103,9 @@ const list = {
data
.
filter
.
groupSort
=
DataHelper
.
sortConvert
(
sortData
.
data
.
sort
);
retData
.
filter
=
DataHelper
.
filterHandle
(
data
.
filter
,
q
);
retData
.
filter
.
showPrice
=
data
.
total
>
10
;
retData
.
filter
.
showInfo
=
(
retData
.
filter
.
style
&&
retData
.
filter
.
style
.
length
>
0
)
||
(
data
.
standard
&&
data
.
standard
.
length
>
0
);
//eslint-disable-line
// retData.filter.showInfo = (retData.filter.style && retData.filter.style.length > 0)
// || (data.standard && data.standard.length > 0); //eslint-disable-line
}
retData
.
navPath
=
{
...
...
apps/product/models/search.js
View file @
cef2755
...
...
@@ -35,24 +35,24 @@ function _paramHanlde(obj) {
// obj.standard = JSON.stringify(standards);
// }
let
_gender
;
if
(
obj
.
yh_channel
)
{
switch
(
obj
.
yh_channel
)
{
case
'men'
:
_gender
=
'1,3'
;
break
;
case
'women'
:
_gender
=
'2,3'
;
break
;
default
:
break
;
}
}
// let _gender;
//
// if (obj.yh_channel) {
// switch (obj.yh_channel) {
// case 'men':
// _gender = '1,3';
// break;
// case 'women':
// _gender = '2,3';
// break;
// default:
// break;
// }
// }
if
(
obj
.
gender
||
_gender
)
{
obj
.
gender
=
obj
.
gender
||
_gender
;
}
// if (obj.gender || _gender) {
// obj.gender = obj.gender || _gender;
// }
return
obj
;
}
...
...
apps/product/models/shop-service.js
View file @
cef2755
...
...
@@ -157,15 +157,16 @@ const ShopService = {
}
info
.
resources
=
resources
;
info
.
menus
=
shopMenu
(
domain
,
resources
.
navigationBar
);
}
else
{
}
if
(
info
.
brandId
)
{
let
brandInfo
=
yield
BrandService
.
getBrandInfo
(
info
.
brandId
,
uid
);
info
.
name
=
brandInfo
.
brandName
;
info
.
name
=
info
.
name
||
brandInfo
.
brandName
;
// info.info = brandInfo.brandIntro;
info
.
btnName
=
'品牌介绍'
;
info
.
isFavorite
=
brandInfo
.
isFavorite
===
'Y'
;
info
.
banner
=
info
.
brandBanner
;
info
.
isFavorite
=
info
.
isFavorite
||
(
brandInfo
.
isFavorite
===
'Y'
);
info
.
banner
=
info
.
banner
||
info
.
brandBanner
;
}
return
info
;
})();
...
...
apps/product/views/partial/list/filter.hbs
View file @
cef2755
...
...
@@ -171,7 +171,7 @@
<div
class=
"style-body nano"
>
<div
class=
"nano-content"
>
{{#
each
style
}}
<div
class=
"input-radio"
data-value=
"
{{
styleId
}}
"
>
<div
class=
"input-radio
{{#if
checked
}}
default-check
{{/if}}
"
data-value=
"
{{
styleId
}}
"
>
{{>
icon
/
radio
}}
<label>
{{
styleName
}}
</label>
</div>
...
...
public/js/product/list/list-search.js
View file @
cef2755
...
...
@@ -342,6 +342,10 @@ var YohoListPage = {
$
(
'.style-body .input-radio'
,
this
.
rootDoc
).
check
({
type
:
'radio'
});
$
(
'.style-body .input-radio.default-check'
,
this
.
rootDoc
).
check
({
type
:
'radio'
,
checked
:
true
});
YohoListPage
.
mulitStyle
=
false
;
$
(
'.style-mulit-btn .btn'
).
addClass
(
'white'
);
},
...
...
@@ -357,6 +361,7 @@ var YohoListPage = {
filterBrand
:
function
(
letter
)
{
$
(
'.yoho-product-list .brand-list .input-radio'
).
each
(
function
()
{
var
first
=
$
(
this
).
data
(
'word'
).
toString
();
// eslint-disable-line
var
name
=
$
(
this
).
find
(
'label'
).
text
().
toLowerCase
();
first
=
first
.
toLowerCase
();
if
(
letter
===
'0-9'
)
{
...
...
@@ -366,7 +371,7 @@ var YohoListPage = {
$
(
this
).
show
();
}
}
else
{
if
(
!
letter
||
first
===
letter
)
{
if
(
!
letter
||
first
===
letter
||
name
.
indexOf
(
letter
)
===
0
)
{
$
(
this
).
show
();
}
else
{
$
(
this
).
hide
();
...
...
@@ -449,7 +454,7 @@ var YohoListPage = {
},
go
:
function
(
q
)
{
var
qs
=
$
.
extend
(
common
.
queryString
(),
q
);
var
qs
=
$
.
extend
(
common
.
queryString
(),
q
,
{
page
:
q
.
page
||
1
}
);
location
.
search
=
$
.
param
(
qs
);
},
...
...
Please
register
or
login
to post a comment