Ei kuvausta

api.php 3.0KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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::group(['prefix' => 'Advert/V1', 'namespace' => 'Advert\V1'], function () {
  17. Route::post("getAdvert", 'AdvertController@getAdvert');
  18. Route::post("advertRecord", 'AdvertController@advertRecord');
  19. // Route::post("getAdvert", function (){echo 1;});
  20. });
  21. Route::group(['prefix' => 'Code/V1', 'namespace' => 'Code\V1', 'middleware' => 'sign'], function () {
  22. Route::post("sendCode", 'SendCode@sendCode');
  23. Route::post("sendCodes", 'SendCode@sendCodes');
  24. //返回所有短信通道
  25. Route::post("returnSmsChannel", 'SendCode@returnSmsChannel');
  26. //根据短信通道id 获取签名及模板
  27. Route::post("returnSignAndTpl", 'SendCode@returnSignAndTpl');
  28. // Route::post("sendsCode", 'SendCode@sendsCode');
  29. });
  30. //新版发送短信
  31. //Route::group(['prefix' => 'Code/V2', 'namespace' => 'Code\V2', 'middleware' => 'sign'], function () {
  32. Route::group(['prefix' => 'Code/V2', 'namespace' => 'Code\V2'], function () {
  33. Route::post("singleSms", 'SmsController@singleSms');
  34. Route::post("multiSms", 'SmsController@multiSms');
  35. Route::post("templateList", 'SmsController@templateList');
  36. Route::post("signList", 'SmsController@signList');
  37. Route::post("voiceCode", 'SmsController@voiceCode');
  38. });
  39. Route::group(['prefix' => 'Push/V1', 'namespace' => 'Push\V1'], function () {
  40. Route::post("miPush", 'PushController@miPush');
  41. Route::post("deleteScheduleJob", 'PushController@deleteScheduleJob');
  42. //华为推送
  43. Route::post("huaweiPush", 'PushController@huaweiPush');
  44. //获取
  45. Route::post("getHuaweiToken", 'PushController@getHuaweiToken');
  46. Route::post("oppoGetAuth", 'PushController@oppoGetAuth');
  47. Route::post("oppoPush", 'PushController@oppoPush');
  48. Route::post("vivoGetAuth", 'PushController@vivoGetAuth');
  49. Route::post("vivoPush", 'PushController@vivoPush');
  50. });
  51. Route::group(['prefix' => 'PushMessage/V1', 'namespace' => 'PushMessage\V1'], function () {
  52. Route::post("getXhzMessage", 'PushMessageController@getXhzMessage');
  53. Route::post("getMessage", 'PushMessageController@getMessage');
  54. });
  55. Route::get('/allStaff','Advert\V1\AdvertController@allStaff');
  56. Route::get('/signUp','Advert\V1\AdvertController@staffSignUp');
  57. Route::get('/signStaffList','Advert\V1\AdvertController@signUpStaffList');
  58. Route::get('/luckDraw','Advert\V1\AdvertController@luckDraw');
  59. Route::get('/luckDrawInit','Advert\V1\AdvertController@luckDrawInit');
  60. Route::get('/signUpInit','Advert\V1\AdvertController@signUpInit');
  61. Route::get('/searchStaff','Advert\V1\AdvertController@searchStaff');