Create your Gitee Account
Explore and code with more than 6 million developers,Free private repositories !:)
Sign up
Clone or download
login.html 4.68 KB
Copy Edit Web IDE Raw Blame History
独孤求胜 authored 2018-02-11 11:54 . 初始化
<!DOCTYPE html>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<!-- Tell the browser to be responsive to screen width -->
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico">
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/font-awesome.min.css">
<link rel="stylesheet" href="css/AdminLTE.min.css">
<!-- AdminLTE Skins. Choose a skin from the css/skins
folder instead of downloading all of them to reduce the load. -->
<link rel="stylesheet" href="css/all-skins.min.css">
<link rel="stylesheet" href="css/main.css">
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src=""></script>
<script src=""></script>
<body class="hold-transition login-page">
<div class="login-box" id="rrapp" v-cloak>
<div class="login-logo">
<!-- /.login-logo -->
<div class="login-box-body">
<p class="login-box-msg">管理员登录</p>
<div v-if="error" class="alert alert-danger alert-dismissible">
<h4 style="margin-bottom: 0px;"><i class="fa fa-exclamation-circle"></i> {{errorMsg}}</h4>
<div class="form-group has-feedback">
<input type="text" class="form-control" v-model="form.username" placeholder="账号">
<span class="glyphicon glyphicon-user form-control-feedback"></span>
<div class="form-group has-feedback">
<input type="password" class="form-control" v-model="form.password" placeholder="密码">
<span class="glyphicon glyphicon-lock form-control-feedback"></span>
<div class="form-group has-feedback">
<input type="text" class="form-control" v-model="form.captcha" @keyup.enter="login" placeholder="验证码">
<span class="glyphicon glyphicon-warning-sign form-control-feedback"></span>
<div class="form-group has-feedback">
<img alt="如果看不清楚,请单击图片刷新!" class="pointer" :src="src" @click="refreshCode">
&nbsp;&nbsp;&nbsp;&nbsp;<a href="javascript:;" @click="refreshCode">点击刷新</a>
<div class="row">
<div class="col-xs-8">
<div class="checkbox icheck">
<!-- /.col -->
<div class="col-xs-4">
<button type="button" class="btn btn-primary btn-block btn-flat" @click="login">登录</button>
<!-- /.col -->
<!-- /.social-auth-links -->
<!-- /.login-box-body -->
<!-- /.login-box -->
<script src="libs/jquery.min.js"></script>
<script src="plugins/jqgrid/jquery.jqGrid.min.js"></script>
<script src="libs/vue.min.js"></script>
<script src="libs/bootstrap.min.js"></script>
<script src="libs/app.js"></script>
<script src="js/common.js"></script>
<script type="text/javascript">
var vm = new Vue({
form: {
username: '',
password: '',
captcha: '',
uuid: ''
error: false,
errorMsg: '',
src: ''
beforeCreate: function(){
if(self != top){
top.location.href = self.location.href;
created: function(){
methods: {
refreshCode: function(){
var uuid = getUUID();
this.form.uuid = uuid;
this.src = baseURL + "captcha.jpg?uuid=" + uuid;
login: function () {
type: "POST",
url: baseURL + "sys/login",
dataType: "json",
contentType: "application/json",
data: JSON.stringify(vm.form),
success: function(r){
if(r.code == 0){//登录成功
localStorage.setItem("token", r.token);
parent.location.href ='index.html';
vm.error = true;
vm.errorMsg = r.msg;

Comment ( 0 )

Sign in for post a comment