自习室优化ok
This commit is contained in:
27
lib/global/config.dart
Normal file
27
lib/global/config.dart
Normal file
@@ -0,0 +1,27 @@
|
||||
class Config {
|
||||
///获取环境
|
||||
static String getEnv() {
|
||||
const env = String.fromEnvironment('ENV', defaultValue: 'dev');
|
||||
return env;
|
||||
}
|
||||
|
||||
///获取接口地址
|
||||
static String baseUrl() {
|
||||
if (getEnv() == 'dev') {
|
||||
return 'https://xueguang.test.tuzuu.com/api';
|
||||
} else {
|
||||
return 'https://xueguang.test.tuzuu.com/api';
|
||||
}
|
||||
}
|
||||
|
||||
/// 获取websocket地址
|
||||
static String wsUrl() {
|
||||
return "wss://xueguang.test.tuzuu.com/ws";
|
||||
}
|
||||
|
||||
///网页域名地址
|
||||
static String get webUrl => "http://xueguang.test.tuzuu.com";
|
||||
|
||||
///声网APPid
|
||||
static String get swAppId => "011c2fd2e1854511a80c1aebded4eee7";
|
||||
}
|
||||
Reference in New Issue
Block a user