|
|
@@ -0,0 +1,32 @@
|
|
|
+<?php
|
|
|
+declare(strict_types=1);
|
|
|
+
|
|
|
+use think\facade\Route;
|
|
|
+use SixShop\Points\Controller\{UserPointController, UserPointLogController};
|
|
|
+use SixShop\System\Middleware\MacroPageMiddleware;
|
|
|
+
|
|
|
+// 后台管理API路由
|
|
|
+// 路由前缀: /admin/points
|
|
|
+
|
|
|
+Route::resource('user_point', UserPointController::class)->middleware([
|
|
|
+ MacroPageMiddleware::class,
|
|
|
+ 'auth'
|
|
|
+])->option([
|
|
|
+ 'name' => 'points:user_point',
|
|
|
+ 'description' => '用户积分',
|
|
|
+]);
|
|
|
+
|
|
|
+Route::group('user_point_log', function () {
|
|
|
+ Route::get('user', [UserPointLogController::class, 'user'])->middleware([
|
|
|
+ MacroPageMiddleware::class,
|
|
|
+ ])->option([
|
|
|
+ 'name' => 'points:user_point_log:user',
|
|
|
+ 'description' => '积分记录用户列表',
|
|
|
+ ]);
|
|
|
+ Route::resource('', UserPointLogController::class)->middleware([
|
|
|
+ MacroPageMiddleware::class,
|
|
|
+ ])->option([
|
|
|
+ 'name' => 'points:user_point_log',
|
|
|
+ 'description' => '积分记录',
|
|
|
+ ]);
|
|
|
+})->middleware(['auth']);
|