panghu 1 anno fa
parent
commit
2b0e4786bc
2 ha cambiato i file con 41 aggiunte e 0 eliminazioni
  1. 13 0
      app/Providers/RouteServiceProvider.php
  2. 28 0
      routes/wps/wps.php

+ 13 - 0
app/Providers/RouteServiceProvider.php

@@ -39,6 +39,7 @@ class RouteServiceProvider extends ServiceProvider
 
 
         $this->mapApiRoutes();
+        $this->mapWpsRoutes();
 
         $this->routes(function () {
 
@@ -75,4 +76,16 @@ class RouteServiceProvider extends ServiceProvider
                 ->group( base_path('routes'.DIRECTORY_SEPARATOR.'api'.DIRECTORY_SEPARATOR."{$fileName}") );
         }
     }
+
+    /**
+     * Wps回调地址
+     */
+    function mapWpsRoutes(){
+        foreach ( glob(base_path('routes'.DIRECTORY_SEPARATOR.'wps'.DIRECTORY_SEPARATOR).'*.php' ) as $fileName ) {
+            $fileName = basename( $fileName );
+            Route::namespace( $this->namespace."\\Wps" )
+                ->prefix('wps')
+                ->group( base_path('routes'.DIRECTORY_SEPARATOR.'wps'.DIRECTORY_SEPARATOR."{$fileName}") );
+        }
+    }
 }

+ 28 - 0
routes/wps/wps.php

@@ -0,0 +1,28 @@
+<?php
+
+use Illuminate\Support\Facades\Route;
+
+
+
+/** 会员 **/
+Route::group(['domain' => env('APP_ADMIN_HOST'), 'prefix' => '/v3/3rd/'],function (){
+    Route::get('files/{file_id}', 'WpsController@getFiles')->name('wps.files');
+    Route::get('files/{file_id}/download', 'WpsController@downloadFiles')->name('wps.download');
+    Route::get('files/{file_id}/permission', 'WpsController@permissionFiles')->name('wps.permission');
+    Route::post('files/{file_id}/upload', 'WpsController@uploadFiles')->name('wps.upload');
+    Route::get('files/{file_id}/versions', 'WpsController@versionsFiles')->name('wps.versions');
+    Route::get('users', 'WpsController@getUsers')->name('wps.users');
+
+});
+
+
+
+Route::group( ['domain' => env('APP_ADMIN_HOST'), 'prefix' => 'esign'],function($router){
+
+
+    Route::match(['post','get'],'esignNotify', 'EsignController@esignNotify')->name('wps.esignNotify');
+    Route::match(['post','get'],'sealNotify', 'EsignController@sealNotify')->name('wps.sealNotify');
+
+});
+
+