mirror of
https://github.com/RxReader/tencent_kit.git
synced 2025-05-17 15:26:37 +08:00
feature 5.0.0
This commit is contained in:
@ -12,15 +12,15 @@ abstract class TencentApiResp {
|
||||
|
||||
/// 网络请求成功发送至服务器,并且服务器返回数据格式正确
|
||||
/// 这里包括所请求业务操作失败的情况,例如没有授权等原因导致
|
||||
static const int RET_SUCCESS = 0;
|
||||
static const int kRetSuccess = 0;
|
||||
|
||||
@JsonKey(
|
||||
defaultValue: RET_SUCCESS,
|
||||
defaultValue: kRetSuccess,
|
||||
)
|
||||
final int ret;
|
||||
final String? msg;
|
||||
|
||||
bool get isSuccessful => ret == RET_SUCCESS;
|
||||
bool get isSuccessful => ret == kRetSuccess;
|
||||
|
||||
Map<String, dynamic> toJson();
|
||||
|
||||
|
@ -21,7 +21,7 @@ class TencentUnionidResp {
|
||||
_$TencentUnionidRespFromJson(json);
|
||||
|
||||
@JsonKey(
|
||||
defaultValue: ERROR_SUCCESS,
|
||||
defaultValue: kErrorSuccess,
|
||||
)
|
||||
final int error;
|
||||
final String? errorDescription;
|
||||
@ -29,9 +29,9 @@ class TencentUnionidResp {
|
||||
final String? openid;
|
||||
final String? unionid;
|
||||
|
||||
static const int ERROR_SUCCESS = 0;
|
||||
static const int kErrorSuccess = 0;
|
||||
|
||||
bool get isSuccessful => error == ERROR_SUCCESS;
|
||||
bool get isSuccessful => error == kErrorSuccess;
|
||||
|
||||
Map<String, dynamic> toJson() => _$TencentUnionidRespToJson(this);
|
||||
|
||||
|
Reference in New Issue
Block a user