Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOBUYWAP
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
yyq
9 years ago
Commit
828c6f354d2209ace362a44c3559f57b71101313
1 parent
6b88f61d
修复商品分类排序异常
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
yohobuy/m.yohobuy.com/application/models/Category/Class.php
yohobuy/m.yohobuy.com/application/models/Category/Class.php
View file @
828c6f3
...
...
@@ -46,8 +46,9 @@ class ClassModel
$genderArr
=
array
(
'boy'
=>
'1,3'
,
'girl'
=>
'2,3'
,
'kids'
=>
'1,2,3'
,
'lifestyle'
=>
'1,2,3'
);
$oneClass
=
array
();
$item
=
array
();
foreach
(
$data
[
'data'
]
as
$k
=>
$v
)
{
$oneClass
=
array
(
'name'
=>
ucfirst
(
rtrim
(
$k
,
's'
)),
'ca'
=>
array
());
foreach
(
$genderArr
as
$gk
=>
$gv
)
{
$v
=
$data
[
'data'
][
$gk
];
$oneClass
=
array
(
'name'
=>
ucfirst
(
rtrim
(
$gk
,
's'
)),
'ca'
=>
array
());
foreach
(
$v
as
$val
)
{
$item
=
array
();
...
...
@@ -59,7 +60,7 @@ class ClassModel
$item
[
'url'
]
=
Helpers
::
url
(
'/'
,
array
(
'sort'
=>
$item
[
'id'
],
'sort_name'
=>
$item
[
'name'
],
'gender'
=>
$g
enderArr
[
$k
]
),
'list'
);
'gender'
=>
$g
v
),
'list'
);
$oneClass
[
'ca'
][]
=
$item
;
continue
;
}
...
...
@@ -71,7 +72,7 @@ class ClassModel
'url'
=>
Helpers
::
url
(
'/'
,
array
(
'sort'
=>
$item
[
'id'
],
'sort_name'
=>
$item
[
'name'
],
'gender'
=>
$g
enderArr
[
$k
]
),
'list'
)
'gender'
=>
$g
v
),
'list'
)
);
$subitem
=
array
();
...
...
@@ -82,7 +83,7 @@ class ClassModel
$subitem
[
'url'
]
=
Helpers
::
url
(
'/'
,
array
(
'sort'
=>
$value
[
'relation_parameter'
][
'sort'
],
'sort_name'
=>
$value
[
'category_name'
],
'gender'
=>
$g
enderArr
[
$k
]
'gender'
=>
$g
v
),
'list'
);
$item
[
'sub'
][]
=
$subitem
;
}
...
...
Please
register
or
login
to post a comment