Merge branch 'sprint/zenops24_lwr_tweak_xuan_web_client' into 'master'

Tweak xuan web client.

See merge request easycorp/zentaopms!2475
This commit is contained in:
李玉春
2022-03-23 06:17:15 +00:00
@@ -33,8 +33,8 @@ $(document).on('hideapp', function(e, app)
<?php else: ?>
<?php
$this->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;