Commit 2dbfd447 by yanju

修改动态页面

parent f99c6417
function dateConvert(time){ 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 year = newDate.getFullYear();
let month = newDate.getMonth()+1; let month = newDate.getMonth()+1;
let day = newDate.getDate(); let day = newDate.getDate();
......
...@@ -64,6 +64,7 @@ ...@@ -64,6 +64,7 @@
created(){ created(){
this.$emit(config.event.listenPageChange,this.currentPage); this.$emit(config.event.listenPageChange,this.currentPage);
if(this.type===2){ if(this.type===2){
this.scrollToGetNext(); this.scrollToGetNext();
} }
...@@ -108,8 +109,7 @@ ...@@ -108,8 +109,7 @@
let pageConTop = this.getElementToPageTop (this.$refs.paginationCon); let pageConTop = this.getElementToPageTop (this.$refs.paginationCon);
let scrollTop = document.documentElement.scrollTop ||document.body.scrollTop; let scrollTop = document.documentElement.scrollTop ||document.body.scrollTop;
let screenTop = scrollTop + window.innerHeight ; let screenTop = scrollTop + window.innerHeight ;
if(screenTop>=pageConTop&&this.paginationState==='over'){
if(screenTop>=pageConTop){
if(this.currentPage<this.pages){ if(this.currentPage<this.pages){
this.currentPage = this.currentPage+1; this.currentPage = this.currentPage+1;
// this.paginationState = 'loading'; // this.paginationState = 'loading';
......
...@@ -5,11 +5,11 @@ ...@@ -5,11 +5,11 @@
<div class="release-card__bottom"> <div class="release-card__bottom">
<div class="bottom__l"> <div class="bottom__l">
<div class="func-item"> <div class="func-item">
<yun-icon name="emoji" @click.native="showEmojiCard=!showEmojiCard" size="12px" color="#00AAE6"></yun-icon> <yun-icon name="emoji" @click.native.stop="showEmojiCard=!showEmojiCard" size="12px" color="#00AAE6"></yun-icon>
<p class="func-item__name" @click="showEmojiCard=!showEmojiCard">表情</p> <p class="func-item__name" @click.stop="showEmojiCard=!showEmojiCard">表情</p>
<transition name="fade"> <transition name="fade">
<div class="func-item__abs" v-if="showEmojiCard"> <div class="func-item__abs" v-if="showEmojiCard" ref="emojiCard">
<div class="header"> <div class="header">
<yun-icon name="close1" size="12px" color="#999" @click.native="showEmojiCard=false"></yun-icon> <yun-icon name="close1" size="12px" color="#999" @click.native="showEmojiCard=false"></yun-icon>
</div> </div>
...@@ -202,6 +202,11 @@ ...@@ -202,6 +202,11 @@
this.showTopicCard = false; this.showTopicCard = false;
} }
} }
if(this.$refs.emojiCard){
if(!this.$refs.emojiCard.contains(e.target)){
this.showEmojiCard = false;
}
}
}) })
...@@ -247,6 +252,7 @@ ...@@ -247,6 +252,7 @@
topicName:value topicName:value
}).then((res)=>{ }).then((res)=>{
if(res.code===0){ if(res.code===0){
this.releaseWord = this.releaseWord +"#"+value+"#";
this.dataGetTopicList(); this.dataGetTopicList();
close(); close();
this.$message({ this.$message({
...@@ -285,6 +291,7 @@ ...@@ -285,6 +291,7 @@
}, },
clickToAddTopic(id,name){ clickToAddTopic(id,name){
this.releaseWord = this.releaseWord +"#"+name+"#"; this.releaseWord = this.releaseWord +"#"+name+"#";
this.showTopicCard = false;
}, },
......
...@@ -123,13 +123,20 @@ ...@@ -123,13 +123,20 @@
size:10 size:10
} }
}).then((response)=>{ }).then((response)=>{
let list = response.data.dataList 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++){ for(let i = 0;i<list.length;i++){
this.postList.push(list[i]); this.postList.push(list[i]);
this.paginationState = 'over'; 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