|
@@ -31,11 +31,18 @@ Route::prefix('client')->group(function () {
|
|
// 发验证码
|
|
// 发验证码
|
|
Route::post('send-code', [AccountController::class, 'sendVerifyCode']);
|
|
Route::post('send-code', [AccountController::class, 'sendVerifyCode']);
|
|
// 手机号登录
|
|
// 手机号登录
|
|
- Route::post('login', [AccountController::class, 'login']);
|
|
|
|
|
|
+ Route::post('login', [AccountController::class, 'login'])->name('login');
|
|
// 微信登录
|
|
// 微信登录
|
|
Route::post('wx-login', [AccountController::class, 'wxLogin']);
|
|
Route::post('wx-login', [AccountController::class, 'wxLogin']);
|
|
});
|
|
});
|
|
|
|
|
|
|
|
+ // 微信相关路由(无需认证)
|
|
|
|
+ Route::prefix('wechat')->group(function () {
|
|
|
|
+ Route::get('auth-url', [WechatController::class, 'getAuthUrl']);
|
|
|
|
+ Route::post('callback', [WechatController::class, 'handleCallback']);
|
|
|
|
+ Route::get('js-config', [WechatController::class, 'getJsConfig']);
|
|
|
|
+ });
|
|
|
|
+
|
|
// 需要认证的路由组
|
|
// 需要认证的路由组
|
|
Route::middleware('auth:sanctum')->group(function () {
|
|
Route::middleware('auth:sanctum')->group(function () {
|
|
// 账号相关
|
|
// 账号相关
|
|
@@ -127,27 +134,12 @@ Route::prefix('client')->group(function () {
|
|
Route::get('{id}/code', [OrderController::class, 'generateCode']);
|
|
Route::get('{id}/code', [OrderController::class, 'generateCode']);
|
|
});
|
|
});
|
|
|
|
|
|
- // 钱包相关
|
|
|
|
- Route::prefix('wallet')->group(function () {
|
|
|
|
- Route::get('records', [WalletController::class, 'records']);
|
|
|
|
- // 取钱包信息
|
|
|
|
- Route::get('wallet', [WalletController::class, 'wallet']);
|
|
|
|
- // 提现
|
|
|
|
- Route::post('withdraw', [WalletController::class, 'withdraw']);
|
|
|
|
- });
|
|
|
|
|
|
|
|
// 团队管理路由
|
|
// 团队管理路由
|
|
Route::prefix('team')->group(function () {
|
|
Route::prefix('team')->group(function () {
|
|
Route::get('list', [MarketDistTeamController::class, 'index'])->name('team.list');
|
|
Route::get('list', [MarketDistTeamController::class, 'index'])->name('team.list');
|
|
});
|
|
});
|
|
|
|
|
|
- // 微信相关路由
|
|
|
|
- Route::prefix('wechat')->group(function () {
|
|
|
|
- Route::get('auth-url', [WechatController::class, 'getAuthUrl']);
|
|
|
|
- Route::post('callback', [WechatController::class, 'handleCallback']);
|
|
|
|
- Route::get('js-config', [WechatController::class, 'getJsConfig']);
|
|
|
|
- });
|
|
|
|
-
|
|
|
|
// 评价管理
|
|
// 评价管理
|
|
Route::post('comments', [CommentController::class, 'store'])->name('client.comments.store');
|
|
Route::post('comments', [CommentController::class, 'store'])->name('client.comments.store');
|
|
Route::get('comments', [CommentController::class, 'index'])->name('client.comments.index');
|
|
Route::get('comments', [CommentController::class, 'index'])->name('client.comments.index');
|