admin.php 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. <?php
  2. /*
  3. |--------------------------------------------------------------------------
  4. | Web Routes
  5. |--------------------------------------------------------------------------
  6. |
  7. | Here is where you can register web routes for your application. These
  8. | routes are loaded by the RouteServiceProvider within a group which
  9. | contains the "web" middleware group. Now create something great!
  10. |
  11. */
  12. Route::fallback(function(){
  13. return response()->json(['message' => 'Not Found'], 404);
  14. });
  15. Route::post('login/login', 'LoginController@login');
  16. Route::group(['middleware'=>'check_token','admin_request_info'],function ($api) {
  17. $api->group(['prefix' => 'login'], function ($api) {
  18. $api->post('logout', 'LoginController@logout');
  19. $api->get('user', 'LoginController@user');
  20. });
  21. $api->group(['prefix' => 'index'], function ($api) {
  22. $api->get('index', 'IndexController@index');
  23. $api->get('get_agent_pay_rate', 'IndexController@getAgentPayRate');
  24. $api->get('get_sale_order_by_all', 'IndexController@getSaleOrderByAll');
  25. $api->get('export_sale_order_by_all', 'IndexController@exportSaleOrderByAll');
  26. $api->get('yesterday_order_by', 'IndexController@yesterdayOrderBy');
  27. $api->get('all_order_by', 'IndexController@allOrderBy');
  28. $api->get('get_sale_info', 'IndexController@getSaleinfo');
  29. $api->get('get_history_total', 'IndexController@getHistoryTotal');
  30. $api->get('get_sku_history_num', 'IndexController@getSkuHistoryNum');
  31. $api->get('get_sku_order_by', 'IndexController@getSkuOrderBy');
  32. $api->get('get3_days_sales0', 'IndexController@get3DaysSales0');
  33. $api->get('export3_days_sales0', 'IndexController@export3DaysSales0');
  34. $api->get('get_every_add_agent', 'IndexController@getEveryAddAgent');
  35. $api->get('get_every_add_agent_sort', 'IndexController@getEveryAddAgentSort');
  36. $api->get('get_every_add_agent_line', 'IndexController@getEveryAddAgentLine');
  37. });
  38. $api->group(['prefix' => 'admin'], function ($api) {
  39. $api->get('index', 'AdminController@index');
  40. $api->post('add', 'AdminController@add');
  41. $api->post('edit', 'AdminController@edit');
  42. $api->post('destroy', 'AdminController@destroy');
  43. $api->post('disabled', 'AdminController@disabled');
  44. $api->post('upload_role', 'AdminController@uploadRole');
  45. $api->post('update_role', 'AdminController@updateRole');
  46. $api->get('get_all_roles', 'AdminController@getAllRoles');
  47. });
  48. $api->group(['prefix' => 'test_user'], function ($api) {
  49. $api->get('index', 'TestUserController@index');
  50. });
  51. $api->group(['prefix' => 'role'], function ($api) {
  52. $api->get('index', 'RoleController@index');
  53. $api->post('add', 'RoleController@add');
  54. $api->post('edit', 'RoleController@edit');
  55. $api->post('destroy', 'RoleController@destroy');
  56. });
  57. $api->group(['prefix' => 'user'], function ($api) {
  58. $api->get('list', 'UserController@list');
  59. $api->get('export', 'UserController@export');
  60. $api->post('disabled', 'UserController@disabled');
  61. $api->post('editUserInfo', 'UserController@editUserInfo');
  62. });
  63. $api->group(['prefix' => 'setting'], function ($api) {
  64. $api->get('getUploadQiNiuToken', 'SettingController@getUploadQiNiuToken');
  65. $api->get('get_video_all', 'SettingController@getVideoAll');
  66. $api->get('get_video_2id', 'SettingController@getVideo2Id');
  67. $api->post('add_video', 'SettingController@addVideo');
  68. $api->post('edit_video', 'SettingController@editVideo');
  69. $api->post('delete_video', 'SettingController@deleteVideo');
  70. });
  71. $api->group(['prefix' => 'order'], function ($api) {
  72. $api->get('list', 'OrderController@list');
  73. $api->get('get_order_details', 'OrderController@getOrderDetails');
  74. $api->get('export', 'OrderController@export');
  75. $api->get('get_order_express', 'OrderController@getOrderExpress');
  76. $api->get('get_abnormal_order', 'OrderController@getAbnormalOrder');
  77. $api->get('get_order_daily_sales', 'OrderController@getOrderDailySales');
  78. $api->get('get_store_top10', 'OrderController@getStoreTop10');
  79. });
  80. $api->group(['prefix' => 'refund'], function ($api) {
  81. $api->get('get_refund_order', 'RefundController@getRefundOrder');
  82. $api->get('get_refund_order_detail', 'RefundController@getRefundOrderDetail');
  83. $api->post('agree_refund', 'RefundController@agreeRefund');
  84. });
  85. $api->group(['prefix' => 'store'], function ($api) {
  86. $api->get('list', 'StoreController@list');
  87. $api->get('get_data_info', 'StoreController@getDataInfo');
  88. $api->get('export', 'StoreController@export');
  89. $api->get('get_all_user', 'StoreController@getAllUser');
  90. $api->post('disabled', 'StoreController@disabled');
  91. $api->get('query', 'StoreController@query');
  92. $api->get('get_account_info', 'StoreController@getAccountInfo');
  93. $api->get('get_account_detail', 'StoreController@getAccountDetail');
  94. $api->get('get_account_detail_all', 'StoreController@getAccountDetailAll');
  95. $api->post('deleteStore', 'StoreController@deleteStore');
  96. $api->post('resDelStore', 'StoreController@resDelStore');
  97. $api->post('newStore', 'StoreController@newStore');
  98. });
  99. $api->group(['prefix' => 'goods'], function ($api) {
  100. $api->get('list', 'GoodsController@list');
  101. $api->post('add_goods', 'GoodsController@addGoods');
  102. $api->post('edit_goods', 'GoodsController@editGoods');
  103. $api->post('edit_size_desc', 'GoodsController@editSizeDesc');
  104. $api->post('shelves', 'GoodsController@shelves');
  105. $api->post('upload_img', 'GoodsController@uploadImg');
  106. $api->post('destroy', 'GoodsController@destroy');
  107. $api->get('get_goods_sku_sales_value', 'GoodsController@getGoodsSkuSalesValue');
  108. });
  109. $api->group(['prefix' => 'comment'], function ($api) {
  110. $api->get('list', 'CommentController@list');
  111. $api->get('detail', 'CommentController@detail');
  112. $api->post('destroy', 'CommentController@destroy');
  113. });
  114. $api->group(['prefix' => 'product'], function ($api) {
  115. $api->get('/getProductInfo', 'ProductController@getProductInfo');
  116. $api->post('/uploadImg', 'ProductController@uploadImg');
  117. $api->post('/uploadVideo', 'ProductController@uploadVideo');
  118. $api->post('/saveProductInfo', 'ProductController@saveProductInfo');
  119. });
  120. });