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
7273eb1e
Commit
7273eb1e
authored
May 29, 2020
by
章建武
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dep
parent
a5da74d8
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
34 additions
and
10 deletions
+34
-10
ArticleController.php
app/Http/Controllers/Index/ArticleController.php
+11
-0
GoodsItemController.php
app/Http/Controllers/Index/GoodsItemController.php
+3
-3
index.blade.php
resources/views/Index/index.blade.php
+6
-3
article_info.blade.php
resources/views/Index/news/article_info.blade.php
+13
-3
web.php
routes/web.php
+1
-1
No files found.
app/Http/Controllers/Index/ArticleController.php
View file @
7273eb1e
...
...
@@ -71,13 +71,24 @@ class ArticleController extends Controller
public
function
info
(
Request
$request
)
{
$url
=
url
()
->
full
();
$pathinfo
=
parse_url
(
$url
);
$path
=
$pathinfo
[
'path'
];
$en
=
substr
(
$path
,
1
,
2
);
if
(
$en
==
'en'
){
$language_type
=
1
;
}
else
{
$language_type
=
0
;
}
$type
=
$request
->
get
(
'type'
);
$id
=
$request
->
post
(
'id'
);
ArticleInfo
::
where
(
'id'
,
'='
,
$id
)
->
increment
(
'browse'
);
$data
=
ArticleInfo
::
query
()
->
where
(
'type'
,
'='
,
$type
)
->
where
(
'id'
,
'<>'
,
$id
)
->
where
(
'status'
,
0
)
->
where
(
'language_type'
,
$language_type
)
->
orderBy
(
'release_time'
,
'desc'
)
->
limit
(
6
)
->
get
();
...
...
app/Http/Controllers/Index/GoodsItemController.php
View file @
7273eb1e
...
...
@@ -77,15 +77,15 @@ class GoodsItemController extends Controller
switch
(
$type
){
case
5
:
$title
=
'空间景观'
;
$content
=
$content5
->
content
;
$content
=
isset
(
$content5
->
content
)
?
$content5
->
content
:
''
;
break
;
case
6
:
$title
=
'活动运营'
;
$content
=
$content6
->
content
;
$content
=
isset
(
$content6
->
content
)
?
$content6
->
content
:
''
;
break
;
case
7
:
$title
=
'艺术街区'
;
$content
=
$content7
->
content
;
$content
=
isset
(
$content7
->
content
)
?
$content7
->
content
:
''
;
}
return
view
(
'index.goods_item.more'
)
...
...
resources/views/Index/index.blade.php
View file @
7273eb1e
...
...
@@ -187,7 +187,11 @@
<img src="
{{
$alert_t
->
url
}}{{
$article1
->
img_path
}}
">
<h1>
{
{$article1->title}
}
</h1>
<p> </p>
@if(
$language_type
== 1)
<a href="
{{
route
(
'enarticle'
,[
'id'
=>
$article1
->
id
,
'type'
=>
$article1
->
type
])}}
">View details<span class="
icon
-
angle
-
double
-
right
"></span></a>
@else
<a href="
{{
route
(
'article'
,[
'id'
=>
$article1
->
id
,
'type'
=>
$article1
->
type
])}}
">查看详情<span class="
icon
-
angle
-
double
-
right
"></span></a>
@endif
</div>
</div>
...
...
@@ -202,7 +206,7 @@
</div>
<div class="
page8
-
center
-
more
">
@if(
$language_type
== 1)
<a href="
{{
route
(
'news'
)}}
"><span></span><i>More info</i></a>
<a href="
{{
route
(
'
en
news'
)}}
"><span></span><i>More info</i></a>
@else
<a href="
{{
route
(
'news'
)}}
"><span></span><i>更多资讯</i></a>
@endif
...
...
@@ -220,8 +224,7 @@
<p></p>
@if(
$language_type
== 1)
<a href="
{{
route
(
'article'
,[
'id'
=>
$article2
->
id
,
'type'
=>
$article2
->
type
])}}
">View details<span class="
icon
-
angle
-
double
-
right
"></span></a>
<a href="
{{
route
(
'enarticle'
,[
'id'
=>
$article2
->
id
,
'type'
=>
$article2
->
type
])}}
">View details<span class="
icon
-
angle
-
double
-
right
"></span></a>
@else
<a href="
{{
route
(
'article'
,[
'id'
=>
$article2
->
id
,
'type'
=>
$article2
->
type
])}}
">查看详情<span class="
icon
-
angle
-
double
-
right
"></span></a>
@endif
...
...
resources/views/Index/news/article_info.blade.php
View file @
7273eb1e
...
...
@@ -27,7 +27,17 @@
<h1>
{
{$info->title}
}
</h1>
</div>
<div class="
news
-
info
-
laiyuan
">
<p><em>来源:
{
{$info->source}}<span></span></em><em>浏览:<span>{{$info->browse}}</span></em><em>发布时间:<span>{{date('Y-m-d',$info->release_time)}
}
</span></em></p>
<p>
@if(
$language_type
== 1)
<em>source:
{
{$info->source}
}
<span></span></em>
<em>browse:<span>
{
{$info->browse}
}
</span></em>
<em>Release time:<span>
{
{date('Y-m-d',$info->release_time)}
}
</span></em>
@else
<em>来源:
{
{$info->source}
}
<span></span></em>
<em>浏览:<span>
{
{$info->browse}
}
</span></em>
<em>发布时间:<span>
{
{date('Y-m-d',$info->release_time)}
}
</span></em>
@endif
</p>
</div>
<div class="
news
-
info
-
b
">
{
!!$info->content!!
}
...
...
@@ -47,7 +57,7 @@
<!--<
a
href
=
"mailto:"
><
span
></
span
></
a
>-->
</
div
>
<
div
class
="
fx
">
分享到:
<!--分享到:-->
<div class="
jiathis_style_24x24
">
<a class="
jiathis_button_qzone
"></a>
<a class="
jiathis_button_tsina
"></a>
...
...
@@ -70,4 +80,4 @@
</div>
</div>
</div>
@endsection
\ No newline at end of file
@endsection
routes/web.php
View file @
7273eb1e
...
...
@@ -77,7 +77,7 @@ Route::get('/Admin', function () {
Route
::
get
(
'/news/article-info'
,
'Index\ArticleController@info'
)
->
name
(
'article'
);
Route
::
get
(
'en/news/article-info'
,
'Index\ArticleController@info'
)
->
name
(
'enarticle'
);
Route
::
get
(
'en/news/'
,
'Index\ArticleController@index'
)
->
name
(
'news'
);
//英文版新闻中心
Route
::
get
(
'en/news/'
,
'Index\ArticleController@index'
)
->
name
(
'
en
news'
);
//英文版新闻中心
Route
::
get
(
'/news'
,
'Index\ArticleController@index'
)
->
name
(
'news'
);
//新闻中心
Route
::
any
(
'/news/articel_list'
,
'Index\ArticleController@article_list'
)
->
name
(
'article_list'
);
Route
::
any
(
'en/news/articel_list'
,
'Index\ArticleController@article_list'
)
->
name
(
'enarticle_list'
);
...
...
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