Commit 4627a05a authored by xiabin's avatar xiabin

修改试图文件以及极验证的模式

parent 379de102
...@@ -65,13 +65,7 @@ class SiteController extends Controller ...@@ -65,13 +65,7 @@ class SiteController extends Controller
'roles' => ['?'], 'roles' => ['?'],
], ],
], ],
], ]
'verbs' => [
'class' => VerbFilter::className(),
'actions' => [
'logout' => ['post'],
],
],
]; ];
} }
...@@ -196,7 +190,7 @@ class SiteController extends Controller ...@@ -196,7 +190,7 @@ class SiteController extends Controller
} }
} }
} else { } else {
$model->addError('token','验证码错误'); $model->addError('token', '验证码错误');
} }
} }
......
...@@ -7,6 +7,6 @@ ...@@ -7,6 +7,6 @@
*/ */
?> ?>
<div class="tp-head navbar-fixed-top clearfix"> <div class="tp-head navbar-fixed-top clearfix">
<div class="menu-btn fl"><a href="#"><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="#"><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="<?= Yii::$app->assetManager->baseUrl ?>/img/avatar.jpg"></a></div>
</div> </div>
...@@ -38,13 +38,7 @@ $baseUrl = \yii\helpers\Url::base(); ...@@ -38,13 +38,7 @@ $baseUrl = \yii\helpers\Url::base();
<li><a href="<?= $baseUrl . "/site/signup" ?>">注册</a></li> <li><a href="<?= $baseUrl . "/site/signup" ?>">注册</a></li>
<?php else : ?> <?php else : ?>
<?= '<li>'
. Html::beginForm(['/site/logout'], 'post')
. Html::submitButton(
'Logout (' . Yii::$app->user->identity->username . ')'
)
. Html::endForm()
. '</li>'; ?>
<?php endif; ?> <?php endif; ?>
</ul> </ul>
......
...@@ -45,6 +45,7 @@ $(function() { ...@@ -45,6 +45,7 @@ $(function() {
}; };
new Accordion($("#accordion"), false); new Accordion($("#accordion"), false);
}); });
JS; JS;
...@@ -86,7 +87,7 @@ $this->registerJs($js, View::POS_END); ...@@ -86,7 +87,7 @@ $this->registerJs($js, View::POS_END);
<a href="<?= $baseUrl . '/user-center/browse-record' ?>"><i class="glyphicon glyphicon-eye-open"></i>浏览记录</a> <a href="<?= $baseUrl . '/user-center/browse-record' ?>"><i class="glyphicon glyphicon-eye-open"></i>浏览记录</a>
</li> </li>
<li><a href="javascript:;"><i class="glyphicon glyphicon-play-circle"></i>我的课堂</a></li> <li><a href="javascript:;"><i class="glyphicon glyphicon-play-circle"></i>我的课堂</a></li>
<li><a href="javascript:;"><i class="glyphicon glyphicon-off"></i>退出登录</a></li> <li><a href="<?=$baseUrl .'/site/logout'?>"><i class="glyphicon glyphicon-off"></i>退出登录</a></li>
</ul> </ul>
<div class="apply-class"> <div class="apply-class">
......
...@@ -31,7 +31,7 @@ $.ajax({ ...@@ -31,7 +31,7 @@ $.ajax({
initGeetest({ initGeetest({
gt: data.gt, gt: data.gt,
challenge: data.challenge, challenge: data.challenge,
product: "embed", // 产品形式,包括:float,embed,popup。注意只对PC版验证码有效 product: "float", // 产品形式,包括:float,embed,popup。注意只对PC版验证码有效
offline: !data.success // 表示用户后台检测极验服务器是否宕机,一般不需要关注 offline: !data.success // 表示用户后台检测极验服务器是否宕机,一般不需要关注
// 更多配置参数请参见:http://www.geetest.com/install/sections/idx-client-sdk.html#config // 更多配置参数请参见:http://www.geetest.com/install/sections/idx-client-sdk.html#config
}, handlerEmbed); }, handlerEmbed);
......
...@@ -52,7 +52,7 @@ $.ajax({ ...@@ -52,7 +52,7 @@ $.ajax({
initGeetest({ initGeetest({
gt: data.gt, gt: data.gt,
challenge: data.challenge, challenge: data.challenge,
product: "embed", // 产品形式,包括:float,embed,popup。注意只对PC版验证码有效 product: "float", // 产品形式,包括:float,embed,popup。注意只对PC版验证码有效
offline: !data.success // 表示用户后台检测极验服务器是否宕机,一般不需要关注 offline: !data.success // 表示用户后台检测极验服务器是否宕机,一般不需要关注
// 更多配置参数请参见:http://www.geetest.com/install/sections/idx-client-sdk.html#config // 更多配置参数请参见:http://www.geetest.com/install/sections/idx-client-sdk.html#config
}, handlerEmbed); }, handlerEmbed);
......
...@@ -34,7 +34,7 @@ $.ajax({ ...@@ -34,7 +34,7 @@ $.ajax({
initGeetest({ initGeetest({
gt: data.gt, gt: data.gt,
challenge: data.challenge, challenge: data.challenge,
product: "embed", // 产品形式,包括:float,embed,popup。注意只对PC版验证码有效 product: "float", // 产品形式,包括:float,embed,popup。注意只对PC版验证码有效
offline: !data.success // 表示用户后台检测极验服务器是否宕机,一般不需要关注 offline: !data.success // 表示用户后台检测极验服务器是否宕机,一般不需要关注
// 更多配置参数请参见:http://www.geetest.com/install/sections/idx-client-sdk.html#config // 更多配置参数请参见:http://www.geetest.com/install/sections/idx-client-sdk.html#config
}, handlerEmbed); }, handlerEmbed);
......
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