3
This commit is contained in:
@@ -143,9 +143,9 @@ class ConfigController extends Base
|
||||
$post = $request->post('row');
|
||||
Db::startTrans();
|
||||
try {
|
||||
if($post['type'] == 'selects'){
|
||||
$post['value'] = implode(',',$post['value']);
|
||||
}
|
||||
// if($post['type'] == 'selects'){
|
||||
// $post['value'] = implode(',',$post['value']);
|
||||
// }
|
||||
$user = ConfigModel::create($post);
|
||||
Db::commit();
|
||||
$this->buildcache();
|
||||
@@ -165,7 +165,7 @@ class ConfigController extends Base
|
||||
$v['value'] = json_decode($v['value'], true);
|
||||
}
|
||||
if(in_array($v['type'] ,['selects']) && !is_array($v['value'])){
|
||||
$v['value'] = explode(',',$v['value']);
|
||||
$v['value'] = explode(',',$v['value']??'');
|
||||
}
|
||||
$list[$v['name']] = $v['value'];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user