feat: 移除 H5 URL 中的品牌参数和缓存参数;更新测试用例以反映更改

This commit is contained in:
Booker
2026-05-26 20:20:01 +07:00
parent 2eef27a0e1
commit 1e19f5f5f8
3 changed files with 11 additions and 48 deletions

View File

@@ -21,14 +21,14 @@ class AppConfig {
final host = environmentHosts.isNotEmpty
? environmentHosts.first
: 'h5-im.imharry.work';
return withFreshShellParams(_normalizeHomeUrl(host));
return _normalizeHomeUrl(host);
}
static String withFreshShellParams(String url) {
final uri = Uri.parse(url);
final queryParameters = Map<String, String>.from(uri.queryParameters)
..['flutter_shell'] = '1'
..['shell_cache_bust'] = DateTime.now().millisecondsSinceEpoch.toString();
final queryParameters = Map<String, String>.from(uri.queryParameters);
queryParameters.remove('flutter_shell');
queryParameters.remove('shell_cache_bust');
queryParameters.remove('shell_app_name');
queryParameters.remove('shell_app_logo');
final fragmentParameters = Uri.splitQueryString(uri.fragment);