优化今日活动
parent
d3c0b5c916
commit
3cd892bd36
|
@ -161,7 +161,14 @@
|
|||
babyBirthdayData: 0,
|
||||
babyNotice:0,//宝宝提醒数量
|
||||
dynamicPictureData: "",
|
||||
noonArr: [],
|
||||
noonArr: [
|
||||
// {
|
||||
// Ampm:'上午',
|
||||
// Content:[
|
||||
// {TimePart:'05:32',Name:'阿斯蒂芬'}
|
||||
// ]
|
||||
// },
|
||||
],
|
||||
moId:"",
|
||||
model:"",
|
||||
className:'',//班级名称
|
||||
|
@ -229,13 +236,15 @@
|
|||
EquipmentID: this.$storage.get('EquipmentID')
|
||||
},
|
||||
});
|
||||
if(data.data.data.VideoUrls!=undefined){
|
||||
this.videoSrc = data.data.data.VideoUrls;
|
||||
this.$storage.set('videoSrc',this.videoSrc);
|
||||
}
|
||||
if(data.data.data.PictureUrls.length){
|
||||
this.classImgArr = data.data.data.PictureUrls;
|
||||
this.$storage.set('classImgArr',this.classImgArr);
|
||||
if(data.data.data){
|
||||
if(data.data.data.VideoUrls!=undefined){
|
||||
this.videoSrc = data.data.data.VideoUrls;
|
||||
this.$storage.set('videoSrc',this.videoSrc);
|
||||
}
|
||||
if(data.data.data.PictureUrls.length){
|
||||
this.classImgArr = data.data.data.PictureUrls;
|
||||
this.$storage.set('classImgArr',this.classImgArr);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if(this.$storage.get('videoSrc')!=undefined){
|
||||
|
@ -265,20 +274,28 @@
|
|||
},
|
||||
// 滚动动画
|
||||
scrollEv(){
|
||||
this.topVal = 0;
|
||||
clearInterval(this.monitorTimer);
|
||||
let parentHeight = $('.right-content').height();
|
||||
let childrenHeight = $('#innerbox').height();
|
||||
this.diffHeight = childrenHeight - parentHeight;
|
||||
this.monitorTimer = setInterval(()=>{
|
||||
let topFlag = $('#innerbox').position().top;
|
||||
if(-topFlag*1==0){
|
||||
this.upEv();
|
||||
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(-topFlag*1==this.diffHeight*1){
|
||||
this.downEv();
|
||||
if(childrenHeight>(parentHeight)){
|
||||
this.monitorTimer = setInterval(()=>{
|
||||
let topFlag = $('#innerbox').position().top;
|
||||
if(-topFlag*1==0){
|
||||
this.upEv();
|
||||
}
|
||||
if(-topFlag*1==this.diffHeight*1){
|
||||
this.downEv();
|
||||
}
|
||||
},timeLen)
|
||||
}
|
||||
},100)
|
||||
}
|
||||
},
|
||||
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;
|
||||
|
|
Loading…
Reference in New Issue