|
...
|
...
|
@@ -280,7 +280,7 @@ class TranslateLogic extends BaseLogic |
|
|
|
try {
|
|
|
|
$info = $this->model->read(['language_id'=>$this->param['language_id'],'url'=>$this->param['url'],'project_id'=>$this->user['project_id'],'type'=>$this->param['type']]);
|
|
|
|
if($info === false){
|
|
|
|
$sourceInfo = $this->getRouteSource($this->param['url']);
|
|
|
|
$sourceInfo = $this->getRouteSource($sendData['new_route']);
|
|
|
|
$param = [
|
|
|
|
'type'=>$this->param['type'] ?? 1,
|
|
|
|
'project_id'=>$this->user['project_id'],
|
|
...
|
...
|
@@ -291,7 +291,7 @@ class TranslateLogic extends BaseLogic |
|
|
|
'source_id'=>$sourceInfo['source_id'],
|
|
|
|
'is_list'=>$sourceInfo['is_list'],
|
|
|
|
'is_custom'=>$sourceInfo['is_custom'],
|
|
|
|
'page'=>$sourceInfo['page'] ?? 0
|
|
|
|
'page'=>$sendData['page'] ?? 0
|
|
|
|
];
|
|
|
|
$id = $this->model->addReturnId($param);
|
|
|
|
TranslateData::insert(['trans_id'=>$id,'data'=>json_encode($data,JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES)]);
|
|
...
|
...
|
@@ -331,7 +331,7 @@ class TranslateLogic extends BaseLogic |
|
|
|
$page = 0;
|
|
|
|
if (is_numeric($route)) {
|
|
|
|
$arr = explode('/',$routes);
|
|
|
|
$page = $arr[1];
|
|
|
|
$page = $route;
|
|
|
|
$route = $arr[0];
|
|
|
|
}
|
|
|
|
$routeModel = new RouteMap();
|
...
|
...
|
|