// +---------------------------------------------------------------------- use think\facade\Route; use app\common\middleware\AdminAuthMiddleware; use app\common\middleware\AdminTokenMiddleware; use app\common\middleware\AllowOriginMiddleware; use app\common\middleware\LogMiddleware; Route::group(function () { Route::get('check/queue', 'admin.Common/queue'); Route::group('excel', function () { Route::get('lst', '/lst')->name('systemStoreExcelLst')->option([ '_alias' => '列表' ]); Route::get('download/:id', '/download')->name('systemStoreExcelDownload')->option([ '_alias' => '下载', ]); Route::get('type', '/type')->option([ '_alias' => '类型', '_auth' => false, ]); })->prefix('merchant.store.Excel')->option([ '_path' => '/group/exportList', '_auth' => false, ]); Route::group('deposit', function () { Route::get('lst', '/lst')->name('systemDepositLst')->option([ '_alias' => '预存管理', ]); Route::post('create/deposit', '/create')->name('systemDepositCreate')->option([ '_alias' => '预存添加', ]); Route::get('form', '/createForm')->name('systemDepositCreateForm')->option([ '_alias' => '预存添加表单', '_auth' => false, '_form' => 'systemDepositCreate', ]); Route::delete(':id', '/delete')->name('systemDepositDelete')->option([ '_alias' => '预存删除', ]); Route::post(':id', '/update')->name('systemDepositUpdate')->option([ '_alias' => '预存编辑', ]); Route::get('form/:id', '/updateForm')->name('systemDepositUpdateForm')->option([ '_alias' => '预存编辑表单', '_auth' => false, '_form' => 'systemDepositUpdate', ]); })->prefix('admin.system.Deposit')->option([ '_path' => '/dashboard', '_auth' => true, ]); Route::group('lottery', function () { Route::get('lst', '/lst')->name('systemLotteryLst')->option([ '_alias' => '预存管理', ]); Route::post('save', '/save')->name('systemLotteryUpdate')->option([ '_alias' => '预存添加', ]); })->prefix('admin.system.Lottery')->option([ '_path' => '/dashboard', '_auth' => true, ]); Route::group('statistics', function () { Route::get('main', '/main')->name('systemStatisticsMain')->option([ '_alias' => '主要数据', ]); Route::get('order', '/order')->name('systemStatisticsOrder')->option([ '_alias' => '当日订单', ]); Route::get('order_num', '/orderNum')->name('systemStatisticsOrderNum')->option([ '_alias' => '当日订单数', ]); Route::get('order_user', '/orderUser')->name('systemStatisticsOrderUser')->option([ '_alias' => '当日支付人数', ]); Route::get('merchant_stock', '/merchantStock')->name('systemStatisticsMerchantStock')->option([ '_alias' => '商户销量', ]); Route::get('merchant_rate', '/merchantRate')->name('systemStatisticsMerchantRate')->option([ '_alias' => '商户访问量', ]); Route::get('merchant_visit', '/merchantVisit')->name('systemStatisticsMerchantVisit')->option([ '_alias' => '商户销售额', ]); Route::get('user_data', '/userData')->name('systemStatisticsUserData')->option([ '_alias' => '用户数据', ]); Route::get('get_admin_count', '/getAdminCount')->name('systemStatisticsAdminCount')->option([ '_alias' => '未处理业务统计', ]); Route::get('get_admin_todo', '/getAdminTodo')->name('systemStatisticsAdminTodo')->option([ '_alias' => '待办事项', ]); Route::get('get_merchant_top', '/getMerchantTop')->name('systemStatisticsMerchantTop')->option([ '_alias' => '商户销量排行', ]); })->prefix('admin.Common')->option([ '_path' => '/dashboard', '_auth' => true, ]); Route::get('statistics/user', 'merchant.Common/user')->name('systemStatisticsUser')->option([ '_alias' => '成交用户', '_path' => '/dashboard', '_auth' => true, ]); Route::get('statistics/user_rate', 'merchant.Common/userRate')->name('systemStatisticsUserRate')->option([ '_alias' => '成交用户占比', '_path' => '/dashboard', '_auth' => true, ]); //安全维护 Route::group('safety/database', function () { Route::get('lst', '/lst')->name('systemSafetyDatabaseLst')->option([ '_alias' => '数据库列表', ]); Route::get('fileList', '/fileList')->name('systemSafetyDatabaseFileList')->option([ '_alias' => '数据库备份列表', ]); Route::get('detail/:name', '/detail')->name('systemSafetyDatabaseDetail')->option([ '_alias' => '数据库备份详情', ]); Route::post('backups', '/backups')->name('systemSafetyDatabaseBackups')->option([ '_alias' => '备份', ]); Route::post('optimize', '/optimize')->name('systemSafetyDatabaseOptimize')->option([ '_alias' => '数据库优化', ]); Route::post('repair', '/repair')->name('systemSafetyDatabaseRepair')->option([ '_alias' => '数据库维护', ]); Route::get('download/:feilname', '/downloadFile')->name('systemSafetyDatabaseDownloadFile')->option([ '_alias' => '数据库备份下载', ]); Route::delete('delete', '/deleteFile')->name('systemSafetyDatabaseDeleteFile')->option([ '_alias' => '数据库备份删除', ]); })->prefix('admin.system.safety.Database')->option([ '_path' => '/maintain/dataBackup', '_auth' => true, ]); Route::post('clear/cache', 'admin.system.Cache/clearCache')->name('systemClearCache')->option([ '_alias' => '清除缓存', '_path' => '/maintain/cache', '_auth' => true, ]); Route::get('upload/config', 'admin.Common/uploadConfig')->name('systemUploadConfig')->option([ '_alias' => '上传配置', '_form' => 'systemSaveUploadConfig', '_auth' => false, ]); Route::post('upload/config', 'admin.Common/saveUploadConfig')->name('systemSaveUploadConfig')->option([ '_alias' => '上传配置保存', '_path' => '/systemForm/Basics/upload', '_auth' => true, ]); Route::get('upload/temp_key', 'admin.Common/temp_key')->name('systemSaveUploadTempKey')->option([ '_alias' => '上传视屏KEY', '_auth' => false, ]); Route::get('data_screen/:key', 'admin.Common/data_screen')->name('systemDataScreen')->option([ '_alias' => '数据大屏', '_auth' => true, '_path' => '/data-screen/index', ]); //协议 Route::group('agreement', function () { Route::get('keylst', '/getKeyLst')->name('systemAgreeKeyLsy')->option([ '_alias' => '协议列表', ]); Route::get(':key', '/getAgree')->name('systemAgreeDetail')->option([ '_alias'=> '协议', '_auth' => false, '_form' => 'systemAgreeSave', ]); Route::post(':key', '/saveAgree')->name('systemAgreeSave')->option([ '_alias' => '协议保存', '_init' => [ \crmeb\services\UpdateAuthInit::class,'agreement'], ]); })->prefix('admin.system.Cache')->option([ '_path' => '/setting/agreements', '_auth' => true, ]); Route::group('copyright', function () { Route::get('get', '/copyright')->name('systemCopyright')->option([ '_alias' => '获取去版权信息', ]); Route::get('auth', '/authCopyright')->name('systemAuthCopyright')->option([ '_alias' => '获取授权信息', ]); Route::post('save', '/svaeCopyright')->name('systemSaveCopyright')->option([ '_alias' => '保存去版权信息', ]); })->prefix('admin.Common')->option([ '_path' => '/maintain/auth', '_auth' => true, ]); Route::group(function () { Route::get('menus', 'admin.system.auth.Menu/menus'); Route::get('system/city/lst', 'merchant.store.shipping.City/lst'); //退出登陆 Route::get('logout', 'admin.system.admin.Login/logout'); //获取版本号 Route::get('version', 'admin.Common/version'); //授权 Route::post('auth_apply', 'admin.Common/auth_apply'); Route::get('check_auth', 'admin.Common/check_auth'); Route::get('auth', 'admin.Common/auth'); Route::get('pay/auth', 'admin.Common/payAuth'); Route::get('config', 'admin.Common/config'); Route::get('merchant/mer_auth', 'admin.system.merchant.MerchantType/mer_auth'); Route::post('upload/video', 'merchant.Common/uploadVideo'); })->option([ '_auth' => false, ]); })->middleware(AllowOriginMiddleware::class) ->middleware(AdminTokenMiddleware::class, true) ->middleware(AdminAuthMiddleware::class) ->middleware(LogMiddleware::class);