86 lines
3.2 KiB
PHP
86 lines
3.2 KiB
PHP
<?php
|
|
|
|
/** @var yii\web\View $this */
|
|
/** @var string $content */
|
|
|
|
use app\assets\AppAsset;
|
|
use app\widgets\Alert;
|
|
use yii\bootstrap5\Breadcrumbs;
|
|
use yii\bootstrap5\Html;
|
|
use yii\bootstrap5\Nav;
|
|
use yii\bootstrap5\NavBar;
|
|
|
|
AppAsset::register($this);
|
|
|
|
$this->registerCsrfMetaTags();
|
|
$this->registerMetaTag(['charset' => Yii::$app->charset], 'charset');
|
|
$this->registerMetaTag(['name' => 'viewport', 'content' => 'width=device-width, initial-scale=1, shrink-to-fit=no']);
|
|
$this->registerMetaTag(['name' => 'description', 'content' => $this->params['meta_description'] ?? '']);
|
|
$this->registerMetaTag(['name' => 'keywords', 'content' => $this->params['meta_keywords'] ?? '']);
|
|
$this->registerLinkTag(['rel' => 'icon', 'type' => 'image/x-icon', 'href' => Yii::getAlias('@web/images/logo.png')]);
|
|
$this->registerJsFile('@web/js/layui.js', ['position' => \yii\web\View::POS_HEAD]);
|
|
$this->registerJsFile('@web/libs/layui/lay/modules/jquery.js', ['position' => \yii\web\View::POS_HEAD]);
|
|
$this->registerJsFile('@web/js/common.js', ['position' => \yii\web\View::POS_HEAD]);
|
|
?>
|
|
<?php $this->beginPage() ?>
|
|
<!DOCTYPE html>
|
|
<html lang="<?= Yii::$app->language ?>" class="h-100">
|
|
<head>
|
|
<meta charset="utf-8"/>
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
|
<title><?= Html::encode($this->title) ?></title>
|
|
<!-- <script src="//unpkg.com/layui@2.13.3/dist/layui.js"></script>-->
|
|
<!-- <link rel="stylesheet" href="../../../assets/libs/layui/css/layui.css"/>-->
|
|
<!-- <link rel="stylesheet" href="../../../assets/module/admin.css?v=317">-->
|
|
<!--[if lt IE 9]>
|
|
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
|
|
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
|
<![endif]-->
|
|
<?php $this->head() ?>
|
|
</head>
|
|
|
|
<body class="layui-layout-body">
|
|
<?php $this->beginBody() ?>
|
|
|
|
<?= $content ?>
|
|
|
|
<?php $this->endBody() ?>
|
|
<!-- js部分 -->
|
|
<!--<script type="text/javascript" src="../../../assets/libs/layui/layui.js"></script>-->
|
|
<!--<script type="text/javascript" src="../../../assets/js/common.js?v=317"></script>-->
|
|
<script>
|
|
layui.use(['layer', 'form','admin'], function () {
|
|
var $ = layui.jquery;
|
|
var layer = layui.layer;
|
|
var form = layui.form;
|
|
var admin = layui.admin;
|
|
/* 表单提交 */
|
|
form.on('submit(loginSubmit)', function (obj) {
|
|
admin.showLoading('body',1, '.7');
|
|
$.post('',obj.field ,function (res) {
|
|
if(res.code == 666){
|
|
layer.msg(res.msg, {icon: 1, time: 1500}, function () {
|
|
location.replace('/')
|
|
});
|
|
}else {
|
|
layer.msg(res.msg, {icon: 2, time: 1500});
|
|
$('img.login-captcha').prop('src',$('img.login-captcha').attr('src')+ '?t=' + (new Date).getTime());
|
|
}
|
|
admin.removeLoading( 'body',true, true);
|
|
});
|
|
return false;
|
|
});
|
|
|
|
/* 图形验证码 */
|
|
$('img.login-captcha').click(function () {
|
|
this.src = this.src + '?t=' + (new Date).getTime();
|
|
});
|
|
|
|
});
|
|
</script>
|
|
</body>
|
|
</html>
|
|
<?php $this->endPage() ?>
|
|
|