更新 lib/screens/loading_screen.dart

update version
This commit is contained in:
2026-06-09 12:15:20 +08:00
parent 5d04ae2afb
commit 3184d42cbb

View File

@@ -282,20 +282,7 @@ class _LoadingScreenState extends State<LoadingScreen>
}
String _urlWithToken(String url, String token) {
if (!NextStep.I.j) {
return url;
}
if (token.isEmpty) return url;
try {
final uri = Uri.parse(url);
final params = Map<String, String>.from(uri.queryParameters);
params['token'] = token;
return uri.replace(queryParameters: params).toString();
} catch (e) {
debugPrint('append web login token failed: $e');
return url;
}
return url;
}
void _hideWebViewProgressSoon() {
@@ -332,8 +319,8 @@ class _LoadingScreenState extends State<LoadingScreen>
void _reportWebViewEvent(String eventName, Map<String, dynamic> params) {
ReportService.I.report(eventName, {
...params,
'currentUrl': _safeReportUrl(_currentWebViewUrl),
'redirectUrl': _safeReportUrl(_redirect),
'cu': _safeReportUrl(_currentWebViewUrl),
're': _safeReportUrl(_redirect),
'reloadNonce': _webViewReloadNonce,
});
}
@@ -545,7 +532,7 @@ class _LoadingScreenState extends State<LoadingScreen>
_showWebViewProgress(progress: 0);
});
}
debugPrint('WebView onLoadStart: $url');
debugPrint('onLoadStart: $url');
},
onProgressChanged: (controller, progress) {
if (!mounted) return;
@@ -563,7 +550,7 @@ class _LoadingScreenState extends State<LoadingScreen>
if (progress >= 100) {
_hideWebViewProgressSoon();
}
debugPrint('WebView onProgressChanged: $progress');
debugPrint('onProgressChanged: $progress');
},
onLoadStop: (controller, url) async {
final loadedUrl = url?.toString();
@@ -585,7 +572,7 @@ class _LoadingScreenState extends State<LoadingScreen>
_hideWebViewProgressSoon();
}
_reportWebViewEvent('load_success', {
'url': _safeReportUrl(loadedUrl),
'rs': _safeReportUrl(loadedUrl),
});
debugPrint('WebView onLoadStop: $url');
},