Commit 123edb66 by Administrator

入口区分

1 parent 790ce248
...@@ -223,15 +223,23 @@ class WebCubit extends Cubit<WebState> { ...@@ -223,15 +223,23 @@ class WebCubit extends Cubit<WebState> {
// 启动本地服务器 // 启动本地服务器
_server = await LocalServerService().startLocalServer(); _server = await LocalServerService().startLocalServer();
final String serverUrl; String serverUrl;
if (state.sessionCode == null || state.sessionCode == '') { if (state.sessionCode == null || state.sessionCode == '') {
serverUrl = '${Constant.localServerTestFileUrl}/login.html'; if (Platform.isAndroid || Platform.isIOS) {
serverUrl = '${Constant.localServerUrl}/login.html';
}else if (Platform.isMacOS){
serverUrl = '${Constant.localServerUrl}/index.html';
}else{
serverUrl = '${Constant.localServerUrl}/login.html';
}
// serverUrl = '${Constant.localServerTestFileUrl}/test2.html'; // serverUrl = '${Constant.localServerTestFileUrl}/test2.html';
} else { } else {
serverUrl = serverUrl =
'http://${state.ip}:${_server.port}/index.html#/h5/login/pages/applogin?sessionCode=${state.sessionCode}&userCode=${state.userCode}&classCode=${state.classCode}&userType=${state.userType}&stuId=${state.stuId}'; 'http://${state.ip}:${_server.port}/index.html#/h5/login/pages/applogin?sessionCode=${state.sessionCode}&userCode=${state.userCode}&classCode=${state.classCode}&userType=${state.userType}&stuId=${state.stuId}';
} }
serverUrl = '${Constant.localServerUrl}/index.html';
_controller.loadRequest(Uri.parse(serverUrl)); _controller.loadRequest(Uri.parse(serverUrl));
} }
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!