diff --git a/pages_promotion/merch/detail.vue b/pages_promotion/merch/detail.vue index a0e60dd..ecdb08a 100644 --- a/pages_promotion/merch/detail.vue +++ b/pages_promotion/merch/detail.vue @@ -24,7 +24,13 @@ - {{ merch.desc }} + + {{ merch.desc }} + + ↓ + 上滑查看更多 + + {{ isDescExpanded ? '↑ 收起' : '↓ 展开' }} @@ -329,7 +335,8 @@ export default { screenWidth: uni.getSystemInfoSync().windowWidth, changeStyleDebounce: null, headerHeightInited: false, - isDescExpanded: false + isDescExpanded: false, + isShowScrollHint: false }; }, mixins: [list], @@ -364,6 +371,12 @@ export default { toggleDesc() { if (!this.merch.desc) return; this.isDescExpanded = !this.isDescExpanded; + if (this.isDescExpanded && this.merch.desc.length > 200) { + this.isShowScrollHint = true; + setTimeout(() => { + this.isShowScrollHint = false; + }, 3000); + } }, initHeaderHeight() { if (!this.merch || !this.merch.merch_name) return; @@ -457,13 +470,37 @@ export default { -webkit-box-orient: unset; max-height: 300rpx; word-break: break-all; + padding-bottom: 80rpx; } -@keyframes autoScroll { - 0% { transform: translateY(0); } - 30% { transform: translateY(-100rpx); } - 60% { transform: translateY(-200rpx); } - 100% { transform: translateY(0); } +.scroll-hint { + position: absolute; + bottom: 0; + left: 0; + right: 0; + display: flex; + align-items: center; + justify-content: center; + padding: 16rpx 0; + background: linear-gradient(to top, rgba(255,255,255,0.95), rgba(255,255,255,0.8)); + z-index: 12; +} + +.scroll-icon { + font-size: 28rpx; + color: #666; + margin-right: 8rpx; + animation: bounceDown 1s ease-in-out infinite; +} + +.scroll-text { + font-size: 24rpx; + color: #666; +} + +@keyframes bounceDown { + 0%, 100% { transform: translateY(0); } + 50% { transform: translateY(8rpx); } } .expand-tip {