RxReader / wechat_kit

Flutter版微信登录/分享/支付 SDK

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

WechatAccessTokenResp 类没有 unionID 成员变量

RA1NO3O opened this issue · comments

截屏2021-07-15 上午11 19 49

import 'package:json_annotation/json_annotation.dart';
import 'package:wechat_kit/src/model/api/wechat_api_resp.dart';

part 'wechat_access_token_resp.g.dart';

@JsonSerializable(
  explicitToJson: true,
  fieldRename: FieldRename.snake,
)
class WechatAccessTokenResp extends WechatApiResp {
  const WechatAccessTokenResp({
    required int errcode,
    String? errmsg,
    this.openid,
    this.scope,
    this.accessToken,
    this.refreshToken,
    this.expiresIn,
  }) : super(
          errcode: errcode,
          errmsg: errmsg,
        );

  factory WechatAccessTokenResp.fromJson(Map<String, dynamic> json) =>
      _$WechatAccessTokenRespFromJson(json);

  final String? openid;
  final String? scope;
  final String? accessToken;
  final String? refreshToken;
  final int? expiresIn; // 单位:秒

  @override
  Map<String, dynamic> toJson() => _$WechatAccessTokenRespToJson(this);
}

你提交一下PR吧

好的,荣幸之至

-_-!!! 额,为啥我看到的文档里面mu木有 unionid

https://developers.weixin.qq.com/doc/oplatform/Mobile_App/WeChat_Login/Authorized_API_call_UnionID.html

截屏2021-07-17 下午3 44 15

在这里,确实是有的😂

thx