constant.dart
5.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
import 'package:appframe/config/env_config.dart';
class Constant {
/// local server 相关
/// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///
/// 应用内部 http 服务
///
// static const String localServerHost = 'appdev-xj.banxiaoer.net';
static const String localServerHost = '127.0.0.1';
static int localServerPort = 35982;
static const localServerPortOption = [35982, 35983, 35984];
static String localServerUrl = 'http://$localServerHost:$localServerPort';
static String localFileUrl = 'http://127.0.0.1:$localServerPort';
static const String localServerTemp = '/temp';
static String localServerTempFileUrl = '$localFileUrl$localServerTemp';
static const String localServerTest = '/test';
static String localServerTestFileUrl = '$localFileUrl$localServerTest';
/// obs 相关
/// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///
/// obs文件分片上传的分片大小:5M
static const int obsUploadChunkSize = 1024 * 1024 * 1;
/// obs文件上传的逻辑前缀
static const String obsLogicPrefix = EnvConfig.env == 'dev' ? 'd2/pridel/user/' : 'p2/unpridel/user/';
// 定义obs存储业务上的关键业务类型,属于这种类型的业务,在存储上区分其分属于何种删除规则
static const List<String> obsPridelFileConfigs = [
'homework',
'clockin',
'clock',
'clazzclock',
'clockinQcard',
'recite',
'aloud',
'hurdle',
'tbx',
'txbb',
'dictation',
'xegd',
'kouyu'
];
/// 版本相关
/// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///
/// app 版本号
///
/// 实际取值来源于 pubspec.yaml 的 version 字段,
/// 在 main.dart 中通过 package_info_plus 读取后赋值;
/// EnvConfig.version 仅作为读取失败时的兜底默认值。
static String appVersion = EnvConfig.version;
/// H5的起始终最低版本号规则
static String h5Version = '0.2.6';
/// H5的版本号存储的key
static const String h5VersionKey = 'h5_version';
/// 用于显示的H5版本号存储的key
static const String h5ShowVersionKey = 'h5_show_version';
/// H5版本号配置文件地址
static const String configUrl = EnvConfig.env == 'dev'
? 'https://bxe-obs.banxiaoer.com/fronts/material/xehybrid/assets/develop/xeapp_conf_dev.json'
// ? 'https://bxe-obs.banxiaoer.com/conf/xeapp_conf_dev.json'
// ? 'http://192.168.2.177/xeapp_conf_dev.json'
: 'https://bxe-obs.banxiaoer.com/conf/xeapp_conf_pro.json';
/// Android APP 最新版本配置地址(用于 APP 自动更新)
/// APP 自动更新轮询间隔
static const Duration appUpgradeCheckInterval = Duration(minutes: 5);
/// APP 自动更新时,下载到本地的 APK 缓存子目录
static const String appUpgradeApkDir = 'app_upgrade';
/// 内部 H5 dist 目录
static const String h5DistDir = 'http_dist_assets';
/// BASE URL 相关
/// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///
static const String bxeBaseUrl = EnvConfig.env == 'dev' ? 'https://dev.banxiaoer.net' : 'https://bxr.banxiaoer.com';
static const String iotAppBaseUrl =
EnvConfig.env == 'dev' ? 'https://iotapp-dev.banxiaoer.com/iotapp' : 'https://iotapp.banxiaoer.com/iotapp';
// static const String iotAppBaseUrl ='http://192.168.2.124:8080/iotapp';
/// 微信登录相关
/// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///
static const String wxAppId = 'wx8c32ea248f0c7765';
static const String universalLink = 'https://dev.banxiaoer.net/path/to/wechat/';
/// IM 相关
/// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///
/// IM SDK
// static const int imSdkAppId = EnvConfig.env == 'dev' ? 1400310691 : 1600117207;
// static const String imClientSecure = EnvConfig.env == 'dev'
// ? 'kM4yqbehB3io9UiLvH6eHvM7xAhfYxoyyaO1tLoHgKltcaI7MZXkUbpFaWdeQIqe'
// : 'GkMkhAnrCThYrZxApCBdFidcAC8USwVnhoqMGzqmSvmcegRCvETtDR2Te9btarnG';
static const int imSdkAppId = 1400310691; // 线上只保留这个实例
static const String imClientSecure = 'kM4yqbehB3io9UiLvH6eHvM7xAhfYxoyyaO1tLoHgKltcaI7MZXkUbpFaWdeQIqe';
// 苹果是根据发布环境来确定是采用什么推送
static const int apnsCertificateID = EnvConfig.apnsEnv == 'product'? 47804:47801;
/// Key
/// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///
static const String classIdSetKey = 'auth_class_ids';
/// 隐私政策相关
/// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///
/// 首次打开登录页面时,是否已显示个人信息收集提示
static const String hasShownPrivacyFirstTimeKey = 'has_shown_privacy_first_time';
/// 测试阶段使用
static const bool needIM = true;
static const bool needUpgrade = true;
}