load.m.js 38 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935
  1. (function () {
  2. const res_path="resources";
  3. // 默认主题配置(绿色主题)
  4. const defaultTheme = {
  5. // 主色调
  6. thirdColor: "#00AF78",
  7. fourthColor: "#046E55",
  8. primaryColor: "#0CF1A9",
  9. secondaryColor: "#00C385",
  10. fiveColor: "#10b981",
  11. highlightColor: "#23FD93", // 高亮绿色
  12. accentColor: "#08c974", // 强调色
  13. // 渐变背景
  14. backgroundColor: "linear-gradient(to right, #0BAA47, #057B52)",
  15. backgroundColor1: "linear-gradient(to right, #10B981, #059669)",
  16. backgroundColor2: "linear-gradient(180deg, rgba(12, 89, 70, 0.8), rgba(12, 89, 70, 0) 100%)",
  17. activityBgColor: "linear-gradient(180deg, rgb(14, 110, 67),rgb(5, 73, 45) 99.237%)",
  18. // 按钮颜色
  19. buttonColor: "linear-gradient(to bottom, #0CE986, #008E61)",
  20. buttonGray: "linear-gradient(180deg, #b3b3b3, #939393)",
  21. warningButtonColor: "linear-gradient(to bottom, #f7c61d, #ef9a05)",
  22. disabledButtonColor: "linear-gradient(to bottom, #b3b3b3, #939393)",
  23. errorButtonColor: "linear-gradient(to bottom, #ff5a6d, #ce1126)",
  24. orangeButtonColor: "linear-gradient(179deg, #FEC412 20.1%, #FE871C 46.83%, #FFFB23 78.17%)",
  25. // 文字颜色
  26. textColor: "#E8ECF0",
  27. textGrayColor: "#818E99",
  28. textGrayColor1: "#6b7280",
  29. textLightColor: "#f9f5ef", // 米白文字
  30. textMutedColor: "#909293", // 更浅的灰色
  31. // 背景颜色
  32. mainBgColor: "#1b1c26",
  33. darkColor: "#13141b",
  34. darkColor1: "#272D39",
  35. darkColor2: "#2e3541",
  36. darkColor3: "#343b49",
  37. bodyBgColor: "#0d1016", // 最深背景
  38. // 面板/卡片颜色
  39. popupBgColor: "#232834",
  40. popupGradientColor: "#092417",
  41. cardBgColor: "#1c1e22",
  42. cardBgColor2: "#1B1F28", // 卡片背景变体
  43. cardBgColor3: "#171C27",
  44. inputBgColor: "#13171F", // 输入框背景
  45. // 边框颜色
  46. borderColor: "#24262b",
  47. selectBorderColor: "#00CDA5",
  48. // 状态颜色
  49. positiveColor: "#7ED321",
  50. negativeColor: "#FF2400",
  51. successColor: "#4caf50", // 成功色
  52. // 金币/警告颜色
  53. warningColor: "#ffd118",
  54. moneyColor: "#FFC700",
  55. goldColor: "#FFD118", // 金色
  56. coinColor: "#edc349", // 金币黄
  57. // 其他
  58. linkColor: "#c2ec9d", // 链接色
  59. scrollbarColor: "#c4c4c4", // 滚动条色
  60. // 弹窗专用(新增)
  61. titleGradient: "linear-gradient(180deg, #FFC700 0%, #FF9B00 100%)", // WELCOME 标题渐变
  62. bonusGradient: "linear-gradient(179deg, #FEC412 20.1%, #FE871C 46.83%, #FFFB23 78.17%)", // Free $10 渐变
  63. popupBgFilter: "none", // 弹窗背景图滤镜
  64. tabIconFilter: "none", // Tab图标滤镜(默认绿色主题保持红色图标)
  65. 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%)", // 游戏菜单背景
  66. iconAccentColor: "#FF2400", // 图标强调色(双色图标的第二色)
  67. };
  68. // 蓝色主题
  69. const blueTheme = {
  70. ...defaultTheme,
  71. thirdColor: "#0078D4",
  72. fourthColor: "#004578",
  73. primaryColor: "#00A9FF",
  74. secondaryColor: "#0078D4",
  75. fiveColor: "#3B82F6",
  76. highlightColor: "#60A5FA",
  77. accentColor: "#3B82F6",
  78. negativeColor: "#2563EB", // 蓝色按钮
  79. moneyColor: "#60A5FA", // 蓝色金币文字
  80. linkColor: "#93C5FD", // 蓝色链接
  81. titleGradient: "linear-gradient(180deg, #60A5FA 0%, #2563EB 100%)",
  82. bonusGradient: "linear-gradient(179deg, #60A5FA 20.1%, #3B82F6 46.83%, #93C5FD 78.17%)",
  83. tabIconFilter: "hue-rotate(200deg) saturate(1.2)", // 红色转蓝色
  84. backgroundColor: "linear-gradient(to right, #1E40AF, #1E3A8A)",
  85. backgroundColor1: "linear-gradient(to right, #3B82F6, #2563EB)",
  86. buttonColor: "linear-gradient(to bottom, #60A5FA, #2563EB)",
  87. activityBgColor: "linear-gradient(180deg, rgb(30, 64, 175),rgb(30, 58, 138) 99.237%)",
  88. backgroundColor2: "linear-gradient(180deg, rgba(30, 64, 175, 0.8), rgba(30, 64, 175, 0) 100%)",
  89. popupGradientColor: "#0a1929",
  90. selectBorderColor: "#60A5FA",
  91. 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%)",
  92. iconAccentColor: "#2563EB",
  93. };
  94. // 紫色主题
  95. const purpleTheme = {
  96. ...defaultTheme,
  97. thirdColor: "#7C3AED",
  98. fourthColor: "#5B21B6",
  99. primaryColor: "#A78BFA",
  100. secondaryColor: "#8B5CF6",
  101. fiveColor: "#8B5CF6",
  102. highlightColor: "#A78BFA",
  103. accentColor: "#8B5CF6",
  104. negativeColor: "#7C3AED", // 紫色按钮
  105. moneyColor: "#A78BFA",
  106. linkColor: "#DDD6FE", // 紫色链接
  107. titleGradient: "linear-gradient(180deg, #A78BFA 0%, #7C3AED 100%)",
  108. bonusGradient: "linear-gradient(179deg, #C4B5FD 20.1%, #8B5CF6 46.83%, #DDD6FE 78.17%)",
  109. tabIconFilter: "hue-rotate(270deg) saturate(1.2)", // 红色转紫色
  110. backgroundColor: "linear-gradient(to right, #5B21B6, #4C1D95)",
  111. backgroundColor1: "linear-gradient(to right, #8B5CF6, #7C3AED)",
  112. buttonColor: "linear-gradient(to bottom, #A78BFA, #7C3AED)",
  113. activityBgColor: "linear-gradient(180deg, rgb(91, 33, 182),rgb(76, 29, 149) 99.237%)",
  114. backgroundColor2: "linear-gradient(180deg, rgba(91, 33, 182, 0.8), rgba(91, 33, 182, 0) 100%)",
  115. popupGradientColor: "#1a0a2e",
  116. selectBorderColor: "#A78BFA",
  117. 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%)",
  118. iconAccentColor: "#7C3AED",
  119. };
  120. // 金色主题
  121. const goldTheme = {
  122. ...defaultTheme,
  123. thirdColor: "#D97706",
  124. fourthColor: "#B45309",
  125. primaryColor: "#FBBF24",
  126. secondaryColor: "#F59E0B",
  127. fiveColor: "#F59E0B",
  128. highlightColor: "#FBBF24",
  129. accentColor: "#F59E0B",
  130. negativeColor: "#D97706", // 金色按钮
  131. moneyColor: "#FBBF24",
  132. linkColor: "#FEF3C7", // 金色链接
  133. titleGradient: "linear-gradient(180deg, #FBBF24 0%, #D97706 100%)",
  134. bonusGradient: "linear-gradient(179deg, #FDE68A 20.1%, #F59E0B 46.83%, #FEF3C7 78.17%)",
  135. tabIconFilter: "hue-rotate(35deg) saturate(1.3)", // 红色转金色
  136. backgroundColor: "linear-gradient(to right, #B45309, #92400E)",
  137. backgroundColor1: "linear-gradient(to right, #F59E0B, #D97706)",
  138. buttonColor: "linear-gradient(to bottom, #FBBF24, #D97706)",
  139. activityBgColor: "linear-gradient(180deg, rgb(180, 83, 9),rgb(146, 64, 14) 99.237%)",
  140. backgroundColor2: "linear-gradient(180deg, rgba(180, 83, 9, 0.8), rgba(180, 83, 9, 0) 100%)",
  141. popupGradientColor: "#291a00",
  142. selectBorderColor: "#FBBF24",
  143. 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%)",
  144. iconAccentColor: "#D97706",
  145. };
  146. // 红色主题
  147. const redTheme = {
  148. ...defaultTheme,
  149. thirdColor: "#DC2626",
  150. fourthColor: "#B91C1C",
  151. primaryColor: "#F87171",
  152. secondaryColor: "#EF4444",
  153. fiveColor: "#EF4444",
  154. highlightColor: "#F87171",
  155. accentColor: "#EF4444",
  156. negativeColor: "#DC2626", // 红色按钮
  157. moneyColor: "#F87171",
  158. linkColor: "#FECACA", // 红色链接
  159. titleGradient: "linear-gradient(180deg, #F87171 0%, #DC2626 100%)",
  160. bonusGradient: "linear-gradient(179deg, #FCA5A5 20.1%, #EF4444 46.83%, #FECACA 78.17%)",
  161. tabIconFilter: "none", // 红色主题保持原色
  162. backgroundColor: "linear-gradient(to right, #B91C1C, #991B1B)",
  163. backgroundColor1: "linear-gradient(to right, #EF4444, #DC2626)",
  164. buttonColor: "linear-gradient(to bottom, #F87171, #DC2626)",
  165. activityBgColor: "linear-gradient(180deg, rgb(185, 28, 28),rgb(153, 27, 27) 99.237%)",
  166. backgroundColor2: "linear-gradient(180deg, rgba(185, 28, 28, 0.8), rgba(185, 28, 28, 0) 100%)",
  167. popupGradientColor: "#2a0a0a",
  168. selectBorderColor: "#F87171",
  169. 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%)",
  170. iconAccentColor: "#DC2626",
  171. };
  172. // 橙色主题 (RapidJackpot)
  173. const orangeTheme = {
  174. ...defaultTheme,
  175. thirdColor: "#EA580C",
  176. fourthColor: "#C2410C",
  177. primaryColor: "#FB923C",
  178. secondaryColor: "#F97316",
  179. fiveColor: "#F97316",
  180. highlightColor: "#FB923C",
  181. accentColor: "#F97316",
  182. negativeColor: "#EA580C", // 橙色按钮
  183. moneyColor: "#FB923C",
  184. linkColor: "#FED7AA", // 橙色链接
  185. titleGradient: "linear-gradient(180deg, #FB923C 0%, #EA580C 100%)",
  186. bonusGradient: "linear-gradient(179deg, #FDBA74 20.1%, #F97316 46.83%, #FED7AA 78.17%)",
  187. tabIconFilter: "hue-rotate(15deg) saturate(1.2)", // 红色转橙色
  188. backgroundColor: "linear-gradient(to right, #C2410C, #9A3412)",
  189. backgroundColor1: "linear-gradient(to right, #F97316, #EA580C)",
  190. buttonColor: "linear-gradient(to bottom, #FB923C, #EA580C)",
  191. activityBgColor: "linear-gradient(180deg, rgb(194, 65, 12),rgb(154, 52, 18) 99.237%)",
  192. backgroundColor2: "linear-gradient(180deg, rgba(194, 65, 12, 0.8), rgba(194, 65, 12, 0) 100%)",
  193. popupGradientColor: "#2a1500",
  194. selectBorderColor: "#FB923C",
  195. 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%)",
  196. iconAccentColor: "#EA580C",
  197. };
  198. // 青色主题 (CashStorm - 龙卷风蓝绿色)
  199. const cyanTheme = {
  200. ...defaultTheme,
  201. thirdColor: "#0891B2",
  202. fourthColor: "#0E7490",
  203. primaryColor: "#22D3EE",
  204. secondaryColor: "#06B6D4",
  205. fiveColor: "#06B6D4",
  206. highlightColor: "#22D3EE",
  207. accentColor: "#06B6D4",
  208. negativeColor: "#0891B2", // 青色按钮
  209. moneyColor: "#22D3EE",
  210. linkColor: "#A5F3FC", // 青色链接
  211. titleGradient: "linear-gradient(180deg, #22D3EE 0%, #0891B2 100%)",
  212. bonusGradient: "linear-gradient(179deg, #67E8F9 20.1%, #06B6D4 46.83%, #A5F3FC 78.17%)",
  213. tabIconFilter: "hue-rotate(175deg) saturate(1.2)", // 红色转青色
  214. backgroundColor: "linear-gradient(to right, #0E7490, #155E75)",
  215. backgroundColor1: "linear-gradient(to right, #06B6D4, #0891B2)",
  216. buttonColor: "linear-gradient(to bottom, #22D3EE, #0891B2)",
  217. activityBgColor: "linear-gradient(180deg, rgb(14, 116, 144),rgb(21, 94, 117) 99.237%)",
  218. backgroundColor2: "linear-gradient(180deg, rgba(14, 116, 144, 0.8), rgba(14, 116, 144, 0) 100%)",
  219. popupGradientColor: "#0a1f29",
  220. selectBorderColor: "#22D3EE",
  221. 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%)",
  222. iconAccentColor: "#0891B2",
  223. };
  224. // 亮黄色+红色主题 (RapidJackpot - 火箭速度感)
  225. const yellowRedTheme = {
  226. ...defaultTheme,
  227. thirdColor: "#EAB308", // 黄色
  228. fourthColor: "#CA8A04",
  229. primaryColor: "#FDE047", // 亮黄色
  230. secondaryColor: "#FACC15",
  231. fiveColor: "#FACC15",
  232. highlightColor: "#FDE047",
  233. accentColor: "#FACC15",
  234. negativeColor: "#DC2626", // 红色按钮(强调色)
  235. moneyColor: "#FDE047",
  236. linkColor: "#FEF9C3", // 浅黄色链接
  237. titleGradient: "linear-gradient(180deg, #FDE047 0%, #DC2626 100%)",
  238. bonusGradient: "linear-gradient(179deg, #FEF08A 20.1%, #FACC15 46.83%, #FEF9C3 78.17%)",
  239. tabIconFilter: "hue-rotate(45deg) saturate(1.4)", // 红色转黄色
  240. backgroundColor: "linear-gradient(to right, #B91C1C, #CA8A04)",
  241. backgroundColor1: "linear-gradient(to right, #FACC15, #EAB308)",
  242. buttonColor: "linear-gradient(to bottom, #FDE047, #DC2626)",
  243. activityBgColor: "linear-gradient(180deg, rgb(185, 28, 28),rgb(202, 138, 4) 99.237%)",
  244. backgroundColor2: "linear-gradient(180deg, rgba(202, 138, 4, 0.8), rgba(202, 138, 4, 0) 100%)",
  245. popupGradientColor: "#2a1a00",
  246. selectBorderColor: "#FDE047",
  247. 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%)",
  248. iconAccentColor: "#DC2626",
  249. };
  250. // 橙色+橙红色主题 (JackpotFury - 火焰暴怒)
  251. const orangeRedTheme = {
  252. ...defaultTheme,
  253. thirdColor: "#EA580C", // 深橙色
  254. fourthColor: "#C2410C",
  255. primaryColor: "#FB923C", // 橙色
  256. secondaryColor: "#F97316",
  257. fiveColor: "#F97316",
  258. highlightColor: "#FDBA14",
  259. accentColor: "#F97316",
  260. negativeColor: "#DC2626", // 橙红色按钮
  261. moneyColor: "#FB923C",
  262. linkColor: "#FED7AA", // 浅橙色链接
  263. titleGradient: "linear-gradient(180deg, #FB923C 0%, #DC2626 100%)",
  264. bonusGradient: "linear-gradient(179deg, #FDBA74 20.1%, #F97316 46.83%, #FED7AA 78.17%)",
  265. tabIconFilter: "hue-rotate(10deg) saturate(1.3)", // 保持偏红橙
  266. backgroundColor: "linear-gradient(to right, #DC2626, #EA580C)",
  267. backgroundColor1: "linear-gradient(to right, #F97316, #EF4444)",
  268. buttonColor: "linear-gradient(to bottom, #FB923C, #DC2626)",
  269. activityBgColor: "linear-gradient(180deg, rgb(220, 38, 38),rgb(234, 88, 12) 99.237%)",
  270. backgroundColor2: "linear-gradient(180deg, rgba(220, 38, 38, 0.8), rgba(220, 38, 38, 0) 100%)",
  271. popupGradientColor: "#2a0f00",
  272. selectBorderColor: "#FB923C",
  273. 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%)",
  274. iconAccentColor: "#DC2626",
  275. };
  276. // 红+叶绿混合主题 (WinExplosion - 爆炸多彩彩虹)
  277. const explosionTheme = {
  278. ...defaultTheme,
  279. thirdColor: "#DC2626", // 红色
  280. fourthColor: "#22C55E", // 叶绿色
  281. primaryColor: "#F87171", // 亮红色
  282. secondaryColor: "#22C55E", // 叶绿色
  283. fiveColor: "#22C55E",
  284. highlightColor: "#22C55E", // 叶绿高亮
  285. accentColor: "#EF4444", // 红色强调
  286. negativeColor: "#DC2626", // 红色按钮
  287. moneyColor: "#4ADE80", // 叶绿金币
  288. linkColor: "#86EFAC", // 浅叶绿链接
  289. titleGradient: "linear-gradient(90deg, #EF4444 0%, #F97316 20%, #EAB308 40%, #22C55E 60%, #3B82F6 80%, #8B5CF6 100%)",
  290. bonusGradient: "linear-gradient(90deg, #FCA5A5 0%, #FDBA74 25%, #FDE047 50%, #86EFAC 75%, #C4B5FD 100%)",
  291. tabIconFilter: "none", // 保持红色图标
  292. backgroundColor: "linear-gradient(to right, #DC2626, #16A34A)",
  293. backgroundColor1: "linear-gradient(to right, #22C55E, #EF4444)",
  294. buttonColor: "linear-gradient(to bottom, #F87171, #16A34A)",
  295. activityBgColor: "linear-gradient(180deg, rgb(220, 38, 38),rgb(22, 163, 74) 99.237%)",
  296. backgroundColor2: "linear-gradient(180deg, rgba(220, 38, 38, 0.8), rgba(22, 163, 74, 0) 100%)",
  297. popupGradientColor: "#0a1f12",
  298. selectBorderColor: "#4ADE80",
  299. 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%)",
  300. iconAccentColor: "#22C55E",
  301. };
  302. // 玫红色+冷蓝绿色主题 (SlotFrenzy - 狂热冷酷)
  303. const purpleTealTheme = {
  304. ...defaultTheme,
  305. thirdColor: "#DB2777", // 玫红色
  306. fourthColor: "#0D9488", // 冷蓝绿色
  307. primaryColor: "#F472B6", // 亮玫红
  308. secondaryColor: "#14B8A6", // 蓝绿色
  309. fiveColor: "#14B8A6",
  310. highlightColor: "#2DD4BF", // 蓝绿高亮
  311. accentColor: "#EC4899", // 玫红强调
  312. negativeColor: "#DB2777", // 玫红按钮
  313. moneyColor: "#2DD4BF", // 蓝绿金币
  314. linkColor: "#FBCFE8", // 浅玫红链接
  315. titleGradient: "linear-gradient(180deg, #F472B6 0%, #14B8A6 100%)",
  316. bonusGradient: "linear-gradient(179deg, #FBCFE8 20.1%, #14B8A6 46.83%, #99F6E4 78.17%)",
  317. tabIconFilter: "hue-rotate(330deg) saturate(1.3)", // 红色转玫红
  318. backgroundColor: "linear-gradient(to right, #BE185D, #0F766E)",
  319. backgroundColor1: "linear-gradient(to right, #14B8A6, #EC4899)",
  320. buttonColor: "linear-gradient(to bottom, #F472B6, #0D9488)",
  321. activityBgColor: "linear-gradient(180deg, rgb(190, 24, 93),rgb(15, 118, 110) 99.237%)",
  322. backgroundColor2: "linear-gradient(180deg, rgba(190, 24, 93, 0.8), rgba(15, 118, 110, 0) 100%)",
  323. popupGradientColor: "#1f0a1a",
  324. selectBorderColor: "#2DD4BF",
  325. 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%)",
  326. iconAccentColor: "#14B8A6",
  327. };
  328. // 叶绿色+金黄色主题 (LuckyHitNow - 幸运四叶草)
  329. const emeraldTheme = {
  330. ...defaultTheme,
  331. thirdColor: "#16A34A", // 叶绿色
  332. fourthColor: "#EAB308", // 金黄色
  333. primaryColor: "#22C55E", // 亮叶绿
  334. secondaryColor: "#F59E0B", // 琥珀金
  335. fiveColor: "#22C55E",
  336. highlightColor: "#FBBF24", // 金黄高亮
  337. accentColor: "#22C55E", // 叶绿强调
  338. negativeColor: "#16A34A", // 叶绿按钮
  339. moneyColor: "#FBBF24", // 金黄金币
  340. linkColor: "#FEF3C7", // 浅金黄链接
  341. titleGradient: "linear-gradient(180deg, #22C55E 0%, #EAB308 100%)",
  342. bonusGradient: "linear-gradient(179deg, #86EFAC 20.1%, #FBBF24 46.83%, #FDE68A 78.17%)",
  343. tabIconFilter: "hue-rotate(100deg) saturate(1.2)", // 红色转叶绿
  344. backgroundColor: "linear-gradient(to right, #15803D, #CA8A04)",
  345. backgroundColor1: "linear-gradient(to right, #22C55E, #F59E0B)",
  346. buttonColor: "linear-gradient(to bottom, #4ADE80, #EAB308)",
  347. activityBgColor: "linear-gradient(180deg, rgb(21, 128, 61),rgb(202, 138, 4) 99.237%)",
  348. backgroundColor2: "linear-gradient(180deg, rgba(21, 128, 61, 0.8), rgba(202, 138, 4, 0) 100%)",
  349. popupGradientColor: "#0f2a12",
  350. selectBorderColor: "#FBBF24",
  351. 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%)",
  352. iconAccentColor: "#EAB308",
  353. };
  354. // ========== 巴西品牌主题 ==========
  355. // TigreReal (皇家虎) - 深酒红 + 帝王金
  356. const tigreRealTheme = {
  357. ...defaultTheme,
  358. thirdColor: "#8B1828",
  359. fourthColor: "#3E101C",
  360. primaryColor: "#D4A04E",
  361. secondaryColor: "#8A6A2E",
  362. fiveColor: "#D4A04E",
  363. highlightColor: "#F0C96B",
  364. accentColor: "#D4A04E",
  365. negativeColor: "#8B1828",
  366. moneyColor: "#F0C96B",
  367. goldColor: "#D4A04E",
  368. coinColor: "#F0C96B",
  369. linkColor: "#F5E9D0",
  370. textColor: "#F5E9D0",
  371. textLightColor: "#F5E9D0",
  372. mainBgColor: "#2A0810",
  373. darkColor: "#1a0508",
  374. bodyBgColor: "#1a0508",
  375. titleGradient: "linear-gradient(180deg, #F0C96B 0%, #D4A04E 100%)",
  376. bonusGradient: "linear-gradient(179deg, #F0C96B 20.1%, #D4A04E 46.83%, #8A6A2E 78.17%)",
  377. tabIconFilter: "hue-rotate(340deg) saturate(1.2)",
  378. backgroundColor: "linear-gradient(to right, #2A0810, #3E101C)",
  379. backgroundColor1: "linear-gradient(to right, #8B1828, #3E101C)",
  380. buttonColor: "linear-gradient(to bottom, #F0C96B, #8A6A2E)",
  381. activityBgColor: "linear-gradient(180deg, rgb(42, 8, 16), rgb(62, 16, 28) 99.237%)",
  382. backgroundColor2: "linear-gradient(180deg, rgba(42, 8, 16, 0.8), rgba(42, 8, 16, 0) 100%)",
  383. popupGradientColor: "#1a0508",
  384. selectBorderColor: "#D4A04E",
  385. 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%)",
  386. iconAccentColor: "#D4A04E",
  387. };
  388. // GiraSamba (桑巴转动) - 派对紫红 + 狂欢节黄 + 翠绿
  389. const giraSambaTheme = {
  390. ...defaultTheme,
  391. thirdColor: "#C2185B",
  392. fourthColor: "#880E4F",
  393. primaryColor: "#FF4081",
  394. secondaryColor: "#C2185B",
  395. fiveColor: "#FF4081",
  396. highlightColor: "#FFD600",
  397. accentColor: "#00A86B",
  398. negativeColor: "#C2185B",
  399. moneyColor: "#FFD600",
  400. goldColor: "#FFD600",
  401. coinColor: "#FFD600",
  402. linkColor: "#FFEBEE",
  403. textColor: "#FFFFFF",
  404. titleGradient: "linear-gradient(90deg, #C2185B 0%, #FFD600 50%, #00A86B 100%)",
  405. bonusGradient: "linear-gradient(179deg, #FF4081 20.1%, #FFD600 46.83%, #00A86B 78.17%)",
  406. tabIconFilter: "hue-rotate(320deg) saturate(1.4)",
  407. backgroundColor: "linear-gradient(to right, #C2185B, #2196F3)",
  408. backgroundColor1: "linear-gradient(to right, #FF4081, #FFD600)",
  409. buttonColor: "linear-gradient(to bottom, #FF4081, #C2185B)",
  410. activityBgColor: "linear-gradient(180deg, rgb(194, 24, 91), rgb(136, 14, 79) 99.237%)",
  411. backgroundColor2: "linear-gradient(180deg, rgba(194, 24, 91, 0.8), rgba(194, 24, 91, 0) 100%)",
  412. popupGradientColor: "#2a0a1a",
  413. selectBorderColor: "#FFD600",
  414. 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%)",
  415. iconAccentColor: "#FF4081",
  416. };
  417. // SelvaDourada (黄金丛林) - 丛林深绿 + 做旧金
  418. const selvaDouradaTheme = {
  419. ...defaultTheme,
  420. thirdColor: "#1E6B4F",
  421. fourthColor: "#0D3B2E",
  422. primaryColor: "#2E8B57",
  423. secondaryColor: "#1E6B4F",
  424. fiveColor: "#2E8B57",
  425. highlightColor: "#B8860B",
  426. accentColor: "#8B6914",
  427. negativeColor: "#0D3B2E",
  428. moneyColor: "#B8860B",
  429. goldColor: "#B8860B",
  430. coinColor: "#8B6914",
  431. linkColor: "#F4E9D8",
  432. textColor: "#F4E9D8",
  433. textLightColor: "#F4E9D8",
  434. mainBgColor: "#0D3B2E",
  435. darkColor: "#0a1f18",
  436. bodyBgColor: "#0a1f18",
  437. titleGradient: "linear-gradient(180deg, #B8860B 0%, #8B6914 100%)",
  438. bonusGradient: "linear-gradient(179deg, #DAA520 20.1%, #B8860B 46.83%, #8B6914 78.17%)",
  439. tabIconFilter: "hue-rotate(110deg) saturate(1.1)",
  440. backgroundColor: "linear-gradient(to right, #0D3B2E, #1E6B4F)",
  441. backgroundColor1: "linear-gradient(to right, #2E8B57, #1E6B4F)",
  442. buttonColor: "linear-gradient(to bottom, #B8860B, #8B6914)",
  443. activityBgColor: "linear-gradient(180deg, rgb(13, 59, 46), rgb(30, 107, 79) 99.237%)",
  444. backgroundColor2: "linear-gradient(180deg, rgba(13, 59, 46, 0.8), rgba(13, 59, 46, 0) 100%)",
  445. popupGradientColor: "#0a1f18",
  446. selectBorderColor: "#B8860B",
  447. 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%)",
  448. iconAccentColor: "#B8860B",
  449. };
  450. // OuroEoGol (黄金与进球) - 巴西绿 + 黄金黄 + 巴西蓝
  451. const ouroEoGolTheme = {
  452. ...defaultTheme,
  453. thirdColor: "#009739",
  454. fourthColor: "#006227",
  455. primaryColor: "#FFDF00",
  456. secondaryColor: "#009739",
  457. fiveColor: "#009739",
  458. highlightColor: "#FFDF00",
  459. accentColor: "#002776",
  460. negativeColor: "#009739",
  461. moneyColor: "#FFDF00",
  462. goldColor: "#FFDF00",
  463. coinColor: "#FFDF00",
  464. linkColor: "#FFFACD",
  465. textColor: "#FFFFFF",
  466. titleGradient: "linear-gradient(180deg, #FFDF00 0%, #009739 100%)",
  467. bonusGradient: "linear-gradient(179deg, #FFDF00 20.1%, #009739 46.83%, #002776 78.17%)",
  468. tabIconFilter: "hue-rotate(95deg) saturate(1.3)",
  469. backgroundColor: "linear-gradient(to right, #006227, #009739)",
  470. backgroundColor1: "linear-gradient(to right, #009739, #FFDF00)",
  471. buttonColor: "linear-gradient(to bottom, #FFDF00, #009739)",
  472. activityBgColor: "linear-gradient(180deg, rgb(0, 151, 57), rgb(0, 98, 39) 99.237%)",
  473. backgroundColor2: "linear-gradient(180deg, rgba(0, 151, 57, 0.8), rgba(0, 151, 57, 0) 100%)",
  474. popupGradientColor: "#0a2a15",
  475. selectBorderColor: "#FFDF00",
  476. 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%)",
  477. iconAccentColor: "#FFDF00",
  478. };
  479. // PraiaDaSorte (幸运海滩) - 夕阳橙 + 天空蓝 + 沙金色
  480. const praiaDaSorteTheme = {
  481. ...defaultTheme,
  482. thirdColor: "#FF6F3C",
  483. fourthColor: "#E85A2C",
  484. primaryColor: "#FFB4A2",
  485. secondaryColor: "#FF6F3C",
  486. fiveColor: "#FF6F3C",
  487. highlightColor: "#F4C07F",
  488. accentColor: "#00B4D8",
  489. negativeColor: "#FF6F3C",
  490. moneyColor: "#F4C07F",
  491. goldColor: "#F4C07F",
  492. coinColor: "#F4C07F",
  493. linkColor: "#FFD6CC",
  494. textColor: "#03045E",
  495. titleGradient: "linear-gradient(180deg, #FF6F3C 0%, #00B4D8 100%)",
  496. bonusGradient: "linear-gradient(179deg, #FFB4A2 20.1%, #F4C07F 46.83%, #00B4D8 78.17%)",
  497. tabIconFilter: "hue-rotate(10deg) saturate(1.2)",
  498. backgroundColor: "linear-gradient(to right, #FF6F3C, #00B4D8)",
  499. backgroundColor1: "linear-gradient(to right, #FFB4A2, #52B788)",
  500. buttonColor: "linear-gradient(to bottom, #FF6F3C, #E85A2C)",
  501. activityBgColor: "linear-gradient(180deg, rgb(255, 111, 60), rgb(0, 180, 216) 99.237%)",
  502. backgroundColor2: "linear-gradient(180deg, rgba(255, 111, 60, 0.8), rgba(255, 111, 60, 0) 100%)",
  503. popupGradientColor: "#2a1505",
  504. selectBorderColor: "#F4C07F",
  505. 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%)",
  506. iconAccentColor: "#00B4D8",
  507. };
  508. // FenixDourada (金凤凰) - 炭黑 + 深紫 + 火焰橙金
  509. const fenixDouradaTheme = {
  510. ...defaultTheme,
  511. thirdColor: "#6B0F3A",
  512. fourthColor: "#3A0CA3",
  513. primaryColor: "#FFB700",
  514. secondaryColor: "#FF5714",
  515. fiveColor: "#FF8C00",
  516. highlightColor: "#FFB700",
  517. accentColor: "#FF5714",
  518. negativeColor: "#6B0F3A",
  519. moneyColor: "#FFB700",
  520. goldColor: "#FFB700",
  521. coinColor: "#FF8C00",
  522. linkColor: "#FFE4B5",
  523. textColor: "#FFB700",
  524. textLightColor: "#FFE4B5",
  525. mainBgColor: "#0A0A0A",
  526. darkColor: "#0A0A0A",
  527. bodyBgColor: "#000000",
  528. titleGradient: "linear-gradient(180deg, #FFB700 0%, #FF5714 100%)",
  529. bonusGradient: "linear-gradient(179deg, #FFB700 20.1%, #FF8C00 46.83%, #FF5714 78.17%)",
  530. tabIconFilter: "hue-rotate(20deg) saturate(1.3) brightness(1.1)",
  531. backgroundColor: "linear-gradient(to right, #3A0CA3, #6B0F3A)",
  532. backgroundColor1: "linear-gradient(to right, #FF5714, #FFB700)",
  533. buttonColor: "linear-gradient(to bottom, #FFB700, #FF5714)",
  534. activityBgColor: "linear-gradient(180deg, rgb(58, 12, 163), rgb(107, 15, 58) 99.237%)",
  535. backgroundColor2: "linear-gradient(180deg, rgba(58, 12, 163, 0.8), rgba(10, 10, 10, 0) 100%)",
  536. popupGradientColor: "#1a0a2e",
  537. selectBorderColor: "#FFB700",
  538. gameMenuBg: "linear-gradient(180deg, rgba(58, 12, 163, 0.9) 0%, rgba(10, 10, 10, 0.95) 30%, rgba(0, 0, 0, 1) 100%)",
  539. iconAccentColor: "#FF5714",
  540. };
  541. // BRG77 (巴西主站) - 金币金 + 巴西绿 + 火焰红
  542. const brg77Theme = {
  543. ...defaultTheme,
  544. thirdColor: "#FFCC00",
  545. fourthColor: "#B8860B",
  546. primaryColor: "#FFD700",
  547. secondaryColor: "#FFCC00",
  548. fiveColor: "#FFCC00",
  549. highlightColor: "#FFD700",
  550. accentColor: "#E63946",
  551. negativeColor: "#E63946",
  552. moneyColor: "#FFCC00",
  553. goldColor: "#FFCC00",
  554. coinColor: "#FFD700",
  555. linkColor: "#FFF8DC",
  556. textColor: "#FFFFFF",
  557. titleGradient: "linear-gradient(180deg, #FFCC00 0%, #B8860B 100%)",
  558. bonusGradient: "linear-gradient(179deg, #FFD700 20.1%, #FFCC00 46.83%, #B8860B 78.17%)",
  559. tabIconFilter: "hue-rotate(40deg) saturate(1.3)",
  560. backgroundColor: "linear-gradient(to right, #009739, #FFCC00)",
  561. backgroundColor1: "linear-gradient(to right, #FFCC00, #E63946)",
  562. buttonColor: "linear-gradient(to bottom, #FFD700, #B8860B)",
  563. activityBgColor: "linear-gradient(180deg, rgb(0, 151, 57), rgb(255, 204, 0) 99.237%)",
  564. backgroundColor2: "linear-gradient(180deg, rgba(255, 204, 0, 0.8), rgba(255, 204, 0, 0) 100%)",
  565. popupGradientColor: "#1a1400",
  566. selectBorderColor: "#FFCC00",
  567. 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%)",
  568. iconAccentColor: "#E63946",
  569. };
  570. // ═══════════════════════════════════════════════════════
  571. // 区域配置(Region Config)
  572. // 每个品牌站点通过 "region" 字段引用对应的区域配置
  573. // 区域配置包含:可用语言、默认语言、API、电话区号、货币、时区等
  574. // ═══════════════════════════════════════════════════════
  575. const regions = {
  576. // 美国区域(默认区域)
  577. // languages / defaultLang 使用完整 BCP47 locale(en-US vs en-GB、pt-BR vs pt-PT 等),消除歧义
  578. "us": {
  579. "code": "us",
  580. "countryCode": "US",
  581. "locale": "en-US",
  582. "languages": ["en-US", "es-MX"],
  583. "defaultLang": "en-US",
  584. "api": "https://api1.usvip.org/",
  585. "apiHost": "api1.usvip.org",
  586. "ws": "wss://api1.usvip.org:10000",
  587. "wsPort": 10000,
  588. "phoneCode": "+1",
  589. "currency": "USD",
  590. "currencySymbol": "$",
  591. "timezone": "America/New_York",
  592. "dateFormat": "MM/DD/YYYY",
  593. "numberFormat": "en-US",
  594. "supportEmailDomain": "usslot777.com",
  595. "titleSuffix": "Online Slots & Real Money Games"
  596. },
  597. // 巴西区域
  598. "br": {
  599. "code": "br",
  600. "countryCode": "BR",
  601. "locale": "pt-BR",
  602. "languages": ["pt-BR", "en-US"],
  603. "defaultLang": "pt-BR",
  604. "api": "https://brapi24680.vipsvip.org/",
  605. "apiHost": "brapi24680.vipsvip.org",
  606. "ws": "wss://brapi24680.vipsvip.org:10000",
  607. "wsPort": 10000,
  608. "phoneCode": "+55",
  609. "currency": "BRL",
  610. "currencySymbol": "R$",
  611. "timezone": "America/Sao_Paulo",
  612. "dateFormat": "DD/MM/YYYY",
  613. "numberFormat": "pt-BR",
  614. "supportEmailDomain": "24680.com",
  615. "titleSuffix": "Slots Online & Jogos com Dinheiro Real"
  616. },
  617. // 墨西哥区域(预留,业务 APP_COUNTRY_CODE.MX)
  618. "mx": {
  619. "code": "mx",
  620. "countryCode": "MX",
  621. "locale": "es-MX",
  622. "languages": ["es-MX", "en-US"],
  623. "defaultLang": "es-MX",
  624. "api": "https://api1.usvip.org/",
  625. "apiHost": "api1.usvip.org",
  626. "ws": "wss://api1.usvip.org:10000",
  627. "wsPort": 10000,
  628. "phoneCode": "+52",
  629. "currency": "MXN",
  630. "currencySymbol": "$",
  631. "timezone": "America/Mexico_City",
  632. "dateFormat": "DD/MM/YYYY",
  633. "numberFormat": "es-MX",
  634. "titleSuffix": "Tragamonedas Online y Juegos con Dinero Real"
  635. },
  636. // 俄罗斯区域(预留)
  637. "ru": {
  638. "code": "ru",
  639. "countryCode": "RU",
  640. "locale": "ru-RU",
  641. "languages": ["ru-RU", "en-US"],
  642. "defaultLang": "ru-RU",
  643. "api": "https://api1.usvip.org/",
  644. "apiHost": "api1.usvip.org",
  645. "ws": "wss://api1.usvip.org:10000",
  646. "wsPort": 10000,
  647. "phoneCode": "+7",
  648. "currency": "RUB",
  649. "currencySymbol": "₽",
  650. "timezone": "Europe/Moscow",
  651. "dateFormat": "DD.MM.YYYY",
  652. "numberFormat": "ru-RU",
  653. "titleSuffix": "Онлайн-слоты и игры на реальные деньги"
  654. },
  655. // 欧盟区域(预留)
  656. // 注意:pt-PT 是葡萄牙本土葡语,与 pt-BR 不同;当前仅有 pt-BR 语言包,如需 pt-PT 需另建 pt_PT.json
  657. "eu": {
  658. "code": "eu",
  659. "countryCode": "EU",
  660. "locale": "en-GB",
  661. "languages": ["en-GB", "es-ES", "pt-PT"],
  662. "defaultLang": "en-GB",
  663. "api": "https://api1.usvip.org/",
  664. "apiHost": "api1.usvip.org",
  665. "ws": "wss://api1.usvip.org:10000",
  666. "wsPort": 10000,
  667. "phoneCode": "+44",
  668. "currency": "EUR",
  669. "currencySymbol": "€",
  670. "timezone": "Europe/London",
  671. "dateFormat": "DD/MM/YYYY",
  672. "numberFormat": "en-GB",
  673. "titleSuffix": "Online Slots & Real Money Games"
  674. }
  675. };
  676. // 默认区域(site_config 未指定 region 时使用)
  677. const DEFAULT_REGION = "us";
  678. const sites_config = {
  679. // ========== 品牌站点配置 ==========
  680. // 根据 logo 颜色分析选择主题
  681. // ========== 巴西品牌站点配置 (pt-BR) ==========
  682. // BRG77 - 巴西默认主站(金币金 + 巴西绿 + 火焰红)
  683. "br24680": {
  684. "title": "24680.com Cassino tradicional com dinheiro real",
  685. "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.",
  686. "product": "24680",
  687. "product_id": "37",
  688. "logo": `/${res_path}/logos/24680.webp`,
  689. "icon": `/${res_path}/icons/24680.webp`,
  690. "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>`,
  691. "region": "br",
  692. "theme": ouroEoGolTheme
  693. },
  694. }
  695. /** 从当前 path 解析 s_k_c 前缀(/s_k_c 或 /s_k_c/xxx),无则返回空字符串 */
  696. const getPathPrefix = () => {
  697. const pathname = window.location.pathname || "";
  698. const m = pathname.match(/^\/([a-zA-Z0-9]+)_(\d+)(?:\/.*)?$/);
  699. return m ? `/${m[1]}_${m[2]}` : "";
  700. };
  701. const geyCommonJSON = () => {
  702. const origin = window.location.origin;
  703. const pathPrefix = getPathPrefix();
  704. const beginurl=origin+"/";
  705. const siteurl = pathPrefix ? origin + pathPrefix + "/" : origin + "/";
  706. const lkey="LOCAL_START_PARAMS";
  707. let search=window.location.search;
  708. const params = new URLSearchParams(search);
  709. if (params.has("c")){
  710. localStorage.setItem(lkey,search);
  711. }
  712. else {
  713. let lsearch=localStorage.getItem(lkey);
  714. if (lsearch==null&&search!=="")localStorage.setItem(lkey,search);
  715. search=lsearch || search;
  716. }
  717. const start_url = siteurl + (search || "");
  718. const site_conf=getSiteConfig();
  719. const icon_path=site_conf.icon;
  720. let dir="product";
  721. if(site_conf.region==="br")dir="product_br";
  722. return {
  723. name: '',
  724. short_name: '',
  725. description: '',
  726. id: './',
  727. start_url: start_url,
  728. scope: './',
  729. display: 'standalone',
  730. background_color: '#2e303f',
  731. theme_color: '#2e303f',
  732. icons: [
  733. {
  734. src: `${beginurl}${icon_path}`,
  735. sizes: '192x192',
  736. type: 'image/png',
  737. purpose: 'any maskable'
  738. }
  739. ],
  740. screenshots: [
  741. {
  742. src: `${beginurl}/${res_path}/${dir}/wide.webp`,
  743. sizes: '600x338',
  744. type: 'image/jpg',
  745. form_factor: 'wide'
  746. },
  747. {
  748. src: `${beginurl}/${res_path}/${dir}/1.webp`,
  749. sizes: '320x585',
  750. type: 'image/png'
  751. },
  752. {
  753. src: `${beginurl}/${res_path}/${dir}/2.webp`,
  754. sizes: '320x585',
  755. type: 'image/png'
  756. },
  757. {
  758. src: `${beginurl}/${res_path}/${dir}/3.webp`,
  759. sizes: '320x585',
  760. type: 'image/png'
  761. },
  762. {
  763. src: `${beginurl}/${res_path}/${dir}/4.webp`,
  764. sizes: '320x585',
  765. type: 'image/png'
  766. },
  767. {
  768. src: `${beginurl}/${res_path}/${dir}/5.webp`,
  769. sizes: '320x585',
  770. type: 'image/png'
  771. }
  772. ],
  773. protocol_handlers:[
  774. {
  775. protocol:'web+usslot',
  776. url:`${siteurl}?launchedfrom=homescreen&pwaprotocolredirect=%s`
  777. }
  778. ]
  779. };
  780. };
  781. const getSettings = async () => {
  782. const {origin,pathname}=window.location
  783. // const url = window.location.href.replace(/\blandingpage\d*\.html\b/, 'manifest.json');
  784. // const url =origin+pathname.substring(0,pathname.lastIndexOf('/'))+ '/manifest.json'
  785. // const response = await fetch(url);
  786. // if (!response.ok) {
  787. // console.error('获取manifest文件失败!');
  788. // return;
  789. // }
  790. // const content = await response.json();
  791. const defaultContent = geyCommonJSON();
  792. const settings = Object.assign(defaultContent, {
  793. name: window.themeConfig.title,
  794. short_name: window.themeConfig.title,
  795. description: window.themeConfig.subtitle,
  796. lang: window.themeConfig.lang || 'en'
  797. });
  798. return settings;
  799. };
  800. const getSitePrefix=()=>{
  801. const hostname = window.location.hostname;
  802. const parts = hostname.split('.');
  803. if (parts[0]==="www")parts.shift();
  804. return parts[0];
  805. }
  806. const getSiteConfig=()=>{
  807. let prefix=getSitePrefix();
  808. if(location.hostname.includes("localhost"))prefix="br24680" // 正式环境删除此行,使用 getSitePrefix() 返回值
  809. const conf=sites_config[prefix] || sites_config["br24680"];
  810. // 合并区域配置:site.region → regions[region] → 写回到 site.regionConfig
  811. const regionKey = conf.region || DEFAULT_REGION;
  812. const regionConf = regions[regionKey] || regions[DEFAULT_REGION];
  813. // lang 优先级:site.lang > region.defaultLang
  814. conf.region = regionKey;
  815. conf.regionConfig = regionConf;
  816. conf.lang = conf.lang || regionConf.defaultLang;
  817. conf.api = conf.api || regionConf.api;
  818. conf.ws = conf.ws || regionConf.ws;
  819. return conf;
  820. }
  821. const applyTheme=(theme = {})=>{
  822. const root = document.documentElement;
  823. if (theme!=null){
  824. for (let key in theme) {
  825. root.style.setProperty(`--${key}`, theme[key]);
  826. }
  827. }
  828. }
  829. const applyPageMeta=()=>{
  830. const lang = window.themeConfig?.lang || 'en';
  831. const region = window.themeConfig?.regionConfig;
  832. // 设置 html lang 属性(优先使用完整 locale,如 pt-BR)
  833. document.documentElement.lang = region?.locale || lang;
  834. // 设置页面标题(使用区域配置的标题后缀)
  835. if (window.themeConfig?.title) {
  836. const titleSuffix = region?.titleSuffix || 'Online Slots & Real Money Games';
  837. document.title = `${window.themeConfig.title} | ${titleSuffix}`;
  838. }
  839. // 设置 favicon
  840. if (window.themeConfig?.favicon) {
  841. let favicon = document.querySelector('link[rel="icon"]');
  842. if (favicon) {
  843. favicon.href = window.themeConfig.favicon;
  844. }
  845. }
  846. // 设置 og:site_name
  847. let ogSiteName = document.querySelector('meta[property="og:site_name"]');
  848. if (ogSiteName && window.themeConfig?.title) {
  849. ogSiteName.setAttribute('content', window.themeConfig.title);
  850. }
  851. }
  852. const initSiteConfig= ()=>{
  853. window.themeConfig=getSiteConfig();
  854. applyTheme(window.themeConfig.theme);
  855. applyPageMeta();
  856. applyInitialLoading();
  857. }
  858. // 设置首屏 Loading 的 logo 和主题色
  859. const applyInitialLoading = () => {
  860. const logo = document.getElementById('initial-logo');
  861. if (logo && window.themeConfig?.logo) {
  862. logo.src = window.themeConfig.logo;
  863. }
  864. // 更新 loading 圆圈的主题色
  865. const loading = document.getElementById('initial-loading');
  866. if (loading && window.themeConfig?.theme?.highlightColor) {
  867. const spinner = loading.querySelector('div:last-of-type');
  868. if (spinner) {
  869. spinner.style.borderTopColor = window.themeConfig.theme.highlightColor;
  870. }
  871. }
  872. }
  873. // 隐藏首屏 Loading(React 应用加载完成后调用)
  874. window.hideInitialLoading = () => {
  875. const loading = document.getElementById('initial-loading');
  876. if (loading) {
  877. loading.style.opacity = '0';
  878. loading.style.transition = 'opacity 0.3s ease';
  879. setTimeout(() => loading.remove(), 300);
  880. }
  881. }
  882. const load = async () => {
  883. initSiteConfig();
  884. const settings = await getSettings();
  885. const str = JSON.stringify(settings, null, 2);
  886. // console.log(settings, str);
  887. let i = document.querySelector('link[rel="manifest"]');
  888. if (!i) {
  889. i = document.createElement('link');
  890. i.rel = 'manifest';
  891. document.head.appendChild(i);
  892. }
  893. i.href = 'data:text/json;charset=utf-8,' + encodeURIComponent(str);
  894. };
  895. load();
  896. })();