Use new tracking API at data.netsyms.net
This commit is contained in:
parent
54e1c69a6e
commit
59f225d64a
@ -63,7 +63,8 @@ function openTrackingHistory(code) {
|
||||
url: SETTINGS.trackingapi,
|
||||
dataType: 'json',
|
||||
data: {
|
||||
code: trackingcode
|
||||
code: trackingcode,
|
||||
nocache: (refresh ? "1" : "")
|
||||
},
|
||||
timeout: 15 * 1000,
|
||||
success: function (resp) {
|
||||
@ -76,14 +77,14 @@ function openTrackingHistory(code) {
|
||||
var infocontext = resp;
|
||||
|
||||
infocontext.current.location.display = locationArrayToString(infocontext.current.location);
|
||||
infocontext.current.date = timestampToDateTimeString(infocontext.current.date);
|
||||
infocontext.current.date = infocontext.current.nicetime;
|
||||
infocontext.current.status = trackingStatusToNiceString(infocontext.current.status, true);
|
||||
infocontext.addresses.from = locationArrayToString(infocontext.addresses.from);
|
||||
infocontext.addresses.to = locationArrayToString(infocontext.addresses.to);
|
||||
|
||||
for (var i = 0; i < infocontext.history.length; i++) {
|
||||
infocontext.history[i].location.display = locationArrayToString(infocontext.history[i].location);
|
||||
infocontext.history[i].date = timestampToDateTimeString(infocontext.history[i].date);
|
||||
infocontext.history[i].date = infocontext.history[i].nicetime;
|
||||
infocontext.history[i].status = trackingStatusToNiceString(infocontext.history[i].status, true);
|
||||
}
|
||||
|
||||
@ -120,7 +121,7 @@ function openTrackingHistory(code) {
|
||||
});
|
||||
}
|
||||
} else {
|
||||
app.dialog.alert(resp.message, "Error");
|
||||
app.dialog.alert(resp.msg, "Error");
|
||||
}
|
||||
},
|
||||
error: function (jqXHR, status, errorThrown) {
|
||||
|
@ -35,7 +35,7 @@
|
||||
<div class="item-title">{{status}}</div>
|
||||
<div class="item-after">{{date}}</div>
|
||||
</div>
|
||||
<div class="item-text">{{details}}</div>
|
||||
<div class="item-text">{{#if containerscan}}<i class='fas fa-pallet'></i> {{/if}}{{details}}</div>
|
||||
<div class="item-text"><b>{{location.display}}</b></div>
|
||||
{{/with}}
|
||||
</div>
|
||||
@ -66,7 +66,7 @@
|
||||
<div class="item-title">{{status}}</div>
|
||||
<div class="item-after">{{date}}</div>
|
||||
</div>
|
||||
<div class="item-text">{{details}}</div>
|
||||
<div class="item-text">{{#if containerscan}}<i class='fas fa-pallet'></i> {{/if}}{{details}}</div>
|
||||
<div class="item-text"><b>{{location.display}}</b></div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -372,7 +372,7 @@ var SETTINGS = {
|
||||
geocodecacheexpiry: 604800, // One week
|
||||
geocodeapi: "https://apis.netsyms.net/packagehelper/geocode.php",
|
||||
geocodebarcodeapi: "https://apis.netsyms.net/packagehelper/geocode_barcode.php",
|
||||
trackingapi: "https://apis.netsyms.net/packagehelper/track.php",
|
||||
trackingapi: "https://data.netsyms.net/v1/logistics/tracking/",
|
||||
weatherapi: "https://apis.netsyms.net/packagehelper/weather.php",
|
||||
geoipapi: "https://apis.netsyms.net/packagehelper/geoip.php",
|
||||
sharelistapi: "https://apis.netsyms.net/packagehelper/sharepackagelist.php",
|
||||
|
Loading…
x
Reference in New Issue
Block a user