Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
fashion_group
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
章建武
fashion_group
Commits
a185017b
Commit
a185017b
authored
May 30, 2020
by
章建武
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dep
parent
4d7ec620
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
5 deletions
+35
-5
AboutController.php
app/Http/Controllers/Index/AboutController.php
+31
-1
IndexController.php
app/Http/Controllers/Index/IndexController.php
+1
-1
home.blade.php
resources/views/Layouts/home.blade.php
+2
-2
sub.blade.php
resources/views/Layouts/sub.blade.php
+1
-1
No files found.
app/Http/Controllers/Index/AboutController.php
View file @
a185017b
...
@@ -4,6 +4,7 @@ use App\Http\Controllers\Controller;
...
@@ -4,6 +4,7 @@ use App\Http\Controllers\Controller;
use
Moell\LayuiAdmin\Models\IndexAbout
;
use
Moell\LayuiAdmin\Models\IndexAbout
;
use
Moell\LayuiAdmin\Models\AddManager
;
use
Moell\LayuiAdmin\Models\AddManager
;
use
Illuminate\Support\Facades\Storage
;
use
Illuminate\Support\Facades\Storage
;
use
Moell\LayuiAdmin\Models\IndexNavigation
;
/**
/**
* Created by PhpStorm.
* Created by PhpStorm.
* User: Administrator
* User: Administrator
...
@@ -22,9 +23,15 @@ class AboutController extends Controller
...
@@ -22,9 +23,15 @@ class AboutController extends Controller
if
(
$en
==
'en'
){
if
(
$en
==
'en'
){
$language_type
=
1
;
$language_type
=
1
;
$en_url
=
$_SERVER
[
'REQUEST_URI'
];
$zh_url
=
substr
(
$_SERVER
[
'REQUEST_URI'
],
3
);
}
else
{
}
else
{
$language_type
=
0
;
$language_type
=
0
;
$en_url
=
'/en'
.
$_SERVER
[
'REQUEST_URI'
];
$zh_url
=
$_SERVER
[
'REQUEST_URI'
];
}
}
$zh
=
$zh_url
;
$en
=
$en_url
;
$about
=
IndexAbout
::
query
()
$about
=
IndexAbout
::
query
()
->
where
(
'language_type'
,
$language_type
)
->
where
(
'language_type'
,
$language_type
)
->
orderBy
(
'sequence'
,
'asc'
)
->
orderBy
(
'sequence'
,
'asc'
)
...
@@ -34,7 +41,30 @@ class AboutController extends Controller
...
@@ -34,7 +41,30 @@ class AboutController extends Controller
->
where
(
'language_type'
,
$language_type
)
->
where
(
'language_type'
,
$language_type
)
->
orderBy
(
'sort'
,
'asc'
)
->
orderBy
(
'sort'
,
'asc'
)
->
get
();
->
get
();
return
view
(
'index.about.about'
,
compact
(
'about'
))
->
with
(
'manager'
,
$manager
);
$navigation
=
IndexNavigation
::
query
()
->
where
(
'is_link'
,
0
)
->
where
(
'parent_id'
,
0
)
->
where
(
'is_show'
,
0
)
->
where
(
'language_type'
,
$language_type
)
->
orderBy
(
'id'
,
'asc'
)
->
get
()
->
toArray
();
foreach
(
$navigation
as
$k
=>
&
$v
){
$children
=
IndexNavigation
::
query
()
->
where
(
'is_link'
,
0
)
->
where
(
'is_show'
,
0
)
->
where
(
'parent_id'
,
$v
[
'id'
])
->
get
()
->
toArray
();
$v
[
'children'
]
=
$children
;
}
return
view
(
'index.about.about'
,
compact
(
'about'
))
->
with
(
'IndexNav'
,
$navigation
)
->
with
(
'language_type'
,
$language_type
)
->
with
(
'zh'
,
$zh
)
->
with
(
'en'
,
$en
)
->
with
(
'manager'
,
$manager
);
}
}
public
function
groupStrategy
()
public
function
groupStrategy
()
...
...
app/Http/Controllers/Index/IndexController.php
View file @
a185017b
...
@@ -100,7 +100,7 @@ class IndexController extends Controller
...
@@ -100,7 +100,7 @@ class IndexController extends Controller
$v
[
'children'
]
=
$children
;
$v
[
'children'
]
=
$children
;
}
}
return
view
(
'
i
ndex.index'
)
return
view
(
'
I
ndex.index'
)
->
with
(
'banner1'
,
$banner1
)
->
with
(
'banner1'
,
$banner1
)
->
with
(
'banner2'
,
$banner2
)
->
with
(
'banner2'
,
$banner2
)
->
with
(
'banner3'
,
$banner3
)
->
with
(
'banner3'
,
$banner3
)
...
...
resources/views/Layouts/home.blade.php
View file @
a185017b
...
@@ -61,7 +61,7 @@
...
@@ -61,7 +61,7 @@
<span
class=
"sr-only"
>
Toggle navigation
</span>
<span
class=
"sr-only"
>
Toggle navigation
</span>
<i
class=
"icon-menu"
></i>
<i
class=
"icon-menu"
></i>
</button>
</button>
<a
class=
"language"
style=
"cursor: pointer"
href=
"{{url('
index
')}}"
>
<a
class=
"language"
style=
"cursor: pointer"
href=
"{{url('')}}"
>
<span
class=
"zh"
>
中文
</span>
<span
class=
"zh"
>
中文
</span>
</a>
</a>
<a
class=
"language1"
style=
"cursor: pointer;"
href=
"{{url('en/index')}}"
>
<a
class=
"language1"
style=
"cursor: pointer;"
href=
"{{url('en/index')}}"
>
...
@@ -83,7 +83,7 @@
...
@@ -83,7 +83,7 @@
<a
href=
"{{url('en/index')}}"
>
Home
</a>
<a
href=
"{{url('en/index')}}"
>
Home
</a>
@else
@else
<a
href=
"{{url('
index
')}}"
>
首页
</a>
<a
href=
"{{url('')}}"
>
首页
</a>
@endif
@endif
</li>
</li>
@foreach($IndexNav as $topNav)
@foreach($IndexNav as $topNav)
...
...
resources/views/Layouts/sub.blade.php
View file @
a185017b
...
@@ -82,7 +82,7 @@
...
@@ -82,7 +82,7 @@
@if($language_type == 1)
@if($language_type == 1)
<a
href=
"{{url('en/index')}}"
>
Home
</a>
<a
href=
"{{url('en/index')}}"
>
Home
</a>
@else
@else
<a
href=
"{{url('
index
')}}"
>
首页
</a>
<a
href=
"{{url('')}}"
>
首页
</a>
@endif
@endif
</li>
</li>
@foreach($IndexNav as $topNav)
@foreach($IndexNav as $topNav)
...
...
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