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
77128c8b
Commit
77128c8b
authored
Jun 08, 2020
by
章建武
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug
parent
311437c0
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
10 deletions
+9
-10
ArticleInfoValidate.php
admin/application/common/validate/ArticleInfoValidate.php
+0
-2
ArticleController.php
app/Http/Controllers/Index/ArticleController.php
+6
-7
IndexController.php
app/Http/Controllers/Index/IndexController.php
+2
-0
index.blade.php
resources/views/Index/index.blade.php
+1
-1
No files found.
admin/application/common/validate/ArticleInfoValidate.php
View file @
77128c8b
...
@@ -10,14 +10,12 @@ class ArticleInfoValidate extends Validate
...
@@ -10,14 +10,12 @@ class ArticleInfoValidate extends Validate
protected
$rule
=
[
protected
$rule
=
[
'title|标题'
=>
'require'
,
'title|标题'
=>
'require'
,
'content|内容'
=>
'require'
,
'content|内容'
=>
'require'
,
'introduce|简介'
=>
'require'
,
];
];
protected
$message
=
[
protected
$message
=
[
'title.require'
=>
'标题不能为空'
,
'title.require'
=>
'标题不能为空'
,
'content.require'
=>
'内容不能为空'
,
'content.require'
=>
'内容不能为空'
,
'introduce.require'
=>
'简介不能为空'
,
];
];
...
...
app/Http/Controllers/Index/ArticleController.php
View file @
77128c8b
...
@@ -37,16 +37,15 @@ class ArticleController extends Controller
...
@@ -37,16 +37,15 @@ class ArticleController extends Controller
$news_center
=
ArticleInfo
::
query
()
$news_center
=
ArticleInfo
::
query
()
->
where
(
'type'
,
'='
,
1
)
->
where
(
'type'
,
'='
,
1
)
->
where
(
'language_type'
,
'='
,
$language_type
)
->
where
(
'language_type'
,
'='
,
$language_type
)
->
orderBy
(
'
id
'
,
'desc'
)
->
orderBy
(
'
num
'
,
'desc'
)
->
first
();
->
first
();
$news_center2
=
ArticleInfo
::
query
()
$news_center2
=
ArticleInfo
::
query
()
->
where
(
'type'
,
'='
,
4
)
->
where
(
'type'
,
'='
,
4
)
->
where
(
'language_type'
,
'='
,
$language_type
)
->
where
(
'language_type'
,
'='
,
$language_type
)
->
orderBy
(
'
id
'
,
'desc'
)
->
orderBy
(
'
num
'
,
'desc'
)
->
first
();
->
first
();
$group_news1
=
ArticleInfo
::
query
()
->
where
(
'type'
,
'='
,
NewsType
::
GROUP_NEWS
)
$group_news1
=
ArticleInfo
::
query
()
->
where
(
'type'
,
'='
,
NewsType
::
GROUP_NEWS
)
->
orderBy
(
'
id
'
,
'asc'
)
->
orderBy
(
'
num
'
,
'asc'
)
->
where
(
'language_type'
,
'='
,
$language_type
)
->
where
(
'language_type'
,
'='
,
$language_type
)
->
limit
(
3
)
->
get
();
->
limit
(
3
)
->
get
();
...
@@ -55,17 +54,17 @@ class ArticleController extends Controller
...
@@ -55,17 +54,17 @@ class ArticleController extends Controller
->
where
(
'status'
,
'='
,
0
)
->
where
(
'status'
,
'='
,
0
)
->
where
(
'type'
,
2
)
->
where
(
'type'
,
2
)
// ->whereNotIn('id', $group_news1->pluck('id')->toArray())
// ->whereNotIn('id', $group_news1->pluck('id')->toArray())
->
orderBy
(
'
id
'
,
'asc'
)
->
orderBy
(
'
num
'
,
'asc'
)
->
limit
(
2
)
->
get
();
->
limit
(
2
)
->
get
();
// dd($language_type);
// dd($language_type);
$item_trends
=
ArticleInfo
::
query
()
->
where
(
'type'
,
'='
,
NewsType
::
ITEM_TRENDS
)
$item_trends
=
ArticleInfo
::
query
()
->
where
(
'type'
,
'='
,
NewsType
::
ITEM_TRENDS
)
->
where
(
'language_type'
,
'='
,
$language_type
)
->
where
(
'language_type'
,
'='
,
$language_type
)
->
orderBy
(
'
id
'
,
'asc'
)
->
orderBy
(
'
num
'
,
'asc'
)
->
limit
(
2
)
->
get
();
->
limit
(
2
)
->
get
();
$item_trends2
=
ArticleInfo
::
query
()
->
where
(
'type'
,
'='
,
NewsType
::
ITEM_TRENDS
)
$item_trends2
=
ArticleInfo
::
query
()
->
where
(
'type'
,
'='
,
NewsType
::
ITEM_TRENDS
)
->
where
(
'language_type'
,
'='
,
$language_type
)
->
where
(
'language_type'
,
'='
,
$language_type
)
// ->whereNotIn('id', $item_trends->pluck('id')->toArray())
// ->whereNotIn('id', $item_trends->pluck('id')->toArray())
->
orderBy
(
'
id
'
,
'asc'
)
->
orderBy
(
'
num
'
,
'asc'
)
->
limit
(
3
)
->
get
();
->
limit
(
3
)
->
get
();
$navigation
=
IndexNavigation
::
query
()
$navigation
=
IndexNavigation
::
query
()
...
...
app/Http/Controllers/Index/IndexController.php
View file @
77128c8b
...
@@ -60,11 +60,13 @@ class IndexController extends Controller
...
@@ -60,11 +60,13 @@ class IndexController extends Controller
$article1
=
ArticleInfo
::
query
()
$article1
=
ArticleInfo
::
query
()
->
where
(
'language_type'
,
'='
,
$language_type
)
->
where
(
'language_type'
,
'='
,
$language_type
)
->
limit
(
1
)
->
limit
(
1
)
->
orderBy
(
'created_at'
,
'desc'
)
->
first
();
->
first
();
$article2
=
ArticleInfo
::
query
()
$article2
=
ArticleInfo
::
query
()
->
where
(
'language_type'
,
'='
,
$language_type
)
->
where
(
'language_type'
,
'='
,
$language_type
)
->
limit
(
1
)
->
limit
(
1
)
->
orderBy
(
'updated_at'
,
'desc'
)
->
first
();
->
first
();
$alert_t
=
ArticleInfo
::
query
()
$alert_t
=
ArticleInfo
::
query
()
...
...
resources/views/Index/index.blade.php
View file @
77128c8b
...
@@ -163,7 +163,7 @@
...
@@ -163,7 +163,7 @@
<a class="
slide
-
a
"><img src="
{{
$val
->
path
}}
" style="
height
:
720
px
;
"></a>
<a class="
slide
-
a
"><img src="
{{
$val
->
path
}}
" style="
height
:
720
px
;
"></a>
<div class="
panel
-
more
">
<div class="
panel
-
more
">
@if(
$language_type
== 1)
@if(
$language_type
== 1)
<a href="
{{
route
(
'enbrand_culture'
)
}}
">
<a href="
{{
$val
->
img_title
}}
">
<img src="
{{
asset
(
'images/moreinfo.png'
)}}
">
<img src="
{{
asset
(
'images/moreinfo.png'
)}}
">
</a>
</a>
@else
@else
...
...
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