优化今日活动

master
chen 2022-07-25 15:19:09 +08:00
parent d3c0b5c916
commit 3cd892bd36
1 changed files with 39 additions and 22 deletions

View File

@ -161,7 +161,14 @@
babyBirthdayData: 0,
babyNotice:0,//
dynamicPictureData: "",
noonArr: [],
noonArr: [
// {
// Ampm:'',
// Content:[
// {TimePart:'05:32',Name:''}
// ]
// },
],
moId:"",
model:"",
className:'',//
@ -229,6 +236,7 @@
EquipmentID: this.$storage.get('EquipmentID')
},
});
if(data.data.data){
if(data.data.data.VideoUrls!=undefined){
this.videoSrc = data.data.data.VideoUrls;
this.$storage.set('videoSrc',this.videoSrc);
@ -237,6 +245,7 @@
this.classImgArr = data.data.data.PictureUrls;
this.$storage.set('classImgArr',this.classImgArr);
}
}
} else {
if(this.$storage.get('videoSrc')!=undefined){
this.videoSrc = this.$storage.get('videoSrc');
@ -265,11 +274,17 @@
},
//
scrollEv(){
if(this.noonArr.length){
this.topVal = 0;
clearInterval(this.monitorTimer);
let parentHeight = $('.right-content').height();
let childrenHeight = $('#innerbox').height();
this.diffHeight = childrenHeight - parentHeight;
let timeLen = 100;
if(this.diffHeight<100){
timeLen = 500;
}
if(childrenHeight>(parentHeight)){
this.monitorTimer = setInterval(()=>{
let topFlag = $('#innerbox').position().top;
if(-topFlag*1==0){
@ -278,7 +293,9 @@
if(-topFlag*1==this.diffHeight*1){
this.downEv();
}
},100)
},timeLen)
}
}
},
downEv(){
$('#innerbox').animate({top:0+'px'},(this.diffHeight/4)*100,'linear');
@ -327,7 +344,7 @@
EquipmentID: this.$storage.get('EquipmentID')
},
});
if(data.data.data!=null){
if(data.data.data){
this.noticeData = data.data.count;
this.noticeObj = data.data.data;
this.noticeObj.PublishTime = this.noticeObj.PublishTime.slice(0,11);
@ -355,7 +372,7 @@
EquipmentID: this.$storage.get('EquipmentID')
},
});
if(data.data.data!=undefined){
if(data.data.data){
this.noonArr = data.data.data[0].WeekData;
this.$storage.set('noonArr',this.noonArr)
this.animate = true;