data:{port:{
"uconf": [
[1, 9600, 8, 0, 1, 19, 1, 20, "", 0],
[],
[]
],
"nconf": [
["mqtt", "117.34.118.44", 1883, 300, "863488058096796", "", "", "866262049424228/downData", "866262049424228/upData;0;866262049424228/controlReply;", 0, 0, 0, 0, "", [1], 0, 0],
[],
[],
[],
[],
[]
],
"mb": [
[2, 1, 21, [1], 1, 0, 0, "", "", "", 0, 500, 0, 5, 3],
[
[10, 96, "010300010001"],
[
["a", 1, "H", 1]
]
]
],
}}
onLoad(options) {
this.setData({
port:{
"uconf": [
[1, 9600, 8, 0, 1, 19, 1, 20, "", 0],
[],
[]
],
"nconf": [
["mqtt", "117.34.118.44", 1883, 300, "863488058096796", "", "", "866262049424228/downData", "866262049424228/upData;0;866262049424228/controlReply;", 0, 0, 0, 0, "", [1], 0, 0],
[],
[],
[],
[],
[]
],
"mb": [
[2, 1, 21, [1], 1, 0, 0, "", "", "", 0, 500, 0, 5, 3],
[
[10, 96, "010300010001"],
[
["a", 1, "H", 1]
]
]
],
}
})
}
两种赋值,第二种部分数据没初始化,两种页面表现不一致
按代码逻辑来说,两者应该是一样的