| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935 |
- (function () {
- const res_path="resources";
-
- // 默认主题配置(绿色主题)
- const defaultTheme = {
- // 主色调
- thirdColor: "#00AF78",
- fourthColor: "#046E55",
- primaryColor: "#0CF1A9",
- secondaryColor: "#00C385",
- fiveColor: "#10b981",
- highlightColor: "#23FD93", // 高亮绿色
- accentColor: "#08c974", // 强调色
-
- // 渐变背景
- backgroundColor: "linear-gradient(to right, #0BAA47, #057B52)",
- backgroundColor1: "linear-gradient(to right, #10B981, #059669)",
- backgroundColor2: "linear-gradient(180deg, rgba(12, 89, 70, 0.8), rgba(12, 89, 70, 0) 100%)",
- activityBgColor: "linear-gradient(180deg, rgb(14, 110, 67),rgb(5, 73, 45) 99.237%)",
-
- // 按钮颜色
- buttonColor: "linear-gradient(to bottom, #0CE986, #008E61)",
- buttonGray: "linear-gradient(180deg, #b3b3b3, #939393)",
- warningButtonColor: "linear-gradient(to bottom, #f7c61d, #ef9a05)",
- disabledButtonColor: "linear-gradient(to bottom, #b3b3b3, #939393)",
- errorButtonColor: "linear-gradient(to bottom, #ff5a6d, #ce1126)",
- orangeButtonColor: "linear-gradient(179deg, #FEC412 20.1%, #FE871C 46.83%, #FFFB23 78.17%)",
-
- // 文字颜色
- textColor: "#E8ECF0",
- textGrayColor: "#818E99",
- textGrayColor1: "#6b7280",
- textLightColor: "#f9f5ef", // 米白文字
- textMutedColor: "#909293", // 更浅的灰色
-
- // 背景颜色
- mainBgColor: "#1b1c26",
- darkColor: "#13141b",
- darkColor1: "#272D39",
- darkColor2: "#2e3541",
- darkColor3: "#343b49",
- bodyBgColor: "#0d1016", // 最深背景
-
- // 面板/卡片颜色
- popupBgColor: "#232834",
- popupGradientColor: "#092417",
- cardBgColor: "#1c1e22",
- cardBgColor2: "#1B1F28", // 卡片背景变体
- cardBgColor3: "#171C27",
- inputBgColor: "#13171F", // 输入框背景
-
- // 边框颜色
- borderColor: "#24262b",
- selectBorderColor: "#00CDA5",
-
- // 状态颜色
- positiveColor: "#7ED321",
- negativeColor: "#FF2400",
- successColor: "#4caf50", // 成功色
-
- // 金币/警告颜色
- warningColor: "#ffd118",
- moneyColor: "#FFC700",
- goldColor: "#FFD118", // 金色
- coinColor: "#edc349", // 金币黄
-
- // 其他
- linkColor: "#c2ec9d", // 链接色
- scrollbarColor: "#c4c4c4", // 滚动条色
-
- // 弹窗专用(新增)
- titleGradient: "linear-gradient(180deg, #FFC700 0%, #FF9B00 100%)", // WELCOME 标题渐变
- bonusGradient: "linear-gradient(179deg, #FEC412 20.1%, #FE871C 46.83%, #FFFB23 78.17%)", // Free $10 渐变
- popupBgFilter: "none", // 弹窗背景图滤镜
- tabIconFilter: "none", // Tab图标滤镜(默认绿色主题保持红色图标)
- gameMenuBg: "linear-gradient(180deg, rgba(0, 100, 70, 0.85) 0%, rgba(0, 50, 35, 0.92) 30%, rgba(0, 0, 0, 0.98) 100%)", // 游戏菜单背景
- iconAccentColor: "#FF2400", // 图标强调色(双色图标的第二色)
- };
- // 蓝色主题
- const blueTheme = {
- ...defaultTheme,
- thirdColor: "#0078D4",
- fourthColor: "#004578",
- primaryColor: "#00A9FF",
- secondaryColor: "#0078D4",
- fiveColor: "#3B82F6",
- highlightColor: "#60A5FA",
- accentColor: "#3B82F6",
- negativeColor: "#2563EB", // 蓝色按钮
- moneyColor: "#60A5FA", // 蓝色金币文字
- linkColor: "#93C5FD", // 蓝色链接
- titleGradient: "linear-gradient(180deg, #60A5FA 0%, #2563EB 100%)",
- bonusGradient: "linear-gradient(179deg, #60A5FA 20.1%, #3B82F6 46.83%, #93C5FD 78.17%)",
- tabIconFilter: "hue-rotate(200deg) saturate(1.2)", // 红色转蓝色
- backgroundColor: "linear-gradient(to right, #1E40AF, #1E3A8A)",
- backgroundColor1: "linear-gradient(to right, #3B82F6, #2563EB)",
- buttonColor: "linear-gradient(to bottom, #60A5FA, #2563EB)",
- activityBgColor: "linear-gradient(180deg, rgb(30, 64, 175),rgb(30, 58, 138) 99.237%)",
- backgroundColor2: "linear-gradient(180deg, rgba(30, 64, 175, 0.8), rgba(30, 64, 175, 0) 100%)",
- popupGradientColor: "#0a1929",
- selectBorderColor: "#60A5FA",
- gameMenuBg: "linear-gradient(180deg, rgba(30, 64, 175, 0.85) 0%, rgba(15, 32, 90, 0.92) 30%, rgba(0, 0, 0, 0.98) 100%)",
- iconAccentColor: "#2563EB",
- };
- // 紫色主题
- const purpleTheme = {
- ...defaultTheme,
- thirdColor: "#7C3AED",
- fourthColor: "#5B21B6",
- primaryColor: "#A78BFA",
- secondaryColor: "#8B5CF6",
- fiveColor: "#8B5CF6",
- highlightColor: "#A78BFA",
- accentColor: "#8B5CF6",
- negativeColor: "#7C3AED", // 紫色按钮
- moneyColor: "#A78BFA",
- linkColor: "#DDD6FE", // 紫色链接
- titleGradient: "linear-gradient(180deg, #A78BFA 0%, #7C3AED 100%)",
- bonusGradient: "linear-gradient(179deg, #C4B5FD 20.1%, #8B5CF6 46.83%, #DDD6FE 78.17%)",
- tabIconFilter: "hue-rotate(270deg) saturate(1.2)", // 红色转紫色
- backgroundColor: "linear-gradient(to right, #5B21B6, #4C1D95)",
- backgroundColor1: "linear-gradient(to right, #8B5CF6, #7C3AED)",
- buttonColor: "linear-gradient(to bottom, #A78BFA, #7C3AED)",
- activityBgColor: "linear-gradient(180deg, rgb(91, 33, 182),rgb(76, 29, 149) 99.237%)",
- backgroundColor2: "linear-gradient(180deg, rgba(91, 33, 182, 0.8), rgba(91, 33, 182, 0) 100%)",
- popupGradientColor: "#1a0a2e",
- selectBorderColor: "#A78BFA",
- gameMenuBg: "linear-gradient(180deg, rgba(91, 33, 182, 0.85) 0%, rgba(45, 16, 91, 0.92) 30%, rgba(0, 0, 0, 0.98) 100%)",
- iconAccentColor: "#7C3AED",
- };
- // 金色主题
- const goldTheme = {
- ...defaultTheme,
- thirdColor: "#D97706",
- fourthColor: "#B45309",
- primaryColor: "#FBBF24",
- secondaryColor: "#F59E0B",
- fiveColor: "#F59E0B",
- highlightColor: "#FBBF24",
- accentColor: "#F59E0B",
- negativeColor: "#D97706", // 金色按钮
- moneyColor: "#FBBF24",
- linkColor: "#FEF3C7", // 金色链接
- titleGradient: "linear-gradient(180deg, #FBBF24 0%, #D97706 100%)",
- bonusGradient: "linear-gradient(179deg, #FDE68A 20.1%, #F59E0B 46.83%, #FEF3C7 78.17%)",
- tabIconFilter: "hue-rotate(35deg) saturate(1.3)", // 红色转金色
- backgroundColor: "linear-gradient(to right, #B45309, #92400E)",
- backgroundColor1: "linear-gradient(to right, #F59E0B, #D97706)",
- buttonColor: "linear-gradient(to bottom, #FBBF24, #D97706)",
- activityBgColor: "linear-gradient(180deg, rgb(180, 83, 9),rgb(146, 64, 14) 99.237%)",
- backgroundColor2: "linear-gradient(180deg, rgba(180, 83, 9, 0.8), rgba(180, 83, 9, 0) 100%)",
- popupGradientColor: "#291a00",
- selectBorderColor: "#FBBF24",
- gameMenuBg: "linear-gradient(180deg, rgba(180, 83, 9, 0.85) 0%, rgba(90, 41, 5, 0.92) 30%, rgba(0, 0, 0, 0.98) 100%)",
- iconAccentColor: "#D97706",
- };
- // 红色主题
- const redTheme = {
- ...defaultTheme,
- thirdColor: "#DC2626",
- fourthColor: "#B91C1C",
- primaryColor: "#F87171",
- secondaryColor: "#EF4444",
- fiveColor: "#EF4444",
- highlightColor: "#F87171",
- accentColor: "#EF4444",
- negativeColor: "#DC2626", // 红色按钮
- moneyColor: "#F87171",
- linkColor: "#FECACA", // 红色链接
- titleGradient: "linear-gradient(180deg, #F87171 0%, #DC2626 100%)",
- bonusGradient: "linear-gradient(179deg, #FCA5A5 20.1%, #EF4444 46.83%, #FECACA 78.17%)",
- tabIconFilter: "none", // 红色主题保持原色
- backgroundColor: "linear-gradient(to right, #B91C1C, #991B1B)",
- backgroundColor1: "linear-gradient(to right, #EF4444, #DC2626)",
- buttonColor: "linear-gradient(to bottom, #F87171, #DC2626)",
- activityBgColor: "linear-gradient(180deg, rgb(185, 28, 28),rgb(153, 27, 27) 99.237%)",
- backgroundColor2: "linear-gradient(180deg, rgba(185, 28, 28, 0.8), rgba(185, 28, 28, 0) 100%)",
- popupGradientColor: "#2a0a0a",
- selectBorderColor: "#F87171",
- gameMenuBg: "linear-gradient(180deg, rgba(185, 28, 28, 0.85) 0%, rgba(90, 14, 14, 0.92) 30%, rgba(0, 0, 0, 0.98) 100%)",
- iconAccentColor: "#DC2626",
- };
- // 橙色主题 (RapidJackpot)
- const orangeTheme = {
- ...defaultTheme,
- thirdColor: "#EA580C",
- fourthColor: "#C2410C",
- primaryColor: "#FB923C",
- secondaryColor: "#F97316",
- fiveColor: "#F97316",
- highlightColor: "#FB923C",
- accentColor: "#F97316",
- negativeColor: "#EA580C", // 橙色按钮
- moneyColor: "#FB923C",
- linkColor: "#FED7AA", // 橙色链接
- titleGradient: "linear-gradient(180deg, #FB923C 0%, #EA580C 100%)",
- bonusGradient: "linear-gradient(179deg, #FDBA74 20.1%, #F97316 46.83%, #FED7AA 78.17%)",
- tabIconFilter: "hue-rotate(15deg) saturate(1.2)", // 红色转橙色
- backgroundColor: "linear-gradient(to right, #C2410C, #9A3412)",
- backgroundColor1: "linear-gradient(to right, #F97316, #EA580C)",
- buttonColor: "linear-gradient(to bottom, #FB923C, #EA580C)",
- activityBgColor: "linear-gradient(180deg, rgb(194, 65, 12),rgb(154, 52, 18) 99.237%)",
- backgroundColor2: "linear-gradient(180deg, rgba(194, 65, 12, 0.8), rgba(194, 65, 12, 0) 100%)",
- popupGradientColor: "#2a1500",
- selectBorderColor: "#FB923C",
- gameMenuBg: "linear-gradient(180deg, rgba(194, 65, 12, 0.85) 0%, rgba(97, 32, 6, 0.92) 30%, rgba(0, 0, 0, 0.98) 100%)",
- iconAccentColor: "#EA580C",
- };
- // 青色主题 (CashStorm - 龙卷风蓝绿色)
- const cyanTheme = {
- ...defaultTheme,
- thirdColor: "#0891B2",
- fourthColor: "#0E7490",
- primaryColor: "#22D3EE",
- secondaryColor: "#06B6D4",
- fiveColor: "#06B6D4",
- highlightColor: "#22D3EE",
- accentColor: "#06B6D4",
- negativeColor: "#0891B2", // 青色按钮
- moneyColor: "#22D3EE",
- linkColor: "#A5F3FC", // 青色链接
- titleGradient: "linear-gradient(180deg, #22D3EE 0%, #0891B2 100%)",
- bonusGradient: "linear-gradient(179deg, #67E8F9 20.1%, #06B6D4 46.83%, #A5F3FC 78.17%)",
- tabIconFilter: "hue-rotate(175deg) saturate(1.2)", // 红色转青色
- backgroundColor: "linear-gradient(to right, #0E7490, #155E75)",
- backgroundColor1: "linear-gradient(to right, #06B6D4, #0891B2)",
- buttonColor: "linear-gradient(to bottom, #22D3EE, #0891B2)",
- activityBgColor: "linear-gradient(180deg, rgb(14, 116, 144),rgb(21, 94, 117) 99.237%)",
- backgroundColor2: "linear-gradient(180deg, rgba(14, 116, 144, 0.8), rgba(14, 116, 144, 0) 100%)",
- popupGradientColor: "#0a1f29",
- selectBorderColor: "#22D3EE",
- gameMenuBg: "linear-gradient(180deg, rgba(14, 116, 144, 0.85) 0%, rgba(7, 58, 72, 0.92) 30%, rgba(0, 0, 0, 0.98) 100%)",
- iconAccentColor: "#0891B2",
- };
- // 亮黄色+红色主题 (RapidJackpot - 火箭速度感)
- const yellowRedTheme = {
- ...defaultTheme,
- thirdColor: "#EAB308", // 黄色
- fourthColor: "#CA8A04",
- primaryColor: "#FDE047", // 亮黄色
- secondaryColor: "#FACC15",
- fiveColor: "#FACC15",
- highlightColor: "#FDE047",
- accentColor: "#FACC15",
- negativeColor: "#DC2626", // 红色按钮(强调色)
- moneyColor: "#FDE047",
- linkColor: "#FEF9C3", // 浅黄色链接
- titleGradient: "linear-gradient(180deg, #FDE047 0%, #DC2626 100%)",
- bonusGradient: "linear-gradient(179deg, #FEF08A 20.1%, #FACC15 46.83%, #FEF9C3 78.17%)",
- tabIconFilter: "hue-rotate(45deg) saturate(1.4)", // 红色转黄色
- backgroundColor: "linear-gradient(to right, #B91C1C, #CA8A04)",
- backgroundColor1: "linear-gradient(to right, #FACC15, #EAB308)",
- buttonColor: "linear-gradient(to bottom, #FDE047, #DC2626)",
- activityBgColor: "linear-gradient(180deg, rgb(185, 28, 28),rgb(202, 138, 4) 99.237%)",
- backgroundColor2: "linear-gradient(180deg, rgba(202, 138, 4, 0.8), rgba(202, 138, 4, 0) 100%)",
- popupGradientColor: "#2a1a00",
- selectBorderColor: "#FDE047",
- gameMenuBg: "linear-gradient(180deg, rgba(185, 28, 28, 0.85) 0%, rgba(101, 67, 2, 0.92) 30%, rgba(0, 0, 0, 0.98) 100%)",
- iconAccentColor: "#DC2626",
- };
- // 橙色+橙红色主题 (JackpotFury - 火焰暴怒)
- const orangeRedTheme = {
- ...defaultTheme,
- thirdColor: "#EA580C", // 深橙色
- fourthColor: "#C2410C",
- primaryColor: "#FB923C", // 橙色
- secondaryColor: "#F97316",
- fiveColor: "#F97316",
- highlightColor: "#FDBA14",
- accentColor: "#F97316",
- negativeColor: "#DC2626", // 橙红色按钮
- moneyColor: "#FB923C",
- linkColor: "#FED7AA", // 浅橙色链接
- titleGradient: "linear-gradient(180deg, #FB923C 0%, #DC2626 100%)",
- bonusGradient: "linear-gradient(179deg, #FDBA74 20.1%, #F97316 46.83%, #FED7AA 78.17%)",
- tabIconFilter: "hue-rotate(10deg) saturate(1.3)", // 保持偏红橙
- backgroundColor: "linear-gradient(to right, #DC2626, #EA580C)",
- backgroundColor1: "linear-gradient(to right, #F97316, #EF4444)",
- buttonColor: "linear-gradient(to bottom, #FB923C, #DC2626)",
- activityBgColor: "linear-gradient(180deg, rgb(220, 38, 38),rgb(234, 88, 12) 99.237%)",
- backgroundColor2: "linear-gradient(180deg, rgba(220, 38, 38, 0.8), rgba(220, 38, 38, 0) 100%)",
- popupGradientColor: "#2a0f00",
- selectBorderColor: "#FB923C",
- gameMenuBg: "linear-gradient(180deg, rgba(220, 38, 38, 0.85) 0%, rgba(117, 44, 6, 0.92) 30%, rgba(0, 0, 0, 0.98) 100%)",
- iconAccentColor: "#DC2626",
- };
- // 红+叶绿混合主题 (WinExplosion - 爆炸多彩彩虹)
- const explosionTheme = {
- ...defaultTheme,
- thirdColor: "#DC2626", // 红色
- fourthColor: "#22C55E", // 叶绿色
- primaryColor: "#F87171", // 亮红色
- secondaryColor: "#22C55E", // 叶绿色
- fiveColor: "#22C55E",
- highlightColor: "#22C55E", // 叶绿高亮
- accentColor: "#EF4444", // 红色强调
- negativeColor: "#DC2626", // 红色按钮
- moneyColor: "#4ADE80", // 叶绿金币
- linkColor: "#86EFAC", // 浅叶绿链接
- titleGradient: "linear-gradient(90deg, #EF4444 0%, #F97316 20%, #EAB308 40%, #22C55E 60%, #3B82F6 80%, #8B5CF6 100%)",
- bonusGradient: "linear-gradient(90deg, #FCA5A5 0%, #FDBA74 25%, #FDE047 50%, #86EFAC 75%, #C4B5FD 100%)",
- tabIconFilter: "none", // 保持红色图标
- backgroundColor: "linear-gradient(to right, #DC2626, #16A34A)",
- backgroundColor1: "linear-gradient(to right, #22C55E, #EF4444)",
- buttonColor: "linear-gradient(to bottom, #F87171, #16A34A)",
- activityBgColor: "linear-gradient(180deg, rgb(220, 38, 38),rgb(22, 163, 74) 99.237%)",
- backgroundColor2: "linear-gradient(180deg, rgba(220, 38, 38, 0.8), rgba(22, 163, 74, 0) 100%)",
- popupGradientColor: "#0a1f12",
- selectBorderColor: "#4ADE80",
- gameMenuBg: "linear-gradient(180deg, rgba(220, 38, 38, 0.85) 0%, rgba(22, 101, 52, 0.92) 30%, rgba(0, 0, 0, 0.98) 100%)",
- iconAccentColor: "#22C55E",
- };
- // 玫红色+冷蓝绿色主题 (SlotFrenzy - 狂热冷酷)
- const purpleTealTheme = {
- ...defaultTheme,
- thirdColor: "#DB2777", // 玫红色
- fourthColor: "#0D9488", // 冷蓝绿色
- primaryColor: "#F472B6", // 亮玫红
- secondaryColor: "#14B8A6", // 蓝绿色
- fiveColor: "#14B8A6",
- highlightColor: "#2DD4BF", // 蓝绿高亮
- accentColor: "#EC4899", // 玫红强调
- negativeColor: "#DB2777", // 玫红按钮
- moneyColor: "#2DD4BF", // 蓝绿金币
- linkColor: "#FBCFE8", // 浅玫红链接
- titleGradient: "linear-gradient(180deg, #F472B6 0%, #14B8A6 100%)",
- bonusGradient: "linear-gradient(179deg, #FBCFE8 20.1%, #14B8A6 46.83%, #99F6E4 78.17%)",
- tabIconFilter: "hue-rotate(330deg) saturate(1.3)", // 红色转玫红
- backgroundColor: "linear-gradient(to right, #BE185D, #0F766E)",
- backgroundColor1: "linear-gradient(to right, #14B8A6, #EC4899)",
- buttonColor: "linear-gradient(to bottom, #F472B6, #0D9488)",
- activityBgColor: "linear-gradient(180deg, rgb(190, 24, 93),rgb(15, 118, 110) 99.237%)",
- backgroundColor2: "linear-gradient(180deg, rgba(190, 24, 93, 0.8), rgba(15, 118, 110, 0) 100%)",
- popupGradientColor: "#1f0a1a",
- selectBorderColor: "#2DD4BF",
- gameMenuBg: "linear-gradient(180deg, rgba(190, 24, 93, 0.85) 0%, rgba(7, 59, 55, 0.92) 30%, rgba(0, 0, 0, 0.98) 100%)",
- iconAccentColor: "#14B8A6",
- };
- // 叶绿色+金黄色主题 (LuckyHitNow - 幸运四叶草)
- const emeraldTheme = {
- ...defaultTheme,
- thirdColor: "#16A34A", // 叶绿色
- fourthColor: "#EAB308", // 金黄色
- primaryColor: "#22C55E", // 亮叶绿
- secondaryColor: "#F59E0B", // 琥珀金
- fiveColor: "#22C55E",
- highlightColor: "#FBBF24", // 金黄高亮
- accentColor: "#22C55E", // 叶绿强调
- negativeColor: "#16A34A", // 叶绿按钮
- moneyColor: "#FBBF24", // 金黄金币
- linkColor: "#FEF3C7", // 浅金黄链接
- titleGradient: "linear-gradient(180deg, #22C55E 0%, #EAB308 100%)",
- bonusGradient: "linear-gradient(179deg, #86EFAC 20.1%, #FBBF24 46.83%, #FDE68A 78.17%)",
- tabIconFilter: "hue-rotate(100deg) saturate(1.2)", // 红色转叶绿
- backgroundColor: "linear-gradient(to right, #15803D, #CA8A04)",
- backgroundColor1: "linear-gradient(to right, #22C55E, #F59E0B)",
- buttonColor: "linear-gradient(to bottom, #4ADE80, #EAB308)",
- activityBgColor: "linear-gradient(180deg, rgb(21, 128, 61),rgb(202, 138, 4) 99.237%)",
- backgroundColor2: "linear-gradient(180deg, rgba(21, 128, 61, 0.8), rgba(202, 138, 4, 0) 100%)",
- popupGradientColor: "#0f2a12",
- selectBorderColor: "#FBBF24",
- gameMenuBg: "linear-gradient(180deg, rgba(21, 128, 61, 0.85) 0%, rgba(101, 67, 2, 0.92) 30%, rgba(0, 0, 0, 0.98) 100%)",
- iconAccentColor: "#EAB308",
- };
- // ========== 巴西品牌主题 ==========
- // TigreReal (皇家虎) - 深酒红 + 帝王金
- const tigreRealTheme = {
- ...defaultTheme,
- thirdColor: "#8B1828",
- fourthColor: "#3E101C",
- primaryColor: "#D4A04E",
- secondaryColor: "#8A6A2E",
- fiveColor: "#D4A04E",
- highlightColor: "#F0C96B",
- accentColor: "#D4A04E",
- negativeColor: "#8B1828",
- moneyColor: "#F0C96B",
- goldColor: "#D4A04E",
- coinColor: "#F0C96B",
- linkColor: "#F5E9D0",
- textColor: "#F5E9D0",
- textLightColor: "#F5E9D0",
- mainBgColor: "#2A0810",
- darkColor: "#1a0508",
- bodyBgColor: "#1a0508",
- titleGradient: "linear-gradient(180deg, #F0C96B 0%, #D4A04E 100%)",
- bonusGradient: "linear-gradient(179deg, #F0C96B 20.1%, #D4A04E 46.83%, #8A6A2E 78.17%)",
- tabIconFilter: "hue-rotate(340deg) saturate(1.2)",
- backgroundColor: "linear-gradient(to right, #2A0810, #3E101C)",
- backgroundColor1: "linear-gradient(to right, #8B1828, #3E101C)",
- buttonColor: "linear-gradient(to bottom, #F0C96B, #8A6A2E)",
- activityBgColor: "linear-gradient(180deg, rgb(42, 8, 16), rgb(62, 16, 28) 99.237%)",
- backgroundColor2: "linear-gradient(180deg, rgba(42, 8, 16, 0.8), rgba(42, 8, 16, 0) 100%)",
- popupGradientColor: "#1a0508",
- selectBorderColor: "#D4A04E",
- gameMenuBg: "linear-gradient(180deg, rgba(42, 8, 16, 0.9) 0%, rgba(20, 4, 8, 0.95) 30%, rgba(0, 0, 0, 0.98) 100%)",
- iconAccentColor: "#D4A04E",
- };
- // GiraSamba (桑巴转动) - 派对紫红 + 狂欢节黄 + 翠绿
- const giraSambaTheme = {
- ...defaultTheme,
- thirdColor: "#C2185B",
- fourthColor: "#880E4F",
- primaryColor: "#FF4081",
- secondaryColor: "#C2185B",
- fiveColor: "#FF4081",
- highlightColor: "#FFD600",
- accentColor: "#00A86B",
- negativeColor: "#C2185B",
- moneyColor: "#FFD600",
- goldColor: "#FFD600",
- coinColor: "#FFD600",
- linkColor: "#FFEBEE",
- textColor: "#FFFFFF",
- titleGradient: "linear-gradient(90deg, #C2185B 0%, #FFD600 50%, #00A86B 100%)",
- bonusGradient: "linear-gradient(179deg, #FF4081 20.1%, #FFD600 46.83%, #00A86B 78.17%)",
- tabIconFilter: "hue-rotate(320deg) saturate(1.4)",
- backgroundColor: "linear-gradient(to right, #C2185B, #2196F3)",
- backgroundColor1: "linear-gradient(to right, #FF4081, #FFD600)",
- buttonColor: "linear-gradient(to bottom, #FF4081, #C2185B)",
- activityBgColor: "linear-gradient(180deg, rgb(194, 24, 91), rgb(136, 14, 79) 99.237%)",
- backgroundColor2: "linear-gradient(180deg, rgba(194, 24, 91, 0.8), rgba(194, 24, 91, 0) 100%)",
- popupGradientColor: "#2a0a1a",
- selectBorderColor: "#FFD600",
- gameMenuBg: "linear-gradient(180deg, rgba(194, 24, 91, 0.85) 0%, rgba(97, 12, 45, 0.92) 30%, rgba(0, 0, 0, 0.98) 100%)",
- iconAccentColor: "#FF4081",
- };
- // SelvaDourada (黄金丛林) - 丛林深绿 + 做旧金
- const selvaDouradaTheme = {
- ...defaultTheme,
- thirdColor: "#1E6B4F",
- fourthColor: "#0D3B2E",
- primaryColor: "#2E8B57",
- secondaryColor: "#1E6B4F",
- fiveColor: "#2E8B57",
- highlightColor: "#B8860B",
- accentColor: "#8B6914",
- negativeColor: "#0D3B2E",
- moneyColor: "#B8860B",
- goldColor: "#B8860B",
- coinColor: "#8B6914",
- linkColor: "#F4E9D8",
- textColor: "#F4E9D8",
- textLightColor: "#F4E9D8",
- mainBgColor: "#0D3B2E",
- darkColor: "#0a1f18",
- bodyBgColor: "#0a1f18",
- titleGradient: "linear-gradient(180deg, #B8860B 0%, #8B6914 100%)",
- bonusGradient: "linear-gradient(179deg, #DAA520 20.1%, #B8860B 46.83%, #8B6914 78.17%)",
- tabIconFilter: "hue-rotate(110deg) saturate(1.1)",
- backgroundColor: "linear-gradient(to right, #0D3B2E, #1E6B4F)",
- backgroundColor1: "linear-gradient(to right, #2E8B57, #1E6B4F)",
- buttonColor: "linear-gradient(to bottom, #B8860B, #8B6914)",
- activityBgColor: "linear-gradient(180deg, rgb(13, 59, 46), rgb(30, 107, 79) 99.237%)",
- backgroundColor2: "linear-gradient(180deg, rgba(13, 59, 46, 0.8), rgba(13, 59, 46, 0) 100%)",
- popupGradientColor: "#0a1f18",
- selectBorderColor: "#B8860B",
- gameMenuBg: "linear-gradient(180deg, rgba(13, 59, 46, 0.9) 0%, rgba(7, 30, 23, 0.95) 30%, rgba(0, 0, 0, 0.98) 100%)",
- iconAccentColor: "#B8860B",
- };
- // OuroEoGol (黄金与进球) - 巴西绿 + 黄金黄 + 巴西蓝
- const ouroEoGolTheme = {
- ...defaultTheme,
- thirdColor: "#009739",
- fourthColor: "#006227",
- primaryColor: "#FFDF00",
- secondaryColor: "#009739",
- fiveColor: "#009739",
- highlightColor: "#FFDF00",
- accentColor: "#002776",
- negativeColor: "#009739",
- moneyColor: "#FFDF00",
- goldColor: "#FFDF00",
- coinColor: "#FFDF00",
- linkColor: "#FFFACD",
- textColor: "#FFFFFF",
- titleGradient: "linear-gradient(180deg, #FFDF00 0%, #009739 100%)",
- bonusGradient: "linear-gradient(179deg, #FFDF00 20.1%, #009739 46.83%, #002776 78.17%)",
- tabIconFilter: "hue-rotate(95deg) saturate(1.3)",
- backgroundColor: "linear-gradient(to right, #006227, #009739)",
- backgroundColor1: "linear-gradient(to right, #009739, #FFDF00)",
- buttonColor: "linear-gradient(to bottom, #FFDF00, #009739)",
- activityBgColor: "linear-gradient(180deg, rgb(0, 151, 57), rgb(0, 98, 39) 99.237%)",
- backgroundColor2: "linear-gradient(180deg, rgba(0, 151, 57, 0.8), rgba(0, 151, 57, 0) 100%)",
- popupGradientColor: "#0a2a15",
- selectBorderColor: "#FFDF00",
- gameMenuBg: "linear-gradient(180deg, rgba(0, 151, 57, 0.85) 0%, rgba(0, 55, 22, 0.92) 30%, rgba(0, 0, 0, 0.98) 100%)",
- iconAccentColor: "#FFDF00",
- };
- // PraiaDaSorte (幸运海滩) - 夕阳橙 + 天空蓝 + 沙金色
- const praiaDaSorteTheme = {
- ...defaultTheme,
- thirdColor: "#FF6F3C",
- fourthColor: "#E85A2C",
- primaryColor: "#FFB4A2",
- secondaryColor: "#FF6F3C",
- fiveColor: "#FF6F3C",
- highlightColor: "#F4C07F",
- accentColor: "#00B4D8",
- negativeColor: "#FF6F3C",
- moneyColor: "#F4C07F",
- goldColor: "#F4C07F",
- coinColor: "#F4C07F",
- linkColor: "#FFD6CC",
- textColor: "#03045E",
- titleGradient: "linear-gradient(180deg, #FF6F3C 0%, #00B4D8 100%)",
- bonusGradient: "linear-gradient(179deg, #FFB4A2 20.1%, #F4C07F 46.83%, #00B4D8 78.17%)",
- tabIconFilter: "hue-rotate(10deg) saturate(1.2)",
- backgroundColor: "linear-gradient(to right, #FF6F3C, #00B4D8)",
- backgroundColor1: "linear-gradient(to right, #FFB4A2, #52B788)",
- buttonColor: "linear-gradient(to bottom, #FF6F3C, #E85A2C)",
- activityBgColor: "linear-gradient(180deg, rgb(255, 111, 60), rgb(0, 180, 216) 99.237%)",
- backgroundColor2: "linear-gradient(180deg, rgba(255, 111, 60, 0.8), rgba(255, 111, 60, 0) 100%)",
- popupGradientColor: "#2a1505",
- selectBorderColor: "#F4C07F",
- gameMenuBg: "linear-gradient(180deg, rgba(255, 111, 60, 0.85) 0%, rgba(0, 90, 108, 0.92) 30%, rgba(0, 0, 0, 0.98) 100%)",
- iconAccentColor: "#00B4D8",
- };
- // FenixDourada (金凤凰) - 炭黑 + 深紫 + 火焰橙金
- const fenixDouradaTheme = {
- ...defaultTheme,
- thirdColor: "#6B0F3A",
- fourthColor: "#3A0CA3",
- primaryColor: "#FFB700",
- secondaryColor: "#FF5714",
- fiveColor: "#FF8C00",
- highlightColor: "#FFB700",
- accentColor: "#FF5714",
- negativeColor: "#6B0F3A",
- moneyColor: "#FFB700",
- goldColor: "#FFB700",
- coinColor: "#FF8C00",
- linkColor: "#FFE4B5",
- textColor: "#FFB700",
- textLightColor: "#FFE4B5",
- mainBgColor: "#0A0A0A",
- darkColor: "#0A0A0A",
- bodyBgColor: "#000000",
- titleGradient: "linear-gradient(180deg, #FFB700 0%, #FF5714 100%)",
- bonusGradient: "linear-gradient(179deg, #FFB700 20.1%, #FF8C00 46.83%, #FF5714 78.17%)",
- tabIconFilter: "hue-rotate(20deg) saturate(1.3) brightness(1.1)",
- backgroundColor: "linear-gradient(to right, #3A0CA3, #6B0F3A)",
- backgroundColor1: "linear-gradient(to right, #FF5714, #FFB700)",
- buttonColor: "linear-gradient(to bottom, #FFB700, #FF5714)",
- activityBgColor: "linear-gradient(180deg, rgb(58, 12, 163), rgb(107, 15, 58) 99.237%)",
- backgroundColor2: "linear-gradient(180deg, rgba(58, 12, 163, 0.8), rgba(10, 10, 10, 0) 100%)",
- popupGradientColor: "#1a0a2e",
- selectBorderColor: "#FFB700",
- gameMenuBg: "linear-gradient(180deg, rgba(58, 12, 163, 0.9) 0%, rgba(10, 10, 10, 0.95) 30%, rgba(0, 0, 0, 1) 100%)",
- iconAccentColor: "#FF5714",
- };
- // BRG77 (巴西主站) - 金币金 + 巴西绿 + 火焰红
- const brg77Theme = {
- ...defaultTheme,
- thirdColor: "#FFCC00",
- fourthColor: "#B8860B",
- primaryColor: "#FFD700",
- secondaryColor: "#FFCC00",
- fiveColor: "#FFCC00",
- highlightColor: "#FFD700",
- accentColor: "#E63946",
- negativeColor: "#E63946",
- moneyColor: "#FFCC00",
- goldColor: "#FFCC00",
- coinColor: "#FFD700",
- linkColor: "#FFF8DC",
- textColor: "#FFFFFF",
- titleGradient: "linear-gradient(180deg, #FFCC00 0%, #B8860B 100%)",
- bonusGradient: "linear-gradient(179deg, #FFD700 20.1%, #FFCC00 46.83%, #B8860B 78.17%)",
- tabIconFilter: "hue-rotate(40deg) saturate(1.3)",
- backgroundColor: "linear-gradient(to right, #009739, #FFCC00)",
- backgroundColor1: "linear-gradient(to right, #FFCC00, #E63946)",
- buttonColor: "linear-gradient(to bottom, #FFD700, #B8860B)",
- activityBgColor: "linear-gradient(180deg, rgb(0, 151, 57), rgb(255, 204, 0) 99.237%)",
- backgroundColor2: "linear-gradient(180deg, rgba(255, 204, 0, 0.8), rgba(255, 204, 0, 0) 100%)",
- popupGradientColor: "#1a1400",
- selectBorderColor: "#FFCC00",
- gameMenuBg: "linear-gradient(180deg, rgba(0, 0, 0, 0.9) 0%, rgba(20, 12, 0, 0.95) 30%, rgba(0, 0, 0, 0.98) 100%)",
- iconAccentColor: "#E63946",
- };
- // ═══════════════════════════════════════════════════════
- // 区域配置(Region Config)
- // 每个品牌站点通过 "region" 字段引用对应的区域配置
- // 区域配置包含:可用语言、默认语言、API、电话区号、货币、时区等
- // ═══════════════════════════════════════════════════════
- const regions = {
- // 美国区域(默认区域)
- // languages / defaultLang 使用完整 BCP47 locale(en-US vs en-GB、pt-BR vs pt-PT 等),消除歧义
- "us": {
- "code": "us",
- "countryCode": "US",
- "locale": "en-US",
- "languages": ["en-US", "es-MX"],
- "defaultLang": "en-US",
- "api": "https://api1.usvip.org/",
- "apiHost": "api1.usvip.org",
- "ws": "wss://api1.usvip.org:10000",
- "wsPort": 10000,
- "phoneCode": "+1",
- "currency": "USD",
- "currencySymbol": "$",
- "timezone": "America/New_York",
- "dateFormat": "MM/DD/YYYY",
- "numberFormat": "en-US",
- "supportEmailDomain": "usslot777.com",
- "titleSuffix": "Online Slots & Real Money Games"
- },
- // 巴西区域
- "br": {
- "code": "br",
- "countryCode": "BR",
- "locale": "pt-BR",
- "languages": ["pt-BR", "en-US"],
- "defaultLang": "pt-BR",
- "api": "https://brapi24680.vipsvip.org/",
- "apiHost": "brapi24680.vipsvip.org",
- "ws": "wss://brapi24680.vipsvip.org:10000",
- "wsPort": 10000,
- "phoneCode": "+55",
- "currency": "BRL",
- "currencySymbol": "R$",
- "timezone": "America/Sao_Paulo",
- "dateFormat": "DD/MM/YYYY",
- "numberFormat": "pt-BR",
- "supportEmailDomain": "24680.com",
- "titleSuffix": "Slots Online & Jogos com Dinheiro Real"
- },
- // 墨西哥区域(预留,业务 APP_COUNTRY_CODE.MX)
- "mx": {
- "code": "mx",
- "countryCode": "MX",
- "locale": "es-MX",
- "languages": ["es-MX", "en-US"],
- "defaultLang": "es-MX",
- "api": "https://api1.usvip.org/",
- "apiHost": "api1.usvip.org",
- "ws": "wss://api1.usvip.org:10000",
- "wsPort": 10000,
- "phoneCode": "+52",
- "currency": "MXN",
- "currencySymbol": "$",
- "timezone": "America/Mexico_City",
- "dateFormat": "DD/MM/YYYY",
- "numberFormat": "es-MX",
- "titleSuffix": "Tragamonedas Online y Juegos con Dinero Real"
- },
- // 俄罗斯区域(预留)
- "ru": {
- "code": "ru",
- "countryCode": "RU",
- "locale": "ru-RU",
- "languages": ["ru-RU", "en-US"],
- "defaultLang": "ru-RU",
- "api": "https://api1.usvip.org/",
- "apiHost": "api1.usvip.org",
- "ws": "wss://api1.usvip.org:10000",
- "wsPort": 10000,
- "phoneCode": "+7",
- "currency": "RUB",
- "currencySymbol": "₽",
- "timezone": "Europe/Moscow",
- "dateFormat": "DD.MM.YYYY",
- "numberFormat": "ru-RU",
- "titleSuffix": "Онлайн-слоты и игры на реальные деньги"
- },
- // 欧盟区域(预留)
- // 注意:pt-PT 是葡萄牙本土葡语,与 pt-BR 不同;当前仅有 pt-BR 语言包,如需 pt-PT 需另建 pt_PT.json
- "eu": {
- "code": "eu",
- "countryCode": "EU",
- "locale": "en-GB",
- "languages": ["en-GB", "es-ES", "pt-PT"],
- "defaultLang": "en-GB",
- "api": "https://api1.usvip.org/",
- "apiHost": "api1.usvip.org",
- "ws": "wss://api1.usvip.org:10000",
- "wsPort": 10000,
- "phoneCode": "+44",
- "currency": "EUR",
- "currencySymbol": "€",
- "timezone": "Europe/London",
- "dateFormat": "DD/MM/YYYY",
- "numberFormat": "en-GB",
- "titleSuffix": "Online Slots & Real Money Games"
- }
- };
- // 默认区域(site_config 未指定 region 时使用)
- const DEFAULT_REGION = "us";
- const sites_config = {
- // ========== 品牌站点配置 ==========
- // 根据 logo 颜色分析选择主题
- // ========== 巴西品牌站点配置 (pt-BR) ==========
- // BRG77 - 巴西默认主站(金币金 + 巴西绿 + 火焰红)
- "br24680": {
- "title": "24680.com Cassino tradicional com dinheiro real",
- "subtitle": "Sequência Par: Dobre Sua Sorte no 24680.com! Melhor Cassino. Maior jogo crash. Comprovadamente justo & Dealer ao vivo. 10000 jogos de slot. Bônus únicos & rodadas grátis da sorte.",
- "product": "24680",
- "product_id": "37",
- "logo": `/${res_path}/logos/24680.webp`,
- "icon": `/${res_path}/icons/24680.webp`,
- "favicon": `data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text x=%2250%%22 y=%2250%%22 style=%22dominant-baseline:central;text-anchor:middle;font-size:110px;%22>🍒</text></svg>`,
- "region": "br",
- "theme": ouroEoGolTheme
- },
- }
- /** 从当前 path 解析 s_k_c 前缀(/s_k_c 或 /s_k_c/xxx),无则返回空字符串 */
- const getPathPrefix = () => {
- const pathname = window.location.pathname || "";
- const m = pathname.match(/^\/([a-zA-Z0-9]+)_(\d+)(?:\/.*)?$/);
- return m ? `/${m[1]}_${m[2]}` : "";
- };
- const geyCommonJSON = () => {
- const origin = window.location.origin;
- const pathPrefix = getPathPrefix();
- const beginurl=origin+"/";
- const siteurl = pathPrefix ? origin + pathPrefix + "/" : origin + "/";
- const lkey="LOCAL_START_PARAMS";
- let search=window.location.search;
- const params = new URLSearchParams(search);
- if (params.has("c")){
- localStorage.setItem(lkey,search);
- }
- else {
- let lsearch=localStorage.getItem(lkey);
- if (lsearch==null&&search!=="")localStorage.setItem(lkey,search);
- search=lsearch || search;
- }
- const start_url = siteurl + (search || "");
- const site_conf=getSiteConfig();
- const icon_path=site_conf.icon;
- let dir="product";
- if(site_conf.region==="br")dir="product_br";
- return {
- name: '',
- short_name: '',
- description: '',
- id: './',
- start_url: start_url,
- scope: './',
- display: 'standalone',
- background_color: '#2e303f',
- theme_color: '#2e303f',
- icons: [
- {
- src: `${beginurl}${icon_path}`,
- sizes: '192x192',
- type: 'image/png',
- purpose: 'any maskable'
- }
- ],
- screenshots: [
- {
- src: `${beginurl}/${res_path}/${dir}/wide.webp`,
- sizes: '600x338',
- type: 'image/jpg',
- form_factor: 'wide'
- },
- {
- src: `${beginurl}/${res_path}/${dir}/1.webp`,
- sizes: '320x585',
- type: 'image/png'
- },
- {
- src: `${beginurl}/${res_path}/${dir}/2.webp`,
- sizes: '320x585',
- type: 'image/png'
- },
- {
- src: `${beginurl}/${res_path}/${dir}/3.webp`,
- sizes: '320x585',
- type: 'image/png'
- },
- {
- src: `${beginurl}/${res_path}/${dir}/4.webp`,
- sizes: '320x585',
- type: 'image/png'
- },
- {
- src: `${beginurl}/${res_path}/${dir}/5.webp`,
- sizes: '320x585',
- type: 'image/png'
- }
- ],
- protocol_handlers:[
- {
- protocol:'web+usslot',
- url:`${siteurl}?launchedfrom=homescreen&pwaprotocolredirect=%s`
- }
- ]
- };
- };
- const getSettings = async () => {
- const {origin,pathname}=window.location
- // const url = window.location.href.replace(/\blandingpage\d*\.html\b/, 'manifest.json');
- // const url =origin+pathname.substring(0,pathname.lastIndexOf('/'))+ '/manifest.json'
- // const response = await fetch(url);
- // if (!response.ok) {
- // console.error('获取manifest文件失败!');
- // return;
- // }
- // const content = await response.json();
- const defaultContent = geyCommonJSON();
- const settings = Object.assign(defaultContent, {
- name: window.themeConfig.title,
- short_name: window.themeConfig.title,
- description: window.themeConfig.subtitle,
- lang: window.themeConfig.lang || 'en'
- });
- return settings;
- };
- const getSitePrefix=()=>{
- const hostname = window.location.hostname;
- const parts = hostname.split('.');
- if (parts[0]==="www")parts.shift();
- return parts[0];
- }
- const getSiteConfig=()=>{
- let prefix=getSitePrefix();
- if(location.hostname.includes("localhost"))prefix="br24680" // 正式环境删除此行,使用 getSitePrefix() 返回值
- const conf=sites_config[prefix] || sites_config["br24680"];
- // 合并区域配置:site.region → regions[region] → 写回到 site.regionConfig
- const regionKey = conf.region || DEFAULT_REGION;
- const regionConf = regions[regionKey] || regions[DEFAULT_REGION];
- // lang 优先级:site.lang > region.defaultLang
- conf.region = regionKey;
- conf.regionConfig = regionConf;
- conf.lang = conf.lang || regionConf.defaultLang;
- conf.api = conf.api || regionConf.api;
- conf.ws = conf.ws || regionConf.ws;
- return conf;
- }
- const applyTheme=(theme = {})=>{
- const root = document.documentElement;
- if (theme!=null){
- for (let key in theme) {
- root.style.setProperty(`--${key}`, theme[key]);
- }
- }
- }
- const applyPageMeta=()=>{
- const lang = window.themeConfig?.lang || 'en';
- const region = window.themeConfig?.regionConfig;
- // 设置 html lang 属性(优先使用完整 locale,如 pt-BR)
- document.documentElement.lang = region?.locale || lang;
- // 设置页面标题(使用区域配置的标题后缀)
- if (window.themeConfig?.title) {
- const titleSuffix = region?.titleSuffix || 'Online Slots & Real Money Games';
- document.title = `${window.themeConfig.title} | ${titleSuffix}`;
- }
- // 设置 favicon
- if (window.themeConfig?.favicon) {
- let favicon = document.querySelector('link[rel="icon"]');
- if (favicon) {
- favicon.href = window.themeConfig.favicon;
- }
- }
- // 设置 og:site_name
- let ogSiteName = document.querySelector('meta[property="og:site_name"]');
- if (ogSiteName && window.themeConfig?.title) {
- ogSiteName.setAttribute('content', window.themeConfig.title);
- }
- }
- const initSiteConfig= ()=>{
- window.themeConfig=getSiteConfig();
- applyTheme(window.themeConfig.theme);
- applyPageMeta();
- applyInitialLoading();
- }
-
- // 设置首屏 Loading 的 logo 和主题色
- const applyInitialLoading = () => {
- const logo = document.getElementById('initial-logo');
- if (logo && window.themeConfig?.logo) {
- logo.src = window.themeConfig.logo;
- }
- // 更新 loading 圆圈的主题色
- const loading = document.getElementById('initial-loading');
- if (loading && window.themeConfig?.theme?.highlightColor) {
- const spinner = loading.querySelector('div:last-of-type');
- if (spinner) {
- spinner.style.borderTopColor = window.themeConfig.theme.highlightColor;
- }
- }
- }
-
- // 隐藏首屏 Loading(React 应用加载完成后调用)
- window.hideInitialLoading = () => {
- const loading = document.getElementById('initial-loading');
- if (loading) {
- loading.style.opacity = '0';
- loading.style.transition = 'opacity 0.3s ease';
- setTimeout(() => loading.remove(), 300);
- }
- }
- const load = async () => {
- initSiteConfig();
- const settings = await getSettings();
- const str = JSON.stringify(settings, null, 2);
- // console.log(settings, str);
- let i = document.querySelector('link[rel="manifest"]');
- if (!i) {
- i = document.createElement('link');
- i.rel = 'manifest';
- document.head.appendChild(i);
- }
- i.href = 'data:text/json;charset=utf-8,' + encodeURIComponent(str);
- };
- load();
- })();
|