| 12345678910111213141516171819202122232425262728293031323334 |
- <?php
- namespace addons\StarChain\backend\controllers;
- use addons\StarChain\common\services\CategorysService;
- class CategorysController extends BaseController
- {
- /**
- * 导入分类
- *
- * @return void
- */
- public function actionIndex()
- {
- return $this->render($this->action->id);
- }
- /**
- * 导入
- *
- * @return void
- */
- public function actionImport()
- {
- if ($this->request->isAjax) {
- $service = new CategorysService(['mall_id' => $this->mall_id]);
- return $service->import()
- ? $this->success('ok')
- : $this->error($service->error);
- }
- }
- }
|