-
-
-
-
-
{{ $t('login.title') }}
-
-
-
-
-
-
-
-
+
+
-
+ label-position="left">
-
-
-
-
-
-
-
-
-
+
+
{{ $t('login.title') }}
+
+
- {{ $t('login.logIn') }}
+
+
+
+
+
+
-
- {{ $t('login.username') }} : admin
- {{ $t('login.password') }} : {{ $t('login.any') }}
-
-
- {{ $t('login.username') }} : editor
- {{ $t('login.password') }} : {{ $t('login.any') }}
-
+
+
+
+
+
+
+
+
+
- {{ $t('login.thirdparty') }}
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{{ $t('login.logIn') }}
+
+
+
+
+
+ {{ $t('login.username') }} : admin
+ {{ $t('login.password') }} : {{ $t('login.any') }}
+
+
+ {{ $t('login.username') }} : editor
+ {{ $t('login.password') }} : {{ $t('login.any') }}
+
+
+
+ {{ $t('login.thirdparty') }}
+
+
+
+
+
+
{{ $t('login.thirdpartyTips') }}
-
+
@@ -91,12 +153,18 @@ export default {
password: '1111111'
},
loginRules: {
- username: [{ required: true, trigger: 'blur', validator: validateUsername }],
- password: [{ required: true, trigger: 'blur', validator: validatePassword }]
+ username: [
+ { required: true, trigger: 'blur', validator: validateUsername }
+ ],
+ password: [
+ { required: true, trigger: 'blur', validator: validatePassword }
+ ]
},
passwordType: 'password',
loading: false,
- showDialog: false
+ showDialog: false,
+ // captchaCode_img_url: process.env.BASE_API + '/adm/captcha'
+ captchaCode_img_url: 'https://www.oschina.net/action/user/captcha'
}
},
created() {
@@ -106,6 +174,10 @@ export default {
// window.removeEventListener('hashchange', this.afterQRScan)
},
methods: {
+ refreshCaptchaImg() {
+ // this.captchaCode_img_url = process.env.BASE_API + '/adm/captcha' + '?t=' + Math.random()
+ this.captchaCode_img_url = 'https://www.oschina.net/action/user/captcha' + '?t=' + Math.random()
+ },
showPwd() {
if (this.passwordType === 'password') {
this.passwordType = ''
@@ -155,12 +227,12 @@ export default {
/* 修复input 背景不协调 和光标变色 */
/* Detail see https://github.com/PanJiaChen/vue-element-admin/pull/927 */
- $bg:#283443;
- $light_gray:#eee;
+ $bg: #283443;
+ $light_gray: #eee;
$cursor: #fff;
@supports (-webkit-mask: none) and (not (cater-color: $cursor)) {
- .login-container .el-input input{
+ .login-container .el-input input {
color: $cursor;
&::first-line {
color: $light_gray;
@@ -173,7 +245,7 @@ export default {
.el-input {
display: inline-block;
height: 47px;
- width: 85%;
+ width: 80%; // 这里85%将影响部分错位 设置为80%即可
input {
background: transparent;
border: 0px;
@@ -199,72 +271,71 @@ export default {