作者 lyh

变更数据

... ... @@ -17,6 +17,7 @@ use App\Models\News\News;
use App\Models\News\NewsCategory;
use App\Models\Product\Category;
use App\Models\Product\CategoryRelated;
use App\Models\Product\Detail;
use App\Models\Product\Keyword;
use App\Models\Product\KeywordRelated;
use App\Models\Product\Product;
... ... @@ -209,6 +210,11 @@ class TicketUploadDataLogic extends BaseLogic
CategoryRelated::saveRelated($id, $info['text']['category_id'] ?? []);//分类关联
KeywordRelated::saveRelated($id,$info['text']['keyword_id'] ?? []);//关键字关联
$route = RouteMap::setRoute($data['title'],RouteMap::SOURCE_PRODUCT,$id,$info['project_id']);
//保存一条描述
if(!empty($info['text']['remark'])){
$detailModel = new Detail();
$detailModel->addReturnId(['content'=>json_encode(['content'=>$info['text']['remark']],true),'title'=>$info['text']['title'],'project_id'=>$info['project_id'],'column_id'=>1,'text_type'=>1]);
}
$productModel->edit(['route'=>$route],['id'=>$id]);
}catch (\Exception $e){
$this->fail('保存失败,请联系管理员');
... ...