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
xuqi
10 years ago
Commit
dc43eb3ea7b5d74cf9715bebf599939d77a39224
2 parents
e61c68bd
a5bb21b7
Merge branch 'develop' of
http://git.dev.yoho.cn/web/yohobuy
into develop
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
44 additions
and
3 deletions
framework
static/sass/category/_brand.scss
yohobuy/m.yohobuy.com/application/models/Category/Class.php
framework
@
119c247f
Subproject commit
75bbc3b075de19f239532f60c5995d06c5f814e2
Subproject commit
119c247f5cf929aa1e059e40609bb16dd6b58f05
...
...
static/sass/category/_brand.scss
View file @
dc43eb3
...
...
@@ -98,7 +98,8 @@
position
:
fixed
;
right
:
1px
;
border-radius
:
6px
;
background
:
rgba
(
0
,
0
,
0
,.
8
);
background
:
rgba
(
0
,
0
,
0
,.
8
);
z-index
:
2
;
b
{
height
:
16px
;
...
...
yohobuy/m.yohobuy.com/application/models/Category/Class.php
View file @
dc43eb3
...
...
@@ -108,11 +108,51 @@ class ClassModel
foreach
(
$classesData
as
$val
)
{
foreach
(
$val
[
'ca'
]
as
$single
)
{
$classes
[
$single
[
'id'
]]
=
$single
[
'name'
];
$classes
+=
array_column
(
$single
[
'sub'
],
'name'
,
'id'
);
$classes
+=
self
::
array_column
(
$single
[
'sub'
],
'name'
,
'id'
);
}
}
return
$classes
;
}
/**
* 自定义array_column函数
*
* @return array 返回数组中指定的一列组成的数组
*/
/**
* 自定义array_column函数
* @param array $input 需要取出数组咧的多维数组
* @param string $columnKey 需要返回的列
* @param mixed $indexKey 作为返回数组的索引值
* @return array 从多维数组中返回单列数组
*/
private
static
function
array_column
(
array
$input
,
$columnKey
,
$indexKey
=
null
)
{
$array
=
array
();
foreach
(
$input
as
$value
)
{
if
(
!
isset
(
$value
[
$columnKey
]))
{
trigger_error
(
"Key
\"
$columnKey
\"
does not exist in array"
);
return
false
;
}
if
(
is_null
(
$indexKey
))
{
$array
[]
=
$value
[
$columnKey
];
}
else
{
if
(
!
isset
(
$value
[
$indexKey
]))
{
trigger_error
(
"Key
\"
$indexKey
\"
does not exist in array"
);
return
false
;
}
if
(
!
is_scalar
(
$value
[
$indexKey
]))
{
trigger_error
(
"Key
\"
$indexKey
\"
does not contain scalar value"
);
return
false
;
}
$array
[
$value
[
$indexKey
]]
=
$value
[
$columnKey
];
}
}
return
$array
;
}
}
...
...
Please
register
or
login
to post a comment