初始化
This commit is contained in:
Executable
+56
@@ -0,0 +1,56 @@
|
||||
///错误编码
|
||||
// ignore_for_file: constant_identifier_names
|
||||
|
||||
class Code {
|
||||
///网络异常
|
||||
static const NETWORK_ERROR = 2001;
|
||||
|
||||
///网络超时
|
||||
static const NETWORK_TIMEOUT = 2002;
|
||||
|
||||
///无网络
|
||||
static const LOCAL_NO_NETWORK = 2003;
|
||||
|
||||
///取消请求
|
||||
static const LOCAL_CANCEL_REQUEST = 2004;
|
||||
|
||||
///账号被封禁
|
||||
static const ACCOUNT_INVISIBLE = 1000;
|
||||
|
||||
///数据返回异常
|
||||
static const PARSE_DATE_ERROR = 1001;
|
||||
|
||||
///需要进行强制更新
|
||||
static const FORCE_UPDATE_VERSION = 1006;
|
||||
|
||||
///token异常
|
||||
static const TOKEN_ABNORMAL = 5009;
|
||||
|
||||
///验证码1分钟重复异常
|
||||
static const VERIFY_CODE_REPEAT = 5007;
|
||||
|
||||
///重放请求(同一个 X-Request-ID 换了业务参数)
|
||||
static const REPLAY_ATTACK = 4009;
|
||||
|
||||
///参数错误 / 资源不存在或已下架
|
||||
static const PARAM_INVALID = 4001;
|
||||
|
||||
///扣次事务失败、结果不确定:必须用**同一个** X-Request-ID 重试,换新 id 会重复扣
|
||||
static const CHARGE_UNCERTAIN = 5003;
|
||||
|
||||
///钱包下载次数不足
|
||||
static const NOT_ENOUGH_DOWNLOAD = 7017;
|
||||
|
||||
///金币余额不足
|
||||
static const NOT_ENOUGH_MONEY = 8000;
|
||||
|
||||
///重复购买(视为已解锁)
|
||||
static const REPEAT_BUY = 8005;
|
||||
|
||||
static const SUCCESS = 200;
|
||||
}
|
||||
|
||||
///错误文案
|
||||
class Lang {
|
||||
static const PARSE_DATE_ERROR = '数据返回异常';
|
||||
}
|
||||
Reference in New Issue
Block a user