perf(): 代码优化
parent
65b159ce06
commit
b9e2563c8e
|
|
@ -59,7 +59,7 @@
|
|||
const warnetm = moment().format("YYYY-MM-DD HH:mm:ss")
|
||||
import SkInfo from '../skInfo/index.vue'
|
||||
import YlzList from '../ylzList/index.vue'
|
||||
let timer= null;
|
||||
let timer = null;
|
||||
export default {
|
||||
components: {
|
||||
SkInfo,
|
||||
|
|
@ -138,21 +138,19 @@
|
|||
getYlzList() {
|
||||
uni.$http.post('/gunshiApp/xyt/stPptnRReal/list').then(res => {
|
||||
if (res.data.code == 200) {
|
||||
console.log(this.Ylzlist,'this.Ylzlist');
|
||||
this.Ylzlist = res.data.data
|
||||
}
|
||||
})
|
||||
},
|
||||
getList() {
|
||||
console.log(11);
|
||||
uni.$http.post('/gunshiApp/xyt/messageCenter/list', {
|
||||
start: '',
|
||||
end: ''
|
||||
}).then(res => {
|
||||
if (res.data.code == 200) {
|
||||
this.messagelist = res.data.data
|
||||
}
|
||||
})
|
||||
uni.$http.post('/gunshiApp/xyt/messageCenter/list', {
|
||||
start: '',
|
||||
end: ''
|
||||
}).then(res => {
|
||||
if (res.data.code == 200) {
|
||||
this.messagelist = res.data.data
|
||||
}
|
||||
})
|
||||
},
|
||||
todetailmessgae() {
|
||||
uni.navigateTo({
|
||||
|
|
@ -249,28 +247,25 @@
|
|||
},
|
||||
|
||||
onLoad() {
|
||||
console.log("走了几遍");
|
||||
|
||||
this.getYlzList();
|
||||
},
|
||||
|
||||
onShow() {
|
||||
var that = this;
|
||||
that.getList();
|
||||
timer = setInterval(function() {
|
||||
that.getList();
|
||||
}, 10000);
|
||||
|
||||
timer = setInterval(function () {
|
||||
that.getList();
|
||||
}, 10000);
|
||||
|
||||
this.setInsert()
|
||||
this.getXcrwData();
|
||||
this.getHandleData();
|
||||
this.getYjData();
|
||||
},
|
||||
onHide() {
|
||||
console.log(222);
|
||||
clearInterval(timer)
|
||||
timer = null;
|
||||
},
|
||||
clearInterval(timer)
|
||||
timer = null;
|
||||
},
|
||||
|
||||
}
|
||||
</script>
|
||||
|
|
@ -281,9 +276,9 @@
|
|||
font-size: 14px;
|
||||
line-height: 24px;
|
||||
background-color: #f3f5f8;
|
||||
height: 100%;
|
||||
overflow: auto;
|
||||
|
||||
height: 100%;
|
||||
overflow: auto;
|
||||
|
||||
}
|
||||
|
||||
.info {
|
||||
|
|
@ -359,12 +354,13 @@
|
|||
background: #fff;
|
||||
}
|
||||
|
||||
.warn1 {
|
||||
.warn1 {
|
||||
padding: 18rpx 20rpx;
|
||||
text-align: left;
|
||||
// margin-bottom: 12rpx;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.info_24 {
|
||||
width: 100%;
|
||||
// position: fixed;
|
||||
|
|
|
|||
|
|
@ -68,7 +68,6 @@
|
|||
}
|
||||
},
|
||||
mounted() {
|
||||
console.log('小玉潭水库222');
|
||||
this.getList()
|
||||
this.getDrp()
|
||||
},
|
||||
|
|
@ -91,13 +90,10 @@
|
|||
uni.$http.get('/gunshiApp/xyt/reservoir/water/detail?stcd=716164061&_=1731028927554').then(res=>{
|
||||
|
||||
this.dataform={...this.dataform,...res.data.data}
|
||||
console.log(this.dataform,'drp yesterdayDrp');
|
||||
|
||||
})
|
||||
uni.$http.post('/gunshiApp/xyt/reservoir/water/list').then(res=>{
|
||||
console.log(res,'drp list');
|
||||
this.dataform={...this.dataform,...res.data.data[0]}
|
||||
console.log(this.dataform,'drp list');
|
||||
this.tm = res.data.data[0].tm
|
||||
})
|
||||
uni.$http.post('/gunshiApp/xyt/stWaterRReal/list').then(res=>{
|
||||
|
|
@ -120,7 +116,6 @@
|
|||
if(index == 0){
|
||||
|
||||
this.showImg = item.url
|
||||
console.log(this.showImg,'this.showImg');
|
||||
}
|
||||
return item})
|
||||
}
|
||||
|
|
@ -140,7 +135,6 @@
|
|||
},
|
||||
getList(){
|
||||
uni.$http.post('/gunshiApp/xyt/attResBase/list').then(res=>{
|
||||
console.log(res.data.data[0]);
|
||||
this.dataform=res.data.data[0]
|
||||
})
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue