解决数据为空报错的bug
parent
0dc9bb75af
commit
3a470e7857
|
@ -498,7 +498,6 @@
|
||||||
this.getcontrol_rtDatastation1()
|
this.getcontrol_rtDatastation1()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
this.waterAndFertilizerParamsList = res.data.map((item, index) => {
|
this.waterAndFertilizerParamsList = res.data.map((item, index) => {
|
||||||
return {
|
return {
|
||||||
...item,
|
...item,
|
||||||
|
@ -524,15 +523,13 @@
|
||||||
})
|
})
|
||||||
this.updateTime = []
|
this.updateTime = []
|
||||||
this.waterAndFertilizerParamsList.forEach((i, index) => {
|
this.waterAndFertilizerParamsList.forEach((i, index) => {
|
||||||
|
|
||||||
this.$http({
|
this.$http({
|
||||||
url: (i.equipmentName == 1 ? this.api.getFs_rtdata : this.api
|
url: (i.equipmentName == 1 ? this.api.getFs_rtdata : this.api
|
||||||
.getcontrol_rtdata) + "?equipmentId=" + i.deviceId,
|
.getcontrol_rtdata) + "?equipmentId=" + i.deviceId,
|
||||||
method: 'post',
|
method: 'post',
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
// console.log(res, '主页查看施肥机实时数据');
|
|
||||||
|
|
||||||
if (res.code == 200) {
|
if (res.code == 200 && res.data.length != 0) {
|
||||||
uni.hideLoading({
|
uni.hideLoading({
|
||||||
title: '完成'
|
title: '完成'
|
||||||
});
|
});
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1045,9 +1045,7 @@ var _default = {
|
||||||
url: (i.equipmentName == 1 ? _this.api.getFs_rtdata : _this.api.getcontrol_rtdata) + "?equipmentId=" + i.deviceId,
|
url: (i.equipmentName == 1 ? _this.api.getFs_rtdata : _this.api.getcontrol_rtdata) + "?equipmentId=" + i.deviceId,
|
||||||
method: 'post'
|
method: 'post'
|
||||||
}).then(function (res) {
|
}).then(function (res) {
|
||||||
// console.log(res, '主页查看施肥机实时数据');
|
if (res.code == 200 && res.data.length != 0) {
|
||||||
|
|
||||||
if (res.code == 200) {
|
|
||||||
uni.hideLoading({
|
uni.hideLoading({
|
||||||
title: '完成'
|
title: '完成'
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue