Commit bae9eb62 authored by 杨培's avatar 杨培

修改提交课堂申请后的提示文字,并自动跳转

parent be66c8fb
......@@ -90,7 +90,11 @@ class ClassesInfoController extends \yii\web\Controller
if (!$agreement) {
$model->addError('agreement', '必须同意使用协议');
} elseif ($model->validate() && $model->save()) {
return $this->render('@app/views/site/success', ['message'=>'您已成功提交课堂申请,我们将尽快为您审核通过。']);
return $this->render('@app/views/site/success', [
'message'=>'您已成功提交课堂申请,审核结果将以短信形式通知您。',
'redirect' => \yii\helpers\Url::to(['/user-center/info']),
'timer' => '2500'
]);
}
}
......
<?php
/**
* Created by PhpStorm.
* User: pader
* Date: 2016/10/20
* Time: 19:02
* @var $message string
* @var $redirect string
* @var $timer int
*/
use frontend\assets\AppAsset;
......@@ -46,6 +45,16 @@ body{
}
CSS;
if (!empty($redirect)) {
$jumpJs = <<<EOD
setTimeout(function() {
location.href = "$redirect";
}, $timer);
EOD;
$this->registerJs($jumpJs);
}
$this->registerCss($css);
$this->title = '提示';
?>
......
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