|
@@ -11,6 +11,7 @@ namespace App\Http\Logic\Bside\Setting; |
|
@@ -11,6 +11,7 @@ namespace App\Http\Logic\Bside\Setting; |
|
11
|
|
11
|
|
|
12
|
use App\Http\Logic\Bside\BaseLogic;
|
12
|
use App\Http\Logic\Bside\BaseLogic;
|
|
13
|
use App\Models\Com\UpdateLog;
|
13
|
use App\Models\Com\UpdateLog;
|
|
|
|
14
|
+use App\Models\RouteMap\RouteMap;
|
|
14
|
use App\Models\User\UserLog;
|
15
|
use App\Models\User\UserLog;
|
|
15
|
use App\Models\WebSetting\Translate as TranslateModel;
|
16
|
use App\Models\WebSetting\Translate as TranslateModel;
|
|
16
|
use App\Models\WebSetting\WebLanguage;
|
17
|
use App\Models\WebSetting\WebLanguage;
|
|
@@ -284,6 +285,37 @@ class TranslateLogic extends BaseLogic |
|
@@ -284,6 +285,37 @@ class TranslateLogic extends BaseLogic |
|
284
|
}
|
285
|
}
|
|
285
|
|
286
|
|
|
286
|
/**
|
287
|
/**
|
|
|
|
288
|
+ * @remark :根据路由获取source+source_id
|
|
|
|
289
|
+ * @name :getRouteSource
|
|
|
|
290
|
+ * @author :lyh
|
|
|
|
291
|
+ * @method :post
|
|
|
|
292
|
+ * @time :2024/5/17 15:11
|
|
|
|
293
|
+ */
|
|
|
|
294
|
+ public function getRouteSource($route){
|
|
|
|
295
|
+ $data = ['source'=>0,'source_id'=>0,'is_list'=>0,'is_custom'=>0];
|
|
|
|
296
|
+ if(strtolower($route) == 'all'){
|
|
|
|
297
|
+ return $this->success($data);
|
|
|
|
298
|
+ }
|
|
|
|
299
|
+ if($route == '/'){
|
|
|
|
300
|
+ $data['source'] = 1;
|
|
|
|
301
|
+ return $this->success($data);
|
|
|
|
302
|
+ }
|
|
|
|
303
|
+ $route = basename($route);
|
|
|
|
304
|
+ $routeModel = new RouteMap();
|
|
|
|
305
|
+ $routeInfo = $routeModel->read(['route'=>$route]);
|
|
|
|
306
|
+ if($routeInfo['source'] == RouteMap::SOURCE_PAGE){
|
|
|
|
307
|
+ if($routeInfo['source_id']){
|
|
|
|
308
|
+ $data = ['source'=>9,'source_id'=>$routeInfo['source_id'],'is_list'=>0,'is_custom'=>0];
|
|
|
|
309
|
+ }
|
|
|
|
310
|
+ }
|
|
|
|
311
|
+ if($routeInfo['source'] == RouteMap::SOURCE_PAGE){
|
|
|
|
312
|
+ if($routeInfo['source_id']){
|
|
|
|
313
|
+ $data = ['source'=>9,'source_id'=>$routeInfo['source_id'],'is_list'=>0,'is_custom'=>0];
|
|
|
|
314
|
+ }
|
|
|
|
315
|
+ }
|
|
|
|
316
|
+ }
|
|
|
|
317
|
+
|
|
|
|
318
|
+ /**
|
|
287
|
* @remark :处理路由
|
319
|
* @remark :处理路由
|
|
288
|
* @name :handleRoute
|
320
|
* @name :handleRoute
|
|
289
|
* @author :lyh
|
321
|
* @author :lyh
|