|
...
|
...
|
@@ -3,7 +3,9 @@ |
|
|
|
namespace App\Http\Logic\Bside\BTemplate;
|
|
|
|
|
|
|
|
use App\Http\Logic\Bside\BaseLogic;
|
|
|
|
use App\Models\Blog\Blog;
|
|
|
|
use App\Models\Blog\BlogCategory;
|
|
|
|
use App\Models\News\News;
|
|
|
|
use App\Models\News\NewsCategory;
|
|
|
|
use App\Models\Product\Category;
|
|
|
|
use App\Models\Product\Product;
|
|
...
|
...
|
@@ -373,8 +375,29 @@ class BTemplateLogic extends BaseLogic |
|
|
|
if($source == BTemplate::SOURCE_HOME){
|
|
|
|
$type = 'index';
|
|
|
|
$route = '';
|
|
|
|
return $this->updateNotify(['project_id'=>$this->user['project_id'], 'type'=>$type, 'route'=>$route]);
|
|
|
|
}else{
|
|
|
|
//其他界面通知更新
|
|
|
|
if($source == 2 && $source_id != 0){
|
|
|
|
$type = RouteMap::SOURCE_PRODUCT;
|
|
|
|
$productModel = new Product();
|
|
|
|
$productInfo = $productModel->read(['id'=>$source_id],['route']);
|
|
|
|
$route = $productInfo['route'];
|
|
|
|
}elseif($source == 3 && $source_id != 0){
|
|
|
|
$type = RouteMap::SOURCE_BLOG;
|
|
|
|
$blogModel = new Blog();
|
|
|
|
$blogInfo = $blogModel->read(['id'=>$source_id],['route']);
|
|
|
|
$route = $blogInfo['route'];
|
|
|
|
}elseif($source == 4 && $source_id != 0){
|
|
|
|
$type = RouteMap::SOURCE_NEWS;
|
|
|
|
$newsModel = new News();
|
|
|
|
$newsInfo = $newsModel->read(['id'=>$source_id],['route']);
|
|
|
|
$route = $newsInfo['route'];
|
|
|
|
}else{
|
|
|
|
$type = 0;
|
|
|
|
$route = 'all';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return $this->updateNotify(['project_id'=>$this->user['project_id'], 'type'=>$type, 'route'=>$route]);
|
|
|
|
return $this->success();
|
|
|
|
}
|
|
|
|
|
...
|
...
|
|