69 lines
2.4 KiB
Dart
69 lines
2.4 KiB
Dart
/// 常量
|
|
import 'package:logger/logger.dart';
|
|
|
|
enum LoginVersion {
|
|
// 不需要加密
|
|
v1,
|
|
// 需要加密
|
|
v2,
|
|
}
|
|
|
|
class Constants {
|
|
/// Debug 未配置签名时自动模拟旧版;signed 强制签名,legacy 显式测试旧版。
|
|
static const fileAccessMode = String.fromEnvironment('FILE_ACCESS_MODE', defaultValue: 'auto');
|
|
static const hasFileAccessConfiguration =
|
|
bool.hasEnvironment('FILE_ACCESS_APP_ID') ||
|
|
bool.hasEnvironment('FILE_ACCESS_KEY_ID') ||
|
|
bool.hasEnvironment('FILE_ACCESS_KEY') ||
|
|
bool.hasEnvironment('FILE_ACCESS_ALLOWED_ORIGINS');
|
|
static const fileAccessAppId = String.fromEnvironment('FILE_ACCESS_APP_ID', defaultValue: 'flutter');
|
|
static const fileAccessKeyId = String.fromEnvironment('FILE_ACCESS_KEY_ID', defaultValue: 'v1');
|
|
static const fileAccessKey = String.fromEnvironment('FILE_ACCESS_KEY');
|
|
static const fileAccessAllowedOrigins = String.fromEnvironment('FILE_ACCESS_ALLOWED_ORIGINS');
|
|
|
|
/// 生产模式写入文件的最低日志等级,达到该等级及以上的日志才会持久化。
|
|
static const productionFileLogLevel = Level.warning;
|
|
|
|
/// 开发模式写入文件的最低日志等级,达到该等级及以上的日志才会持久化。
|
|
static const developmentFileLogLevel = Level.warning;
|
|
|
|
// oauth2 APP模式客户端信息
|
|
static const oauth2AppClient = 'android:android';
|
|
|
|
// oauth2 登录的url
|
|
static const oauth2AppApiUrl = 'auth/oauth2/token';
|
|
|
|
// 前端加密密钥
|
|
static const pwdEncKey = 'pigxpigxpigxpigx';
|
|
|
|
/// 服务 url 线上
|
|
static const apiUrl = 'https://www.pjzhhq.cn/api';
|
|
|
|
// static const apiUrl = 'https://dzc-test-1.fy.takin.cc';
|
|
|
|
/// 静态资源 url
|
|
static const ossUrl = apiUrl;
|
|
|
|
/// 人脸识别 插件方法管道
|
|
static const facePlugsMethodChannel = 'local/face_discern';
|
|
|
|
/// 人脸识别 插件回调管道
|
|
static const facePlugsEventChannel = 'local/face_discern_event';
|
|
|
|
/// 人脸库注册进度管道
|
|
static const facePlugsRegistrationEventChannel =
|
|
'local/face_discern_registration_event';
|
|
|
|
/// 在库照片批量质量检测进度事件通道。
|
|
static const facePlugsQualityAuditEventChannel =
|
|
'local/face_discern_quality_audit_event';
|
|
|
|
/// 数据库名字
|
|
static const databaseName = 'cash_register.db';
|
|
|
|
/// 设备唯一编码
|
|
static const deviceUniqueCode = 'EjFJx0WQ';
|
|
|
|
static const loginVersion = LoginVersion.v2;
|
|
}
|