admin.php 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246
  1. <?php
  2. Route::group(['namespace' => 'platform\controllers'], function () {
  3. Route::get('login', 'LoginController@showLoginForm')->name('admin.login');
  4. Route::post('login', 'LoginController@login');
  5. Route::get('logout', 'LoginController@logout');
  6. Route::post('logout', 'LoginController@logout');
  7. Route::get('register', 'RegisterController@showRegistrationForm')->name('admin.register');
  8. Route::post('register', 'RegisterController@register');
  9. Route::post('contactInformation', 'RegisterController@contactInformation');
  10. Route::post('followArticle', 'RegisterController@followArticle');
  11. Route::any('changePwd', 'ResetpwdController@changePwd'); //修改密码
  12. Route::any('sendCode', 'ResetpwdController@sendCode'); //发送验证码
  13. Route::any('getCaptcha', 'ResetpwdController@getCaptcha'); //发送图形验证码
  14. Route::any('checkCode', 'ResetpwdController@checkCode'); //检查验证码
  15. Route::any('detail', 'ResetpwdController@detail'); //检查验证码
  16. Route::any('auth', 'ResetpwdController@authPassword'); // 管理员修改密码
  17. // Route::any('yunSwitch', 'YunSwitchController@index'); // 获取芸签平台开启公众号id
  18. Route::get('/', 'IndexController@index');
  19. // 安装向导
  20. Route::post('install/agreement', 'InstallController@agreement'); // 安装协议
  21. Route::post('install/check', 'InstallController@check'); // 运行环境检测
  22. Route::post('install/file_power', 'InstallController@filePower'); // 文件权限设置
  23. Route::post('install/set_info', 'InstallController@setInformation'); // 账号设置
  24. Route::post('install/create_data', 'InstallController@createData'); // 创建数据
  25. Route::post('install/delete', 'InstallController@delete'); // 删除控制器
  26. Route::post('install/random_user', 'InstallController@getRandomUser'); // 生成随机账号
  27. Route::post('install/random_psw', 'InstallController@getRandomPsw'); // 生成随机密码
  28. Route::get('center',['as' => 'admin.center', 'uses' => 'CenterController@index']);
  29. Route::get('login/site', 'LoginController@site'); // 登录页面返回数据
  30. Route::any('login/login_code', 'LoginController@loginCode'); //发送验证码
  31. Route::any('login/refresh_pic', 'LoginController@refreshPic'); //刷新验证码
  32. //发送注册手机验证码
  33. Route::any('register_code', 'RegisterController@registerCode');
  34. //管理员注册
  35. Route::any('register_admin', 'RegisterController@registerAdmin');
  36. //注册页面信息
  37. Route::any('register_site', 'RegisterController@registerSite');
  38. //刷新注册图形验证码
  39. Route::any('register_captcha', 'RegisterController@refreshCaptcha');
  40. });
  41. Route::group(['prefix' => 'system/upload', 'namespace' => 'platform\modules\system\controllers'], function (){
  42. // 上传
  43. Route::any('upload', 'UploadController@upload'); // 上传图片 or 视频 or 音频
  44. Route::any('image', 'UploadController@image'); // 图片列表
  45. Route::any('fetch', 'UploadController@fetch'); // 获取远程图片
  46. Route::any('delete', 'UploadController@delete'); // 删除图片
  47. Route::any('video', 'UploadController@video'); // 音频视频列表
  48. });
  49. Route::group(['middleware' => ['auth:admin', 'authAdmin', 'checkPasswordSafe', 'shopBootStrap', 'check']], function () {
  50. Route::get('index', ['as' => 'admin.index', 'uses' => '\app\platform\controllers\IndexController@index']);
  51. //清除缓存
  52. Route::get('clear', ['as' => 'admin.clear', 'uses' => '\app\platform\controllers\ClearController@index']);
  53. //用户管理
  54. Route::group(['namespace' => 'platform\modules\user\controllers'], function () {
  55. //权限管理路由
  56. Route::get('permission/{parentId}/create', ['as' => 'admin.permission.create', 'uses' => 'PermissionController@create']);
  57. Route::post('permission/{parentId}/create', ['as' => 'admin.permission.create', 'uses' => 'PermissionController@store']);
  58. Route::get('permission/{id}/edit', ['as' => 'admin.permission.edit', 'uses' => 'PermissionController@edit']);
  59. Route::post('permission/{id}/edit', ['as' => 'admin.permission.edit', 'uses' => 'PermissionController@update']);
  60. Route::get('permission/{id}/delete', ['as' => 'admin.permission.destroy', 'uses' => 'PermissionController@destroy']);
  61. Route::get('permission/{parentId}/index', ['as' => 'admin.permission.index', 'uses' => 'PermissionController@index']);
  62. Route::get('permission/index', ['as' => 'admin.permission.index', 'uses' => 'PermissionController@index']);
  63. Route::post('permission/index', ['as' => 'admin.permission.index', 'uses' => 'PermissionController@index']);
  64. //角色管理路由
  65. Route::get('role/index', ['as' => 'admin.role.index', 'uses' => 'RoleController@index']);
  66. Route::post('role/index', ['as' => 'admin.role.index', 'uses' => 'RoleController@index']);
  67. Route::get('role/create', ['as' => 'admin.role.create', 'uses' => 'RoleController@create']);
  68. Route::post('role/create', ['as' => 'admin.role.create', 'uses' => 'RoleController@store']);
  69. Route::get('role/{id}/edit', ['as' => 'admin.role.edit', 'uses' => 'RoleController@edit']);
  70. Route::post('role/{id}/edit', ['as' => 'admin.role.edit', 'uses' => 'RoleController@update']);
  71. Route::get('role/{id}/delete', ['as' => 'admin.role.destroy', 'uses' => 'RoleController@destroy']);
  72. });
  73. // 站点管理
  74. Route::group(['prefix' => 'system', 'namespace' => 'platform\modules\system\controllers'], function (){
  75. // 站点设置
  76. Route::any('site', 'SiteController@index');
  77. // 附件设置-全局设置
  78. Route::any('globals', 'AttachmentController@globals');
  79. // 附件设置-远程设置
  80. Route::any('remote', 'AttachmentController@remote');
  81. // 附件设置-远程设置-阿里云搜索bucket
  82. Route::post('bucket', 'AttachmentController@bucket');
  83. // 附件设置-远程设置-测试阿里云配置
  84. Route::any('oss', 'AttachmentController@oss');
  85. // 附件设置-远程设置-测试腾讯云配置
  86. Route::any('cos', 'AttachmentController@cos');
  87. // 附件设置-远程设置-测试华为云配置
  88. Route::any('obs', 'AttachmentController@obs');
  89. // 授权检查
  90. Route::any('update/system-info', 'UpdateController@systemInfo');
  91. // 检查更新
  92. Route::get('update/verifyCheck', 'UpdateController@verifyCheck');
  93. // 后台文件
  94. Route::any('update/fileDownload', 'UpdateController@fileDownload');
  95. // 更新日志
  96. Route::any('update/log', 'UpdateController@log');
  97. // 版权
  98. Route::any('update/pirate', 'UpdateController@pirate');
  99. // 前端压缩包下载
  100. Route::any('update/startDownload', 'UpdateController@startDownload');
  101. // 框架压缩包下载
  102. Route::any('update/FrameworkDownload', 'UpdateController@startDownloadFramework');
  103. //短信设置
  104. Route::any('sms', 'AttachmentController@sms');
  105. // 用户登录设置
  106. Route::any('login_set', 'LoginSetController@index');
  107. // 站点注册-显示
  108. Route::get('siteRegister/index', 'SiteRegisterController@index');
  109. // 站点注册-获取城市
  110. Route::post('siteRegister/getcity', 'SiteRegisterController@getcity');
  111. // 站点注册-获取地区
  112. Route::post('siteRegister/getarea', 'SiteRegisterController@getarea');
  113. // 站点注册-获取手机验证码
  114. Route::post('siteRegister/sendSms', 'SiteRegisterController@sendSms');
  115. // 站点注册-注册
  116. Route::post('siteRegister/register', 'SiteRegisterController@register');
  117. // 站点注册-重置密钥
  118. Route::post('siteRegister/reset', 'SiteRegisterController@resetSecretKey');
  119. // 获取白名单列表
  120. Route::post('whiteList', 'LoginSetController@whiteList');
  121. // 添加IP白名单
  122. Route::post('setWhiteList', 'LoginSetController@addWhiteList');
  123. // 编辑IP白名单
  124. Route::put('setWhiteList', 'LoginSetController@editWhiteList');
  125. // 删除IP白名单
  126. Route::delete('setWhiteList', 'LoginSetController@delWhiteList');
  127. });
  128. // 用户管理
  129. Route::group(['prefix' => 'user', 'namespace' => 'platform\modules\user\controllers'], function (){
  130. // 用户列表
  131. Route::post('index', 'AdminUserController@index');
  132. // 添加用户
  133. Route::any('create', 'AdminUserController@create');
  134. // 用户编辑
  135. Route::any('edit', 'AdminUserController@edit');
  136. // 用户修改状态
  137. Route::post('status', 'AdminUserController@status');
  138. // 用户修改密码
  139. Route::post('change', 'AdminUserController@change');
  140. // 用户主动修改密码
  141. Route::post('user_change', 'AdminUserController@userChange');
  142. // 用户信息修改
  143. Route::post('modify_user', 'AdminUserController@modifyCurrentUser');
  144. // 发送手机验证码
  145. Route::post('send_code', 'AdminUserController@sendCode');
  146. // 发送新手机号验证码
  147. Route::post('send_new_code', 'AdminUserController@sendNewCode');
  148. // 修改手机号
  149. Route::post('modify_mobile', 'AdminUserController@modifyMobile');
  150. // 平台列表
  151. Route::post('app_list', 'AdminUserController@applicationList');
  152. // 店员用户列表
  153. Route::post('clerk_list', 'AdminUserController@clerkList');
  154. //前台首页设置
  155. Route::match(['get', 'post'], 'home_set', 'ThemeSetController@index');
  156. //添加主题
  157. Route::post('create_theme', 'ThemeSetController@createTheme');
  158. //主题列表
  159. Route::post('theme_list', 'ThemeSetController@themeList');
  160. //编辑主题参数
  161. Route::match(['get', 'post'], 'edit_theme', 'ThemeSetController@editTheme');
  162. //编辑
  163. Route::match(['get', 'post'], 'multiple_list', 'ThemeSetController@multipleList');
  164. //编辑列表
  165. Route::match(['get', 'post'], 'dent_list', 'ThemeSetController@dentList');
  166. //联系方式列表
  167. Route::match(['get', 'post'], 'contact_list', 'ThemeSetController@contactList');
  168. });
  169. //插件套餐
  170. Route::group(['prefix'=> 'pluginsSetMeal', 'namespace'=>'platform\modules\pluginsSetMeal\controllers'], function (){
  171. //插件列表
  172. Route::any('pluginsList/','PluginsSetMealController@pluginsList');
  173. //新增套餐
  174. Route::any('addPluginsMeal/','PluginsSetMealController@addPluginsMeal');
  175. //启用套餐
  176. Route::any('empower/' ,'PluginsSetMealController@empower');
  177. //获取套餐列表
  178. Route::any('mealList/', 'PluginsSetMealController@getPlugins');
  179. //套餐使用记录
  180. Route::any('pluginsRecord/','PluginsSetMealController@record');
  181. //编辑套餐
  182. Route::any('editMeal/','PluginsSetMealController@editMeal');
  183. //删除套餐
  184. Route::post('delMeal/','PluginsSetMealController@delMeal');
  185. //更改套餐显示状态
  186. Route::post('changeSate/','PluginsSetMealController@changeSate');
  187. });
  188. Route::group(['namespace' => 'platform\modules\application\controllers'], function () {
  189. // 平台管理
  190. Route::any('application/', 'ApplicationController@index');
  191. //修改应用
  192. Route::post('application/update/{id}', 'ApplicationController@update');
  193. //启用禁用或恢复应用及跳转链接
  194. Route::get('application/switchStatus/{id}', 'ApplicationController@switchStatus');
  195. //置顶或取消置顶平台
  196. Route::get('application/setTop/{id}', 'ApplicationController@setTop');
  197. //详情
  198. Route::any('application/getApp', 'ApplicationController@getApp');
  199. //添加应用
  200. Route::post('application/add/', 'ApplicationController@add');
  201. //添加应用权限检测
  202. Route::any('application/checkAddRole/', 'ApplicationController@checkAddRole');
  203. //删除 加入回收站
  204. Route::get('application/delete/{id}', 'ApplicationController@delete');
  205. //回收站
  206. Route::any('application/recycle/', 'ApplicationController@recycle');
  207. //基础设置
  208. Route::any('application/basic_settings', 'ApplicationController@basicSettings');
  209. //获取新增平台时的管理员和插件套餐信息
  210. Route::get('application/getMessage', 'ApplicationController@getMessage');
  211. //图片上传
  212. Route::post('all/upload/', 'AllUploadController@upload');
  213. //本地图片列表
  214. Route::any('all/list/', 'AllUploadController@getLocalList');
  215. //删除图片列表中的数据
  216. Route::any('all/delImg/', 'AllUploadController@delLocalImg');
  217. //平台用户管理
  218. Route::any('appuser/', 'AppuserController@index');
  219. //添加平台用户
  220. Route::any('appuser/add', 'AppuserController@add');
  221. //删除平台用户
  222. Route::get('appuser/delete', 'AppuserController@delete');
  223. //搜索会员
  224. Route::any('appuser/checkname', 'AppuserController@checkname');
  225. });
  226. });
  227. Route::get('/', function () {
  228. return redirect('/admin/index');
  229. });