6
0
Fork 0

调整商品分类选择

release
vine_liutk 2021-12-29 10:26:54 +08:00
parent fd4cf51f61
commit ffcea60b62
2 changed files with 4 additions and 4 deletions

View File

@ -122,9 +122,9 @@ class ProductSpuController extends AdminController
$form->display('id');
if ($form->isCreating()) {
$form->select('one_category')->options(admin_route('api.product_categories'))->load('two_category', admin_route('api.product_categories'));
$form->select('two_category')->load('category_id', admin_route('api.product_categories'));
$form->select('category_id')->required();
// $form->select('one_category')->options(admin_route('api.product_categories'))->load('two_category', admin_route('api.product_categories'));
// $form->select('two_category')->load('category_id', admin_route('api.product_categories'));
$form->select('category_id')->options(admin_route('api.product_categories', ['q'=>2]))->required();
}
$form->text('name')->required();
$form->text('subtitle');

View File

@ -25,7 +25,7 @@ class ProductCategorySeeder extends Seeder
'name'=>'默认二级',
'is_show' => true,
'children'=>[
['name'=> '特膳视频', 'is_show' => true],
['name'=> '特膳食品', 'is_show' => true],
['name'=> '健康养生', 'is_show' => true],
['name'=> '美妆个护', 'is_show' => true],
['name'=> '生活用品', 'is_show' => true],