55 lines
1.6 KiB
Dart
Executable File
55 lines
1.6 KiB
Dart
Executable File
import '../hj_model/splash/domain_source_model.dart';
|
|
|
|
/// 地址数据:接口路径常量 + 启动选线后下发的各类域名
|
|
class Address {
|
|
// ===== 路径常量 =====
|
|
/// 接口路径前缀,拼在 baseHost 后面
|
|
static const apiPrefix = 'api/app';
|
|
|
|
/// 视频上传
|
|
static const uploadVideo = '/vid/uploadDotJson';
|
|
|
|
/// 图片上传
|
|
static const uploadImg = '/vid/uploadStatic';
|
|
|
|
/// 通过支付宝API解析银行卡号发卡行和银行卡类别、获取银行LOGO
|
|
static const aliCcdApi = 'https://ccdcapi.alipay.com/validateAndCacheCardInfo.json?_input_charset=utf-8&cardBinCheck=true&cardNo=';
|
|
|
|
// ===== 域名 / 线路(启动时赋值)=====
|
|
/// 选线后的域名 host
|
|
static String? baseHost;
|
|
|
|
/// 接口基础路径 = baseHost + apiPrefix
|
|
static String? baseApiPath;
|
|
|
|
/// cdn地址,后台返回
|
|
static String? cdnAddress;
|
|
|
|
/// 有声小说 cdn
|
|
static String? audioCdnAddress;
|
|
|
|
/// 图片加载地址
|
|
static String? baseImagePath;
|
|
|
|
/// 落地页地址(永久域名),后台下发 GUIDE 时覆盖
|
|
static String groundUrl = 'https://huangguomj.net';
|
|
/// 备用落地页地址 默认地址
|
|
static String backUpURl = '';
|
|
/// tg群里地址 默认地址
|
|
static String groupTelegram = '';
|
|
/// 邮箱
|
|
static String? groundEmail;
|
|
|
|
/// cdn 线路列表
|
|
static List<Domain> cdnAddressLists = [];
|
|
|
|
/// 当前生效的 cdn 线路
|
|
static Domain? get currentDomain {
|
|
final index = cdnAddressLists.indexWhere((e) => e.url == cdnAddress);
|
|
return index < 0 ? null : cdnAddressLists[index];
|
|
}
|
|
|
|
// ===== 用户态 =====
|
|
static String? token;
|
|
}
|