Skip to content
This repository was archived by the owner on Jul 30, 2020. It is now read-only.

Commit 1ea4b9c

Browse files
committed
v0.0.5 修复帖子详情滑动卡顿问题 首页栏目切换动画修复 部分图标修复
1 parent ae0db78 commit 1ea4b9c

File tree

14 files changed

+13
-6
lines changed

14 files changed

+13
-6
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ API来自于[cnode社区](https://cnodejs.org/api)
1111
![](./img/show.jpg)
1212

1313
线上版本更新日志
14+
v0.0.5 修复帖子详情滑动卡顿问题 首页栏目切换动画修复 部分图标修复
1415

1516
v0.0.4 修复几处样式,添加帖子热帖,发帖添加markdown预览,通知添加一键已读和点击已读 markdown发布的预览
1617

src/pages/detail/index.vue

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<img class='author-img' :src='detailData.author && detailData.author.avatar_url' alt="头像">
88
<span class='name'>{{detailData.author&& detailData.author.loginname}}</span>
99
</div>
10-
<div class='list'><img @click.stop="collect" :src="detailData.is_collect?'../../../static/star2.png':'../../../static/star1.png'" style='width:40rpx;height:40rpx;'><span>楼主</span></div>
10+
<div class='list'><img @click.stop="collect" :src="detailData.is_collect?'../../static/star2.png':'../../static/star1.png'" style='width:40rpx;height:40rpx;'><span>楼主</span></div>
1111
</div>
1212
<scroll-view class='body' scroll-y='true' @scroll='onScroll($event)' :scroll-top="top" enable-back-to-top='true' @scrolltolower='getMore'>
1313
<div class='title'>
@@ -18,7 +18,7 @@
1818
<span>评论:{{detailData.reply_count}}</span>
1919
</div>
2020
</div>
21-
<img class='up-png' src="../../../static/up.png" mode='widthFix' @click.stop="goTop">
21+
<img class='up-png' src="../../static/up.png" mode='widthFix' @click.stop="goTop">
2222
<div v-if='!sendVisible' class='reply-buton' @click.stop="showReplyModal">评论</div>
2323
<div class='content'>
2424
<wemark :mdData='detailData.content'></wemark>
@@ -37,8 +37,8 @@
3737
<wemark :mdData='item.content'></wemark>
3838
</p>
3939
<div class='foot'>
40-
<div :data-replyid='item.id' :data-originindex='originindex' @click.stop="upOrCancel($event)"><img class='icon' :src="(!item.is_uped)?'../../../static/good1.png':'../../../static/good2.png'" /><span>点赞:{{item.ups.length}}</span></div>
41-
<div :data-loginname='item.author.loginname' @click.stop="showReplyModal($event)" :data-replyid='item.id'><img class='icon' src='../../../static/chat.png' /><span>回复</span></div>
40+
<div :data-replyid='item.id' :data-originindex='originindex' @click.stop="upOrCancel($event)"><img class='icon' :src="(!item.is_uped)?'../../static/good1.png':'../../static/good2.png'" /><span>点赞:{{item.ups.length}}</span></div>
41+
<div :data-loginname='item.author.loginname' @click.stop="showReplyModal($event)" :data-replyid='item.id'><img class='icon' src='../../static/chat.png' /><span>回复</span></div>
4242
</div>
4343
</div>
4444
</div>
@@ -76,7 +76,10 @@ export default {
7676
7777
methods: {
7878
onScroll(e) {
79-
this.top = e.target.scrollTop;
79+
if (this.timer){
80+
clearTimeout(this.timer);
81+
this.timer = setTimeout(() =>this.top = e.target.scrollTop,500)
82+
}
8083
},
8184
async getData() {
8285
const accesstoken = wx.getStorageSync("accesstoken");
@@ -229,7 +232,8 @@ export default {
229232
sendVisible: false,
230233
id: "",
231234
replyId: "",
232-
top: 0
235+
top: 0,
236+
timer: null
233237
};
234238
}
235239
};

src/pages/index/index.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,8 @@ export default {
106106
.container {
107107
background-color: rgb(245, 245, 249);
108108
font-size: 30rpx;
109+
overflow:hidden;
110+
width:100vw;
109111
.header {
110112
display: flex;
111113
& > div {
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)