#pragma mark - WXApiDelegate - (void)onResp:(BaseResp *)resp{ if ([resp isKindOfClass:[SendAuthResp class]]) { SendAuthResp *saresq = (SendAuthResp *)resp; //正确 NSString *code = saresq.code; //错误 resp.errCode } } 直接使用了resp.errCode去请求了