From c85ad314e40e1d86b2adb0bdc7eba1dfa033c8c3 Mon Sep 17 00:00:00 2001 From: liapples Date: Tue, 17 Aug 2021 11:36:20 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=BB=A3=E7=90=86=E5=95=86?= =?UTF-8?q?=E4=BA=A7=E5=93=81=E5=88=86=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Admin/Controllers/CategoryController.php | 11 +- .../Controllers/CategoryController.php | 87 ++++++ app/AdminAgent/Repositories/Category.php | 16 + app/AdminAgent/routes.php | 2 +- app/Models/Category.php | 3 +- dcat_admin_ide_helper.php | 288 +++++++++--------- resources/lang/zh_CN/category.php | 7 +- 7 files changed, 258 insertions(+), 156 deletions(-) create mode 100644 app/AdminAgent/Controllers/CategoryController.php create mode 100644 app/AdminAgent/Repositories/Category.php diff --git a/app/Admin/Controllers/CategoryController.php b/app/Admin/Controllers/CategoryController.php index a13cc18..c28eeac 100644 --- a/app/Admin/Controllers/CategoryController.php +++ b/app/Admin/Controllers/CategoryController.php @@ -39,12 +39,7 @@ class CategoryController extends AdminController $grid->column('pid'); $grid->column('name'); $grid->column('sort'); - - $grid->filter(function (Grid\Filter $filter) { - $filter->model()->where('agent_id', 0); - - $filter->equal('id'); - }); + $grid->column('template'); }); } @@ -62,6 +57,7 @@ class CategoryController extends AdminController $show->field('pid'); $show->field('name'); $show->field('sort'); + $show->field('template'); }); } @@ -78,10 +74,11 @@ class CategoryController extends AdminController $form->display('id'); $form->select('pid')->options($options)->required(); $form->text('name')->required(); - $form->text('sort')->default(255); + $form->text('sort')->default(255)->help('越小越靠前'); })->saving(function (Form $form) { //后台管理员的agent_id为0 $form->agent_id = 0; + $form->sort = $form->sort ?? 255; }); } } diff --git a/app/AdminAgent/Controllers/CategoryController.php b/app/AdminAgent/Controllers/CategoryController.php new file mode 100644 index 0000000..956bc73 --- /dev/null +++ b/app/AdminAgent/Controllers/CategoryController.php @@ -0,0 +1,87 @@ +header('产品分类') + ->body(function (Row $row) { + $tree = new Tree(new Category); + $tree->query(function ($model) { + //agent_id为0是系统分类,其它是代理商分类 + return $model->where('agent_id', Admin::user()->id); + }); + $row->column(12, $tree); + }); + } + + /** + * Make a grid builder. + * + * @return Grid + */ + protected function grid() + { + return Grid::make(new Category(), function (Grid $grid) { + $grid->column('id')->sortable(); + $grid->column('name'); + $grid->column('pid'); + $grid->column('sort'); + $grid->column('template'); + }); + } + + /** + * Make a show builder. + * + * @param mixed $id + * + * @return Show + */ + protected function detail($id) + { + return Show::make($id, new Category(), function (Show $show) { + $show->field('id'); + $show->field('name'); + $show->field('pid'); + $show->field('sort'); + $show->field('template'); + }); + } + + /** + * Make a form builder. + * + * @return Form + */ + protected function form() + { + return Form::make(new Category(), function (Form $form) { + $agent_id = Admin::user()->id; + $options = Category::selectOptions(fn($query) => $query->where('agent_id', $agent_id)); + + $form->display('id'); + $form->hidden('agent_id')->value($agent_id)->required(); + $form->select('pid')->options($options)->required(); + $form->text('name')->required(); + $form->text('sort')->default(255)->help('越小越靠前'); +// $form->text('template'); + })->saving(function (Form $form) { + $form->agent_id = Admin::user()->id; + $form->sort = $form->sort ?? 255; + }); + } +} diff --git a/app/AdminAgent/Repositories/Category.php b/app/AdminAgent/Repositories/Category.php new file mode 100644 index 0000000..db00b03 --- /dev/null +++ b/app/AdminAgent/Repositories/Category.php @@ -0,0 +1,16 @@ +get('/', 'HomeController@index'); $router->resource('product/list', 'AgentProductController'); - + $router->resource('category/list', 'CategoryController'); }); diff --git a/app/Models/Category.php b/app/Models/Category.php index 74d2503..dfd966f 100644 --- a/app/Models/Category.php +++ b/app/Models/Category.php @@ -4,10 +4,11 @@ namespace App\Models; use Dcat\Admin\Traits\ModelTree; use Illuminate\Database\Eloquent\Factories\HasFactory; +use Illuminate\Database\Eloquent\SoftDeletes; class Category extends BaseModel { - use HasFactory; + use HasFactory, SoftDeletes; use ModelTree; // 模型树需要的三个属性 diff --git a/dcat_admin_ide_helper.php b/dcat_admin_ide_helper.php index de7df77..a0696bd 100644 --- a/dcat_admin_ide_helper.php +++ b/dcat_admin_ide_helper.php @@ -11,87 +11,87 @@ namespace Dcat\Admin { use Illuminate\Support\Collection; /** - * @property Grid\Column|Collection product_id - * @property Grid\Column|Collection know * @property Grid\Column|Collection content + * @property Grid\Column|Collection know + * @property Grid\Column|Collection product_id + * @property Grid\Column|Collection created_at + * @property Grid\Column|Collection detail * @property Grid\Column|Collection id * @property Grid\Column|Collection name * @property Grid\Column|Collection type - * @property Grid\Column|Collection version - * @property Grid\Column|Collection detail - * @property Grid\Column|Collection created_at * @property Grid\Column|Collection updated_at + * @property Grid\Column|Collection version * @property Grid\Column|Collection is_enabled - * @property Grid\Column|Collection parent_id - * @property Grid\Column|Collection order + * @property Grid\Column|Collection extension * @property Grid\Column|Collection icon + * @property Grid\Column|Collection order + * @property Grid\Column|Collection parent_id * @property Grid\Column|Collection uri - * @property Grid\Column|Collection extension - * @property Grid\Column|Collection permission_id * @property Grid\Column|Collection menu_id - * @property Grid\Column|Collection slug + * @property Grid\Column|Collection permission_id * @property Grid\Column|Collection http_method * @property Grid\Column|Collection http_path + * @property Grid\Column|Collection slug * @property Grid\Column|Collection role_id * @property Grid\Column|Collection user_id * @property Grid\Column|Collection value - * @property Grid\Column|Collection username - * @property Grid\Column|Collection password * @property Grid\Column|Collection avatar + * @property Grid\Column|Collection password * @property Grid\Column|Collection remember_token + * @property Grid\Column|Collection username + * @property Grid\Column|Collection agent_id + * @property Grid\Column|Collection desc * @property Grid\Column|Collection picture * @property Grid\Column|Collection tag - * @property Grid\Column|Collection desc - * @property Grid\Column|Collection agent_id * @property Grid\Column|Collection about - * @property Grid\Column|Collection reg_protocol * @property Grid\Column|Collection buy_protocol - * @property Grid\Column|Collection price + * @property Grid\Column|Collection reg_protocol + * @property Grid\Column|Collection category_id + * @property Grid\Column|Collection channel_id + * @property Grid\Column|Collection deleted_at * @property Grid\Column|Collection original_price + * @property Grid\Column|Collection price * @property Grid\Column|Collection sale - * @property Grid\Column|Collection channel_id - * @property Grid\Column|Collection category_id * @property Grid\Column|Collection status - * @property Grid\Column|Collection deleted_at + * @property Grid\Column|Collection address * @property Grid\Column|Collection appid * @property Grid\Column|Collection appsecret - * @property Grid\Column|Collection mchid - * @property Grid\Column|Collection mchkey * @property Grid\Column|Collection company_name - * @property Grid\Column|Collection logo - * @property Grid\Column|Collection address - * @property Grid\Column|Collection license_pic - * @property Grid\Column|Collection director * @property Grid\Column|Collection contact_phone + * @property Grid\Column|Collection director + * @property Grid\Column|Collection license_pic + * @property Grid\Column|Collection logo + * @property Grid\Column|Collection mchid + * @property Grid\Column|Collection mchkey * @property Grid\Column|Collection author * @property Grid\Column|Collection image * @property Grid\Column|Collection pid - * @property Grid\Column|Collection template * @property Grid\Column|Collection sort + * @property Grid\Column|Collection template * @property Grid\Column|Collection agent_product_id - * @property Grid\Column|Collection start_at * @property Grid\Column|Collection end_at - * @property Grid\Column|Collection uuid + * @property Grid\Column|Collection start_at * @property Grid\Column|Collection connection - * @property Grid\Column|Collection queue - * @property Grid\Column|Collection payload * @property Grid\Column|Collection exception * @property Grid\Column|Collection failed_at + * @property Grid\Column|Collection payload + * @property Grid\Column|Collection queue + * @property Grid\Column|Collection uuid * @property Grid\Column|Collection photo * @property Grid\Column|Collection is_read - * @property Grid\Column|Collection order_no - * @property Grid\Column|Collection num - * @property Grid\Column|Collection mobile - * @property Grid\Column|Collection pay_type * @property Grid\Column|Collection coupon_id - * @property Grid\Column|Collection paid_money + * @property Grid\Column|Collection mobile + * @property Grid\Column|Collection num + * @property Grid\Column|Collection order_no * @property Grid\Column|Collection paid_at + * @property Grid\Column|Collection paid_money + * @property Grid\Column|Collection pay_type * @property Grid\Column|Collection refund_info * @property Grid\Column|Collection email * @property Grid\Column|Collection token - * @property Grid\Column|Collection supplier_id * @property Grid\Column|Collection pictures * @property Grid\Column|Collection stock + * @property Grid\Column|Collection supplier_id * @property Grid\Column|Collection url * @property Grid\Column|Collection picture_ad * @property Grid\Column|Collection channels @@ -103,87 +103,87 @@ namespace Dcat\Admin { * @property Grid\Column|Collection unionid * @property Grid\Column|Collection verifier * - * @method Grid\Column|Collection product_id(string $label = null) - * @method Grid\Column|Collection know(string $label = null) * @method Grid\Column|Collection content(string $label = null) + * @method Grid\Column|Collection know(string $label = null) + * @method Grid\Column|Collection product_id(string $label = null) + * @method Grid\Column|Collection created_at(string $label = null) + * @method Grid\Column|Collection detail(string $label = null) * @method Grid\Column|Collection id(string $label = null) * @method Grid\Column|Collection name(string $label = null) * @method Grid\Column|Collection type(string $label = null) - * @method Grid\Column|Collection version(string $label = null) - * @method Grid\Column|Collection detail(string $label = null) - * @method Grid\Column|Collection created_at(string $label = null) * @method Grid\Column|Collection updated_at(string $label = null) + * @method Grid\Column|Collection version(string $label = null) * @method Grid\Column|Collection is_enabled(string $label = null) - * @method Grid\Column|Collection parent_id(string $label = null) - * @method Grid\Column|Collection order(string $label = null) + * @method Grid\Column|Collection extension(string $label = null) * @method Grid\Column|Collection icon(string $label = null) + * @method Grid\Column|Collection order(string $label = null) + * @method Grid\Column|Collection parent_id(string $label = null) * @method Grid\Column|Collection uri(string $label = null) - * @method Grid\Column|Collection extension(string $label = null) - * @method Grid\Column|Collection permission_id(string $label = null) * @method Grid\Column|Collection menu_id(string $label = null) - * @method Grid\Column|Collection slug(string $label = null) + * @method Grid\Column|Collection permission_id(string $label = null) * @method Grid\Column|Collection http_method(string $label = null) * @method Grid\Column|Collection http_path(string $label = null) + * @method Grid\Column|Collection slug(string $label = null) * @method Grid\Column|Collection role_id(string $label = null) * @method Grid\Column|Collection user_id(string $label = null) * @method Grid\Column|Collection value(string $label = null) - * @method Grid\Column|Collection username(string $label = null) - * @method Grid\Column|Collection password(string $label = null) * @method Grid\Column|Collection avatar(string $label = null) + * @method Grid\Column|Collection password(string $label = null) * @method Grid\Column|Collection remember_token(string $label = null) + * @method Grid\Column|Collection username(string $label = null) + * @method Grid\Column|Collection agent_id(string $label = null) + * @method Grid\Column|Collection desc(string $label = null) * @method Grid\Column|Collection picture(string $label = null) * @method Grid\Column|Collection tag(string $label = null) - * @method Grid\Column|Collection desc(string $label = null) - * @method Grid\Column|Collection agent_id(string $label = null) * @method Grid\Column|Collection about(string $label = null) - * @method Grid\Column|Collection reg_protocol(string $label = null) * @method Grid\Column|Collection buy_protocol(string $label = null) - * @method Grid\Column|Collection price(string $label = null) + * @method Grid\Column|Collection reg_protocol(string $label = null) + * @method Grid\Column|Collection category_id(string $label = null) + * @method Grid\Column|Collection channel_id(string $label = null) + * @method Grid\Column|Collection deleted_at(string $label = null) * @method Grid\Column|Collection original_price(string $label = null) + * @method Grid\Column|Collection price(string $label = null) * @method Grid\Column|Collection sale(string $label = null) - * @method Grid\Column|Collection channel_id(string $label = null) - * @method Grid\Column|Collection category_id(string $label = null) * @method Grid\Column|Collection status(string $label = null) - * @method Grid\Column|Collection deleted_at(string $label = null) + * @method Grid\Column|Collection address(string $label = null) * @method Grid\Column|Collection appid(string $label = null) * @method Grid\Column|Collection appsecret(string $label = null) - * @method Grid\Column|Collection mchid(string $label = null) - * @method Grid\Column|Collection mchkey(string $label = null) * @method Grid\Column|Collection company_name(string $label = null) - * @method Grid\Column|Collection logo(string $label = null) - * @method Grid\Column|Collection address(string $label = null) - * @method Grid\Column|Collection license_pic(string $label = null) - * @method Grid\Column|Collection director(string $label = null) * @method Grid\Column|Collection contact_phone(string $label = null) + * @method Grid\Column|Collection director(string $label = null) + * @method Grid\Column|Collection license_pic(string $label = null) + * @method Grid\Column|Collection logo(string $label = null) + * @method Grid\Column|Collection mchid(string $label = null) + * @method Grid\Column|Collection mchkey(string $label = null) * @method Grid\Column|Collection author(string $label = null) * @method Grid\Column|Collection image(string $label = null) * @method Grid\Column|Collection pid(string $label = null) - * @method Grid\Column|Collection template(string $label = null) * @method Grid\Column|Collection sort(string $label = null) + * @method Grid\Column|Collection template(string $label = null) * @method Grid\Column|Collection agent_product_id(string $label = null) - * @method Grid\Column|Collection start_at(string $label = null) * @method Grid\Column|Collection end_at(string $label = null) - * @method Grid\Column|Collection uuid(string $label = null) + * @method Grid\Column|Collection start_at(string $label = null) * @method Grid\Column|Collection connection(string $label = null) - * @method Grid\Column|Collection queue(string $label = null) - * @method Grid\Column|Collection payload(string $label = null) * @method Grid\Column|Collection exception(string $label = null) * @method Grid\Column|Collection failed_at(string $label = null) + * @method Grid\Column|Collection payload(string $label = null) + * @method Grid\Column|Collection queue(string $label = null) + * @method Grid\Column|Collection uuid(string $label = null) * @method Grid\Column|Collection photo(string $label = null) * @method Grid\Column|Collection is_read(string $label = null) - * @method Grid\Column|Collection order_no(string $label = null) - * @method Grid\Column|Collection num(string $label = null) - * @method Grid\Column|Collection mobile(string $label = null) - * @method Grid\Column|Collection pay_type(string $label = null) * @method Grid\Column|Collection coupon_id(string $label = null) - * @method Grid\Column|Collection paid_money(string $label = null) + * @method Grid\Column|Collection mobile(string $label = null) + * @method Grid\Column|Collection num(string $label = null) + * @method Grid\Column|Collection order_no(string $label = null) * @method Grid\Column|Collection paid_at(string $label = null) + * @method Grid\Column|Collection paid_money(string $label = null) + * @method Grid\Column|Collection pay_type(string $label = null) * @method Grid\Column|Collection refund_info(string $label = null) * @method Grid\Column|Collection email(string $label = null) * @method Grid\Column|Collection token(string $label = null) - * @method Grid\Column|Collection supplier_id(string $label = null) * @method Grid\Column|Collection pictures(string $label = null) * @method Grid\Column|Collection stock(string $label = null) + * @method Grid\Column|Collection supplier_id(string $label = null) * @method Grid\Column|Collection url(string $label = null) * @method Grid\Column|Collection picture_ad(string $label = null) * @method Grid\Column|Collection channels(string $label = null) @@ -200,87 +200,87 @@ namespace Dcat\Admin { class MiniGrid extends Grid {} /** - * @property Show\Field|Collection product_id - * @property Show\Field|Collection know * @property Show\Field|Collection content + * @property Show\Field|Collection know + * @property Show\Field|Collection product_id + * @property Show\Field|Collection created_at + * @property Show\Field|Collection detail * @property Show\Field|Collection id * @property Show\Field|Collection name * @property Show\Field|Collection type - * @property Show\Field|Collection version - * @property Show\Field|Collection detail - * @property Show\Field|Collection created_at * @property Show\Field|Collection updated_at + * @property Show\Field|Collection version * @property Show\Field|Collection is_enabled - * @property Show\Field|Collection parent_id - * @property Show\Field|Collection order + * @property Show\Field|Collection extension * @property Show\Field|Collection icon + * @property Show\Field|Collection order + * @property Show\Field|Collection parent_id * @property Show\Field|Collection uri - * @property Show\Field|Collection extension - * @property Show\Field|Collection permission_id * @property Show\Field|Collection menu_id - * @property Show\Field|Collection slug + * @property Show\Field|Collection permission_id * @property Show\Field|Collection http_method * @property Show\Field|Collection http_path + * @property Show\Field|Collection slug * @property Show\Field|Collection role_id * @property Show\Field|Collection user_id * @property Show\Field|Collection value - * @property Show\Field|Collection username - * @property Show\Field|Collection password * @property Show\Field|Collection avatar + * @property Show\Field|Collection password * @property Show\Field|Collection remember_token + * @property Show\Field|Collection username + * @property Show\Field|Collection agent_id + * @property Show\Field|Collection desc * @property Show\Field|Collection picture * @property Show\Field|Collection tag - * @property Show\Field|Collection desc - * @property Show\Field|Collection agent_id * @property Show\Field|Collection about - * @property Show\Field|Collection reg_protocol * @property Show\Field|Collection buy_protocol - * @property Show\Field|Collection price + * @property Show\Field|Collection reg_protocol + * @property Show\Field|Collection category_id + * @property Show\Field|Collection channel_id + * @property Show\Field|Collection deleted_at * @property Show\Field|Collection original_price + * @property Show\Field|Collection price * @property Show\Field|Collection sale - * @property Show\Field|Collection channel_id - * @property Show\Field|Collection category_id * @property Show\Field|Collection status - * @property Show\Field|Collection deleted_at + * @property Show\Field|Collection address * @property Show\Field|Collection appid * @property Show\Field|Collection appsecret - * @property Show\Field|Collection mchid - * @property Show\Field|Collection mchkey * @property Show\Field|Collection company_name - * @property Show\Field|Collection logo - * @property Show\Field|Collection address - * @property Show\Field|Collection license_pic - * @property Show\Field|Collection director * @property Show\Field|Collection contact_phone + * @property Show\Field|Collection director + * @property Show\Field|Collection license_pic + * @property Show\Field|Collection logo + * @property Show\Field|Collection mchid + * @property Show\Field|Collection mchkey * @property Show\Field|Collection author * @property Show\Field|Collection image * @property Show\Field|Collection pid - * @property Show\Field|Collection template * @property Show\Field|Collection sort + * @property Show\Field|Collection template * @property Show\Field|Collection agent_product_id - * @property Show\Field|Collection start_at * @property Show\Field|Collection end_at - * @property Show\Field|Collection uuid + * @property Show\Field|Collection start_at * @property Show\Field|Collection connection - * @property Show\Field|Collection queue - * @property Show\Field|Collection payload * @property Show\Field|Collection exception * @property Show\Field|Collection failed_at + * @property Show\Field|Collection payload + * @property Show\Field|Collection queue + * @property Show\Field|Collection uuid * @property Show\Field|Collection photo * @property Show\Field|Collection is_read - * @property Show\Field|Collection order_no - * @property Show\Field|Collection num - * @property Show\Field|Collection mobile - * @property Show\Field|Collection pay_type * @property Show\Field|Collection coupon_id - * @property Show\Field|Collection paid_money + * @property Show\Field|Collection mobile + * @property Show\Field|Collection num + * @property Show\Field|Collection order_no * @property Show\Field|Collection paid_at + * @property Show\Field|Collection paid_money + * @property Show\Field|Collection pay_type * @property Show\Field|Collection refund_info * @property Show\Field|Collection email * @property Show\Field|Collection token - * @property Show\Field|Collection supplier_id * @property Show\Field|Collection pictures * @property Show\Field|Collection stock + * @property Show\Field|Collection supplier_id * @property Show\Field|Collection url * @property Show\Field|Collection picture_ad * @property Show\Field|Collection channels @@ -292,87 +292,87 @@ namespace Dcat\Admin { * @property Show\Field|Collection unionid * @property Show\Field|Collection verifier * - * @method Show\Field|Collection product_id(string $label = null) - * @method Show\Field|Collection know(string $label = null) * @method Show\Field|Collection content(string $label = null) + * @method Show\Field|Collection know(string $label = null) + * @method Show\Field|Collection product_id(string $label = null) + * @method Show\Field|Collection created_at(string $label = null) + * @method Show\Field|Collection detail(string $label = null) * @method Show\Field|Collection id(string $label = null) * @method Show\Field|Collection name(string $label = null) * @method Show\Field|Collection type(string $label = null) - * @method Show\Field|Collection version(string $label = null) - * @method Show\Field|Collection detail(string $label = null) - * @method Show\Field|Collection created_at(string $label = null) * @method Show\Field|Collection updated_at(string $label = null) + * @method Show\Field|Collection version(string $label = null) * @method Show\Field|Collection is_enabled(string $label = null) - * @method Show\Field|Collection parent_id(string $label = null) - * @method Show\Field|Collection order(string $label = null) + * @method Show\Field|Collection extension(string $label = null) * @method Show\Field|Collection icon(string $label = null) + * @method Show\Field|Collection order(string $label = null) + * @method Show\Field|Collection parent_id(string $label = null) * @method Show\Field|Collection uri(string $label = null) - * @method Show\Field|Collection extension(string $label = null) - * @method Show\Field|Collection permission_id(string $label = null) * @method Show\Field|Collection menu_id(string $label = null) - * @method Show\Field|Collection slug(string $label = null) + * @method Show\Field|Collection permission_id(string $label = null) * @method Show\Field|Collection http_method(string $label = null) * @method Show\Field|Collection http_path(string $label = null) + * @method Show\Field|Collection slug(string $label = null) * @method Show\Field|Collection role_id(string $label = null) * @method Show\Field|Collection user_id(string $label = null) * @method Show\Field|Collection value(string $label = null) - * @method Show\Field|Collection username(string $label = null) - * @method Show\Field|Collection password(string $label = null) * @method Show\Field|Collection avatar(string $label = null) + * @method Show\Field|Collection password(string $label = null) * @method Show\Field|Collection remember_token(string $label = null) + * @method Show\Field|Collection username(string $label = null) + * @method Show\Field|Collection agent_id(string $label = null) + * @method Show\Field|Collection desc(string $label = null) * @method Show\Field|Collection picture(string $label = null) * @method Show\Field|Collection tag(string $label = null) - * @method Show\Field|Collection desc(string $label = null) - * @method Show\Field|Collection agent_id(string $label = null) * @method Show\Field|Collection about(string $label = null) - * @method Show\Field|Collection reg_protocol(string $label = null) * @method Show\Field|Collection buy_protocol(string $label = null) - * @method Show\Field|Collection price(string $label = null) + * @method Show\Field|Collection reg_protocol(string $label = null) + * @method Show\Field|Collection category_id(string $label = null) + * @method Show\Field|Collection channel_id(string $label = null) + * @method Show\Field|Collection deleted_at(string $label = null) * @method Show\Field|Collection original_price(string $label = null) + * @method Show\Field|Collection price(string $label = null) * @method Show\Field|Collection sale(string $label = null) - * @method Show\Field|Collection channel_id(string $label = null) - * @method Show\Field|Collection category_id(string $label = null) * @method Show\Field|Collection status(string $label = null) - * @method Show\Field|Collection deleted_at(string $label = null) + * @method Show\Field|Collection address(string $label = null) * @method Show\Field|Collection appid(string $label = null) * @method Show\Field|Collection appsecret(string $label = null) - * @method Show\Field|Collection mchid(string $label = null) - * @method Show\Field|Collection mchkey(string $label = null) * @method Show\Field|Collection company_name(string $label = null) - * @method Show\Field|Collection logo(string $label = null) - * @method Show\Field|Collection address(string $label = null) - * @method Show\Field|Collection license_pic(string $label = null) - * @method Show\Field|Collection director(string $label = null) * @method Show\Field|Collection contact_phone(string $label = null) + * @method Show\Field|Collection director(string $label = null) + * @method Show\Field|Collection license_pic(string $label = null) + * @method Show\Field|Collection logo(string $label = null) + * @method Show\Field|Collection mchid(string $label = null) + * @method Show\Field|Collection mchkey(string $label = null) * @method Show\Field|Collection author(string $label = null) * @method Show\Field|Collection image(string $label = null) * @method Show\Field|Collection pid(string $label = null) - * @method Show\Field|Collection template(string $label = null) * @method Show\Field|Collection sort(string $label = null) + * @method Show\Field|Collection template(string $label = null) * @method Show\Field|Collection agent_product_id(string $label = null) - * @method Show\Field|Collection start_at(string $label = null) * @method Show\Field|Collection end_at(string $label = null) - * @method Show\Field|Collection uuid(string $label = null) + * @method Show\Field|Collection start_at(string $label = null) * @method Show\Field|Collection connection(string $label = null) - * @method Show\Field|Collection queue(string $label = null) - * @method Show\Field|Collection payload(string $label = null) * @method Show\Field|Collection exception(string $label = null) * @method Show\Field|Collection failed_at(string $label = null) + * @method Show\Field|Collection payload(string $label = null) + * @method Show\Field|Collection queue(string $label = null) + * @method Show\Field|Collection uuid(string $label = null) * @method Show\Field|Collection photo(string $label = null) * @method Show\Field|Collection is_read(string $label = null) - * @method Show\Field|Collection order_no(string $label = null) - * @method Show\Field|Collection num(string $label = null) - * @method Show\Field|Collection mobile(string $label = null) - * @method Show\Field|Collection pay_type(string $label = null) * @method Show\Field|Collection coupon_id(string $label = null) - * @method Show\Field|Collection paid_money(string $label = null) + * @method Show\Field|Collection mobile(string $label = null) + * @method Show\Field|Collection num(string $label = null) + * @method Show\Field|Collection order_no(string $label = null) * @method Show\Field|Collection paid_at(string $label = null) + * @method Show\Field|Collection paid_money(string $label = null) + * @method Show\Field|Collection pay_type(string $label = null) * @method Show\Field|Collection refund_info(string $label = null) * @method Show\Field|Collection email(string $label = null) * @method Show\Field|Collection token(string $label = null) - * @method Show\Field|Collection supplier_id(string $label = null) * @method Show\Field|Collection pictures(string $label = null) * @method Show\Field|Collection stock(string $label = null) + * @method Show\Field|Collection supplier_id(string $label = null) * @method Show\Field|Collection url(string $label = null) * @method Show\Field|Collection picture_ad(string $label = null) * @method Show\Field|Collection channels(string $label = null) diff --git a/resources/lang/zh_CN/category.php b/resources/lang/zh_CN/category.php index affb729..43754ed 100644 --- a/resources/lang/zh_CN/category.php +++ b/resources/lang/zh_CN/category.php @@ -1,4 +1,4 @@ - [ 'Category' => '产品分类', @@ -6,9 +6,10 @@ return [ ], 'fields' => [ 'agent_id' => '代理商ID', - 'pid' => '上级ID', - 'name' => '类目名称', + 'pid' => '上级分类', + 'name' => '分类名称', 'sort' => '排序', + 'template' => '产品模板', ], 'options' => [ ],