Commit 3f2c9e4c authored by xiabin's avatar xiabin

修改课堂中心头像

parent 77b7aa25
...@@ -81,7 +81,7 @@ class SiteController extends Controller ...@@ -81,7 +81,7 @@ class SiteController extends Controller
], ],
'captcha' => [ 'captcha' => [
'class' => 'yii\captcha\CaptchaAction', 'class' => 'yii\captcha\CaptchaAction',
'fixedVerifyCode' => FALSE ? 'testme' : NULL, 'fixedVerifyCode' => YII_ENV_DEV ? 'testme' : NULL,
'maxLength' => 6, 'maxLength' => 6,
'minLength' => 6, 'minLength' => 6,
'transparent' => TRUE, 'transparent' => TRUE,
...@@ -273,29 +273,7 @@ function actionResetPasswordSuccess() ...@@ -273,29 +273,7 @@ function actionResetPasswordSuccess()
return $this->render('resetPasswordSuccess'); return $this->render('resetPasswordSuccess');
} }
/**
* 极验证开始
* ajax
*/
public
function actionStartCaptcha()
{
if (Yii::$app->request->isAjax) {
$type = Yii::$app->request->get('type');
if ($type == 'pc') {
$GtSdk = new Geetest(Yii::$app->params['captchaId'], Yii::$app->params['privateKey']);
} else {
throw new \yii\web\ForbiddenHttpException('参数错误');
}
$user_id = Yii::$app->security->generateRandomString(16);
$status = $GtSdk->pre_process($user_id);
Yii::$app->session->set(self::GT_SERVER, $status);
Yii::$app->session->set(self::GT_USER_ID, $user_id);
echo $GtSdk->get_response_str();
} else {
throw new \yii\web\ForbiddenHttpException('非法请求');
}
}
/** /**
* 设置登录后回调url * 设置登录后回调url
......
...@@ -8,5 +8,5 @@ ...@@ -8,5 +8,5 @@
?> ?>
<div class="tp-head navbar-fixed-top clearfix"> <div class="tp-head navbar-fixed-top clearfix">
<div class="menu-btn fl"><a href="javascript:;"><i class="icon-menu"></i></a></div> <div class="menu-btn fl"><a href="javascript:;"><i class="icon-menu"></i></a></div>
<div class="avatar fr"><a href="<?= \yii\helpers\Url::base() . 'user-center'?>"><img src="<?= Yii::$app->assetManager->baseUrl ?>/img/avatar.jpg"></a></div> <div class="avatar fr"><a href="<?= \yii\helpers\Url::base() . 'user-center'?>"><img src="<?=\common\models\User::getAvatarUrl(Yii::$app->user->identity->avatar) ?>"></a></div>
</div> </div>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment