canyin-project/ybcy/controllers/channel/BaseController.php

17 lines
417 B
PHP
Raw Normal View History

2024-11-01 16:07:54 +08:00
<?php
namespace app\controllers\channel;
use Yii;
use yii\web\Controller;
use yii\web\Session;
use yii\web\Cookie;
class BaseController extends Controller{
public $enableCsrfValidation = false;
function init(){
$cashInfo=Yii::$app->session->get('cashInfo');
if(!$cashInfo){
echo json_encode(['code'=> 2,'msg' =>'请重新登录']);die;
}
parent::init();
}
}