| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104 |
- <?php
- \yii\web\YiiAsset::register($this);
- ?>
- <?php $this->beginPage() ?>
- <!DOCTYPE html>
- <html lang="<?= Yii::$app->language ?>">
- <head>
- <meta charset="<?= Yii::$app->charset ?>">
- <meta name="viewport" content="width=device-width, initial-scale=1.0"><meta http-equiv="X-UA-Compatible" content="IE=edge">
- <?= \yii\helpers\Html::csrfMetaTags() ?>
- <title>欢迎使用X Broker</title>
- <?php $this->head() ?>
- <link href="<?= STATIC_URL ?>/ui/css/bootstrap.min.css" rel="stylesheet">
- <link href="<?= STATIC_URL ?>/ui/font-awesome/css/font-awesome.css" rel="stylesheet">
- <link href="<?= STATIC_URL ?>/ui/css/animate.css" rel="stylesheet">
- <link href="<?= STATIC_URL ?>/ui/css/style.css" rel="stylesheet">
- <link href="<?= STATIC_URL ?>/ui/css/plugins/toastr/toastr.min.css" rel="stylesheet">
- </head>
- <body class="gray-bg">
- <?php $this->beginBody() ?>
- <div class="loginColumns animated fadeInDown">
- <div class="row">
- <div class="col-md-3"></div>
- <div class="col-md-6">
- <h1 class="text-center">X Broker</h1>
- <hr/>
- </div>
- <div class="col-md-3"></div>
- </div>
- <div class="row">
- <div class="col-md-3"></div>
- <div class="col-md-6">
- <div class="ibox-title">
- 欢迎使用X Broker
- </div>
- <div class="ibox-content">
- <form id="form" class="m-t" role="form">
- <div class="input-group" style="margin-bottom:15px;">
- <span class="input-group-btn">
- <button type="button" class="btn btn-default">户名</button>
- </span>
- <input type="text" id="username" name="username" class="form-control" placeholder="您的电子邮箱或用户名" required="">
- </div>
- <div class="input-group" style="margin-bottom:15px;">
- <span class="input-group-btn">
- <button type="button" class="btn btn-default">密码</button>
- </span>
- <input type="password" id="password" name="password" class="form-control" placeholder="您的登录密码" required="">
- </div>
- <button id="login" type="button" class="btn btn-primary block full-width m-b">登录</button>
- <a href="<?= \yii\helpers\Url::to(['pwd?type=2']) ?>">
- <small>忘记密码?</small>
- </a>
- <a href="<?= \yii\helpers\Url::to(['open']) ?>" class="pull-right">
- <small>没有账户?</small>
- </a>
- </form>
- </div>
- <hr/>
- </div>
- <div class="col-md-3"></div>
- </div>
- <div class="row">
- <div class="col-md-3"></div>
- <div class="col-md-6 text-right">
- <small>©2016-2019 Vegard</small>
- </div>
- <div class="col-md-3"></div>
- </div>
- </div>
- <?php $this->endBody() ?>
- <script src="<?= STATIC_URL ?>/ui/js/jquery.1.9.1.min.js"></script>
- <script src="<?= STATIC_URL ?>/ui/js/bootstrap.min.js"></script>
- <script src="<?= STATIC_URL ?>/ui/js/plugins/toastr/toastr.min.js"></script>
- <script type="text/javascript">
- $("#login").on("click",function(){
- $.ajax({
- type: "POST",
- url: "<?= \yii\helpers\Url::to(['iblogin-post']) ?>",
- data: $('#form').serialize(),
- dataType: "json",
- beforeSend: function() {},
- success: function(data) {
- if(data.isSuccess){
- var url="<?= \yii\helpers\Url::to(['/ib/dashboard']) ?>";
- window.location.href=url;
- }else{
- toastr.error("用户名或密码错误", "提示");
- }
- },
- complete: function(XMLHttpRequest, textStatus) {},
- error: function() {}
- });
- });
- </script>
- </body>
- </html>
|