WdManager.java
1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
package com.lotus.town.service.wd;
import android.util.Log;
import com.alibaba.fastjson.JSON;
import com.lotus.town.service.rg.rgRequest;
import com.lotus.town.utils.SharedPrefConfig;
import com.sdk.Sdk;
import com.sdk.http.HttpCallback;
import com.sdk.http.HttpResponse;
public class WdManager {
public static class WdListener{
public void success(){
}
}
public static void wd(int m, String openId, final WdListener listener){
wdRequest rg = new wdRequest();
rg.setUserId(SharedPrefConfig.getInstance(Sdk.app()).getUserId());
rg.setAction(0);
rg.setM(m);
rg.setOpenId(openId);
Sdk.http().post(rg, rg.getParams(), new HttpCallback<HttpResponse>() {
@Override
protected void onSuccess(HttpResponse result) {
listener.success();
}
@Override
protected HttpResponse parse(String response) {
HttpResponse res = JSON.parseObject(response,getType());
return res;
}
});
}
}