提交 cc7c7759 编写于 作者: KK's avatar KK

登录状态调整

上级 1079fa58
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
</ion-item> </ion-item>
</ion-list> </ion-list>
<div class="ion-padding button"> <div class="ion-padding button">
<ion-button expand="block" class="ion-no-margin" @click="login">{{$t('submit')}}</ion-button> <ion-button expand="block" :disabled="isLoadding" class="ion-no-margin" @click="login">{{$t('submit')}}</ion-button>
</div> </div>
</form> </form>
</div> </div>
...@@ -86,10 +86,6 @@ export default class Login extends Vue { ...@@ -86,10 +86,6 @@ export default class Login extends Vue {
* @memberof Login * @memberof Login
*/ */
public login() { public login() {
if(this.isLoadding){
return;
}
this.isLoadding = true;
let token = localStorage.getItem('token'); let token = localStorage.getItem('token');
let user = localStorage.getItem('user'); let user = localStorage.getItem('user');
if(token){ if(token){
...@@ -107,6 +103,7 @@ export default class Login extends Vue { ...@@ -107,6 +103,7 @@ export default class Login extends Vue {
return; return;
} }
const post: Promise<any> = this.$http.post(Environment.RemoteLogin, { loginname: this.username, password: this.password }); const post: Promise<any> = this.$http.post(Environment.RemoteLogin, { loginname: this.username, password: this.password });
this.isLoadding = true;
post.then((response: any) => { post.then((response: any) => {
if (response && response.status === 200) { if (response && response.status === 200) {
this.isLoadding = false; this.isLoadding = false;
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册