src/AppBundle/Controller/Admin/MobileController.php
(开头部分) 2KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<?php
namespace AppBundle\Controller\Admin;
use AppBundle\Common\Exception\FileToolkitException;
use AppBundle\Common\FileToolkit;
use AppBundle\Common\ArrayToolkit;
use Biz\CloudPlatform\CloudAPIFactory;
use Biz\Common\CommonException;
use Biz\Content\Service\FileService;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
class MobileController extends BaseController
{
public function mobileAction(Request $request)
{
$operationMobile = $this->getSettingService()->get('operation_mobile', array());
$courseGrids = $this->getSettingService()->get('operation_course_grids', array());
$settingMobile = $this->getSettingService()->get('mobile', array());
$default = array(
'banner1' => '', // 轮播图1
'banner2' => '', // 轮播图2
'banner3' => '', // 轮播图3
'banner4' => '', // 轮播图4
'banner5' => '', // 轮播图5
'bannerUrl1' => '', // 轮播图1的触发地址
'bannerUrl2' => '', // 轮播图2的触发地址
'bannerUrl3' => '', // 轮播图3的触发地址
'bannerUrl4' => '', // 轮播图4的触发地址
'bannerUrl5' => '', // 轮播图5的触发地址
'bannerClick1' => '', // 轮播图1是否触发动作
'bannerClick2' => '', // 轮播图2是否触发动作
'bannerClick3' => '', // 轮播图3是否触发动作
'bannerClick4' => '', // 轮播图4是否触发动作
'bannerClick5' => '', // 轮播图5是否触发动作
'bannerJumpToCourseId1' => ' ',
'bannerJumpToCourseId2' => ' ',
'bannerJumpToCourseId3' => ' ',
'bannerJumpToCourseId4' => ' ',
'bannerJumpToCourseId5' => ' ',
);
$mobile = array_merge($default, $operationMobile);
if ('POST' == $request->getMethod()) {
$operationMobile = $request->request->all();
$mobile = array_merge($courseGrids, $settingMobile, $operationMobile);
$this->getSettingService()->set('operation_mobile', $operationMobile);
$this->getSettingService()->set('operation_course_grids', $courseGrids);
$this->getSettingService()->set('mobile', $mobile);
$this->setFlashMessage('success', 'site.save.success');
}
$bannerCourses = array();
for ($i = 1; $i <= 5; ++$i) {
$bannerCourses[$i] = (' ' != $mobile['bannerJumpToCourseId'.$i]) ? $this->getCourseService()->getCourse($mobile['bannerJumpToCourseId'.$i]) : null;
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。