错误:在Jhispter上,连接失败,但警告框(提示)除外。怎么做?

时间:2019-05-07 10:11:13

标签: jhipster

我在Jhipster下启动了一个项目, 希望我可以与“ ADMIN ADMIN”建立联系 除非我在输入中输入用户 它失败, 但是它会打开输入警报 在警报中,连接有效,但在登录名中无效 我不明白为什么。你有什么主意吗?

我试图重做代码,但是它什么也没提供

login() {
    this.loginService
      .login({
        username: this.loginForm.get('username').value,
        password: this.loginForm.get('password').value,
        rememberMe: this.loginForm.get('rememberMe').value
      })
      .then(() => {
        this.authenticationError = false;
        this.activeModal.dismiss('login success');
        if (this.router.url === '/register' || /^\/activate\//.test(this.router.url) || /^\/reset\//.test(this.router.url)) {
          this.router.navigate(['']);
        }

        this.eventManager.broadcast({
          name: 'authenticationSuccess',
          content: 'Sending Authentication Success'
        });

        // previousState was set in the authExpiredInterceptor before being redirected to login modal.
        // since login is successful, go to stored previousState and clear previousState
        const redirect = this.stateStorageService.getUrl();
        if (redirect) {
          this.stateStorageService.storeUrl(null);
          this.router.navigateByUrl(redirect);
        }
      })
      .catch(() => {
        this.authenticationError = true;
      });
}

0 个答案:

没有答案