合并分支 'master-server' 到 'master'
Master server 查看合并请求 !1221
正在显示
1 个修改的文件
包含
2 行增加
和
3 行删除
| @@ -1293,22 +1293,21 @@ MBR60L100PT,Rectifier/Schottky Barrier Rectifier,TO-247AD,Common Cathode,100,60, | @@ -1293,22 +1293,21 @@ MBR60L100PT,Rectifier/Schottky Barrier Rectifier,TO-247AD,Common Cathode,100,60, | ||
| 1293 | continue; | 1293 | continue; |
| 1294 | } | 1294 | } |
| 1295 | //添加内容 | 1295 | //添加内容 |
| 1296 | - $contentId = $customContentModel->addReturnId(['name'=>$array[0],'module_id'=>2]); | 1296 | + $contentId = $customContentModel->addReturnId(['name'=>$array[0],'module_id'=>2,'project_id'=>$project_id]); |
| 1297 | echo date('Y-m-d H:i:s') . '当前扩展数据id:'. $contentId . PHP_EOL; | 1297 | echo date('Y-m-d H:i:s') . '当前扩展数据id:'. $contentId . PHP_EOL; |
| 1298 | //注册路由 | 1298 | //注册路由 |
| 1299 | $route = RouteMap::setRoute($array[0], RouteMap::SOURCE_MODULE, | 1299 | $route = RouteMap::setRoute($array[0], RouteMap::SOURCE_MODULE, |
| 1300 | $contentId, $project_id); | 1300 | $contentId, $project_id); |
| 1301 | $customContentModel->edit(['route'=>$route],['id'=>$contentId]); | 1301 | $customContentModel->edit(['route'=>$route],['id'=>$contentId]); |
| 1302 | if(!empty($array[1])){ | 1302 | if(!empty($array[1])){ |
| 1303 | + $categoryId = ','; | ||
| 1303 | $cateArr = explode('/',$array[1]); | 1304 | $cateArr = explode('/',$array[1]); |
| 1304 | foreach ($cateArr as $cateV){ | 1305 | foreach ($cateArr as $cateV){ |
| 1305 | - $categoryId = ','; | ||
| 1306 | $cateInfo = $customCategoryModel->read(['name'=>$cateV,'module_id'=>2,'project_id'=>$project_id]); | 1306 | $cateInfo = $customCategoryModel->read(['name'=>$cateV,'module_id'=>2,'project_id'=>$project_id]); |
| 1307 | if($cateInfo !== false){ | 1307 | if($cateInfo !== false){ |
| 1308 | $categoryId .= $cateInfo['id'].','; | 1308 | $categoryId .= $cateInfo['id'].','; |
| 1309 | } | 1309 | } |
| 1310 | } | 1310 | } |
| 1311 | - $categoryId = trim($categoryId,','); | ||
| 1312 | $customContentModel->edit(['category_id'=>$categoryId],['id'=>$contentId]); | 1311 | $customContentModel->edit(['category_id'=>$categoryId],['id'=>$contentId]); |
| 1313 | } | 1312 | } |
| 1314 | $saveData = [ | 1313 | $saveData = [ |
-
请 注册 或 登录 后发表评论