作者 李宇航

合并分支 'master-server' 到 'master'

gx修改上传图片翻译问题处理



查看合并请求 !944
... ... @@ -12,6 +12,7 @@ namespace App\Http\Controllers\Bside;
use App\Enums\Common\Code;
use App\Http\Logic\Bside\News\NewsLogic;
use App\Models\Channel\Channel;
use App\Models\CustomModule\CustomModuleCategory;
use App\Models\CustomModule\CustomModuleContent;
use App\Models\CustomModule\CustomModuleExtentContent;
use App\Models\Domain\DomainInfo;
... ... @@ -79,6 +80,11 @@ DSE1504F,Super fast Recovery Rectifier,ITO-220AC,400,15,Single Positive,150,1.4,
'operator_id'=>6393,
'module_id'=>2,
];
$customModuleCategoryModel = new CustomModuleCategory();
$catInfo = $customModuleCategoryModel->read(['name'=>$array1[1]]);
if($catInfo !== false){
$contentData['category_id'] = $catInfo['id'];
}
$customModuleContentModel = new CustomModuleContent();
$contentId = $customModuleContentModel->addReturnId($contentData);
$route = RouteMap::setRoute($array1[0],RouteMap::SOURCE_MODULE,$contentId,2837);
... ...
... ... @@ -234,8 +234,8 @@ class ImageController extends Controller
$tran_name = $tran_name[0];
}
$enName = generateRoute($tran_name);
if(substr($enName, 0, 1) === '-'){
$enName = md5(uniqid().$project_id.rand(1,1000));;
if(substr($enName, 0, 1) === '-' || empty($enName)){
$enName = md5(uniqid().$project_id.rand(1,1000));
}
$fileName = $enName;
$i=1;
... ...