|
...
|
...
|
@@ -11,6 +11,7 @@ namespace App\Http\Logic\Bside\Setting; |
|
|
|
|
|
|
|
use App\Http\Logic\Bside\BaseLogic;
|
|
|
|
use App\Models\Com\UpdateLog;
|
|
|
|
use App\Models\RouteMap\RouteMap;
|
|
|
|
use App\Models\User\UserLog;
|
|
|
|
use App\Models\WebSetting\Translate as TranslateModel;
|
|
|
|
use App\Models\WebSetting\WebLanguage;
|
|
...
|
...
|
@@ -284,6 +285,37 @@ class TranslateLogic extends BaseLogic |
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @remark :根据路由获取source+source_id
|
|
|
|
* @name :getRouteSource
|
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
|
|
|
* @time :2024/5/17 15:11
|
|
|
|
*/
|
|
|
|
public function getRouteSource($route){
|
|
|
|
$data = ['source'=>0,'source_id'=>0,'is_list'=>0,'is_custom'=>0];
|
|
|
|
if(strtolower($route) == 'all'){
|
|
|
|
return $this->success($data);
|
|
|
|
}
|
|
|
|
if($route == '/'){
|
|
|
|
$data['source'] = 1;
|
|
|
|
return $this->success($data);
|
|
|
|
}
|
|
|
|
$route = basename($route);
|
|
|
|
$routeModel = new RouteMap();
|
|
|
|
$routeInfo = $routeModel->read(['route'=>$route]);
|
|
|
|
if($routeInfo['source'] == RouteMap::SOURCE_PAGE){
|
|
|
|
if($routeInfo['source_id']){
|
|
|
|
$data = ['source'=>9,'source_id'=>$routeInfo['source_id'],'is_list'=>0,'is_custom'=>0];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if($routeInfo['source'] == RouteMap::SOURCE_PAGE){
|
|
|
|
if($routeInfo['source_id']){
|
|
|
|
$data = ['source'=>9,'source_id'=>$routeInfo['source_id'],'is_list'=>0,'is_custom'=>0];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @remark :处理路由
|
|
|
|
* @name :handleRoute
|
|
|
|
* @author :lyh
|
...
|
...
|
|