up.
This commit is contained in:
parent
bf734c6427
commit
2ed72e3980
27
app/controller/admin/xm/ProductGroupController.php
Normal file
27
app/controller/admin/xm/ProductGroupController.php
Normal file
@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace app\controller\admin\xm;
|
||||
|
||||
use app\BaseController;
|
||||
use app\service\CurdService;
|
||||
use think\response\Json;
|
||||
|
||||
class ProductGroupController extends BaseController
|
||||
{
|
||||
public function page(): Json
|
||||
{
|
||||
try{
|
||||
$model = \app\entity\XmProductGroup::withSearch([], [
|
||||
'name' => $this->request->get('name/s', ''),
|
||||
'comments' => $this->request->get('comments/s', ''),
|
||||
]);
|
||||
|
||||
$paginate = CurdService::getPaginate($this->request, $model);
|
||||
}catch (\Exception $e){
|
||||
return $this->writeError($e->getMessage());
|
||||
}
|
||||
|
||||
|
||||
return $this->writeSuccess('success', $paginate);
|
||||
}
|
||||
}
|
||||
@ -27,7 +27,8 @@ use app\controller\admin\{auth,
|
||||
system\UserController,
|
||||
xm\MemberProfileController,
|
||||
xm\PlatformController,
|
||||
xm\ProductController};
|
||||
xm\ProductController,
|
||||
xm\ProductGroupController};
|
||||
use app\http\middleware\AuthMiddleware;
|
||||
use think\facade\Route;
|
||||
use think\middleware\AllowCrossDomain;
|
||||
@ -198,6 +199,10 @@ Route::group("adminapi", function () {
|
||||
Route::get('page', [ProductController::class, 'page'])->name("xm.pageProducts");
|
||||
})->name('产品接口');
|
||||
|
||||
Route::group('product-group', function (){
|
||||
Route::get('page', [ProductGroupController::class, 'page'])->name("xm.pageProductGroups");
|
||||
})->name('产品分组接口');
|
||||
|
||||
Route::group('institution', function (){
|
||||
Route::get('page', [InstitutionController::class, 'page'])->name("xm.pageInstitutions");
|
||||
})->name('机构接口');
|
||||
|
||||
Loading…
Reference in New Issue
Block a user