wx-program
parent
857f77487e
commit
b3f3feceba
|
@ -49,6 +49,7 @@
|
||||||
clearInterval(this.timer)&&this.timer
|
clearInterval(this.timer)&&this.timer
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
|
// console.log('greenhouseDevice');
|
||||||
const that = this
|
const that = this
|
||||||
this.timer=setInterval(function() {
|
this.timer=setInterval(function() {
|
||||||
uni.getStorage({
|
uni.getStorage({
|
||||||
|
@ -57,7 +58,7 @@
|
||||||
that.getEquipmentInfo(uni.getStorageSync('userid'))
|
that.getEquipmentInfo(uni.getStorageSync('userid'))
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}, 120000);
|
}, 60000);
|
||||||
},
|
},
|
||||||
onPullDownRefresh() {
|
onPullDownRefresh() {
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
|
|
|
@ -28,7 +28,8 @@
|
||||||
background: {
|
background: {
|
||||||
backgroundColor: '#24B383',
|
backgroundColor: '#24B383',
|
||||||
},
|
},
|
||||||
deviceList: []
|
deviceList: [],
|
||||||
|
timer:null
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
|
@ -42,18 +43,23 @@
|
||||||
that.getEquipmentInfo(uni.getStorageSync('userid'))
|
that.getEquipmentInfo(uni.getStorageSync('userid'))
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
setInterval(function() {
|
|
||||||
|
|
||||||
|
},
|
||||||
|
onHide() {
|
||||||
|
clearInterval(this.timer)&&this.timer
|
||||||
|
},
|
||||||
|
onShow() {
|
||||||
|
// console.log('preciseWaterAndFertilizer');
|
||||||
|
const that = this
|
||||||
|
this.timer=setInterval(function() {
|
||||||
uni.getStorage({
|
uni.getStorage({
|
||||||
key: 'token',
|
key: 'token',
|
||||||
success: function(res) {
|
success: function(res) {
|
||||||
// uni.showLoading({
|
|
||||||
// title: '加载中...'
|
|
||||||
// })
|
|
||||||
that.getEquipmentInfo(uni.getStorageSync('userid'))
|
that.getEquipmentInfo(uni.getStorageSync('userid'))
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}, 120000);
|
}, 60000);
|
||||||
|
|
||||||
},
|
},
|
||||||
onPullDownRefresh() {
|
onPullDownRefresh() {
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
|
|
|
@ -356,16 +356,9 @@
|
||||||
that.getEquipmentInfo(uni.getStorageSync('userid'))
|
that.getEquipmentInfo(uni.getStorageSync('userid'))
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
this.timer = setInterval(function() {
|
|
||||||
uni.getStorage({
|
|
||||||
key: 'token',
|
|
||||||
success: function(res) {
|
|
||||||
that.getEquipmentInfo(uni.getStorageSync('userid'))
|
|
||||||
},
|
|
||||||
})
|
|
||||||
}, 60000);
|
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
|
// console.log('timeEnvironment');
|
||||||
let that = this
|
let that = this
|
||||||
clearInterval(that.timer) && that.timer
|
clearInterval(that.timer) && that.timer
|
||||||
this.timer = setInterval(function() {
|
this.timer = setInterval(function() {
|
||||||
|
@ -491,7 +484,7 @@
|
||||||
} else {
|
} else {
|
||||||
this.updateTime.push('暂无')
|
this.updateTime.push('暂无')
|
||||||
}
|
}
|
||||||
console.log(this.updateTime,'this.updateTime');
|
// console.log(this.updateTime,'this.updateTime');
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
console.log('接口失败');
|
console.log('接口失败');
|
||||||
})
|
})
|
||||||
|
|
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
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -213,6 +213,7 @@ var _default = {
|
||||||
clearInterval(this.timer) && this.timer;
|
clearInterval(this.timer) && this.timer;
|
||||||
},
|
},
|
||||||
onShow: function onShow() {
|
onShow: function onShow() {
|
||||||
|
// console.log('greenhouseDevice');
|
||||||
var that = this;
|
var that = this;
|
||||||
this.timer = setInterval(function () {
|
this.timer = setInterval(function () {
|
||||||
uni.getStorage({
|
uni.getStorage({
|
||||||
|
@ -221,7 +222,7 @@ var _default = {
|
||||||
that.getEquipmentInfo(uni.getStorageSync('userid'));
|
that.getEquipmentInfo(uni.getStorageSync('userid'));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}, 120000);
|
}, 60000);
|
||||||
},
|
},
|
||||||
onPullDownRefresh: function onPullDownRefresh() {
|
onPullDownRefresh: function onPullDownRefresh() {
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
|
|
|
@ -193,7 +193,8 @@ var _default = {
|
||||||
background: {
|
background: {
|
||||||
backgroundColor: '#24B383'
|
backgroundColor: '#24B383'
|
||||||
},
|
},
|
||||||
deviceList: []
|
deviceList: [],
|
||||||
|
timer: null
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLoad: function onLoad() {
|
onLoad: function onLoad() {
|
||||||
|
@ -207,17 +208,21 @@ var _default = {
|
||||||
that.getEquipmentInfo(uni.getStorageSync('userid'));
|
that.getEquipmentInfo(uni.getStorageSync('userid'));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
setInterval(function () {
|
},
|
||||||
|
onHide: function onHide() {
|
||||||
|
clearInterval(this.timer) && this.timer;
|
||||||
|
},
|
||||||
|
onShow: function onShow() {
|
||||||
|
// console.log('preciseWaterAndFertilizer');
|
||||||
|
var that = this;
|
||||||
|
this.timer = setInterval(function () {
|
||||||
uni.getStorage({
|
uni.getStorage({
|
||||||
key: 'token',
|
key: 'token',
|
||||||
success: function success(res) {
|
success: function success(res) {
|
||||||
// uni.showLoading({
|
|
||||||
// title: '加载中...'
|
|
||||||
// })
|
|
||||||
that.getEquipmentInfo(uni.getStorageSync('userid'));
|
that.getEquipmentInfo(uni.getStorageSync('userid'));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}, 120000);
|
}, 60000);
|
||||||
},
|
},
|
||||||
onPullDownRefresh: function onPullDownRefresh() {
|
onPullDownRefresh: function onPullDownRefresh() {
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
|
|
|
@ -783,16 +783,9 @@ var _default = {
|
||||||
that.getEquipmentInfo(uni.getStorageSync('userid'));
|
that.getEquipmentInfo(uni.getStorageSync('userid'));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.timer = setInterval(function () {
|
|
||||||
uni.getStorage({
|
|
||||||
key: 'token',
|
|
||||||
success: function success(res) {
|
|
||||||
that.getEquipmentInfo(uni.getStorageSync('userid'));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}, 60000);
|
|
||||||
},
|
},
|
||||||
onShow: function onShow() {
|
onShow: function onShow() {
|
||||||
|
// console.log('timeEnvironment');
|
||||||
var that = this;
|
var that = this;
|
||||||
clearInterval(that.timer) && that.timer;
|
clearInterval(that.timer) && that.timer;
|
||||||
this.timer = setInterval(function () {
|
this.timer = setInterval(function () {
|
||||||
|
@ -963,7 +956,7 @@ var _default = {
|
||||||
} else {
|
} else {
|
||||||
_this.updateTime.push('暂无');
|
_this.updateTime.push('暂无');
|
||||||
}
|
}
|
||||||
console.log(_this.updateTime, 'this.updateTime');
|
// console.log(this.updateTime,'this.updateTime');
|
||||||
}).catch(function (err) {
|
}).catch(function (err) {
|
||||||
console.log('接口失败');
|
console.log('接口失败');
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue