mirror of
https://github.com/RxReader/tencent_kit.git
synced 2025-06-20 02:21:51 +08:00
整理
This commit is contained in:
@ -4,8 +4,8 @@ import 'dart:io';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_cache_manager/flutter_cache_manager.dart';
|
||||
import 'package:tencent_kit/tencent_kit.dart';
|
||||
import 'package:tencent_kit_example/model/api/tencent_user_info_resp.dart';
|
||||
import 'package:tencent_kit_example/model/unionid/tencent_unionid_resp.dart';
|
||||
import 'package:tencent_kit_example/model/tencent_api_resp.dart';
|
||||
import 'package:tencent_kit_example/model/tencent_unionid_resp.dart';
|
||||
import 'package:tencent_kit_example/tencent.dart';
|
||||
|
||||
const String _TENCENT_APPID = 'your tencent appId';
|
||||
|
@ -1,20 +0,0 @@
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
|
||||
abstract class TencentApiResp {
|
||||
const TencentApiResp({
|
||||
required this.ret,
|
||||
this.msg,
|
||||
});
|
||||
|
||||
/// 网络请求成功发送至服务器,并且服务器返回数据格式正确
|
||||
/// 这里包括所请求业务操作失败的情况,例如没有授权等原因导致
|
||||
static const int RET_SUCCESS = 0;
|
||||
|
||||
@JsonKey(
|
||||
defaultValue: RET_SUCCESS,
|
||||
)
|
||||
final int ret;
|
||||
final String? msg;
|
||||
|
||||
bool get isSuccessful => ret == RET_SUCCESS;
|
||||
}
|
@ -1,7 +1,25 @@
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
import 'package:tencent_kit_example/model/api/tencent_api_resp.dart';
|
||||
|
||||
part 'tencent_user_info_resp.g.dart';
|
||||
part 'tencent_api_resp.g.dart';
|
||||
|
||||
abstract class TencentApiResp {
|
||||
const TencentApiResp({
|
||||
required this.ret,
|
||||
this.msg,
|
||||
});
|
||||
|
||||
/// 网络请求成功发送至服务器,并且服务器返回数据格式正确
|
||||
/// 这里包括所请求业务操作失败的情况,例如没有授权等原因导致
|
||||
static const int RET_SUCCESS = 0;
|
||||
|
||||
@JsonKey(
|
||||
defaultValue: RET_SUCCESS,
|
||||
)
|
||||
final int ret;
|
||||
final String? msg;
|
||||
|
||||
bool get isSuccessful => ret == RET_SUCCESS;
|
||||
}
|
||||
|
||||
@JsonSerializable(
|
||||
explicitToJson: true,
|
||||
@ -62,7 +80,7 @@ class TencentUserInfoResp extends TencentApiResp {
|
||||
name: 'figureurl_qq_2',
|
||||
)
|
||||
final String?
|
||||
figureurlQq2; // 大小为100×100像素的QQ头像URL。需要注意,不是所有的用户都拥有QQ的100x100的头像,但40x40像素则是一定会有。
|
||||
figureurlQq2; // 大小为100×100像素的QQ头像URL。需要注意,不是所有的用户都拥有QQ的100x100的头像,但40x40像素则是一定会有。
|
||||
final String? figureurlType;
|
||||
final String? isYellowVip;
|
||||
final String? vip;
|
@ -1,6 +1,6 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'tencent_user_info_resp.dart';
|
||||
part of 'tencent_api_resp.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
@ -3,8 +3,8 @@ import 'dart:convert';
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:tencent_kit/tencent_kit.dart';
|
||||
import 'package:tencent_kit_example/model/api/tencent_user_info_resp.dart';
|
||||
import 'package:tencent_kit_example/model/unionid/tencent_unionid_resp.dart';
|
||||
import 'package:tencent_kit_example/model/tencent_api_resp.dart';
|
||||
import 'package:tencent_kit_example/model/tencent_unionid_resp.dart';
|
||||
|
||||
extension MixerTencent on Tencent {
|
||||
/// 用户信息
|
||||
|
Reference in New Issue
Block a user