|
...
|
...
|
@@ -114,10 +114,12 @@ class ProductController extends BaseController |
|
|
|
'content'=>$this->param['content'] ?? '',
|
|
|
|
'thumb'=>json_encode($thumb,true),
|
|
|
|
'gallery'=>json_encode($gallery,true),
|
|
|
|
'category_id'=>$category_id,
|
|
|
|
'created_at'=>date('Y-m-d H:i:s'),
|
|
|
|
'updated_at'=>date('Y-m-d H:i:s')
|
|
|
|
];
|
|
|
|
if(!empty($category_id)){
|
|
|
|
$productData['category_id'] = $category_id;
|
|
|
|
}
|
|
|
|
$product_id = $productModel->addReturnId($productData);
|
|
|
|
$route = RouteMap::setRoute($productData['title'], RouteMap::SOURCE_PRODUCT, $product_id, $this->param['project_id']);
|
|
|
|
$productModel->edit(['route'=>$route],['id'=>$cate_id]);
|
...
|
...
|
|