hy-farm/muchang/home/controllers/WebController.php
2026-05-29 19:54:56 +08:00

55 lines
1.1 KiB
PHP

<?php
/**
* Created by PhpStorm.
* User: zn
* Date: 2017/6/21
* Time: 15:02
*/
namespace app\controllers;
use common\modules\createrobot\CreateRobotUtil;
use common\modules\verifyimage\VerifyImageUtil;
use Yii;
use yii\web\Controller;
use yii\web\Response;
class WebController extends Controller
{
public function actionIndex()
{
// $this->layout = false;
// Yii::$app->response->format = Response::FORMAT_HTML;
list($imageBase64, $code) = VerifyImageUtil::CreateVerifyImage();
echo $code;
//
echo '<p><img src=' . $imageBase64 . ' alt="image 1" width="96" height="48"/></p>';
}
/**
* 获取小喇叭消息列表
*/
public function actionGetBroadcastList()
{
return $this->render('get_broadcast_list');
}
/**
* 获取公告列表
*/
public function actionGetNoticeList()
{
return $this->render('get_notice_list');
}
public function actionShare()
{
$this->layout = false;
Yii::$app->response->format = Response::FORMAT_HTML;
return $this->render('share');
}
}