|
...
|
...
|
@@ -10,15 +10,15 @@ |
|
|
|
namespace App\Http\Logic\Bside\News;
|
|
|
|
|
|
|
|
use App\Http\Logic\Bside\BaseLogic;
|
|
|
|
use App\Models\News\BlogExtend;
|
|
|
|
use App\Models\Product\ExtendInfo;
|
|
|
|
use App\Models\News\NewsExtend;
|
|
|
|
use App\Models\News\NewsExtendInfo;
|
|
|
|
|
|
|
|
class NewsExtendLogic extends BaseLogic
|
|
|
|
{
|
|
|
|
public function __construct()
|
|
|
|
{
|
|
|
|
parent::__construct();
|
|
|
|
$this->model = new BlogExtend();
|
|
|
|
$this->model = new NewsExtend();
|
|
|
|
$this->param = $this->requestAll;
|
|
|
|
}
|
|
|
|
|
|
...
|
...
|
@@ -84,7 +84,7 @@ class NewsExtendLogic extends BaseLogic |
|
|
|
public function extendDel(){
|
|
|
|
$info = $this->model->read(['id'=>$this->param['id']]);
|
|
|
|
//查看当前扩展字段是否设置了值
|
|
|
|
$extendInfoModel = new ExtendInfo();
|
|
|
|
$extendInfoModel = new NewsExtendInfo();
|
|
|
|
$extendInfo = $extendInfoModel->read(['key'=>$info['key']]);
|
|
|
|
if($extendInfo !== false){
|
|
|
|
$this->fail('当前扩展字段已有产品在使用,不允许删除');
|
...
|
...
|
|