Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
backend
Overview
Overview
Details
Activity
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
亲子游项目
backend
Commits
8344059d
Commit
8344059d
authored
Oct 20, 2018
by
LiuJunYi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
商家null-BUG
parent
ff7cb87f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletions
+7
-1
application/admin/controller/Project.php
+7
-1
No files found.
application/admin/controller/Project.php
View file @
8344059d
...
@@ -148,7 +148,6 @@ class Project extends AuthBase
...
@@ -148,7 +148,6 @@ class Project extends AuthBase
$old_banners
=
json_decode
(
$project_info
[
'banners_native'
]);
$old_banners
=
json_decode
(
$project_info
[
'banners_native'
]);
$old_poster
=
$project_info
[
'poster'
];
$old_poster
=
$project_info
[
'poster'
];
$old_kf_qrcode
=
$project_info
[
'kf_qrcode'
];
$old_kf_qrcode
=
$project_info
[
'kf_qrcode'
];
//如果是商家则保存客服二维码
//如果是商家则保存客服二维码
if
(
$data
[
'type'
]
==
2
)
{
if
(
$data
[
'type'
]
==
2
)
{
if
(
input
(
'file.kf_qrcode'
))
{
if
(
input
(
'file.kf_qrcode'
))
{
...
@@ -179,6 +178,13 @@ class Project extends AuthBase
...
@@ -179,6 +178,13 @@ class Project extends AuthBase
$data
[
'banners'
]
=
json_encode
(
array_merge
(
$banners
,
$old_banners
));
$data
[
'banners'
]
=
json_encode
(
array_merge
(
$banners
,
$old_banners
));
}
}
//去除null
foreach
(
$data
as
$k
=>
$v
){
if
(
$v
===
'null'
){
unset
(
$data
[
$k
]);
}
}
//写入数据库
//写入数据库
$res
=
$this
->
project_model
->
save
(
$data
,
[
'id'
=>
$id
]);
$res
=
$this
->
project_model
->
save
(
$data
,
[
'id'
=>
$id
]);
if
(
$res
)
{
if
(
$res
)
{
...
...
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