api.php 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. <?php
  2. use Illuminate\Http\Request;
  3. /*
  4. |--------------------------------------------------------------------------
  5. | API Routes
  6. |--------------------------------------------------------------------------
  7. |
  8. | Here is where you can register API routes for your application. These
  9. | routes are loaded by the RouteServiceProvider within a group which
  10. | is assigned the "api" middleware group. Enjoy building your API!
  11. |
  12. */
  13. Route::middleware('auth:api')->get('/user', function (Request $request) {
  14. return $request->user();
  15. });
  16. Route::any('login', 'Api\LoginController@login');
  17. Route::any('test', 'Api\TestController@aa');
  18. Route::any('getHeaderWord', 'Api\HeaderWordController@getHeaderWord');
  19. //文件获取
  20. Route::any('uploadFiles/{file_name}', 'Api\FileUploadController@getFile');
  21. Route::group(['middleware'=> ['checkLogin']],function ($route){
  22. $route->any('getHeaderSetting', 'Api\HeaderWordController@getHeaderSettings');
  23. $route->any('HeaderSettingsAdd', 'Api\HeaderWordController@add');
  24. $route->any('HeaderSettingsDetail', 'Api\HeaderWordController@detail');
  25. //文件上传统一方法
  26. $route->any('uploadFile', 'Api\FileUploadController@uploadFile');
  27. $route->any('menuAdd', 'Api\SysMenuController@add');
  28. $route->any('menuEdit', 'Api\SysMenuController@edit');
  29. $route->any('menuDel', 'Api\SysMenuController@del');
  30. $route->any('menuList', 'Api\SysMenuController@menuList');
  31. $route->any('menuMove', 'Api\SysMenuController@menuMove');
  32. $route->any('employeeAdd', 'Api\EmployeeController@employeeAdd');
  33. $route->any('employeeEdit', 'Api\EmployeeController@employeeEdit');
  34. $route->any('employeeDel', 'Api\EmployeeController@employeeDel');
  35. $route->any('employeeList', 'Api\EmployeeController@employeeList');
  36. $route->any('departAdd', 'Api\EmployeeController@departAdd');
  37. $route->any('departEdit', 'Api\EmployeeController@departEdit');
  38. $route->any('departDel', 'Api\EmployeeController@departDel');
  39. $route->any('departList', 'Api\EmployeeController@departList');
  40. $route->any('roleAdd', 'Api\EmployeeController@roleAdd');
  41. $route->any('roleEdit', 'Api\EmployeeController@roleEdit');
  42. $route->any('roleDel', 'Api\EmployeeController@roleDel');
  43. $route->any('roleList', 'Api\EmployeeController@roleList');
  44. $route->any('roleDetail', 'Api\EmployeeController@roleDetail');
  45. $route->any('roleMenu', 'Api\EmployeeController@roleMenu');
  46. $route->any('teamAdd', 'Api\EmployeeController@teamAdd');
  47. $route->any('teamEdit', 'Api\EmployeeController@teamEdit');
  48. $route->any('teamDel', 'Api\EmployeeController@teamDel');
  49. $route->any('teamList', 'Api\EmployeeController@teamList');
  50. $route->any('teamDetail', 'Api\EmployeeController@teamDetail');
  51. $route->any('employeeDepart', 'Api\EmployeeController@employeeDepart');
  52. $route->any('employeeTeam', 'Api\EmployeeController@employeeTeam');
  53. $route->any('employeeRole', 'Api\EmployeeController@employeeRole');
  54. //基础类型
  55. $route->any('basicTypeList', 'Api\BasicTypeController@basicTypeList');
  56. $route->any('basicTypeEdit', 'Api\BasicTypeController@basicTypeEdit');
  57. $route->any('basicTypeAdd', 'Api\BasicTypeController@basicTypeAdd');
  58. $route->any('basicTypeDel', 'Api\BasicTypeController@basicTypeDel');
  59. //跟进记录
  60. $route->any('followUpRecordList', 'Api\FollowUpRecordController@followUpRecordList');
  61. $route->any('followUpRecordEdit', 'Api\FollowUpRecordController@followUpRecordEdit');
  62. $route->any('followUpRecordAdd', 'Api\FollowUpRecordController@followUpRecordAdd');
  63. $route->any('followUpRecordDel', 'Api\FollowUpRecordController@followUpRecordDel');
  64. //客户
  65. $route->any('customerList', 'Api\CustomerController@customerList');
  66. $route->any('customerEdit', 'Api\CustomerController@customerEdit');
  67. $route->any('customerAdd', 'Api\CustomerController@customerAdd');
  68. $route->any('customerDel', 'Api\CustomerController@customerDel');
  69. $route->any('customerDetail', 'Api\CustomerController@customerDetail');
  70. //联系人
  71. $route->any('contactsList', 'Api\ContactsController@contactsList');
  72. $route->any('contactsEdit', 'Api\ContactsController@contactsEdit');
  73. $route->any('contactsAdd', 'Api\ContactsController@contactsAdd');
  74. $route->any('contactsDel', 'Api\ContactsController@contactsDel');
  75. $route->any('contactsDetail', 'Api\ContactsController@contactsDetail');
  76. //产品分类
  77. $route->any('productCategoryList', 'Api\ProductController@productCategoryList');
  78. $route->any('productCategoryEdit', 'Api\ProductController@productCategoryEdit');
  79. $route->any('productCategoryAdd', 'Api\ProductController@productCategoryAdd');
  80. $route->any('productCategoryDel', 'Api\ProductController@productCategoryDel');
  81. //产品名称
  82. $route->any('productList', 'Api\ProductController@productList');
  83. $route->any('productEdit', 'Api\ProductController@productEdit');
  84. $route->any('productAdd', 'Api\ProductController@productAdd');
  85. $route->any('productDel', 'Api\ProductController@productDel');
  86. $route->any('productDetail', 'Api\ProductController@productDetail');
  87. //采购单
  88. $route->any('purchaseOrderList', 'Api\PurchaseOrderController@purchaseOrderList');
  89. $route->any('purchaseOrderEdit', 'Api\PurchaseOrderController@purchaseOrderEdit');
  90. $route->any('purchaseOrderDetail', 'Api\PurchaseOrderController@purchaseOrderDetail');
  91. $route->any('purchaseOrderAdd', 'Api\PurchaseOrderController@purchaseOrderAdd');
  92. $route->any('purchaseOrderDel', 'Api\PurchaseOrderController@purchaseOrderDel');
  93. $route->any('purchaseOrderConfirm', 'Api\PurchaseOrderController@purchaseOrderConfirm');
  94. //发货单
  95. $route->any('invoiceOrderList', 'Api\InvoiceOrderController@invoiceOrderList');
  96. $route->any('invoiceOrderEdit', 'Api\InvoiceOrderController@invoiceOrderEdit');
  97. $route->any('invoiceOrderDetail', 'Api\InvoiceOrderController@invoiceOrderDetail');
  98. $route->any('invoiceOrderAdd', 'Api\InvoiceOrderController@invoiceOrderAdd');
  99. $route->any('invoiceOrderDel', 'Api\InvoiceOrderController@invoiceOrderDel');
  100. //收货单
  101. $route->any('takeOrderList', 'Api\TakeOrderController@takeOrderList');
  102. $route->any('takeOrderEdit', 'Api\TakeOrderController@takeOrderEdit');
  103. $route->any('takeOrderDetail', 'Api\TakeOrderController@takeOrderDetail');
  104. $route->any('takeOrderAdd', 'Api\TakeOrderController@takeOrderAdd');
  105. $route->any('takeOrderDel', 'Api\TakeOrderController@takeOrderDel');
  106. //销售订单
  107. $route->any('salesOrderGet', 'Api\SalesOrderController@salesOrderGet');
  108. $route->any('salesOrderList', 'Api\SalesOrderController@salesOrderList');
  109. $route->any('salesOrderEdit', 'Api\SalesOrderController@salesOrderEdit');
  110. $route->any('salesOrderDetail', 'Api\SalesOrderController@salesOrderDetail');
  111. $route->any('salesOrderAdd', 'Api\SalesOrderController@salesOrderAdd');
  112. $route->any('salesOrderDel', 'Api\SalesOrderController@salesOrderDel');
  113. });