支持现场服务器地址配置
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import 'dart:convert';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:maibu_satabot_v2/core/env/env_config.dart';
|
||||
import 'package:maibu_satabot_v2/core/env/server_configuration.dart';
|
||||
import 'package:maibu_satabot_v2/core/localization/app_localizations.dart';
|
||||
import 'package:maibu_satabot_v2/core/router/route_paths.dart';
|
||||
import 'package:webview_flutter/webview_flutter.dart';
|
||||
@@ -25,7 +27,12 @@ class _DjPageState extends State<DjPage> {
|
||||
void initState() {
|
||||
super.initState();
|
||||
|
||||
final url = "https://pvs.satabot.com/?platform=flutter&t=${DateTime.now().millisecondsSinceEpoch}";
|
||||
final url = EnvConfig.address(ServerService.stationWeb).replace(
|
||||
queryParameters: {
|
||||
'platform': 'flutter',
|
||||
't': DateTime.now().millisecondsSinceEpoch.toString(),
|
||||
},
|
||||
);
|
||||
|
||||
controller = WebViewController()
|
||||
..setJavaScriptMode(JavaScriptMode.unrestricted)
|
||||
@@ -35,7 +42,7 @@ class _DjPageState extends State<DjPage> {
|
||||
_handleJsMessage(message.message);
|
||||
},
|
||||
)
|
||||
..loadRequest(Uri.parse(url));
|
||||
..loadRequest(url);
|
||||
}
|
||||
|
||||
/// 处理 H5 返回的数据
|
||||
|
||||
Reference in New Issue
Block a user