merge heihedata branch r5110 - r5206 into trunk
This commit is contained in:
parent
62e50fb6ea
commit
a4ddb0a87b
|
@ -196,7 +196,7 @@
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<?php if(isset($this->data['attid']) && !empty($this->data['attid'])){ ?>
|
<?php if(isset($this->data['attid']) && !empty($this->data['attid'])){ ?>
|
||||||
<input type="hidden" id="reference_file_content" value='<?= json_encode($this->data[' file']) ?>' />
|
<input type="hidden" id="reference_file_content" value='<?= json_encode($this->data['file']) ?>' />
|
||||||
<script>
|
<script>
|
||||||
upload.onsuccess('', $('#reference_file_content').val(), "");
|
upload.onsuccess('', $('#reference_file_content').val(), "");
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -130,17 +130,19 @@ class Client extends \Zend_Controller_Plugin_Abstract
|
||||||
$client->param['callback'] => $client->config['callback'],
|
$client->param['callback'] => $client->config['callback'],
|
||||||
$client->param['code'] => $code
|
$client->param['code'] => $code
|
||||||
);
|
);
|
||||||
|
|
||||||
$curl = new Curl();
|
$curl = new Curl();
|
||||||
$curl->port = 443;
|
$curl->port = 443;
|
||||||
$curl->initOptions(array('verifyssl'=>false));
|
$curl->initOptions(array('verifyssl'=>false));
|
||||||
$data = $curl->request($main_url,$param,"POST");
|
$data = $curl->request($main_url,$param,"POST");
|
||||||
|
|
||||||
$cache_data = json_decode($data['response'],true);
|
$cache_data = json_decode($data['response'],true);
|
||||||
|
|
||||||
if(!isset($cache_data['expires_in']))
|
$userinfo = json_decode($cache_data['userInfo'],true);
|
||||||
|
|
||||||
|
if(!is_array($cache_data) || !isset($cache_data['expires_in']) || !isset($userinfo['cstnetId']))
|
||||||
{
|
{
|
||||||
return "未获得授权信息,请重试链接";
|
return "未获得授权信息,请重试链接,如果还无法登录请使用网站账号密码登录";
|
||||||
}
|
}
|
||||||
|
|
||||||
return $cache_data;
|
return $cache_data;
|
||||||
|
|
|
@ -66,8 +66,11 @@ class Escience
|
||||||
{
|
{
|
||||||
return "参数错误";
|
return "参数错误";
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->userInfo = json_decode($tokenData['userInfo'],true);
|
if(is_array($tokenData['userInfo']))
|
||||||
|
$this->userInfo = $tokenData['userInfo'];
|
||||||
|
else
|
||||||
|
$this->userInfo = json_decode($tokenData['userInfo'],true);
|
||||||
|
|
||||||
unset($tokenData['userInfo']);
|
unset($tokenData['userInfo']);
|
||||||
|
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 3.4 KiB |
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue