|
@@ -31,28 +31,14 @@ class WebController extends AbstractController
|
|
*/
|
|
*/
|
|
#[Inject]
|
|
#[Inject]
|
|
private $websiteServiceClient;
|
|
private $websiteServiceClient;
|
|
-<<<<<<< HEAD
|
|
|
|
- protected $siteId;
|
|
|
|
- public function __construct(){
|
|
|
|
- $websiteInfo = $this->getWebsiteId();
|
|
|
|
- var_dump($websiteInfo);
|
|
|
|
- if($websiteInfo['code'] == 200){
|
|
|
|
- $this->siteId = $websiteInfo['data']['id'];
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-=======
|
|
|
|
-
|
|
|
|
->>>>>>> dc5ca2d82095a07156ecae10ce8899519068294e
|
|
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 获取栏目导航
|
|
* 获取栏目导航
|
|
* @return array
|
|
* @return array
|
|
*/
|
|
*/
|
|
public function getWebsiteCategory()
|
|
public function getWebsiteCategory()
|
|
{
|
|
{
|
|
-<<<<<<< HEAD
|
|
|
|
- var_dump("网站id:",$this->siteId);
|
|
|
|
-=======
|
|
|
|
->>>>>>> dc5ca2d82095a07156ecae10ce8899519068294e
|
|
|
|
|
|
+
|
|
$data = [
|
|
$data = [
|
|
'website_id'=>Context::get("SiteId")
|
|
'website_id'=>Context::get("SiteId")
|
|
];
|
|
];
|
|
@@ -64,31 +50,6 @@ class WebController extends AbstractController
|
|
return Result::success($result['data']);
|
|
return Result::success($result['data']);
|
|
}
|
|
}
|
|
|
|
|
|
-<<<<<<< HEAD
|
|
|
|
- /**
|
|
|
|
- * @return array
|
|
|
|
- */
|
|
|
|
- public function getWebsiteId()
|
|
|
|
- {
|
|
|
|
- $header = $this->request->getHeaders();
|
|
|
|
- var_dump("获取header:",$header);
|
|
|
|
- if(!isset($header['origin'])){
|
|
|
|
- return Result::error("header请配置origin");
|
|
|
|
- }
|
|
|
|
- $origin = $header['origin'][0];
|
|
|
|
- $logindevice = explode("//", $origin);
|
|
|
|
- $data = [
|
|
|
|
- 'website_url'=>$logindevice[1]
|
|
|
|
- ];
|
|
|
|
- var_dump($data);
|
|
|
|
- $result = $this->websiteServiceClient->getWebsiteId($data);
|
|
|
|
- if ($result['code'] != ErrorCode::SUCCESS) {
|
|
|
|
- return Result::error($result['message'],0,[]);
|
|
|
|
- }
|
|
|
|
- return Result::success($result['data']);
|
|
|
|
- }
|
|
|
|
-=======
|
|
|
|
-
|
|
|
|
->>>>>>> dc5ca2d82095a07156ecae10ce8899519068294e
|
|
|
|
|
|
+
|
|
|
|
|
|
}
|
|
}
|