Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
杨树贤
/
LC_news
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
73c38f6b
authored
Nov 28, 2019
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
添加商品ID的录入
parent
88242302
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
4 deletions
app/Model/ArticleModel.php
resources/views/web/SaveArticle.blade.php
app/Model/ArticleModel.php
View file @
73c38f6b
...
@@ -91,7 +91,7 @@ class ArticleModel extends Model
...
@@ -91,7 +91,7 @@ class ArticleModel extends Model
public
function
ApiSaveArticle
(
$AdminID
){
public
function
ApiSaveArticle
(
$AdminID
){
$Arr
=
[
'art_id'
,
'top_type_id'
,
'type_id'
,
'title'
,
'flag'
,
'sort_order'
,
'art_type'
,
'start_review'
,
'title_seo'
,
'description'
,
'keyword'
,
'litpic'
,
$Arr
=
[
'art_id'
,
'top_type_id'
,
'type_id'
,
'title'
,
'flag'
,
'sort_order'
,
'art_type'
,
'start_review'
,
'title_seo'
,
'description'
,
'keyword'
,
'litpic'
,
'banner_flag'
,
'banner_title'
,
'banner_img'
,
'tag_tag_id'
,
'tag_tag'
,
'tag_url'
,
'tag_status'
,
'content'
,
'writer'
];
'banner_flag'
,
'banner_title'
,
'banner_img'
,
'tag_tag_id'
,
'tag_tag'
,
'tag_url'
,
'tag_status'
,
'content'
,
'writer'
,
'goods_id'
];
$collert
=
Request
::
only
(
$Arr
);
$collert
=
Request
::
only
(
$Arr
);
$collert
=
TrimX
(
$collert
,
true
,
$Arr
);
$collert
=
TrimX
(
$collert
,
true
,
$Arr
);
//先处理文章主表
//先处理文章主表
...
@@ -103,9 +103,8 @@ class ArticleModel extends Model
...
@@ -103,9 +103,8 @@ class ArticleModel extends Model
}
}
$ArticleArr
=
[
'top_type_id'
,
'type_id'
,
'title'
,
'description'
,
'keyword'
,
'sort_order'
,
'writer'
,
'title_seo'
,
'litpic'
,
$ArticleArr
=
[
'top_type_id'
,
'type_id'
,
'title'
,
'description'
,
'keyword'
,
'sort_order'
,
'writer'
,
'title_seo'
,
'litpic'
,
'start_review'
,
'art_type'
,
'banner_flag'
,
'banner_title'
,
'banner_img'
];
'start_review'
,
'art_type'
,
'banner_flag'
,
'banner_title'
,
'banner_img'
,
'goods_id'
];
foreach
(
$ArticleArr
as
$k
=>
$v
)
$data
[
$v
]
=
empty
(
$collert
[
$v
])
?
''
:
$collert
[
$v
];
foreach
(
$ArticleArr
as
$k
=>
$v
)
$data
[
$v
]
=
empty
(
$collert
[
$v
])
?
''
:
$collert
[
$v
];
DB
::
connection
(
$this
->
connection
)
->
beginTransaction
();
DB
::
connection
(
$this
->
connection
)
->
beginTransaction
();
$ErrInfo
=
empty
(
$collert
[
'art_id'
])
?
'新增'
:
'编辑'
;
$ErrInfo
=
empty
(
$collert
[
'art_id'
])
?
'新增'
:
'编辑'
;
if
(
empty
(
$collert
[
'art_id'
])){
//新增
if
(
empty
(
$collert
[
'art_id'
])){
//新增
...
@@ -171,7 +170,6 @@ class ArticleModel extends Model
...
@@ -171,7 +170,6 @@ class ArticleModel extends Model
//删除这一次没有更新的关联标签
//删除这一次没有更新的关联标签
$ArticleTagModel
->
where
(
'art_id'
,
'='
,
$BodyData
[
'art_id'
])
->
where
(
'update_time'
,
'<'
,
$time
)
->
update
([
'flag'
=>
1
,
'update_time'
=>
$time
]);
$ArticleTagModel
->
where
(
'art_id'
,
'='
,
$BodyData
[
'art_id'
])
->
where
(
'update_time'
,
'<'
,
$time
)
->
update
([
'flag'
=>
1
,
'update_time'
=>
$time
]);
DB
::
connection
(
$this
->
connection
)
->
commit
();
DB
::
connection
(
$this
->
connection
)
->
commit
();
PushThesaurus
(
$BodyData
[
'art_id'
]);
return
[
0
,
$ErrInfo
.
'成功'
];
return
[
0
,
$ErrInfo
.
'成功'
];
}
}
...
...
resources/views/web/SaveArticle.blade.php
View file @
73c38f6b
This diff is collapsed.
Click to expand it.
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