|
...
|
...
|
@@ -11,6 +11,7 @@ use App\Enums\Common\Code; |
|
|
|
use App\Http\Logic\Bside\User\UserLoginLogic;
|
|
|
|
use App\Models\Domain\DomainInfo;
|
|
|
|
use App\Models\Product\Category;
|
|
|
|
use App\Models\Product\CategoryRelated;
|
|
|
|
use App\Models\Product\Product;
|
|
|
|
use App\Models\Project\OnlineCheck;
|
|
|
|
use App\Models\Project\Project;
|
|
...
|
...
|
@@ -177,4 +178,27 @@ class PrivateController extends BaseController |
|
|
|
$data = ['token'=>$token,'main_lang_id'=>$info['main_lang_id'],'language_info'=>$languageInfo];
|
|
|
|
$this->response('success',Code::SUCCESS,$data);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 项目 有效产品路由列表
|
|
|
|
* @param Request $request
|
|
|
|
* @return false|string
|
|
|
|
*/
|
|
|
|
public function getProductRoute(Request $request)
|
|
|
|
{
|
|
|
|
$domain = trim($request->input('domain'));
|
|
|
|
if (empty($domain)) {
|
|
|
|
return $this->error('非法参数!');
|
|
|
|
}
|
|
|
|
|
|
|
|
$project = Project::getProjectByDomain($domain);
|
|
|
|
if (empty($project)) {
|
|
|
|
return $this->error('未找到当前域名对应的项目!');
|
|
|
|
}
|
|
|
|
ProjectServer::useProject($project->id);
|
|
|
|
$feature_category = Category::whereIn('title', ['Featured','featured'])->pluck('id');
|
|
|
|
$feature_product = CategoryRelated::whereIn('cate_id',$feature_category)->pluck('product_id')->unique()->toArray();
|
|
|
|
$product_route = Product::where(['status' => Product::STATUS_ON])->whereNotIn('id', $feature_product)->pluck('route')->toArray();
|
|
|
|
return $this->success($product_route);
|
|
|
|
}
|
|
|
|
} |
...
|
...
|
|