https://developers.weixin.qq.com/doc/oplatform/Mobile_App/Access_Guide/ohos.htmlhttps://developers.weixin.qq.com/doc/oplatform/Mobile_App/Access_Guide/ohos.html
sdk版本:1.0.14
鸿蒙调用授权api想要获取code,实际打印是有code,但是这个抽象类定义的时候却没有这个参数,导致取字段的时候会报错,导致编译不过
// abstract class BaseReq 静态类
id: number = 0;
readonly name: string = this.constructor.name
transaction?: string
openId?: string
abstract checkArgs(): boolean
abstract get type(): number
// ----------------------------------------------
// 实际打印的值
{
"id": 0,
"name": "",
"errCode": 0,
"authResult": true,
"errStr": "",
"transaction": "",
"code": "xxx",
"state": "xxx",
"lang": "zh_CN",
"country": "xxxx"
}

你好,报错提示什么呢?
是约束问题,相当于我取一个key为a的 值,但是你再这个抽象类没有定义a的约束,但是实际返回有这个值,导致我编写代码会提示该对象没有这个key导致编译不通过,现在我都是自己写了一个interface,而且你先这个resp是一个抽象类也不可以继承拓展