使用 HTML/Javascript 保持登录到 Acumatica

问题描述

我正在为 Acumatica 2020 构建 PWA Web 应用程序。我计划使用 Angular,如果失败,则使用 JQuery 来调用 Acumatica API。

我目前的问题是登录成功后,任何额外的 API 调用都会导致

constructor(http: HttpClient,@Inject('BASE_URL') baseUrl: string) {
    
  let credentials = {
    "name": "myuser","password": "mypasswd"
  };

  http.post<any>(this.loginUrl,credentials).subscribe(data => {
    this.getAppointments(http);
  });
}

getAppointments(http: HttpClient) {
    http.get<Appointment[]>(this.apptUrl).subscribe(data => { this.appts = data },error => 
    console.error(error));
}

这是Angular组件中的简单代码

with

如何使登录在浏览器中持久化以供后续 API 调用使用?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)