25
640
2913
金牌会员
var service= msg.payload.Services; var len=service.length; var SvcNo=[]; for (var i=0; i<len; i++){ SvcNo.push({payload:service[i].ServiceNo}); return [SvcNo];}
使用道具 举报
8
2073
6057
论坛元老
流水无味
27
2143
8940
9
242
1792
oemsys 发表于 2019-7-15 07:26 找花老板~!~!~支持几个静态~!~!支持下论谈,。。分分钟有人帮你搞定
23
1338
6761
超级版主
natic 发表于 2019-7-15 09:11 javascript的问题吗?可以群里面找下我
var end = []; for (var i = 0; i < msg.payload.Services.length; i++) { var serviceNo = msg.payload.Services[i].ServiceNo; var nextBus = Math.round((new Date(msg.payload.Services[i].NextBus.EstimatedArrival) - new Date()) / 1000 / 60 ); var nextBus2 = Math.round((new Date(msg.payload.Services[i].NextBus2.EstimatedArrival) - new Date()) / 1000 / 60 ); var e = serviceNo + "将在" + nextBus + "分钟和" + nextBus2 + "分钟后到达"; end.push(e); } return {payload:end};
2
287
996
论坛积极会员
本版积分规则 发表回复 回帖后跳转到最后一页
经常在论坛发帖,且发帖量较大
为论坛做出突出贡献的会员
教程高产大神,简直就是为了教程而生~
Archiver|手机版|小黑屋|Hassbian
GMT+8, 2024-12-4 16:21 , Processed in 0.073376 second(s), 35 queries .
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.