Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
semour
/
semour_web
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
492d8d42
authored
Apr 26, 2023
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
品牌只展示有英文简称的
parent
047edd38
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
app/Http/Services/BrandService.php
resources/views/brand/map.blade.php
app/Http/Services/BrandService.php
View file @
492d8d42
...
...
@@ -46,17 +46,21 @@ class BrandService
$letters
=
generate_letters
();
$standardBrandList
=
[];
foreach
(
$standardBrandCache
as
$standardBrand
)
{
if
(
empty
(
$standardBrand
[
'brand_short_name_en'
]))
{
continue
;
}
$matchLetter
=
false
;
foreach
(
$letters
as
$letter
)
{
if
(
start_with
(
strtoupper
(
$standardBrand
[
'brand_name'
]),
$letter
))
{
if
(
empty
(
$standardBrand
[
'brand_name_en'
]))
{
//brand_short_name_en
if
(
start_with
(
strtoupper
(
$standardBrand
[
'brand_short_name_en'
]),
$letter
))
{
if
(
empty
(
$standardBrand
[
'brand_short_name_en'
]))
{
continue
;
}
$standardBrandList
[
$letter
][]
=
$standardBrand
;
$matchLetter
=
true
;
}
}
if
(
!
$matchLetter
&&
!
empty
(
$standardBrand
[
'brand_name_en'
]))
{
if
(
!
$matchLetter
&&
!
empty
(
$standardBrand
[
'brand_
short_
name_en'
]))
{
$standardBrandList
[
'#'
][]
=
$standardBrand
;
}
}
...
...
resources/views/brand/map.blade.php
View file @
492d8d42
...
...
@@ -58,7 +58,7 @@
<div class="
ttl
">
{
{$key}
}
</div>
<div class="
ttc
row
boxsiz
">
@foreach (
$item
as
$itemchild
)
<a href="
/
brand
/
{{
$itemchild
[
'standard_brand_id'
]}}
" >
{
{$itemchild['brand_name_en']}
}
</a>
<a href="
/
brand
/
{{
$itemchild
[
'standard_brand_id'
]}}
" >
{
{$itemchild['brand_
short_
name_en']}
}
</a>
@endforeach
</div>
</div>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment