Commit 22580e30 by 肖康

Merge branch 'master' of http://119.23.72.7/xiaokang/cloudSystem

parents 9d364b8c 5fe5867d
Showing with 18 additions and 5 deletions
......@@ -41,7 +41,7 @@
<span class="error">{{errror_text}}</span>
<a href="javascript:;">忘记密码</a>
</p>
<a href="javascript:;" class="btn-submit" :class="active ? 'active':''" @click="submit()" :loading="true">登录</a>
<a href="javascript:;" class="btn-submit" :class="active ? 'active':''" @click="submit()" :loading="true">登录</a>
</div>
</div>
</div>
......@@ -50,7 +50,8 @@
</template>
<script>
import Vue from 'vue';
import {Loading} from 'element-ui';
export default {
name: "index",
data() {
......@@ -58,9 +59,9 @@
pwdFlag: true,
active: false,
errror_text: '',
status1:false,
status2:false,
loading:true,
status1: false,
status2: false,
loading: true,
form: {
username: '',
password: '',
......@@ -94,10 +95,16 @@
this.pwdFlag = !this.pwdFlag;
},
submit() {
var myreg = /^[1][3,4,5,7,8][0-9]{9}$/;
if (!this.form.username) {
this.errror_text = '请输入手机号';
return false;
}
if (!myreg.test(this.form.username)) {
this.errror_text = '请输入正确的手机号';
return false;
}
if (!this.form.password) {
this.errror_text = '请输入登录密码';
return false;
......@@ -107,7 +114,13 @@
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