refactor: 修改导航新增唯一标识处理
This commit is contained in:
@@ -75,12 +75,16 @@ class Navigation
|
||||
public function save()
|
||||
{
|
||||
$post = request()->post([
|
||||
'unique_label' => '',
|
||||
'name',
|
||||
'at_platform' => 'pc',
|
||||
'desc',
|
||||
'status' => 1
|
||||
]);
|
||||
$data = array_merge($post, ['language_id' => request()->lang_id, 'unique_label' => uniqid("NAV_")]);
|
||||
if (empty($post['unique_label'])) {
|
||||
$post['unique_label'] = uniqid("NAV_");
|
||||
}
|
||||
$data = array_merge($post, ['language_id' => request()->lang_id]);
|
||||
|
||||
$validate = new NavigationValidate;
|
||||
if (!$validate->scene('add')->check($data)) {
|
||||
|
||||
Reference in New Issue
Block a user