回调接口路由更新

This commit is contained in:
mzeros 2024-11-02 15:54:47 +08:00
parent 870273041c
commit db2ba7f6d9

View File

@ -33,14 +33,21 @@ if ($pathInfo == null) {
if($version!='api'){
if(!str_contains($pathInfo, 'api.')){
app()->route->any('call','/gateway/api.notify/call');
if(str_contains($version, '.')){
$versions = str_replace(".", "", $version);
#支持小版本的更新
app()->route->any('call','/gateway/'.$versions.'.notify/call');
}else{
app()->route->any('call','/gateway/'.$version.'.notify/call');
}
}
}else{
if(!str_contains($pathInfo, 'api.')){
app()->route->any('call','/gateway/'.$version.'.notify/call');
// app()->route->any('call','/gateway/'.$version.'.notify/call');
app()->route->any('call','/gateway/api.notify/call');
}
}