问题标签 [traccar]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
2141 浏览

reactjs - How to access the value from set-cookie in React?

I've been working on a project using Traccar API and React.

My problem is that I want to save the value of set-cookie response Header, to store it in the browser's cookies.

I want to do this because, neither Firefox or Chrome set the cookie on the browser.

Cookie not set

But on both browsers I get the same response Header.

Response header

This is my function, and as you can see, I tried to get the value of set-cookie using response.headers.get()

But everytime I call the request, the result is the same.

Null value

Also, i tried to modify the credentials Header and using credentials: include,credentials: same-origin and credentials: omit, but still no luck.

I've been stuck with this problem for over a week, One of the things that I have noticed is that when testing the API methods in Postman, the JSESSIONID value, which come from set-cookie, is always used, this value is returned as a Response Header, but in the Code Snippets, is also set as a Request Header, that makes sense because every method on the API using Postman uses it as a Request Header.

So, how to get this value?

0 投票
0 回答
17 浏览

xcode - 没有这样的模块“InAppSettingsKit”

我已经安装了 CocoaPods,但在我的项目中,我收到消息说 CocoaPods 没有模块“InAppSettingsKit”。有任何想法吗?

错误截图

在此处输入图像描述

0 投票
0 回答
64 浏览

flutter - 如何在颤振上使用 Traccar api?

我正在尝试在我的颤振项目中使用 Traccar API,但它没有给我一个错误。我已经在邮递员上尝试过 API,它工作得很好。我试过HTTP包和Dio包仍然有同样的错误。我也尝试过 相同的问题,但仍然没有区别。有什么办法可以解决这个问题吗?

0 投票
2 回答
37 浏览

extjs - ExtJS 控制器交互

抱歉,如果没有正确命名,开发不是我的第一语言:)

我正在尝试向名为 Traccar(基于 Web 的跟踪平台)的 extjs Web 应用程序添加功能。

对于熟悉该应用程序的任何人,我正在尝试将“快速报告”按钮添加到设备部分,以便您可以单击设备,单击按钮,它将展开报告部分并预先选择报告类型为行程,设备为所选设备,然后单击显示。

从技术角度来看,我已经实现了其中的一些。我相信我需要关注两个视图控制器 - “DevicesController.js”(https://github.com/traccar/traccar-web/blob/9e1c0b44189136ec6abf05720c698027a689fa08/web/app/view/edit/DevicesController.js) js)和“ReportsController.js”(https://github.com/traccar/traccar-web/blob/9e1c0b44189136ec6abf05720c698027a689fa08/web/app/view/ReportController.js

我已经弄清楚了如何扩展屏幕底部的报告部分(这很容易):

我一直在尝试调用报告控制器与它进行交互,但我似乎无法理解如何做到这一点(如果你能做到的话)我一直在尝试类似 -

但是,我收到这样的错误

测试方法目前很简单,只是为了证明我到了那里-

任何指针/指导/建议将不胜感激

0 投票
0 回答
36 浏览

extjs - 对话框中的 Traccar 属性

这是关于 Traccar 开发的一般问题

我有一个修改版的 traccar,我对更改 web ui 很有信心(https://github.com/traccar/traccar-web

我想做的一件事是让最终用户更容易访问某些“属性”。

例如,此时如果您想在设备上设置限速,您必须为设备添加限速属性并在属性对话框中进行设置。

我希望通过主设备编辑对话框已经定义和编辑某些属性。

我希望能够将其应用于设备、地理围栏和用户。

任何指针/代码示例将不胜感激。