kk
This commit is contained in:
parent
9e54521a7d
commit
7b15a686b5
@ -138,7 +138,7 @@ module.exports = function(){
|
|||||||
return get_tracking(ids).then(res=>{
|
return get_tracking(ids).then(res=>{
|
||||||
var text = "*Tracking*\n\n";
|
var text = "*Tracking*\n\n";
|
||||||
for(var rr of res){
|
for(var rr of res){
|
||||||
text+=`*[${rr.id}](${tracking.getTrackingUrl(rr.id)})*\n_${rr.date?rr.date:'Unknown'} - ${rr.loc?rr.loc:'Unknown'}_\n${rr.status}\n\n`;
|
text+=`[*${rr.id}*](${tracking.getTrackingUrl(rr.id)})\n_${rr.date?rr.date:'Unknown'} - ${rr.loc?rr.loc:'Unknown'}_\n${rr.status}\n\n`;
|
||||||
}
|
}
|
||||||
return event.reply( text, {"reply_markup":Markup.inlineKeyboard(kb),"parse_mode":"Markdown"});
|
return event.reply( text, {"reply_markup":Markup.inlineKeyboard(kb),"parse_mode":"Markdown"});
|
||||||
});
|
});
|
||||||
@ -172,7 +172,7 @@ module.exports = function(){
|
|||||||
return get_tracking(res).then(res=>{
|
return get_tracking(res).then(res=>{
|
||||||
var text = `*Tracking* (Updated: ${new Date().toLocaleString()})\n\n`;
|
var text = `*Tracking* (Updated: ${new Date().toLocaleString()})\n\n`;
|
||||||
for(var rr of res){
|
for(var rr of res){
|
||||||
text+=`*[${rr.id}](${tracking.getTrackingUrl(rr.id)})*\n_${rr.date?rr.date:'Unknown'} - ${rr.loc?rr.loc:'Unknown'}_\n${rr.status}\n\n`;
|
text+=`[*${rr.id}*](${tracking.getTrackingUrl(rr.id)})\n_${rr.date?rr.date:'Unknown'} - ${rr.loc?rr.loc:'Unknown'}_\n${rr.status}\n\n`;
|
||||||
}
|
}
|
||||||
return event.editMessageText( text, {"reply_markup":Markup.inlineKeyboard(kb),"parse_mode":"Markdown"});
|
return event.editMessageText( text, {"reply_markup":Markup.inlineKeyboard(kb),"parse_mode":"Markdown"});
|
||||||
});
|
});
|
||||||
|
@ -79,11 +79,11 @@ async function get_tracking(trck_ids, guid){
|
|||||||
.then(res => res.json());
|
.then(res => res.json());
|
||||||
}
|
}
|
||||||
|
|
||||||
get_tracking(['993711592316210394'],'').then(res=>{
|
get_tracking(['99'],'').then(res=>{
|
||||||
console.log(res.dat);
|
console.log(res.dat);
|
||||||
console.log(res.dat[0].track.zex);
|
console.log(res.dat[0].track.zex);
|
||||||
console.log(res.dat[0].track.z0);
|
console.log(res.dat[0].track.z0);
|
||||||
console.log(res.dat[0].track.z1);
|
console.log(res.dat[0].track.z1);
|
||||||
console.log(tracking.getTrackingUrl('993711592316210394'));
|
console.log(tracking.getTrackingUrl('99'));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user