123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140 |
- <?php
- use App\Http\Controllers\ClassifyController;
- use App\Http\Controllers\LoginController;
- use App\Http\Controllers\LookJobController;
- use App\Http\Controllers\UserController;
- use Illuminate\Http\Request;
- use Illuminate\Support\Facades\Route;
- use App\Http\Controllers\JobController;
- /*
- |--------------------------------------------------------------------------
- | API Routes
- |--------------------------------------------------------------------------
- |
- | Here is where you can register API routes for your application. These
- | routes are loaded by the RouteServiceProvider within a group which
- | is assigned the "api" middleware group. Enjoy building your API!
- |
- */
- /** @var TYPE_NAME $api */
- $api = app("Dingo\Api\Routing\Router");
- $api->version('v1', function ($api) {
- $api->group(['middleware'=>'check_token'],function ($api) {
- /**发布招工信息**/
- $api->post('/AddInfo',[JobController::class,'AddInfo']);
- /**上传图片**/
- $api->post('/UploadImg', [JobController::class,'UploadImg']);
- $api->post('/AddUpdateInfo', [LookJobController::class,'AddUpdateInfo']);
- $api->group(['prefix' => 'job'], function($api) {
- /*获取个人发布的找活信息**/
- $api->post('GetUserJobList', [JobController::class,'GetUserJobList']);
- /**更新状态**/
- $api->post('/UpdateStatus',[JobController::class,'UpdateStatus']);
- /**删除**/
- $api->delete('/DelJobInfo',[JobController::class,'DelJobInfo']);
- });
- $api->group(['prefix' => 'Lookjob'], function($api) {
- /**获取个人找活信息**/
- $api->post('/GetUserInfoList', [LookJobController::class,'GetUserInfoList']);
- /**更新状态**/
- $api->post('/UpdateStatus', [LookJobController::class,'UpdateStatus']);
- /**删除**/
- $api->delete('/DelLookJobInfo',[LookJobController::class,'DelLookJobInfo']);
- });
- $api->group(['prefix' => 'User'], function($api) {
- /**获取个人信息**/
- $api->post('/GetUserInfo', [UserController::class,'GetUserInfo']);
- /**更新个人信息**/
- $api->post('/UpdateUserInfo', [UserController::class,'UpdateUserInfo']);
- /**上传头像**/
- $api->post('/UploadImg', [UserController::class,'UploadImg']);
- });
- });
- $api->group(['prefix' => 'job'], function($api) {
- /**获取招工列表**/
- $api->post('/JobList',[JobController::class,'JobList']);
- $api->post('/GetJobDetail',[JobController::class,'GetJobDetail']);
- });
- $api->group(['prefix' => 'Lookjob'], function($api) {
- /*获取个人发布的找活信息**/
- $api->post('GetLookJobList', [LookJobController::class,'GetLookJobList']);
- $api->post('GetLookJobDetail', [LookJobController::class,'GetLookJobDetail']);
- });
- $api->get('classify/AddClassify',[ClassifyController::class,'AddClassify']);
- $api->post('/User/UpdatePwd', [UserController::class,'UpdatePwd']);
- $api->group(['middleware' => 'throttles:5,1','prefix' => 'Login'], function($api) {
- $api->group(['middleware' => 'throttles:5,1'], function($api) {
- /**注册**/
- $api->post('register', [LoginController::class,'Register']);
- });
- $api->get('captcha', [LoginController::class,'captcha']);
- $api->get('verifyCaptcha', [LoginController::class,'verifyCaptcha']);
- $api->get('Token', [LoginController::class,'Token']);
- /**图片验证码**/
- // $api->post('VerifyCode', [LoginController::class,'VerifyCode']);
- });
- $api->group(['middleware' => 'throttlesms:10,2','prefix' => 'Login'], function($api) {
- //获取短信验证码
- $api->post('SendSms', [LoginController::class,'SendSms']);
- });
- $api->group(['middleware' => 'throttles:500,1','prefix' => 'Login'], function($api) {
- /**图片验证码**/
- $api->post('VerifyCode', [LoginController::class,'VerifyCode']);
- $api->get('codeEs', [LoginController::class,'codeEs']);
- });
- $api->group(['prefix' => 'Login'], function($api) {
- /*登录**/
- $api->post('Login', [LoginController::class,'Login']);
- });
- });
|