|
...
|
...
|
@@ -47,6 +47,7 @@ class NewsCategoryLogic extends BaseLogic |
|
|
|
*/
|
|
|
|
public function info_news_category(){
|
|
|
|
$info = $this->model->read($this->param);
|
|
|
|
$info['url'] = $this->user['domain'] . $info['alias'];
|
|
|
|
return $this->success($info);
|
|
|
|
}
|
|
|
|
|
|
...
|
...
|
@@ -125,7 +126,7 @@ class NewsCategoryLogic extends BaseLogic |
|
|
|
}
|
|
|
|
//查询当前分类下是否有商品
|
|
|
|
$newsModel = new NewsModel();
|
|
|
|
$info = $newsModel->read(['id'=>['like','%,'.$id.',%']]);
|
|
|
|
$info = $newsModel->read(['category_id'=>['like','%,'.$id.',%']]);
|
|
|
|
if($info !== false){
|
|
|
|
$this->fail('当前分类下已存在新闻,不允许修改上级');
|
|
|
|
}
|
...
|
...
|
|