完善生产查询与登录权限配置

This commit is contained in:
2026-09-03 19:56:19 +08:00
parent 793f140a45
commit 02c8fb7021
438 changed files with 1595 additions and 573 deletions
@@ -0,0 +1,25 @@
declare const uni: any;
type SystemTheme = 'light' | 'dark';
/**
* 非 H5 平台获取当前系统主题
*/
export function getSystemDarkMode(): SystemTheme {
try {
if (typeof uni !== 'undefined' && typeof uni.getSystemInfoSync === 'function') {
const systemInfo = uni.getSystemInfoSync();
const theme = systemInfo.osTheme || systemInfo.theme || 'light';
if (theme === 'dark') {
return 'dark';
}
if (theme === 'light') {
return 'light';
}
}
} catch (e) {
// 获取失败时默认返回亮色
console.warn('[system-theme] getSystemDarkMode failed', e);
}
return 'light';
}