码农笔录博客源码
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

70 рядки
2.6 KiB

6 роки тому
{{template "header" .}}
5 роки тому
<meta name="keywords" content="码农随笔,个人随笔,博客,个人博客,个人笔记,技术博客,免费云笔记,云笔记,随笔,IT博客,谷歌地图,码农笔录,aiprose">
<title>登录 - 码农随笔</title>
6 роки тому
</head>
<body>
<div class="root-container">
{{template "nav" .}}
<div class="login-root">
<div class="input-container">
<div class="input-root">
6 роки тому
<div class="inputs-class">
4 роки тому
<i-form>
<form-item prop="user">
<i-input type="text" v-model="user.username" placeholder="请输入用户名">
<Icon type="ios-person-outline" slot="prepend"></Icon>
</i-input>
</form-item>
<form-item prop="password">
<i-input type="password" v-model="user.userpwd" placeholder="请输入密码">
<Icon type="ios-lock-outline" slot="prepend"></Icon>
</i-input>
</form-item>
<i-button type="info" long @click="login">快速登录</i-button>
</i-form>
<div class="login-bottom">
<a href="/regist">快速注册</a>
6 роки тому
</div>
</div>
6 роки тому
</div>
</div>
</div>
</div>
</body>
6 роки тому
<script>
4 роки тому
var app = new Vue({
el: ".root-container",
delimiters: ['${', '}'],
data: {
user: {}
},
methods: {
login (){
var _this= this
if (this.user.username.trim().length < 4) {
this.$Message.warning('用户名最低4位');
// this.$Notice.warning({
// title: '用户名最低4位',
// desc: ''
// });
return
}
if (this.user.userpwd.trim().length < 6) {
this.$Message.warning('密码最低6位');
return
}
$.post('/api/login', this.user,
6 роки тому
function (data) {
if (data.Status == 1) {
4 роки тому
_this.$Message.warning(data.Msg);
6 роки тому
} else {
4 роки тому
_this.$Message.success("登录成功");
6 роки тому
window.location.href = "/"
6 роки тому
}
}, 'json')
4 роки тому
}
}
6 роки тому
})
</script>
6 роки тому
<script type="text/javascript" src="/static/js/seo.js"></script>
6 роки тому
</html>