|
红色部分,报错,是否系统是否不支持高阶函数
//这个页面将展示标签点名为pointName的标签点快照
var pointName;
//加载页面完成后,检查是否有标签点名传入,如果没有标签点名传入,则从数据库中查出一个标签点,作为pointName
//然后对这个标签点进行查询,每1000毫秒查询一次
$(function(){
pointName = location.href.split('?')[1];
if(pointName===undefined){
$.ajax({
type:"get",
url:"http://localhost:10086/api/Point?start=0&count=1&filter=*&tabfilter=*",
success:function(result){
pointName = result.PointsPros[0].TagName;
$('#point').text(pointName);
}
});
}
else {
$('#point').text(pointName);
}
setInterval(() => {
$.ajax({
type:"get",
url:"http://localhost:10086/api/Snapshot?tagName="+encodeURIComponent(pointName)+"&isSingleData=true",
success:function(result){
$("#snapshot").text(result.Value);
$("#time").text(result.Time);
}
});
}, 1000);
})
|
|