From 9707084e4e2afba0e0c09b8d576e2b2b766f08c2 Mon Sep 17 00:00:00 2001 From: jscyl13849007907 <13849007907@163.com> Date: Mon, 4 Aug 2025 17:27:15 +0800 Subject: [PATCH] no message --- components/panel/hr.vue | 4 ++-- components/panel/numCard.vue | 2 +- pages/person/index.vue | 2 +- root/bind/inviteList.vue | 4 ++-- root/detail/userShare.vue | 40 +++++++++++++++++++--------------------- 5 files changed, 25 insertions(+), 27 deletions(-) diff --git a/components/panel/hr.vue b/components/panel/hr.vue index a7ce33d..f82f7c3 100644 --- a/components/panel/hr.vue +++ b/components/panel/hr.vue @@ -32,14 +32,14 @@ .doc-left{ width: 43px; height: 2px; - border: 1px solid; + border-top: 1px solid; border-image: linear-gradient(270deg, rgba(255,255,255,0.20), #cccccc) 1 1; transform: rotate(180deg); } .doc-right{ width: 43px; height: 2px; - border: 1px solid; + border-top: 1px solid; border-image: linear-gradient(270deg, rgba(255,255,255,0.20), #cccccc) 1 1; } } diff --git a/components/panel/numCard.vue b/components/panel/numCard.vue index 56b1387..f8065df 100644 --- a/components/panel/numCard.vue +++ b/components/panel/numCard.vue @@ -22,7 +22,7 @@ v-for="(item, index) in list" :key="index" :style="{ - width: 'calc(100% / ' + num + ')', + width: 'calc(100% / ' + num +' - 1rpx)', }" @click="handleClick(item, index)" class="" diff --git a/pages/person/index.vue b/pages/person/index.vue index e753112..efec115 100644 --- a/pages/person/index.vue +++ b/pages/person/index.vue @@ -795,7 +795,7 @@ export default { background-color: #ededed; .m-info { - width: calc(100% - 40rpx); + width: calc(100% - 52px); margin: 0 auto; margin-bottom: 20rpx; diff --git a/root/bind/inviteList.vue b/root/bind/inviteList.vue index c3eed72..975fd32 100644 --- a/root/bind/inviteList.vue +++ b/root/bind/inviteList.vue @@ -494,14 +494,14 @@ export default { .doc-left { width: 43px; height: 2px; - border: 1px solid; + border-top: 1px solid; border-image: linear-gradient(270deg, rgba(255, 255, 255, 0.2), #cccccc) 1 1; transform: rotate(180deg); } .doc-right { width: 43px; height: 2px; - border: 1px solid; + border-top: 1px solid; border-image: linear-gradient(270deg, rgba(255, 255, 255, 0.2), #cccccc) 1 1; } } diff --git a/root/detail/userShare.vue b/root/detail/userShare.vue index 6ac22b0..93791a1 100644 --- a/root/detail/userShare.vue +++ b/root/detail/userShare.vue @@ -333,30 +333,28 @@ export default { // 触摸移动事件 onTouchMove(e) { - if (!this.isTouching) return; - - if (e.touches && e.touches.length > 0) { - this.moveY = e.touches[0].pageY; - const moveDistance = this.moveY - this.startY; + if (!this.isTouching) return; - // 只有向下移动(moveDistance > 0)时才触发下拉效果 - if (moveDistance > 0) { - const query = uni.createSelectorQuery().in(this); - query.select('.scroll-container').boundingClientRect(data => { - if (data) { - const scrollTop = data.scrollTop || 0; - // 只有在滚动到顶部且向下拉动时才执行缩放 - if (scrollTop <= 0) { - // 根据移动距离计算缩放值,使效果更自然 - // 可以调整 divisor(这里是80)来改变缩放的灵敏度 - const scaleValue = Math.min(moveDistance / 40, 1); // 限制最大缩放值 - this.backgroundScale = scaleValue; - this.mtScroll = scaleValue; - } + if (e.touches && e.touches.length > 0) { + this.moveY = e.touches[0].pageY; + const moveDistance = this.moveY - this.startY; + + // 只有向下移动(moveDistance > 0)且移动距离合理时才触发下拉效果 + if (moveDistance > 0 && moveDistance < 200) { // 限制最大下拉距离 + const query = uni.createSelectorQuery().in(this); + query.select('.scroll-container').boundingClientRect(data => { + if (data) { + const scrollTop = data.scrollTop || 0; + // 只有在滚动到顶部且向下拉动时才执行缩放 + if (scrollTop <= 0) { + // 根据移动距离计算缩放值,使效果更自然 + this.backgroundScale = Math.min(moveDistance * 0.05, 10); // 限制最大缩放值 + this.mtScroll = Math.min(moveDistance * 0.05, 10); + } + } + }).exec(); } - }).exec(); } - } }, // 触摸结束事件