chore(config): 添加项目配置文件和隐私协议

- 添加 .editorconfig 文件统一代码风格
- 添加 .env.development 和 .env.example 环境配置文件
- 添加 .eslintignore 和 .eslintrc.js 代码检查配置
- 添加 .gitignore 版本控制忽略文件配置
- 添加 .prettierignore 格式化忽略配置
- 添加隐私协议HTML文件
- 添加API密钥管理组件基础结构
This commit is contained in:
2026-01-26 14:05:01 +08:00
commit 482e2a2718
1192 changed files with 238401 additions and 0 deletions

42
src/utils/merchant.ts Normal file
View File

@@ -0,0 +1,42 @@
// 获取商户ID
export const getMerchantId = () => {
const merchantId = localStorage.getItem('MerchantId');
if (merchantId) {
return Number(merchantId);
}
return undefined;
};
// 获取商户名称
export const getMerchantName = () => {
const MerchantName = localStorage.getItem('MerchantName');
if (MerchantName) {
return MerchantName;
}
return undefined;
};
// 获取商户Logo
export const getMerchantAvatar = () => {
const MerchantLogo = localStorage.getItem('MerchantLogo');
if (MerchantLogo) {
return MerchantLogo;
}
return undefined;
};
export const getRoleIdByMerchant = () => {
const id = localStorage.getItem('RoleIdByMerchant');
if (id) {
return Number(id);
}
return undefined;
};
export const getRoleNameByMerchant = () => {
const name = localStorage.getItem('RoleNameByMerchant');
if (name) {
return name;
}
return undefined;
};