数据对接格式说明
2017-04-20 本文已影响0人
Lynn童
首页数据格式(charts.js)
- 折线图实时数据
url : '/frontend/getflow'
参数: 0/1
请求间隔:3s
返回格式:
var getFlow=[{
time:"2017/03/04 22:22:22",
size: 1200,
insize: 100,
inrate:0.5,
},{
time:"2017/03/04 22:22:25",
size: 1300,
insize: 200,
inrate:0.3,
},{
time:"2017/03/04 22:22:28",
size: 1400,
insize: 110,
inrate:0.1,
},{
time:"2017/03/04 22:22:31",
size: 1500,
insize: 400,
inrate:0.3,
},{
time:"2017/03/04 22:22:34",
size: 1100,
insize: 300,
inrate:0.2,
},{
time:"2017/03/04 22:22:37",
size: 1100,
insize: 500,
inrate:0.7,
},{
time:"2017/03/04 22:22:40",
size: 520,
insize: 600,
inrate:0.6,
},{
time:"2017/03/04 22:22:43",
size: 1400,
insize: 700,
inrate:0.4,
},{
time:"2017/03/04 22:22:46",
size: 1500,
insize: 200,
inrate:0.5,
},{
time:"2017/03/04 22:22:49",
size: 1600,
insize: 100,
inrate:0.1,
}];
- 来访周期+活跃度
url: '/frontend/period'
参数:0/1
请求间隔:5min
返回格式:
var period ={
t1:100,
t2:200,
t3:400,
t4:300,
t5:100,
t6:50,
high:100,
medium:200,
low:150,
sleep:250
};
- 新老顾客
url: '/frontend/newOld'
参数:0/1
请求间隔:5min
返回格式:
var newOld ={
newVisitor:300,
oldVisitor:150
};
- 驻点时长+深访跳出
url: '/frontend/intime'
参数:0/1
请求间隔:5min
返回格式:
var intime ={
deep:0.3,
jump:0.4,
f1:100,
f2:200,
f3:400,
f4:300,
f5:100
};
- 首页地图坐标
url: '/frontend/gps'
参数:0/1
请求间隔:无
返回格式:
var gps={
lon:116.325409,
lat:39.996147
};
details 请求格式
- 客流分析
url: '/frontend/details/traffic'
参数:
var params={
probeID:0,
date:"Wed Apr 05 2017 00:00:00 GMT+0800 (中国标准时间)"
};
返回格式:
var traffic={
d1:[{
data: [500, 6, 0, 28,5, 6, 0, 28, 8, 24, 11, 16, 14, 0, 31, 0, 2, 0, 4, 0, 3, 2, 6, 6]
}, {
data: [0, 2, 12, 2,0, 2, 12, 2, 12, 0, 12, 0, 2, 3, 0, 2, 4, 22, 0, 8, 0, 4, 0, 0]
},{
data:[0.60, 0.65, 0.55, 0.45, 0.48, 0.49, 0.68, 0.74, 0.88, 0.76, 0.70, 0.50,0.60, 0.62, 0.55, 0.45, 0.48, 0.49, 0.68, 0.74, 0.88, 0.76, 0.70, 0.50]
}],
d2:[{
data: [5, 6, 0, 28,5, 6, 0, 28, 8, 24, 11, 16, 14, 0, 31, 0, 2, 0, 4, 0, 3, 2, 6, 6]
}, {
data: [0, 2, 12, 2,0, 2, 12, 2, 12, 0, 12, 0, 2, 3, 0, 2, 4, 22, 0, 8, 0, 4, 0, 0]
},{
data:[0.60, 0.65, 0.55, 0.45, 0.48, 0.49, 0.68, 0.74, 0.88, 0.76, 0.70, 0.50,0.60, 0.62, 0.55, 0.45, 0.48, 0.49, 0.68, 0.74, 0.88, 0.76, 0.70, 0.50]
}],
d3:[{
data: [5, 6, 0, 28,5, 6, 0, 28, 8, 24, 11, 16, 14, 0, 31, 0, 2, 0, 4, 0, 3, 2, 6, 6]
}, {
data: [0, 2, 12, 2,0, 2, 12, 2, 12, 0, 12, 0, 2, 3, 0, 2, 4, 22, 0, 8, 0, 4, 0, 0]
},{
data:[0.60, 0.65, 0.55, 0.45, 0.48, 0.49, 0.68, 0.74, 0.88, 0.76, 0.70, 0.50,0.60, 0.62, 0.55, 0.45, 0.48, 0.49, 0.68, 0.74, 0.88, 0.76, 0.70, 0.50]
}],
d4:[{
data: [5, 6, 0, 28,5, 6, 0, 28, 8, 24, 11, 16, 14, 0, 31, 0, 2, 0, 4, 0, 3, 2, 6, 6]
}, {
data: [0, 2, 12, 2,0, 2, 12, 2, 12, 0, 12, 0, 2, 3, 0, 2, 4, 22, 0, 8, 0, 4, 0, 0]
},{
data:[0.60, 0.65, 0.55, 0.45, 0.48, 0.49, 0.68, 0.74, 0.88, 0.76, 0.70, 0.50,0.60, 0.62, 0.55, 0.45, 0.48, 0.49, 0.68, 0.74, 0.88, 0.76, 0.70, 0.50]
}],
d5:[{
data: [5, 6, 0, 28,5, 6, 0, 28, 8, 24, 11, 16, 14, 0, 31, 0, 2, 0, 4, 0, 3, 2, 6, 6]
}, {
data: [0, 2, 12, 2,0, 2, 12, 2, 12, 0, 12, 0, 2, 3, 0, 2, 4, 22, 0, 8, 0, 4, 0, 0]
},{
data:[0.60, 0.65, 0.55, 0.45, 0.48, 0.49, 0.68, 0.74, 0.88, 0.76, 0.70, 0.50,0.60, 0.62, 0.55, 0.45, 0.48, 0.49, 0.68, 0.74, 0.88, 0.76, 0.70, 0.50]
}],
d6:[{
data: [5, 6, 0, 28,5, 6, 0, 28, 8, 24, 11, 16, 14, 0, 31, 0, 2, 0, 4, 0, 3, 2, 6, 6]
}, {
data: [0, 2, 12, 2,0, 2, 12, 2, 12, 0, 12, 0, 2, 3, 0, 2, 4, 22, 0, 8, 0, 4, 0, 0]
},{
data:[0.60, 0.65, 0.55, 0.45, 0.48, 0.49, 0.68, 0.74, 0.88, 0.76, 0.70, 0.50,0.60, 0.62, 0.55, 0.45, 0.48, 0.49, 0.68, 0.74, 0.88, 0.76, 0.70, 0.50]
}],
d7:[{
data: [5, 6, 0, 28,5, 6, 0, 28, 8, 24, 11, 16, 14, 0, 31, 0, 2, 0, 4, 0, 3, 2, 6, 6]
}, {
data: [0, 2, 12, 2,0, 2, 12, 2, 12, 0, 12, 10, 2, 3, 0, 2, 4, 22, 0, 8, 0, 4, 0, 0]
},{
data:[0.60, 0.65, 0.55, 0.45, 0.48, 0.49, 0.68, 0.74, 0.88, 0.76, 0.70, 0.50,0.60, 0.62, 0.55, 0.45, 0.48, 0.49, 0.68, 0.74, 0.88, 0.76, 0.70, 0.50]
}],
};
- 来访周期+活跃度
url: '/frontend/details/period'
参数:
var params={
probeID:0,
date:"Wed Apr 05 2017 00:00:00 GMT+0800 (中国标准时间)"
};
返回格式:
var period={
period:[4,7,11,15,25, 36,22, 32, 24,42,120],
high:200,
medium:300,
low:150
};
- 驻店时长
url: '/frontend/details/intime'
参数:
var params={
probeID:0,
date:"Wed Apr 05 2017 00:00:00 GMT+0800 (中国标准时间)"
};
返回格式:
var intime={
f1:[10, 22, 41, 64, 90, 110,120, 132, 151, 204, 250, 310,320, 282, 241, 214, 190, 170,150, 132, 101, 84, 50, 23],
f2:[10, 22, 41, 64, 90, 110,120, 132, 151, 204, 250, 310,320, 282, 241, 214, 190, 170,150, 132, 101, 84, 50, 23],
f3:[10, 22, 41, 64, 90, 110,120, 132, 151, 204, 250, 310,320, 282, 241, 214, 190, 170,150, 132, 101, 84, 50, 23],
f4:[10, 22, 41, 64, 90, 110,120, 132, 151, 204, 250, 310,320, 282, 241, 214, 190, 170,150, 132, 101, 84, 50, 23],
f5:[10, 22, 41, 64, 90, 110,120, 132, 151, 204, 250, 310,320, 282, 241, 214, 190, 170,150, 132, 101, 84, 50, 23]
};
4.新老顾客
url: '/frontend/details/newOld'
参数:
var params={
probeID:0,
date:"Wed Apr 05 2017 00:00:00 GMT+0800 (中国标准时间)"
};
返回格式:
var newOld={
newVisitor:[7,25,50, 76,102,130,164,180,140,112,72, 32],
oldVisitor:[125,160,120,100,70,48,18,7,26,46,69,109]
};
- 深访跳出
url: '/frontend/details/deep'
参数:
var params={
probeID:0,
date:"Wed Apr 05 2017 00:00:00 GMT+0800 (中国标准时间)"
};
返回格式:
var deep={
deep:[7,25,50,76,102,130,164],
jump:[125,160,120,100,70,48,18]
}