admin.php 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260
  1. <?php
  2. /*
  3. * This file is part of the Jiannei/lumen-api-starter.
  4. *
  5. * (c) Jiannei <longjian.huang@foxmail.com>
  6. *
  7. * This source file is subject to the MIT license that is bundled
  8. * with this source code in the file LICENSE.
  9. */
  10. use Illuminate\Support\Facades\Route;
  11. /*
  12. |--------------------------------------------------------------------------
  13. | Application Routes
  14. |--------------------------------------------------------------------------
  15. |
  16. | Here is where you can register all of the routes for an application.
  17. | It is a breeze. Simply tell Lumen the URIs it should respond to
  18. | and give it the Closure to call when that URI is requested.
  19. |
  20. */
  21. /**
  22. * 公共
  23. */
  24. Route::group([
  25. 'prefix' => 'common'
  26. ], function () {
  27. Route::get('enums', 'CommonController@enums');
  28. Route::get('clear', 'CommonController@clear');
  29. // Route::get('test', 'CommonController@test');
  30. });
  31. /**
  32. * 基础模块
  33. */
  34. Route::group([
  35. 'namespace' => 'Base',
  36. 'prefix' => 'base'
  37. ], function () {
  38. //账号密码登录
  39. Route::post('/auth/login', 'AuthController@accountLogin');
  40. //微信小程序登录
  41. // Route::post('/auth/mini-program-login', 'AuthController@miniProgramLogin');
  42. // Route::post('/auth/mini-program-mobile-login', 'AuthController@miniProgramMobileLogin');
  43. // Route::post('/auth/test-mobile-login', 'AuthController@testMobile');
  44. //配置文件
  45. Route::post('/settings/configs', 'SettingController@configs');
  46. Route::post('/dicts/configs', 'DictController@configs');
  47. Route::get('/dicts/config', 'DictController@config');
  48. Route::get('/admin/select-options', 'AdminController@selectOptions');
  49. Route::group([
  50. 'middleware' => ['auth:admins', 'auth.role:admin', 'single:admins']
  51. // 'middleware' => ['jwt.auth', 'jwt.refresh', 'auth.role:admin']
  52. ], function () {
  53. Route::get('/auth/me', 'AuthController@me');
  54. Route::get('/auth/logout', 'AuthController@logout');
  55. // Route::post('/auth/refresh-token', 'AuthController@refreshToken');
  56. Route::post('/auth/validate-password', 'AuthController@validatePassword');
  57. // Route::post('/auth/bind-wechat', 'AuthController@bindWechat');
  58. // Route::get('/auth/unbind-wechat', 'AuthController@unbindWechat');
  59. // Route::post('/auth/mini-bind-mobile', 'AuthController@miniBindMobile');
  60. Route::post('/auth/update-password', 'AuthController@updatePassword');
  61. Route::post('/auth/update-info', 'AuthController@updateInfo');
  62. Route::post('/auth/mobile/send-validate-code', 'AuthController@sendValidateCode');
  63. Route::post('/auth/mobile', 'AuthController@updateMobile');
  64. //日志记录
  65. Route::get('/logs', 'LogController@index');
  66. Route::get('/log', 'LogController@show');
  67. Route::post('/log/app-upload-log', 'LogController@appUploadLog');
  68. //字典管理
  69. Route::get('/dicts', 'DictController@index');
  70. Route::post('/dict', 'DictController@store');
  71. Route::get('/dict', 'DictController@show');
  72. Route::put('/dict', 'DictController@update');
  73. Route::delete('/dict', 'DictController@destroy');
  74. Route::get('/dict-details', 'DictDetailController@index');
  75. Route::post('/dict-detail', 'DictDetailController@store');
  76. Route::get('/dict-detail', 'DictController@show');
  77. Route::put('/dict-detail', 'DictDetailController@update');
  78. Route::delete('/dict-detail', 'DictDetailController@destroy');
  79. //配置管理
  80. Route::get('/settings', 'SettingController@index');
  81. Route::post('/setting', 'SettingController@store');
  82. Route::get('/setting', 'SettingController@show');
  83. Route::put('/setting', 'SettingController@update');
  84. Route::delete('/setting', 'SettingController@destroy');
  85. Route::post('/setting/save', 'SettingController@save');
  86. Route::get('/setting/tags', 'SettingController@tags');
  87. //部门管理
  88. Route::get('/departments', 'DepartmentController@index');
  89. Route::post('/department', 'DepartmentController@store');
  90. Route::get('/department', 'DepartmentController@show');
  91. Route::put('/department', 'DepartmentController@update');
  92. Route::delete('/department', 'DepartmentController@destroy');
  93. Route::get('/department/select-options', 'DepartmentController@selectOptions');
  94. //菜单管理
  95. Route::get('/menus', 'MenuController@index');
  96. Route::post('/menu', 'MenuController@store');
  97. Route::get('/menu', 'MenuController@show');
  98. Route::put('/menu', 'MenuController@update');
  99. Route::delete('/menu', 'MenuController@destroy');
  100. Route::get('/menu/icons', 'MenuController@icons');
  101. Route::get('/menu/my-menus', 'MenuController@myMenus');
  102. //角色管理
  103. Route::get('/roles', 'RoleController@index');
  104. Route::post('/role', 'RoleController@store');
  105. Route::get('/role', 'RoleController@show');
  106. Route::put('/role', 'RoleController@update');
  107. Route::delete('/role', 'RoleController@destroy');
  108. Route::post('/role/save-menus', 'RoleController@saveMenusPermissions');
  109. Route::post('/role/save-data-permissions', 'RoleController@saveDataPermissions');
  110. Route::post('/role/save-apis-permissions', 'RoleController@saveApisPermissions');
  111. Route::get('/role/permissions', 'RoleController@getRolePermissions');
  112. Route::get('/role/select-options', 'RoleController@selectOptions');
  113. //API权限列表
  114. Route::get('/permissions', 'PermissionController@index');
  115. //资源管理
  116. Route::post('/resource/upload', 'ResourceController@upload');
  117. Route::post('/resource/download', 'ResourceController@download');
  118. Route::post('/resource/base64-to-img', 'ResourceController@base64ToImg');
  119. //管理员管理
  120. Route::get('/admins', 'AdminController@index');
  121. Route::post('/admin', 'AdminController@store');
  122. Route::get('/admin', 'AdminController@show');
  123. Route::put('/admin', 'AdminController@update');
  124. Route::delete('/admin', 'AdminController@destroy');
  125. Route::post('/admin/batch-delete', 'AdminController@batchDelete');
  126. Route::post('/admin/reset-password', 'AdminController@resetPassword');
  127. Route::post('/admin/batch-update-status', 'AdminController@batchUpdateStatus');
  128. //任务管理
  129. Route::get('/tasks', 'TaskController@index');
  130. Route::get('/area/select-options', 'AreaController@selectOptions');
  131. //用户管理
  132. Route::get('/users', 'UserController@index');
  133. Route::post('/user', 'UserController@store');
  134. Route::post('/user/batch-update-status', 'UserController@batchUpdateStatus');
  135. Route::get('/user', 'UserController@show');
  136. Route::put('/user', 'UserController@update');
  137. Route::delete('/user', 'UserController@destroy');
  138. Route::get('/user/select-options', 'UserController@selectOptions');
  139. //地区管理
  140. Route::get('/areas', 'AreaController@index');
  141. Route::post('/area', 'AreaController@store');
  142. Route::get('/area', 'AreaController@show');
  143. Route::put('/area', 'AreaController@update');
  144. Route::delete('/area', 'AreaController@destroy');
  145. Route::get('/area/select-options', 'AreaController@selectOptions');
  146. });
  147. });
  148. /**
  149. * 大卫博士
  150. */
  151. Route::group([
  152. 'prefix' => 'dwbs',
  153. 'namespace' => 'Dwbs',
  154. 'middleware' => ['auth:admins', 'auth.role:admin', 'single:admins']
  155. ], function () {
  156. //礼品管理
  157. Route::get('/shop-goods', 'ShopGoodController@index');
  158. Route::post('/shop-good', 'ShopGoodController@store');
  159. Route::get('/shop-good', 'ShopGoodController@show');
  160. Route::put('/shop-good', 'ShopGoodController@update');
  161. Route::delete('/shop-good', 'ShopGoodController@destroy');
  162. Route::get('/shop-good/select-options', 'ShopGoodController@selectOptions');
  163. // Route::post('/shop-good/kucun', 'ShopGoodController@updateGoodNums');
  164. Route::post('/shop-good/addkucun', 'ShopGoodController@addGoodNums');
  165. Route::get('/shop-good/reload-kucun', 'ShopGoodController@reloadGoodKucun');
  166. //兑换订单管理
  167. Route::get('/shop-orders', 'ShopOrderController@index');
  168. // Route::post('/shop-order', 'ShopOrderController@store');
  169. Route::get('/shop-order', 'ShopOrderController@show');
  170. Route::put('/shop-order', 'ShopOrderController@update');
  171. Route::post('/shop-order/update-address', 'ShopOrderController@updateAddress');
  172. // Route::delete('/shop-order', 'ShopOrderController@destroy');
  173. // Route::get('/shop-order/select-options', 'ShopOrderController@selectOptions');
  174. Route::post('/shop-order/batch-check', 'ShopOrderController@batchCheck');
  175. Route::post('/shop-order/import-wuliu', 'ShopOrderController@importWuLiu');
  176. Route::post('/shop-order/export', 'ShopOrderController@export');
  177. Route::get('/shop-order/express', 'ShopOrderController@express');
  178. Route::post('/shop-order/close-order', 'ShopOrderController@closeOrder');
  179. //产品管理
  180. Route::get('/goods', 'GoodController@index');
  181. Route::post('/good', 'GoodController@store');
  182. Route::get('/good', 'GoodController@show');
  183. Route::put('/good', 'GoodController@update');
  184. Route::delete('/good', 'GoodController@destroy');
  185. Route::get('/good/select-options', 'GoodController@selectOptions');
  186. //订单管理
  187. Route::get('/orders', 'OrderController@index');
  188. Route::get('/order', 'OrderController@show');
  189. Route::get('/order/export-user-order-good', 'OrderController@exportUserOrderGood');
  190. //学分记录
  191. Route::get('/xuefens', 'UserXuefenController@index');
  192. Route::get('/xuefen', 'UserXuefenController@show');
  193. //积分记录
  194. Route::get('/jifens', 'UserJifenController@index');
  195. Route::get('/jifen', 'UserJifenController@show');
  196. //分类管理
  197. Route::get('/business-categories', 'BusinessCategoryController@index');
  198. Route::post('/business-category', 'BusinessCategoryController@store');
  199. Route::get('/business-category', 'BusinessCategoryController@show');
  200. Route::put('/business-category', 'BusinessCategoryController@update');
  201. Route::delete('/business-category', 'BusinessCategoryController@destroy');
  202. Route::get('/business-category/select-options', 'BusinessCategoryController@selectOptions');
  203. //分类管理
  204. Route::get('/business-shops', 'BusinessSchoolController@index');
  205. Route::post('/business-shop', 'BusinessSchoolController@store');
  206. Route::get('/business-shop', 'BusinessSchoolController@show');
  207. Route::put('/business-shop', 'BusinessSchoolController@update');
  208. Route::delete('/business-shop', 'BusinessSchoolController@destroy');
  209. Route::get('/business-shop/select-options', 'BusinessSchoolController@selectOptions');
  210. Route::get('/ranking/good-nums', 'RankingController@goodNumsStatistics');
  211. Route::get('/statistical-resources', 'StatisticalResourceController@index');
  212. Route::get('/statistical-resource', 'StatisticalResourceController@show');
  213. Route::get('/statistical-resource/download', 'StatisticalResourceController@download');
  214. //证书管理
  215. Route::get('/zhengshus', 'ZhengshuController@index');
  216. Route::post('/zhengshu', 'ZhengshuController@store');
  217. Route::get('/zhengshu', 'ZhengshuController@show');
  218. Route::put('/zhengshu', 'ZhengshuController@update');
  219. Route::delete('/zhengshu', 'ZhengshuController@destroy');
  220. Route::get('/zhengshu/select-options', 'ZhengshuController@selectOptions');
  221. });