解决数据为空报错的bug

wx-program
pangdundun 2024-06-11 12:00:53 +08:00
parent 0dc9bb75af
commit 3a470e7857
36 changed files with 36 additions and 41 deletions

View File

@ -498,7 +498,6 @@
this.getcontrol_rtDatastation1()
}
this.waterAndFertilizerParamsList = res.data.map((item, index) => {
return {
...item,
@ -524,15 +523,13 @@
})
this.updateTime = []
this.waterAndFertilizerParamsList.forEach((i, index) => {
this.$http({
url: (i.equipmentName == 1 ? this.api.getFs_rtdata : this.api
.getcontrol_rtdata) + "?equipmentId=" + i.deviceId,
method: 'post',
}).then(res => {
// console.log(res, '');
if (res.code == 200) {
if (res.code == 200 && res.data.length != 0) {
uni.hideLoading({
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

View File

@ -1045,9 +1045,7 @@ var _default = {
url: (i.equipmentName == 1 ? _this.api.getFs_rtdata : _this.api.getcontrol_rtdata) + "?equipmentId=" + i.deviceId,
method: 'post'
}).then(function (res) {
// console.log(res, '主页查看施肥机实时数据');
if (res.code == 200) {
if (res.code == 200 && res.data.length != 0) {
uni.hideLoading({
title: '完成'
});