|
|
@@ -20,7 +20,7 @@
|
|
|
class="login-form middle"
|
|
|
auto-complete="on"
|
|
|
label-position="left"
|
|
|
- style="position: relative;top: 200px; left: calc((100% - 320px)/2);top: 150px;"
|
|
|
+ style="position: relative; top: 200px; left: calc((100% - 320px) / 2); top: 150px"
|
|
|
>
|
|
|
<el-input
|
|
|
ref="username"
|
|
|
@@ -94,7 +94,7 @@
|
|
|
import { Vue, Component, Watch } from 'vue-property-decorator'
|
|
|
import { userFirstLogin } from '@/api/user'
|
|
|
import { changePassword } from '@/api/base'
|
|
|
-import { regPassword } from '@/utils/reg'
|
|
|
+import { regNewPassword } from '@/utils/reg'
|
|
|
import { ElForm } from 'element-ui/types/form'
|
|
|
const sha1Hex = require('sha1-hex')
|
|
|
const defaultPwd = '000000'
|
|
|
@@ -141,8 +141,8 @@ export default class Login extends Vue {
|
|
|
callback(new Error('请输入密码!'))
|
|
|
} else {
|
|
|
if (this.changePwd.pass !== '') {
|
|
|
- if (!regPassword().test(value)) {
|
|
|
- callback(new Error('密码位数8-16位,必须包含大小写字母和数字,不可包含非法字符!'))
|
|
|
+ if (!regNewPassword().test(value)) {
|
|
|
+ callback(new Error('密码位数至少12位,必须包含大小写字母和数字,不可包含非法字符!'))
|
|
|
return
|
|
|
}
|
|
|
}
|
|
|
@@ -284,6 +284,7 @@ export default class Login extends Vue {
|
|
|
this.loading = false
|
|
|
this.changePwd.pass = ''
|
|
|
this.changePwd.checkPass = ''
|
|
|
+ this.loginForm.password = ''
|
|
|
sessionStorage.clear()
|
|
|
} else {
|
|
|
this.$nextTick(() => {
|