Commit 50c66ad6982cf746b20e6164fc3b9870b9271ee4
1 parent
b85c8854
feat:开发环境配置文件
Showing
3 changed files
with
9 additions
and
6 deletions
lib/common/core/app_consts.dart
1 | -import 'package:flutter/foundation.dart'; | |
1 | +import '../request/basic_config.dart'; | |
2 | 2 | |
3 | 3 | class AppConsts { |
4 | 4 | /// 隐私协议 |
... | ... | @@ -11,7 +11,7 @@ class AppConsts { |
11 | 11 | static const String userTermSdkUrl = 'http://page.kouyuxingqiu.com/term_sdk.html'; |
12 | 12 | |
13 | 13 | /// 先声SDK |
14 | - static const String xsAppKey = kDebugMode?'t418':'a418'; | |
15 | - static const String xsAppSecretKey = kDebugMode?'1a16f31f2611bf32fb7b3fc38f5b2c81':'c11163aa6c834a028da4a4b30955be99'; | |
16 | - static const String xsAppService = kDebugMode?'':'"wss://api.cloud.ssapi.cn'; | |
14 | + static String xsAppKey = BasicConfig().devTest?'t418':'a418'; | |
15 | + static String xsAppSecretKey = BasicConfig().devTest?'1a16f31f2611bf32fb7b3fc38f5b2c81':'c11163aa6c834a028da4a4b30955be99'; | |
16 | + static String xsAppService = BasicConfig().devTest?'':'"wss://api.cloud.ssapi.cn'; | |
17 | 17 | } | ... | ... |
lib/common/request/basic_config.dart
0 → 100644
lib/common/request/config.dart
1 | -import 'package:flutter/foundation.dart'; | |
1 | +import 'package:wow_english/common/request/basic_config.dart'; | |
2 | 2 | |
3 | 3 | ///request config |
4 | 4 | class RequestConfig { |
5 | 5 | static String baseUrlDev = 'http://wow-app.dev.kouyuxingqiu.com/'; |
6 | 6 | static String baseUrlProd = 'http://app-api.pro.kouyuxingqiu.com/'; |
7 | - static String baseUrl = kDebugMode ? baseUrlDev : baseUrlProd; | |
7 | + static String baseUrl = BasicConfig().devTest ? baseUrlDev : baseUrlProd; | |
8 | 8 | |
9 | 9 | static const connectTimeout = Duration(seconds: 15); |
10 | 10 | static const successCode = 200; | ... | ... |