前言
从MoonLinkConverter 属性mtopRequest 的类型TBSDKServer可以找到突破口
- (id)mtopRequest{
%log();
return %orig;
}
%end
@property(retain, nonatomic) TBSDKServer *mtopRequest; // @synthesize mtopRequest=_mtopRequest;
从而发现 mtopRequest 的真实class是TBSDKMTOPServer
观察数据
- (void)fillWithMtopResponse:(id)arg1{
}
发送请求流程
id server = [%c(TBSDKMTOPServer) requestWithMethod:@"mtop.taobao.sharepassword.genpassword"];//1
cy# [#0x16712240 startAsynchronous]//2
fillWithMtopResponse // 进行数据接收//3
添加Wua
server.isNeedWua = 1;
调用其父类TBSDKServer设置apiVersion
@property(readonly, nonatomic) NSString *apiVersion; // @synthesize apiVersion=_apiVersion;
调用此方法才生效
MtopExtRequest *request = server.request;
[request setApiVersion:@"1.0"];
整体流程
先请求
dic[@"api"] = @"mtop.alimama.moon.provider.edetail.iteminfo.get";
在请求mtop.taobao.sharepassword.genpassword