api.php 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  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. /** @var TYPE_NAME $api */
  14. $api = app('Dingo\Api\Routing\Router');
  15. $api->version('v1',[
  16. 'namespace'=>'App\Http\Controllers'
  17. ],function ($api) {
  18. $api->group(['prefix'=>'login'],function($api){
  19. $api->post('wx_login','LoginController@wxLogin');
  20. $api->get('getToken','LoginController@getToken');
  21. });
  22. $api->post('crypt/getCryptData', 'CryptController@getCryptData');
  23. $api->post('crypt/getCryptDataStore', 'CryptController@getCryptDataStore');
  24. $api->group(['middleware'=>'check_token'],function ($api){
  25. $api->group(['prefix'=>'login'], function ($api){
  26. $api->get('get_user_info','LoginController@getUserInfo');
  27. $api->post('send_sms','LoginController@sendSms');
  28. $api->post('edit_sms','LoginController@editSms');
  29. $api->post('merge_user','LoginController@mergeUser');
  30. });
  31. $api->group(['prefix'=>'store'], function ($api){
  32. $api->get('get_store_index','StoreController@getStoreIndex');
  33. $api->get('get_shop_car_num','StoreController@getShopCarNum');
  34. $api->post('add_store_comment','StoreController@addStoreComment');
  35. });
  36. $api->group(['prefix'=>'goods'], function ($api){
  37. $api->get('get_goods_info','GoodsController@getGoodsInfo');
  38. $api->get('get_address','GoodsController@getAddress');
  39. $api->get('get_shop_car','GoodsController@getShopCar');
  40. $api->post('add_shop_car','GoodsController@addShopCar');
  41. $api->post('destroy_shop_car','GoodsController@destroyShopCar');
  42. $api->post('destroy_shop_car_sku','GoodsController@destroyShopCarSku');
  43. $api->get('get_goods_infos','GoodsController@getGoodsInfos');
  44. $api->get('get_all_address','GoodsController@getAllAddress');
  45. $api->post('set_default_address','GoodsController@setDefaultAddress');
  46. $api->post('update_address','GoodsController@updateAddress');
  47. $api->post('destroy_address','GoodsController@destroyAddress');
  48. $api->post('add_address','GoodsController@addAddress');
  49. $api->post('checked_shop_car','GoodsController@checkedShopCar');
  50. $api->post('update_shop_car_num','GoodsController@updateShopCarNum');
  51. });
  52. $api->group(['prefix'=>'order'], function ($api){
  53. $api->get('get_order_index','OrderController@getOrderIndex');
  54. $api->post('tip_send','OrderController@tipSend');
  55. $api->post('submit_order_info','OrderController@submitOrderInfo');
  56. $api->post('CheckOrder','OrderController@CheckOrder');
  57. $api->post('cancel_order','OrderController@cancelOrder');
  58. $api->get('get_order_status_num','OrderController@getOrderStatusNum');
  59. $api->get('get_order_list','OrderController@getOrderList');
  60. $api->get('get_order_express','OrderController@getOrderExpress');
  61. $api->get('get_comment','OrderController@getComment');
  62. $api->post('sure_pick_up','OrderController@surePickUp');
  63. $api->get('get_sign_package','OrderController@getSignPackage');
  64. $api->get('discernAdress','OrderController@DealAddress');
  65. $api->get('get_order_no_info','OrderController@getOrderNoInfo');
  66. $api->post('edit_order_remark','OrderController@editOrderRemark');
  67. $api->get('get_refund_order_detail','OrderController@getRefundOrderDetail');
  68. $api->get('get_scan_order','OrderController@getScanOrder');
  69. $api->post('sure_one_self_take','OrderController@sureOneSelfTake');
  70. $api->get('get_address_info','OrderController@getAddressInfo');
  71. });
  72. $api->group(['prefix'=>'cancel'], function ($api){
  73. $api->get('get_cancel_order_list','CancelController@getCancelOrderList');
  74. $api->post('delete_origin_order','CancelController@deleteOriginOrder');
  75. });
  76. $api->group(['prefix'=>'refund'], function ($api){
  77. $api->get('get_all_refund_order','RefundController@getAllRefundOrder');
  78. $api->get('get_origin_order_info','RefundController@getOriginOrderInfo');
  79. $api->post('upload_refund_order_img','RefundController@uploadRefundOrderImg');
  80. $api->post('submit_refund_order','RefundController@submitRefundOrder');
  81. $api->post('cancel_refund_order','RefundController@cancelRefundOrder');
  82. $api->get('get_refund_order_detail','RefundController@getRefundOrderDetail');
  83. });
  84. });
  85. });