src/AppBundle/Controller/Admin/EduCloudController.php
(开头部分) 2KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<?php
namespace AppBundle\Controller\Admin;
use AppBundle\Common\Exception\FileToolkitException;
use Biz\System\SettingException;
use Imagine\Image\Box;
use Imagine\Gd\Imagine;
use Biz\Util\EdusohoLiveClient;
use AppBundle\Common\FileToolkit;
use Biz\CloudPlatform\KeyApplier;
use AppBundle\Common\ArrayToolkit;
use Biz\CloudPlatform\IMAPIFactory;
use Biz\CloudPlatform\CloudAPIFactory;
use Biz\CloudPlatform\Service\AppService;
use Symfony\Component\HttpFoundation\Request;
use Biz\CloudPlatform\Client\AbstractCloudAPI;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Security\Core\Encoder\MessageDigestPasswordEncoder;
class EduCloudController extends BaseController
{
//概览页,产品简介页
public function myCloudAction(Request $request)
{
// @apitodo 需改成leaf
try {
$api = CloudAPIFactory::create('root');
$info = $api->get('/me');
} catch (\RuntimeException $e) {
return $this->render('admin/edu-cloud/cloud-error.html.twig', array());
}
if (isset($info['accessCloud']) && 0 != $info['accessCloud']) {
return $this->redirect($this->generateUrl('admin_my_cloud_overview'));
}
if (!isset($info['accessCloud']) || $this->getWebExtension()->isTrial() || 0 == $info['accessCloud']) {
$trialHtml = $this->getCloudCenterExperiencePage();
return $this->render('admin/edu-cloud/cloud.html.twig', array(
'content' => $trialHtml['content'],
));
}
$unTrial = file_get_contents('http://open.edusoho.com/api/v1/block/cloud_guide');
$unTrialHtml = json_decode($unTrial, true);
return $this->render('admin/edu-cloud/cloud.html.twig', array(
'content' => $unTrialHtml['content'],
));
}
//概览页,服务概况页
// refactor
public function myCloudOverviewAction(Request $request)
{
try {
$api = CloudAPIFactory::create('root');
$isBinded = $this->getAppService()->getBinded();
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。