65 lines
2.6 KiB
PHP

<?php
use App\Http\Controllers\Integrations\EsignCallbacks;
use App\Http\Controllers\Onboarding\CourierOnboardingForms;
use App\Http\Controllers\HxbOtpVerificationController;
use App\Http\Controllers\Business\SupplierNegativeAlertDingTalkForms;
use App\Http\Controllers\Business\SupplierSummaryCardCallback;
use Illuminate\Support\Facades\Route;
use Livewire\Livewire;
/**
* 'web' middleware applied to all routes
*
* @see \App\Providers\Route::mapWebRoutes
*/
Route::post('integrations/esign/callback', EsignCallbacks::class)
->middleware('throttle:120,1')
->name('integrations.esign.callback');
// 钉钉 AI 互动卡片回传请求;来源由 x-ddpaas-signature 校验。
Route::post('webhooks/dingtalk/card/supplier-confirmation', SupplierSummaryCardCallback::class)
->middleware('throttle:120,1')
->name('integrations.dingtalk.supplier-summary-card.callback');
// 快递入驻:快递方扫码打开的免登录填报页,凭链接里的随机 token 访问。
Route::get('onboarding/courier/{token}', [CourierOnboardingForms::class, 'show'])
->middleware('throttle:60,1')
->where('token', '[A-Za-z0-9]{32,64}')
->name('courier-onboarding.form');
Route::post('onboarding/courier/{token}', [CourierOnboardingForms::class, 'update'])
->middleware('throttle:20,1')
->where('token', '[A-Za-z0-9]{32,64}')
->name('courier-onboarding.update');
Route::get('supplier-negative-alert/task/{token}', [SupplierNegativeAlertDingTalkForms::class, 'show'])
->middleware('throttle:60,1')
->where('token', '[A-Za-z0-9]{64}')
->name('supplier-negative-alert.task');
Route::post('supplier-negative-alert/task/{token}', [SupplierNegativeAlertDingTalkForms::class, 'update'])
->middleware('throttle:20,1')
->where('token', '[A-Za-z0-9]{64}')
->name('supplier-negative-alert.task.update');
Route::get('supplier-negative-alert/task/{token}/attachments/{attachment}', [SupplierNegativeAlertDingTalkForms::class, 'attachment'])
->middleware('throttle:120,1')
->where('token', '[A-Za-z0-9]{64}')
->whereNumber('attachment')
->name('supplier-negative-alert.task.attachment');
Route::get('hxb-verification/{token}', [HxbOtpVerificationController::class, 'show'])
->middleware('throttle:60,1')
->where('token', '[a-f0-9]{64}')
->name('hxb-otp.form');
Route::post('hxb-verification/{token}', [HxbOtpVerificationController::class, 'submit'])
->middleware('throttle:20,1')
->where('token', '[a-f0-9]{64}')
->name('hxb-otp.submit');
Livewire::setScriptRoute(function ($handle) {
$base = request()->getBasePath();
return Route::get($base . '/vendor/livewire/livewire/dist/livewire.min.js', $handle);
});