Commit 2dbfd447 by yanju

修改动态页面

parent f99c6417
function dateConvert(time){
let newDate = new Date(time);
let newTime = time+8*60*60*1000;
let newDate = new Date(newTime);
let year = newDate.getFullYear();
let month = newDate.getMonth()+1;
let day = newDate.getDate();
......
......@@ -64,6 +64,7 @@
created(){
this.$emit(config.event.listenPageChange,this.currentPage);
if(this.type===2){
this.scrollToGetNext();
}
......@@ -108,8 +109,7 @@
let pageConTop = this.getElementToPageTop (this.$refs.paginationCon);
let scrollTop = document.documentElement.scrollTop ||document.body.scrollTop;
let screenTop = scrollTop + window.innerHeight ;
if(screenTop>=pageConTop){
if(screenTop>=pageConTop&&this.paginationState==='over'){
if(this.currentPage<this.pages){
this.currentPage = this.currentPage+1;
// this.paginationState = 'loading';
......@@ -304,7 +304,7 @@
border-radius: 4*$length;
color:#999;
font-size: 12px;
}
}
......
......@@ -5,11 +5,11 @@
<div class="release-card__bottom">
<div class="bottom__l">
<div class="func-item">
<yun-icon name="emoji" @click.native="showEmojiCard=!showEmojiCard" size="12px" color="#00AAE6"></yun-icon>
<p class="func-item__name" @click="showEmojiCard=!showEmojiCard">表情</p>
<yun-icon name="emoji" @click.native.stop="showEmojiCard=!showEmojiCard" size="12px" color="#00AAE6"></yun-icon>
<p class="func-item__name" @click.stop="showEmojiCard=!showEmojiCard">表情</p>
<transition name="fade">
<div class="func-item__abs" v-if="showEmojiCard">
<div class="func-item__abs" v-if="showEmojiCard" ref="emojiCard">
<div class="header">
<yun-icon name="close1" size="12px" color="#999" @click.native="showEmojiCard=false"></yun-icon>
</div>
......@@ -202,6 +202,11 @@
this.showTopicCard = false;
}
}
if(this.$refs.emojiCard){
if(!this.$refs.emojiCard.contains(e.target)){
this.showEmojiCard = false;
}
}
})
......@@ -247,6 +252,7 @@
topicName:value
}).then((res)=>{
if(res.code===0){
this.releaseWord = this.releaseWord +"#"+value+"#";
this.dataGetTopicList();
close();
this.$message({
......@@ -285,6 +291,7 @@
},
clickToAddTopic(id,name){
this.releaseWord = this.releaseWord +"#"+name+"#";
this.showTopicCard = false;
},
......
......@@ -123,13 +123,20 @@
size:10
}
}).then((response)=>{
let list = response.data.dataList
for(let i = 0;i<list.length;i++){
this.postList.push(list[i]);
if(currentPage===1){
this.postList = response.data.dataList;
this.pages = response.data.totalPage;
this.paginationState = 'over';
}else{
let list = response.data.dataList;
for(let i = 0;i<list.length;i++){
this.postList.push(list[i]);
this.paginationState = 'over';
}
this.pages = response.data.totalPage;
}
this.pages = response.data.totalPage;
})
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment