diff --git a/pages/tabbar/category/category.vue b/pages/tabbar/category/category.vue index 4b1c948..08cd0a6 100644 --- a/pages/tabbar/category/category.vue +++ b/pages/tabbar/category/category.vue @@ -23,6 +23,10 @@ @refresherrefresh="fnGetData(true)" @scrolltolower="fnGetData(false)" @scroll="fnOnScroll" + @touchmove.stop + @touchstart="fnOnTouchStart" + @touchend="fnOnTouchEnd" + @touchcancel="fnOnTouchEnd" > @@ -78,6 +82,8 @@ export default { isLoadMore: false, loadMoreText: '', scrollTop: 0, + tempScrollTop: 0, + scrollTimeout: null, triggered: false }; }, @@ -181,9 +187,7 @@ export default { }); }, fnOnScroll(e) { - throttle(() => { - this.scrollTop = e.detail.scrollTop; - }, 1000); + this.tempScrollTop = e.detail.scrollTop; }, fnToTopScroll() { uni.pageScrollTo({ @@ -191,6 +195,15 @@ export default { duration: 500 }); this.scrollTop = 0; + this.tempScrollTop = 0; + }, + fnOnTouchStart() { + clearTimeout(this.scrollTimeout); + }, + fnOnTouchEnd() { + this.scrollTimeout = setTimeout(() => { + this.scrollTop = this.tempScrollTop; + }, 500); } } }; diff --git a/pages/tabbar/links/links.vue b/pages/tabbar/links/links.vue index 7a891a7..18e091f 100644 --- a/pages/tabbar/links/links.vue +++ b/pages/tabbar/links/links.vue @@ -7,7 +7,7 @@ - + @@ -28,44 +28,49 @@ - - - - - - + + + + + @@ -90,7 +95,7 @@ - + @@ -101,7 +106,6 @@ import tmFlotbutton from '@/tm-vuetify/components/tm-flotbutton/tm-flotbutton.vu import tmTags from '@/tm-vuetify/components/tm-tags/tm-tags.vue'; import tmEmpty from '@/tm-vuetify/components/tm-empty/tm-empty.vue'; import tmImages from '@/tm-vuetify/components/tm-images/tm-images.vue'; -import tmQuickIndex from '@/tm-vuetify/components/tm-quickIndex/tm-quickIndex.vue'; import tmPoup from '@/tm-vuetify/components/tm-poup/tm-poup.vue'; import { GetRandomNumberByRange } from '@/utils/random.js'; @@ -114,7 +118,6 @@ export default { tmTags, tmEmpty, tmImages, - tmQuickIndex, tmPoup }, data() { @@ -129,7 +132,8 @@ export default { detail: { show: false, data: {} - } + }, + linkTotal: 0 }; }, computed: { @@ -158,6 +162,7 @@ export default { return this.$haloConfig.colors[_r]; }, fnGetData() { + this.linkTotal = 0; this.loading = 'loading'; uni.showLoading({ mask: true, @@ -169,12 +174,12 @@ export default { if (res.status == 200) { console.log('请求结果:'); console.log(res); - let resData = res.data; // 处理数据 - const _result = resData.map(item => { + const _result = res.data.map(item => { const _team = item.team || '未分组'; const _firstChart = _team ? _team.substring(0, 1) : ''; const _links = item.links.map(link => { + this.linkTotal += 1; link.logo = this.$utils.checkAvatarUrl(link.logo); return link; }); @@ -266,7 +271,7 @@ export default { // height: 126rpx; width: 80rpx; height: 80rpx; - border-radius: 50%; + border-radius: 12rpx; border: 6rpx solid #ffffff; box-shadow: none; }