From 5d7facc94dc8514e913fee566537161207c4327a Mon Sep 17 00:00:00 2001 From: jinhhanhan <1683105490@qq.com> Date: Fri, 14 Aug 2026 15:03:23 +0800 Subject: [PATCH] =?UTF-8?q?chore=EF=BC=9A=E7=AB=96=E7=89=88=E8=A7=86?= =?UTF-8?q?=E9=A2=91=E5=8F=AF=E4=BB=A5=E6=AD=A3=E5=B8=B8=E5=9C=A8=E5=AE=B9?= =?UTF-8?q?=E5=99=A8=E9=87=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .local.config.js | 2 +- .../goods-detail-view/goods-detail-view.vue | 49 +------------------ 2 files changed, 3 insertions(+), 48 deletions(-) diff --git a/.local.config.js b/.local.config.js index 2a94f2a..1430734 100644 --- a/.local.config.js +++ b/.local.config.js @@ -181,7 +181,7 @@ const localDevConfig = ({ // })['2724']; // 生物菌肥 // })['2811']; // 选择要使用的环境配置 // })['local-11']; // 选择要使用的环境配置 -})['192.168.8.118-1']; // 本地 +})['1']; // 本地 // })['local-2']; // 本地 // })['local-11']; // 本地 // })['1-test']; // test diff --git a/pages_goods/_components/goods-detail-view/goods-detail-view.vue b/pages_goods/_components/goods-detail-view/goods-detail-view.vue index 5ca54cb..83f7aee 100644 --- a/pages_goods/_components/goods-detail-view/goods-detail-view.vue +++ b/pages_goods/_components/goods-detail-view/goods-detail-view.vue @@ -37,8 +37,7 @@ :info="goodsSkuDetail.barrageData" /> - - + - + @@ -540,8 +538,6 @@ export default { data() { // 商品详情骨架屏:模拟「轮播图 + 价格行 + 标题简介 + 规格行 + 商家 + 详情 + 推荐」 return { - // 视频元数据(宽/高),用于竖屏视频自适应容器高度 - videoInfo: { width: 0, height: 0 }, // 1. 轮播图:方形 banner 占位 skeletonBanner: { padding: '0', @@ -666,27 +662,6 @@ export default { }; }, computed: { - // 媒体容器高度:视频激活且为竖屏时按视频比例撑高,否则保持图片 swiper 高度 - mediaHeight() { - if ( - this.switchMedia === 'video' && - this.videoInfo.width && - this.videoInfo.height && - this.videoInfo.height > this.videoInfo.width - ) { - try { - const sys = uni.getSystemInfoSync(); - const ratio = this.videoInfo.height / this.videoInfo.width; - const videoHeight = sys.windowWidth * ratio; - // 竖屏视频最大高度限制为屏幕宽度的 5:4,防止 9:16 等过长视频占满整屏 - const maxHeight = sys.windowWidth * 1.25; - return Math.min(videoHeight, maxHeight) + 'px'; - } catch (e) { - // 异常时回退到图片高度 - } - } - return this.goodsSkuDetail.swiperHeight; - }, aiAvatarUrl() { return this.$util.img(IMAGE_CONFIG.aiAvatar); }, @@ -711,26 +686,6 @@ export default { return this.goodsSkuDetail && Number(this.goodsSkuDetail.goods_id) > 0; } }, - watch: { - // 切换商品/视频源时重置视频元数据,防止旧数据影响新视频的高度计算 - 'goodsSkuDetail.video_url'(newVal, oldVal) { - if (newVal !== oldVal) { - this.videoInfo = { width: 0, height: 0 }; - } - } - }, - methods: { - // 视频元数据加载后记录宽高,用于竖屏视频自适应容器高度 - onVideoLoadedMetadata(e) { - const detail = e.detail || {}; - if (detail.width && detail.height) { - this.videoInfo = { - width: Number(detail.width), - height: Number(detail.height) - }; - } - } - }, mixins: [scroll, detail] };