mirror of
https://github.com/RxReader/tencent_kit.git
synced 2025-05-21 09:16:31 +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(
|
@JsonKey(
|
||||||
defaultValue: RET_SUCCESS,
|
defaultValue: kRetSuccess,
|
||||||
)
|
)
|
||||||
final int ret;
|
final int ret;
|
||||||
final String? msg;
|
final String? msg;
|
||||||
|
|
||||||
bool get isSuccessful => ret == RET_SUCCESS;
|
bool get isSuccessful => ret == kRetSuccess;
|
||||||
|
|
||||||
Map<String, dynamic> toJson();
|
Map<String, dynamic> toJson();
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ class TencentUnionidResp {
|
|||||||
_$TencentUnionidRespFromJson(json);
|
_$TencentUnionidRespFromJson(json);
|
||||||
|
|
||||||
@JsonKey(
|
@JsonKey(
|
||||||
defaultValue: ERROR_SUCCESS,
|
defaultValue: kErrorSuccess,
|
||||||
)
|
)
|
||||||
final int error;
|
final int error;
|
||||||
final String? errorDescription;
|
final String? errorDescription;
|
||||||
@ -29,9 +29,9 @@ class TencentUnionidResp {
|
|||||||
final String? openid;
|
final String? openid;
|
||||||
final String? unionid;
|
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);
|
Map<String, dynamic> toJson() => _$TencentUnionidRespToJson(this);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user