feat: 完善对象存储上传与真实条码二维码引擎,彻底剥离保底Mock数据

这个提交包含在:
xcbyy
2026-10-09 17:18:14 +08:00
父节点 6d3076cdb8
当前提交 d0f4050cdc
共有 329 个文件被更改,包括 54416 次插入 和 926 次删除

查看文件

@@ -84,36 +84,78 @@ export function applyThemeToNativeUI(themeKey) {
const theme = THEMES[themeKey] || THEMES[THEME_KEYS.COOL];
const { navBar, tabBar } = theme.tokens;
// 1. 设置顶部系统导航栏颜色
// 1. 设置顶部系统导航栏颜色 (仅在小程序/App支持原生导航栏时生效,防御 H5 与自定义导航)
// #ifndef H5
try {
if (typeof uni !== 'undefined' && uni.setNavigationBarColor) {
uni.setNavigationBarColor({
if (typeof uni !== 'undefined' && typeof uni.setNavigationBarColor === 'function') {
const p = uni.setNavigationBarColor({
frontColor: navBar.frontColor,
backgroundColor: navBar.backgroundColor,
animation: {
duration: 200,
timingFunc: 'easeOut'
}
},
success: () => {},
fail: () => {}
});
if (p && typeof p.catch === 'function') {
p.catch(() => {});
}
}
} catch (e) {
// 忽略特定页面无系统导航栏异常
}
// #endif
// 2. 设置底部原生 TabBar 菜单颜色
// 2. 设置底部原生 TabBar 菜单颜色 (仅在原生 TabBar 激活时生效,防御使用自定义 TabBar 组件或原生已隐藏)
// #ifndef H5
try {
if (typeof uni !== 'undefined' && uni.setTabBarStyle) {
uni.setTabBarStyle({
if (typeof uni !== 'undefined' && typeof uni.setTabBarStyle === 'function') {
const p = uni.setTabBarStyle({
color: tabBar.color,
selectedColor: tabBar.selectedColor,
backgroundColor: tabBar.backgroundColor,
borderStyle: tabBar.borderStyle
borderStyle: tabBar.borderStyle,
success: () => {},
fail: () => {}
});
if (p && typeof p.catch === 'function') {
p.catch(() => {});
}
}
} catch (e) {
// 忽略非 TabBar 页面抛出的异常
}
// 3. 动态设置窗口底层原生背景色与下拉刷新底色 (彻底消除页面路由切换时的瞬间黑屏闪烁)
try {
if (typeof uni !== 'undefined' && typeof uni.setBackgroundColor === 'function') {
const p = uni.setBackgroundColor({
backgroundColor: theme.tokens.bgPrimary,
backgroundColorTop: theme.tokens.bgPrimary,
backgroundColorBottom: theme.tokens.bgPrimary,
success: () => {},
fail: () => {}
});
if (p && typeof p.catch === 'function') {
p.catch(() => {});
}
}
if (typeof uni !== 'undefined' && typeof uni.setBackgroundTextStyle === 'function') {
const p = uni.setBackgroundTextStyle({
textStyle: themeKey === THEME_KEYS.WARM ? 'dark' : 'light',
success: () => {},
fail: () => {}
});
if (p && typeof p.catch === 'function') {
p.catch(() => {});
}
}
} catch (e) {
// 忽略特定平台背景色设置异常
}
// #endif
// 3. 在 H5 环境下同步在 body 与 documentElement 上添加/移除主题 class,并同步设置 CSS 变量
try {
if (typeof document !== 'undefined') {