初始化
This commit is contained in:
Executable
+48
@@ -0,0 +1,48 @@
|
||||
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;
|
||||
|
||||
/// 落地页地址
|
||||
static String? groundUrl;
|
||||
|
||||
/// 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;
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
import '../hj_model/home/plate_model.dart';
|
||||
import '../hj_model/splash/domain_source_model.dart';
|
||||
|
||||
/// 全局配置:常量 + 启动时由 /ping/domain 下发并缓存的运营配置
|
||||
class Config {
|
||||
// ===== 应用标识 =====
|
||||
static const appName = '黄果短剧';
|
||||
static const innerVersion = '1.0.0';
|
||||
static const isDebug = false;
|
||||
|
||||
/// 播放失败诊断开关:失败时把现场信息复制到剪贴板,供用户回传排查。
|
||||
/// ⚠️ 测试包专用,**发正式包前必须改回 false**
|
||||
static const playDiagnose = false;
|
||||
|
||||
// ===== 密钥 =====
|
||||
/// 加密密钥
|
||||
static const encryptKey = '65dc07d1b7915c6b2937432b091837a7';
|
||||
|
||||
/// 签名密钥(防重放攻击)
|
||||
static const signKey = 'kaFtkDJRcchRMTI9';
|
||||
|
||||
// ===== 域名 / 线路 =====
|
||||
static String dns = '91porn.zmnchs.com'; // 运维提供,返回配置域名
|
||||
|
||||
/// 本地兜底线路(无本地缓存线路时用)
|
||||
static const lineList = isDebug
|
||||
? [
|
||||
'https://91pornht.remoces.com',
|
||||
]
|
||||
: [
|
||||
'https://d1s84171319hi1.cloudfront.net',
|
||||
'https://d2j97wqe01j5pa.cloudfront.net',
|
||||
];
|
||||
|
||||
// ===== AI 功能价格 =====
|
||||
static String aiUndressPrice = ''; // 脱衣价格
|
||||
static String aiVideoPrice = ''; // 图生视频价格
|
||||
static String aiDrawPrice = ''; // 绘图价格
|
||||
static String aiNovelPrice = ''; // 小说价格
|
||||
static List<AISwitchConf>? aiTypes; // ai功能类型(含排序)
|
||||
|
||||
// ===== 首页模块数据 =====
|
||||
static HomePlateModel? plateModule; // 亚模块数据
|
||||
static List<JGAreaModel>? jgArea; // 金刚区
|
||||
static List<MarqueeModel>? marquees; // 新版跑马灯数据
|
||||
static List<BannerJumpEntity> bannerJumps = [];
|
||||
static BannerJump? proxyBanner;
|
||||
|
||||
// ===== 搜索 =====
|
||||
static List<String> hotWords = []; // 搜索热门词
|
||||
static List<String> searchHints = []; // 搜索提示词
|
||||
|
||||
// ===== 暗网 =====
|
||||
static bool darkWebEnable = true; // 是否开启
|
||||
static String? darkWebVipName;
|
||||
static String? darkWebVipId;
|
||||
static String? darkWebImg; // 暗网图片
|
||||
static String? darkWebIcon; // 暗网图标
|
||||
static String? darkWebIconName; // 暗网图标名称
|
||||
|
||||
// ===== 短剧 =====
|
||||
static String? shortDramaCardId; // 短剧卡 id,付费墙拉起会员弹窗时默认选中它
|
||||
static bool entryPopupEnabled = true; // 「AI爽剧来袭」引导气泡开关,后台置 false 即永久不出现
|
||||
|
||||
// ===== 开关 / 展示配置 =====
|
||||
static bool isStoreOpen = false; // 商店模块开关
|
||||
static bool vipMark = true; // vip角标是否展示
|
||||
static bool coinMark = true; // 金币角标是否展示
|
||||
static bool freeMark = true; // 免费类角标总开关(如「免费试看」)
|
||||
static String? signIcon; // 签到
|
||||
static String? mineBg; // 我的背景配置
|
||||
}
|
||||
Reference in New Issue
Block a user