7 changed files with 75 additions and 96 deletions
-
41app/Admin/Actions/Tree/CategoryTie.php
-
18app/Admin/Controllers/v3/CategoryController.php
-
34app/Admin/Extensions/TypeCorrelationBind.php
-
55app/Admin/Forms/CategoryTieForm.php
-
7app/Admin/routes.php
-
3app/Models/v3/Category.php
-
13resources/lang/zh-CN/category-tie.php
@ -1,34 +0,0 @@ |
|||||
<?php |
|
||||
namespace App\Admin\Extensions; |
|
||||
|
|
||||
use Dcat\Admin\Grid\RowAction; |
|
||||
|
|
||||
class TypeCorrelationBind extends RowAction |
|
||||
{ |
|
||||
public function title() |
|
||||
{ |
|
||||
return '绑定'; |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 添加JS |
|
||||
* |
|
||||
* @return string |
|
||||
*/ |
|
||||
protected function script() |
|
||||
{ |
|
||||
return <<<JS |
|
||||
$('.type-bind-row').on('click', function () { |
|
||||
// Your code.
|
|
||||
window.location.href ='/admin/coupon/TieForm'; |
|
||||
}); |
|
||||
JS; |
|
||||
} |
|
||||
|
|
||||
public function html() |
|
||||
{ |
|
||||
$this->setHtmlAttribute(['class' => 'coupon-edit-row']); |
|
||||
return parent::html(); |
|
||||
} |
|
||||
|
|
||||
} |
|
||||
@ -0,0 +1,13 @@ |
|||||
|
<?php |
||||
|
return [ |
||||
|
'labels' => [ |
||||
|
'CategoryTie' => '绑定', |
||||
|
'categoryTie' => '绑定', |
||||
|
], |
||||
|
'fields' => [ |
||||
|
'category_ids' => '选择分类', |
||||
|
], |
||||
|
'options' => [ |
||||
|
'actions' => '操作' |
||||
|
], |
||||
|
]; |
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue