From ec4c8c9bd93c0b20fb3c2658e2af6899d8e28db2 Mon Sep 17 00:00:00 2001 From: jackyu66git Date: Tue, 25 Aug 2026 03:41:41 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=84=88=E5=BF=83=E9=AD=94=E6=96=B9?= =?UTF-8?q?=E9=A1=B6=E6=A0=8F=20logo=20=E7=94=A8=E5=90=8C=E7=BA=A7=20cover?= =?UTF-8?q?=20=E5=8F=A0=E5=9C=A8=20web-view=20=E4=B8=8A=EF=BC=88202608279?= =?UTF-8?q?=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 保留 yxg-nav-bar + web-view 兄弟结构;微信端普通 image 会被 web-view 盖住, 用页面级 cover-image 对齐导航行显示 logo。 Co-authored-by: Cursor --- pages/yxg-magic/index.vue | 33 +++++++++++++++++++++++++++------ util/yxgConfig.js | 2 +- 2 files changed, 28 insertions(+), 7 deletions(-) diff --git a/pages/yxg-magic/index.vue b/pages/yxg-magic/index.vue index 0f110e8..796c349 100644 --- a/pages/yxg-magic/index.vue +++ b/pages/yxg-magic/index.vue @@ -3,12 +3,14 @@ + + + + + + + @@ -57,13 +69,16 @@ const headH = statusBarH + navBarH const webviewH = windowH - headH const logoH = Math.min(menuH, 30) const logoW = Math.min(Math.round((logoH * 598) / 130), Math.floor(screenW * 0.4)) +const logoLeft = Math.floor((screenW - logoW) / 2) +const logoTop = Math.floor((navBarH - logoH) / 2) -const navBarStyle = `height:${headH}px;padding-top:${statusBarH}px;` +const navBarStyle = `height:${headH}px;padding-top:${statusBarH}px;box-sizing:border-box;` const navRowStyle = `height:${navBarH}px;` const logoStyle = `width:${logoW}px;height:${logoH}px;` -const webviewStyle = `height:${webviewH}px;` +const webviewStyle = `top:${headH}px;height:${webviewH}px;` +const logoCoverStyle = `position:fixed;top:${statusBarH}px;left:0;width:${screenW}px;height:${navBarH}px;z-index:9999;` +const coverLogoStyle = `position:absolute;left:${logoLeft}px;top:${logoTop}px;width:${logoW}px;height:${logoH}px;` -/** web-view 已在导航下方,H5 只需极小顶距 */ const h5Url = computed( () => `${YXG_H5_BASE}?mp=1&nh=1&sbh=4&v=${YXG_H5_VERSION}#wechat_redirect`, @@ -87,6 +102,7 @@ console.log('[yxg-magic] outer nav + webview', { webviewH, logoW, logoH, + logoSrc: YXG_MP_LOGO_URL, }) @@ -99,13 +115,16 @@ page { diff --git a/util/yxgConfig.js b/util/yxgConfig.js index 185f17f..b6f5427 100644 --- a/util/yxgConfig.js +++ b/util/yxgConfig.js @@ -2,7 +2,7 @@ import { LOCAL_H5_HOST, USE_LOCAL_H5 } from './yxgConfig.local.js' const PROD_BASE = 'https://h5.yuxingu.com.cn/psy/' -const PROD_VERSION = '202608278' +const PROD_VERSION = '202608279' /** 愈心魔方顶栏 logo(小程序包内 static,不请求外网) */ export const YXG_MP_LOGO_URL = '/static/n-main/yxg-brand-logo.png'