Commit f92deedc by wd

修改新增时保存字段缺失

parent fa85c504
......@@ -63,6 +63,13 @@ class Save extends \Sparsh\FreeShippingBar\Controller\Adminhtml\Entity implement
try {
if (empty($data['entity_id'])) {
unset($data['entity_id']);
$data['bar_layout_position'] = 'page_top';
}else{
if ($data['entity_id'] == 2){
$data['bar_layout_position'] = 'insert_snippet';
}else{
$data['bar_layout_position'] = 'page_top';
}
}
/** @var $model \Sparsh\FreeShippingBar\Model\Entity */
......@@ -110,11 +117,7 @@ class Save extends \Sparsh\FreeShippingBar\Controller\Adminhtml\Entity implement
unset($data['background_img_phone']);
}
if ($data['entity_id'] == 2){
$data['bar_layout_position'] = 'insert_snippet';
}else{
$data['bar_layout_position'] = 'page_top';
}
$model->setData($data);
$model->save();
......
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