123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260 |
- <?php
- /*
- * This file is part of the Jiannei/lumen-api-starter.
- *
- * (c) Jiannei <longjian.huang@foxmail.com>
- *
- * This source file is subject to the MIT license that is bundled
- * with this source code in the file LICENSE.
- */
- use Illuminate\Support\Facades\Route;
- /*
- |--------------------------------------------------------------------------
- | Application Routes
- |--------------------------------------------------------------------------
- |
- | Here is where you can register all of the routes for an application.
- | It is a breeze. Simply tell Lumen the URIs it should respond to
- | and give it the Closure to call when that URI is requested.
- |
- */
- /**
- * 公共
- */
- Route::group([
- 'prefix' => 'common'
- ], function () {
- Route::get('enums', 'CommonController@enums');
- Route::get('clear', 'CommonController@clear');
- // Route::get('test', 'CommonController@test');
- });
- /**
- * 基础模块
- */
- Route::group([
- 'namespace' => 'Base',
- 'prefix' => 'base'
- ], function () {
- //账号密码登录
- Route::post('/auth/login', 'AuthController@accountLogin');
- //微信小程序登录
- // Route::post('/auth/mini-program-login', 'AuthController@miniProgramLogin');
- // Route::post('/auth/mini-program-mobile-login', 'AuthController@miniProgramMobileLogin');
- // Route::post('/auth/test-mobile-login', 'AuthController@testMobile');
- //配置文件
- Route::post('/settings/configs', 'SettingController@configs');
- Route::post('/dicts/configs', 'DictController@configs');
- Route::get('/dicts/config', 'DictController@config');
- Route::get('/admin/select-options', 'AdminController@selectOptions');
- Route::group([
- 'middleware' => ['auth:admins', 'auth.role:admin', 'single:admins']
- // 'middleware' => ['jwt.auth', 'jwt.refresh', 'auth.role:admin']
- ], function () {
- Route::get('/auth/me', 'AuthController@me');
- Route::get('/auth/logout', 'AuthController@logout');
- // Route::post('/auth/refresh-token', 'AuthController@refreshToken');
- Route::post('/auth/validate-password', 'AuthController@validatePassword');
- // Route::post('/auth/bind-wechat', 'AuthController@bindWechat');
- // Route::get('/auth/unbind-wechat', 'AuthController@unbindWechat');
- // Route::post('/auth/mini-bind-mobile', 'AuthController@miniBindMobile');
- Route::post('/auth/update-password', 'AuthController@updatePassword');
- Route::post('/auth/update-info', 'AuthController@updateInfo');
- Route::post('/auth/mobile/send-validate-code', 'AuthController@sendValidateCode');
- Route::post('/auth/mobile', 'AuthController@updateMobile');
- //日志记录
- Route::get('/logs', 'LogController@index');
- Route::get('/log', 'LogController@show');
- Route::post('/log/app-upload-log', 'LogController@appUploadLog');
- //字典管理
- Route::get('/dicts', 'DictController@index');
- Route::post('/dict', 'DictController@store');
- Route::get('/dict', 'DictController@show');
- Route::put('/dict', 'DictController@update');
- Route::delete('/dict', 'DictController@destroy');
- Route::get('/dict-details', 'DictDetailController@index');
- Route::post('/dict-detail', 'DictDetailController@store');
- Route::get('/dict-detail', 'DictController@show');
- Route::put('/dict-detail', 'DictDetailController@update');
- Route::delete('/dict-detail', 'DictDetailController@destroy');
- //配置管理
- Route::get('/settings', 'SettingController@index');
- Route::post('/setting', 'SettingController@store');
- Route::get('/setting', 'SettingController@show');
- Route::put('/setting', 'SettingController@update');
- Route::delete('/setting', 'SettingController@destroy');
- Route::post('/setting/save', 'SettingController@save');
- Route::get('/setting/tags', 'SettingController@tags');
- //部门管理
- Route::get('/departments', 'DepartmentController@index');
- Route::post('/department', 'DepartmentController@store');
- Route::get('/department', 'DepartmentController@show');
- Route::put('/department', 'DepartmentController@update');
- Route::delete('/department', 'DepartmentController@destroy');
- Route::get('/department/select-options', 'DepartmentController@selectOptions');
- //菜单管理
- Route::get('/menus', 'MenuController@index');
- Route::post('/menu', 'MenuController@store');
- Route::get('/menu', 'MenuController@show');
- Route::put('/menu', 'MenuController@update');
- Route::delete('/menu', 'MenuController@destroy');
- Route::get('/menu/icons', 'MenuController@icons');
- Route::get('/menu/my-menus', 'MenuController@myMenus');
- //角色管理
- Route::get('/roles', 'RoleController@index');
- Route::post('/role', 'RoleController@store');
- Route::get('/role', 'RoleController@show');
- Route::put('/role', 'RoleController@update');
- Route::delete('/role', 'RoleController@destroy');
- Route::post('/role/save-menus', 'RoleController@saveMenusPermissions');
- Route::post('/role/save-data-permissions', 'RoleController@saveDataPermissions');
- Route::post('/role/save-apis-permissions', 'RoleController@saveApisPermissions');
- Route::get('/role/permissions', 'RoleController@getRolePermissions');
- Route::get('/role/select-options', 'RoleController@selectOptions');
- //API权限列表
- Route::get('/permissions', 'PermissionController@index');
- //资源管理
- Route::post('/resource/upload', 'ResourceController@upload');
- Route::post('/resource/download', 'ResourceController@download');
- Route::post('/resource/base64-to-img', 'ResourceController@base64ToImg');
- //管理员管理
- Route::get('/admins', 'AdminController@index');
- Route::post('/admin', 'AdminController@store');
- Route::get('/admin', 'AdminController@show');
- Route::put('/admin', 'AdminController@update');
- Route::delete('/admin', 'AdminController@destroy');
- Route::post('/admin/batch-delete', 'AdminController@batchDelete');
- Route::post('/admin/reset-password', 'AdminController@resetPassword');
- Route::post('/admin/batch-update-status', 'AdminController@batchUpdateStatus');
- //任务管理
- Route::get('/tasks', 'TaskController@index');
- Route::get('/area/select-options', 'AreaController@selectOptions');
- //用户管理
- Route::get('/users', 'UserController@index');
- Route::post('/user', 'UserController@store');
- Route::post('/user/batch-update-status', 'UserController@batchUpdateStatus');
- Route::get('/user', 'UserController@show');
- Route::put('/user', 'UserController@update');
- Route::delete('/user', 'UserController@destroy');
- Route::get('/user/select-options', 'UserController@selectOptions');
- //地区管理
- Route::get('/areas', 'AreaController@index');
- Route::post('/area', 'AreaController@store');
- Route::get('/area', 'AreaController@show');
- Route::put('/area', 'AreaController@update');
- Route::delete('/area', 'AreaController@destroy');
- Route::get('/area/select-options', 'AreaController@selectOptions');
- });
- });
- /**
- * 大卫博士
- */
- Route::group([
- 'prefix' => 'dwbs',
- 'namespace' => 'Dwbs',
- 'middleware' => ['auth:admins', 'auth.role:admin', 'single:admins']
- ], function () {
- //礼品管理
- Route::get('/shop-goods', 'ShopGoodController@index');
- Route::post('/shop-good', 'ShopGoodController@store');
- Route::get('/shop-good', 'ShopGoodController@show');
- Route::put('/shop-good', 'ShopGoodController@update');
- Route::delete('/shop-good', 'ShopGoodController@destroy');
- Route::get('/shop-good/select-options', 'ShopGoodController@selectOptions');
- // Route::post('/shop-good/kucun', 'ShopGoodController@updateGoodNums');
- Route::post('/shop-good/addkucun', 'ShopGoodController@addGoodNums');
- Route::get('/shop-good/reload-kucun', 'ShopGoodController@reloadGoodKucun');
- //兑换订单管理
- Route::get('/shop-orders', 'ShopOrderController@index');
- // Route::post('/shop-order', 'ShopOrderController@store');
- Route::get('/shop-order', 'ShopOrderController@show');
- Route::put('/shop-order', 'ShopOrderController@update');
- Route::post('/shop-order/update-address', 'ShopOrderController@updateAddress');
- // Route::delete('/shop-order', 'ShopOrderController@destroy');
- // Route::get('/shop-order/select-options', 'ShopOrderController@selectOptions');
- Route::post('/shop-order/batch-check', 'ShopOrderController@batchCheck');
- Route::post('/shop-order/import-wuliu', 'ShopOrderController@importWuLiu');
- Route::post('/shop-order/export', 'ShopOrderController@export');
- Route::get('/shop-order/express', 'ShopOrderController@express');
- Route::post('/shop-order/close-order', 'ShopOrderController@closeOrder');
- //产品管理
- Route::get('/goods', 'GoodController@index');
- Route::post('/good', 'GoodController@store');
- Route::get('/good', 'GoodController@show');
- Route::put('/good', 'GoodController@update');
- Route::delete('/good', 'GoodController@destroy');
- Route::get('/good/select-options', 'GoodController@selectOptions');
- //订单管理
- Route::get('/orders', 'OrderController@index');
- Route::get('/order', 'OrderController@show');
- Route::get('/order/export-user-order-good', 'OrderController@exportUserOrderGood');
- //学分记录
- Route::get('/xuefens', 'UserXuefenController@index');
- Route::get('/xuefen', 'UserXuefenController@show');
- //积分记录
- Route::get('/jifens', 'UserJifenController@index');
- Route::get('/jifen', 'UserJifenController@show');
- //分类管理
- Route::get('/business-categories', 'BusinessCategoryController@index');
- Route::post('/business-category', 'BusinessCategoryController@store');
- Route::get('/business-category', 'BusinessCategoryController@show');
- Route::put('/business-category', 'BusinessCategoryController@update');
- Route::delete('/business-category', 'BusinessCategoryController@destroy');
- Route::get('/business-category/select-options', 'BusinessCategoryController@selectOptions');
- //分类管理
- Route::get('/business-shops', 'BusinessSchoolController@index');
- Route::post('/business-shop', 'BusinessSchoolController@store');
- Route::get('/business-shop', 'BusinessSchoolController@show');
- Route::put('/business-shop', 'BusinessSchoolController@update');
- Route::delete('/business-shop', 'BusinessSchoolController@destroy');
- Route::get('/business-shop/select-options', 'BusinessSchoolController@selectOptions');
- Route::get('/ranking/good-nums', 'RankingController@goodNumsStatistics');
- Route::get('/statistical-resources', 'StatisticalResourceController@index');
- Route::get('/statistical-resource', 'StatisticalResourceController@show');
- Route::get('/statistical-resource/download', 'StatisticalResourceController@download');
- //证书管理
- Route::get('/zhengshus', 'ZhengshuController@index');
- Route::post('/zhengshu', 'ZhengshuController@store');
- Route::get('/zhengshu', 'ZhengshuController@show');
- Route::put('/zhengshu', 'ZhengshuController@update');
- Route::delete('/zhengshu', 'ZhengshuController@destroy');
- Route::get('/zhengshu/select-options', 'ZhengshuController@selectOptions');
- });
|