格式如下。。
{
"data": [
{
"fldIDI": "1",
"fldSensorNO": "01",
"fldgatherdatetime": "2017/5/19 8:38:29",
"fldGatherDate": "2017-05-19",
"fldGatherTime": "08:38",
"fldTemperature": "28.4",
"fldHumidity": "65.8",
"fldIlluminance": "598"
},
{
"fldIDI": "2",
"fldSensorNO": "02",
"fldgatherdatetime": "2017/5/19 8:38:37",
"fldGatherDate": "2017-05-19",
"fldGatherTime": "08:38",
"fldTemperature": "28.4",
"fldHumidity": "65.8",
"fldIlluminance": "324"
},
{
"fldIDI": "3",
"fldSensorNO": "03",
"fldgatherdatetime": "2017/5/19 8:38:15",
"fldGatherDate": "2017-05-19",
"fldGatherTime": "08:38",
"fldTemperature": "28.4",
"fldHumidity": "65.8",
"fldIlluminance": "1237"
},
wx.request({
url:
'url'
,
data:{},
method:
'POST'
,
header:{
'content-type'
:
'application/x-www-form-urlencoded;charset=UTF-8'
},
success:
function
(res){
console.log(res.data.length)
}
})