chore:商品详情的视频按钮和图片按钮后台可以控制

This commit is contained in:
2026-10-26 09:21:01 +08:00
parent 704c39bdae
commit da7f5d9a6a
4 changed files with 45 additions and 9 deletions

View File

@@ -249,7 +249,7 @@ const localDevConfig = ({
// })['2811']; // 本地
// })['5g-317']; // 电磁兼容
// })['5g-351']; //
})['2811']; // 本地
})['5g-97']; // 本地
// })['5g-248']; // 中瑞 工业称重系统垃圾吊电子秤,首页,图片链接部分的PDF文档打不开
// })['2881']; // 本地
// })['local-2']; // 本地

View File

@@ -135,19 +135,31 @@
bottom: 80rpx;
//#endif
text-align: center;
line-height: 50rpx;
line-height: calc(var(--hover-nav-media-tab-size, 24rpx) * 2.1);
// 视频/图片切换按钮(2026-10-24): 后台独立可调(与悬浮语言/客服/电话按钮互不干扰)。
// hover_nav_media_tab_bg_color 未配置 → 原半透明灰 rgba(100,100,100,0.4)
// hover_nav_media_tab_text_color 未配置 → #fff
// hover_nav_media_tab_size 未配置 → 24rpx; 高度/圆角/内边距/间距以 em 随字号联动缩放
// 选中态保留主题红(全局 .color-base-bg 提供 bg) + 白字。
text {
background: rgba(100, 100, 100, 0.4);
color: #fff;
font-size: $font-size-tag;
line-height: 50rpx;
border-radius: 20rpx;
padding: 0 30rpx;
background: var(--hover-nav-media-tab-bg-color, rgba(100, 100, 100, 0.4));
color: var(--hover-nav-media-tab-text-color, #fff);
font-size: var(--hover-nav-media-tab-size, 24rpx);
height: 2.1em;
line-height: 2.1em;
border-radius: 0.85em;
padding: 0 1.25em;
display: inline-block;
box-sizing: border-box;
// 选中态: 主题红由全局 .color-base-bg 兜底, 这里只管白字保证对比度
&.color-base-bg {
color: #fff;
}
&:last-child {
margin-left: 40rpx;
margin-left: 1.6em;
}
}
}

View File

@@ -210,6 +210,19 @@ async function loadAllOverrides() {
new Promise((r) => setTimeout(() => r({ code: -1, message: 'timeout' }), REMOTE.requestTimeout || 4000)),
]);
// [临时排查] 打印主题覆写接口实际返回,确认 hover_nav_media_tab_* 是否在 brand 桶
// 排查完删除即可(全局搜索 THEME-OVERRIDES 定位)
try {
const _byTheme = (res && res.data && res.data.by_theme) || {};
const _brand = (_byTheme.brand && typeof _byTheme.brand === 'object') ? _byTheme.brand : {};
const _hoverKeys = Object.keys(_brand).filter(k => k.indexOf('hover_nav') === 0);
console.log('[THEME-OVERRIDES] http code =', res && res.code,
'| by_theme keys =', Object.keys(_byTheme),
'| brand token 数 =', Object.keys(_brand).length,
'| brand.hover_nav keys =', _hoverKeys,
'| hover_nav_media_tab_size =', _brand['hover_nav_media_tab_size']);
} catch (e) { /* 忽略 */ }
if (!res || res.code !== 0 || !res.data) {
const reason = !res ? 'network' : (res.code === -1 ? 'timeout' : (res.message || 'bad-response'));
setRemoteStatus('fail', { reason, theme: 'all' });

View File

@@ -538,6 +538,17 @@ const store = new Vuex.Store({
let color = util.colourBlend(theme.main_color, '#ffffff', (i / 10));
themeColor += `--base-color-light-${i}:${color};`;
}
// [临时排查] 确认后台 hover_nav_media_tab_* 是否进入 themeStyle 并生成了 CSS 变量
// 排查完删除即可(全局搜索 THEME-CHECK 定位)
try {
console.log('[THEME-CHECK]', {
bg: theme['hover_nav_media_tab_bg_color'],
text: theme['hover_nav_media_tab_text_color'],
size: theme['hover_nav_media_tab_size'],
hoverNavCount: Object.keys(theme).filter(k => k.indexOf('hover_nav') === 0).length,
sizeVarGenerated: themeColor.indexOf('--hover-nav-media-tab-size') > -1
});
} catch (e) { /* 忽略 */ }
_themeColorCache = themeColor;
_themeColorCacheKey = cacheKey;
this.commit('setThemeColor', themeColor);