|
|
@@ -5,10 +5,14 @@ import android.util.Log;
|
|
|
|
|
|
import com.kfzs.libs.IView;
|
|
|
import com.kfzs.libs.di.http.HttpService;
|
|
|
+import com.sheep.gamegroup.model.entity.BaseMessage;
|
|
|
+import com.sheep.gamegroup.model.util.SheepSubscriber;
|
|
|
import com.sheep.jiuyan.samllsheep.SheepApp;
|
|
|
import com.sheep.jiuyan.samllsheep.utils.SpUtils;
|
|
|
import org.json.JSONException;
|
|
|
import org.json.JSONObject;
|
|
|
+
|
|
|
+import java.io.File;
|
|
|
import java.util.HashMap;
|
|
|
import java.util.Map;
|
|
|
import javax.inject.Inject;
|
|
|
@@ -128,6 +132,8 @@ public class ZXStep1Presenter implements ZXStep1Contact.Presenter {
|
|
|
|
|
|
@Override
|
|
|
public void getImageCode() {
|
|
|
+ Map<String,String> map = new HashMap<>();
|
|
|
+ map.put("token",SpUtils.getOpenId(SheepApp.mContext));
|
|
|
httpService.commitCreditCardZXImageCode()
|
|
|
.subscribeOn(Schedulers.io())
|
|
|
.observeOn(AndroidSchedulers.mainThread())
|
|
|
@@ -144,11 +150,11 @@ public class ZXStep1Presenter implements ZXStep1Contact.Presenter {
|
|
|
|
|
|
@Override
|
|
|
public void onNext(String str) {
|
|
|
- byte[] bytes = str.getBytes();
|
|
|
+ Log.e(TAG, "onNext: "+str );
|
|
|
try {
|
|
|
JSONObject object = new JSONObject(str);
|
|
|
if( object.getBoolean("success")){
|
|
|
- view.showImageCode(object.getJSONObject("data").getString("img"));
|
|
|
+ view.showImageCode(object.getJSONObject("data").getString("data"));
|
|
|
}
|
|
|
else {
|
|
|
view.showProgress(object.getString("errors"));
|
|
|
@@ -156,7 +162,7 @@ public class ZXStep1Presenter implements ZXStep1Contact.Presenter {
|
|
|
} catch (JSONException e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
- Log.e(TAG, "onNext: "+ str );
|
|
|
+// Log.e(TAG, "onNext: "+ str );
|
|
|
}
|
|
|
});
|
|
|
}
|