diff --git a/xuanxuan/extension/xuan/index/ext/view/index.xuanxuan.html.hook.php b/xuanxuan/extension/xuan/index/ext/view/index.xuanxuan.html.hook.php index a10a4022be..9fdc05f312 100644 --- a/xuanxuan/extension/xuan/index/ext/view/index.xuanxuan.html.hook.php +++ b/xuanxuan/extension/xuan/index/ext/view/index.xuanxuan.html.hook.php @@ -33,8 +33,8 @@ $(document).on('hideapp', function(e, app) loadModel('im'); - -if(isset($this->config->xuanxuan->turnon) && $this->config->xuanxuan->turnon) +$xxdStatus = $this->im->getXxdStatus(); +if(isset($this->config->xuanxuan->turnon) && $this->config->xuanxuan->turnon && $xxdStatus == 'online') { $xuanConfig = new stdclass(); $token = $this->im->userGetAuthToken($this->app->user->id, 'zentaoweb'); @@ -42,7 +42,7 @@ if(isset($this->config->xuanxuan->turnon) && $this->config->xuanxuan->turnon) $backendUrl = $this->im->getServer('zentao'); $xuanConfig->clientUrl = $clientUrl; - $xuanConfig->server = parse_url($backendUrl, PHP_URL_HOST); + $xuanConfig->server = ($this->config->xuanxuan->https == 'on' ? 'https' : 'http') . '://' . parse_url($backendUrl, PHP_URL_HOST) . ':' . $this->config->xuanxuan->commonPort; $xuanConfig->account = $this->app->user->account; $xuanConfig->authKey = $token->token; $xuanConfig->debug = $this->config->debug;