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
zhangxiaoru
9 years ago
Commit
e0452da9b3d18397f58c5cd96063468828b934e9
1 parent
06c2e034
品牌
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
12 deletions
apps/brand/models/brand.js
public/js/brand/index.page.js
public/scss/me/order/_nav.css
apps/brand/models/brand.js
View file @
e0452da
'use strict'
;
const
serviceAPI
=
global
.
yoho
.
ServiceAPI
;
//
const serviceAPI = global.yoho.ServiceAPI;
const
api
=
global
.
yoho
.
API
;
const
camelCase
=
global
.
yoho
.
camelCase
;
const
_
=
require
(
'lodash'
);
const
logger
=
global
.
yoho
.
logger
;
const
_processListData
=
(
list
)
=>
{
let
category
=
{
key
:
''
,
brands
:
[]
};
// let category = {
// key: '',
// brands: []
// };
let
listData
=
[];
list
=
list
||
[];
list
=
camelCase
(
list
);
console
.
log
(
list
)
console
.
log
(
list
)
;
_
.
forEach
(
list
.
data
.
allList
,
function
(
value
,
index
)
{
...
...
@@ -39,7 +39,7 @@ const _processTabData = (list) => {
list
=
list
||
[];
list
=
camelCase
(
list
);
console
.
log
(
list
)
console
.
log
(
list
)
;
// let artList = list.list.artList.map(data =>{
// data.publishTime = data.publishTime.replace(/年|月/g, '/');
...
...
@@ -48,10 +48,10 @@ const _processTabData = (list) => {
// return data;
// });
}
}
;
const
_getResources
=
()
=>
{
return
api
.
get
(
''
,
{
return
api
.
get
(
''
,
{
method
:
'web.brand.series'
}).
then
((
result
)
=>
{
if
(
result
&&
result
.
code
===
200
)
{
...
...
@@ -64,7 +64,7 @@ const _getResources = () => {
};
const
_getBreakingSort
=
()
=>
{
return
api
.
get
(
''
,
{
return
api
.
get
(
''
,
{
method
:
'app.brand.newBrandList'
}).
then
((
result
)
=>
{
if
(
result
&&
result
.
code
===
200
)
{
...
...
public/js/brand/index.page.js
View file @
e0452da
...
...
@@ -32,7 +32,7 @@ $(window).scroll(function() {
$category
.
click
(
function
()
{
var
name
=
$
(
this
).
attr
(
'href'
).
split
(
'#'
)[
1
],
targetTop
=
$list
.
find
(
'[name='
+
name
+
']'
).
offset
().
top
-
categoryHeight
;
$
(
'.category-nav'
).
find
(
'a'
).
css
(
'color'
,
'#222'
);
$
(
this
).
css
(
'color'
,
'#379ed6'
);
...
...
public/scss/me/order/_nav.css
View file @
e0452da
...
...
@@ -13,7 +13,7 @@
min-width
:
16px
;
line-height
:
16px
;
display
:
inline-block
;
padding
:
0
px
5px
;
padding
:
0
5px
;
position
:
absolute
;
top
:
0
;
right
:
14px
;
...
...
Please
register
or
login
to post a comment