Commit 5fe5867d by liangjianmin

css

parent baa71016
Showing with 16 additions and 3 deletions
...@@ -50,6 +50,7 @@ ...@@ -50,6 +50,7 @@
</template> </template>
<script> <script>
import Vue from 'vue'; import Vue from 'vue';
import {Loading} from 'element-ui';
export default { export default {
name: "index", name: "index",
...@@ -58,9 +59,9 @@ ...@@ -58,9 +59,9 @@
pwdFlag: true, pwdFlag: true,
active: false, active: false,
errror_text: '', errror_text: '',
status1:false, status1: false,
status2:false, status2: false,
loading:true, loading: true,
form: { form: {
username: '', username: '',
password: '', password: '',
...@@ -94,10 +95,16 @@ ...@@ -94,10 +95,16 @@
this.pwdFlag = !this.pwdFlag; this.pwdFlag = !this.pwdFlag;
}, },
submit() { submit() {
var myreg = /^[1][3,4,5,7,8][0-9]{9}$/;
if (!this.form.username) { if (!this.form.username) {
this.errror_text = '请输入手机号'; this.errror_text = '请输入手机号';
return false; return false;
} }
if (!myreg.test(this.form.username)) {
this.errror_text = '请输入正确的手机号';
return false;
}
if (!this.form.password) { if (!this.form.password) {
this.errror_text = '请输入登录密码'; this.errror_text = '请输入登录密码';
return false; return false;
...@@ -107,7 +114,13 @@ ...@@ -107,7 +114,13 @@
return false; return false;
} }
let loadingInstance = Loading.service({
background: 'rgba(0, 0, 0, 0)'
});
setTimeout(() => {
loadingInstance.close();
}, 2000);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment