From 71e91da7573a8926d7176959e17cdb4b405de355 Mon Sep 17 00:00:00 2001 From: Lj <1095098147@qq.com> Date: Fri, 11 Jul 2025 13:33:10 +0800 Subject: [PATCH] =?UTF-8?q?'=E4=BF=AE=E6=94=B9=E8=A7=86=E9=A2=91=E6=92=AD?= =?UTF-8?q?=E6=94=BE=E8=A7=86=E8=A7=92=E3=80=82=E4=BF=AE=E5=A4=8D=E6=9F=A5?= =?UTF-8?q?=E7=9C=8B=E5=93=81=E7=89=8C=E6=8C=89=E9=92=AE=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E4=B8=8D=E5=85=A8'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.js | 2 +- pages/component/home.vue | 5 +- pages/component/recycle.vue | 142 +++++++++++++++++++++++++++++++++--------- pages/subcomponent/wallet.vue | 4 +- 4 files changed, 116 insertions(+), 37 deletions(-) diff --git a/config.js b/config.js index dde5b6a..d166eb8 100644 --- a/config.js +++ b/config.js @@ -1,5 +1,5 @@ // config.js -const type = 'local' +const type = 'prod' const config = { local: { diff --git a/pages/component/home.vue b/pages/component/home.vue index aa60f97..2d34210 100644 --- a/pages/component/home.vue +++ b/pages/component/home.vue @@ -444,15 +444,14 @@ if (!this.videoPlayingStates[index]) { // 第一次点击:显示视频并开始播放 this.$set(this.videoPlayingStates, index, true); - // 等待视频元素渲染后再进行操作 this.$nextTick(() => { setTimeout(() => { const videoContext = uni.createVideoContext(`video-${index}`, this); if (videoContext) { - // 直接进入全屏播放 + // 直接进入全屏播放,强制竖屏 videoContext.requestFullScreen({ - direction: -1 // 自动选择方向 + direction: 0 // 竖屏方向,0代表竖屏,1代表横屏,-1自动 }); } }, 200); diff --git a/pages/component/recycle.vue b/pages/component/recycle.vue index be80e3f..5298e2d 100644 --- a/pages/component/recycle.vue +++ b/pages/component/recycle.vue @@ -87,10 +87,10 @@ {{item.service}} - - - 回收规则 - + + + 回收规则 + @@ -768,24 +768,24 @@ export default { showRules(item) { // isPin=Y: 弹规则,读到底部后自动弹品牌;isPin=N: 只弹规则 if (item.isPin === 'Y') { - // 检查该商品是否已经查看过规则 - if (this.viewedRuleItems.has(item.id)) { - // 如果已经查看过,直接跳过规则弹窗,进入品牌选择 - this.isWaitingForBrandSelection = false; - this.getGoodsBrandList(item.id); - this.showBrandPopup = true; - return; + // 检查该商品是否已经查看过规则 + if (this.viewedRuleItems.has(item.id)) { + // 如果已经查看过,直接跳过规则弹窗,进入品牌选择 + this.isWaitingForBrandSelection = false; + this.getGoodsBrandList(item.id); + this.showBrandPopup = true; + return; + } + // 重置滚动状态 + this.hasScrolledToBottom = false; + // 获取回收规则富文本 + this.$api('getGoodsRecycleRule', { goodsId: item.id }, res => { + if (res.code === 200 && res.result) { + this.ruleHtml = res.result + } else { + this.ruleHtml = '

暂无回收规则

' } - // 重置滚动状态 - this.hasScrolledToBottom = false; - // 获取回收规则富文本 - this.$api('getGoodsRecycleRule', { goodsId: item.id }, res => { - if (res.code === 200 && res.result) { - this.ruleHtml = res.result - } else { - this.ruleHtml = '

暂无回收规则

' - } - this.showRulePopup = true + this.showRulePopup = true // 规则弹窗关闭后自动弹品牌弹窗逻辑在closeRulePopup已实现 }) } else { @@ -800,7 +800,7 @@ export default { this.showRulePopup = true // 不弹品牌弹窗 this.isWaitingForBrandSelection = false; - }) + }) } }, showMore() { @@ -1186,15 +1186,14 @@ export default { if (!this.videoPlayingStates[index]) { // 第一次点击:显示视频并开始播放 this.$set(this.videoPlayingStates, index, true); - // 等待视频元素渲染后再进行操作 this.$nextTick(() => { setTimeout(() => { const videoContext = uni.createVideoContext(`recycle-video-${index}`, this); if (videoContext) { - // 直接进入全屏播放 + // 直接进入全屏播放,强制竖屏 videoContext.requestFullScreen({ - direction: -1 // 自动选择方向 + direction: 0 // 竖屏方向,0代表竖屏,1代表横屏,-1自动 }); } }, 200); @@ -1584,7 +1583,7 @@ export default { .goods-content { flex: 1; height: 100%; - padding: 0 30rpx 180rpx 30rpx; /* 添加底部padding,为固定底部栏预留空间 */ + padding: 0 0 180rpx 0; /* 添加底部padding,为固定底部栏预留空间 */ background: #ffffff; width: 70%; margin: 1rpx; @@ -1683,6 +1682,7 @@ export default { align-items: center; flex-wrap: nowrap; gap: 10rpx; + margin-top: 10rpx; } .price-info { @@ -1757,11 +1757,11 @@ export default { margin-top: 0; .rules { display: inline-flex; - align-items: center; - font-family: PingFang SC; - font-weight: 400; - font-size: 12px; - color: #666; + align-items: center; + font-family: PingFang SC; + font-weight: 400; + font-size: 12px; + color: #666; white-space: nowrap; } } @@ -2727,4 +2727,84 @@ export default { font-size: 28rpx; color: #222; } + +.rules-link { + min-width: 90rpx; + padding: 0 12rpx; + .rules { + font-size: 15px; + white-space: normal; + overflow: visible; + } +} +// ... existing code ... +.rules-brand-row { + display: flex; + align-items: center; + margin-top: 20rpx; + gap: 24rpx; // 增大间距 + .rules-link { + margin-top: 0; + } + .brand-check-placeholder { + margin-left: 16rpx; + } +} +// ... existing code ... +.price-info { + display: flex; + align-items: baseline; + white-space: nowrap; + flex-shrink: 0; + gap: 12rpx; // 增大间距 + .price-symbol { + font-size: 32rpx; // 增大符号 + color: #ff7a0e; + } + .price-value { + font-size: 44rpx; // 增大数字 + color: #ff7a0e; + font-weight: bold; + margin: 0 6rpx; + white-space: nowrap; + } + .price-unit { + font-size: 28rpx; + color: #999; + white-space: nowrap; + } +} +.quantity-control { + display: flex; + align-items: center; + flex-shrink: 0; + white-space: nowrap; + gap: 16rpx; // 增大间距 + button { + width: 72rpx; // 增大按钮 + height: 72rpx; + padding: 0; + margin: 0; + display: flex; + align-items: center; + justify-content: center; + font-size: 36rpx; // 增大符号 + color: #666; + background: #ffffff; + border: none; + border-radius: 50%; + &::after { + border: none; + } + &:active { + opacity: 0.8; + } + } + .quantity { + width: 60rpx; + text-align: center; + font-size: 36rpx; // 增大数字 + color: #333; + } +} \ No newline at end of file diff --git a/pages/subcomponent/wallet.vue b/pages/subcomponent/wallet.vue index 8a4f2af..2afed60 100644 --- a/pages/subcomponent/wallet.vue +++ b/pages/subcomponent/wallet.vue @@ -387,9 +387,9 @@ export default { setTimeout(() => { const videoContext = uni.createVideoContext(`wallet-video-${index}`, this); if (videoContext) { - // 直接进入全屏播放 + // 直接进入全屏播放,强制竖屏 videoContext.requestFullScreen({ - direction: -1 // 自动选择方向 + direction: 0 // 竖屏方向,0代表竖屏,1代表横屏,-1自动 }); } }, 200);