Commit 8344059d by LiuJunYi

商家null-BUG

parent ff7cb87f
......@@ -148,7 +148,6 @@ class Project extends AuthBase
$old_banners = json_decode($project_info['banners_native']);
$old_poster = $project_info['poster'];
$old_kf_qrcode = $project_info['kf_qrcode'];
//如果是商家则保存客服二维码
if ($data['type'] == 2) {
if (input('file.kf_qrcode')) {
......@@ -179,6 +178,13 @@ class Project extends AuthBase
$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]);
if ($res) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment