|
@@ -15,6 +15,9 @@ import android.view.View;
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
|
+import com.bumptech.glide.Glide;
|
|
|
|
|
+import com.bumptech.glide.load.engine.DiskCacheStrategy;
|
|
|
|
|
+import com.bumptech.glide.request.RequestOptions;
|
|
|
import com.kfzs.duanduan.ActMain;
|
|
import com.kfzs.duanduan.ActMain;
|
|
|
import com.kfzs.duanduan.bean.KFIntentKeys;
|
|
import com.kfzs.duanduan.bean.KFIntentKeys;
|
|
|
import com.sheep.gamegroup.absBase.BaseActivity;
|
|
import com.sheep.gamegroup.absBase.BaseActivity;
|
|
@@ -243,6 +246,15 @@ public class Jump2View {
|
|
|
CommonUtil.getInstance().updateUserInfo(new Action1<UserEntity>() {
|
|
CommonUtil.getInstance().updateUserInfo(new Action1<UserEntity>() {
|
|
|
@Override
|
|
@Override
|
|
|
public void call(UserEntity userEntity) {
|
|
public void call(UserEntity userEntity) {
|
|
|
|
|
+ if(userEntity != null && !TextUtils.isEmpty(userEntity.getShare_link())) {
|
|
|
|
|
+// GlideImageLoader.downLoadImage(userEntity.getShare_link().hashCode(), AppUtil.getQRLink(userEntity.getShare_link(), 800), null);
|
|
|
|
|
+// //PersionInfoAct.java与AskGetMoneyAct.java中分享二维码时的图片预下载
|
|
|
|
|
+ Glide.with(activity)
|
|
|
|
|
+ .load(AppUtil.getQRLink(userEntity.getShare_link(), 800))
|
|
|
|
|
+ .apply(new RequestOptions().diskCacheStrategy(DiskCacheStrategy.RESOURCE))
|
|
|
|
|
+ .preload(800, 800);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
if(userEntity != null && userEntity.canBindMobile() && !hasShowBindPhone(userEntity)){//老用户没有绑定手机号,且没有展示过绑定手机号界面
|
|
if(userEntity != null && userEntity.canBindMobile() && !hasShowBindPhone(userEntity)){//老用户没有绑定手机号,且没有展示过绑定手机号界面
|
|
|
Jump2View.getInstance().goBindPhone(activity, 1);
|
|
Jump2View.getInstance().goBindPhone(activity, 1);
|
|
|
return;
|
|
return;
|
|
@@ -380,8 +392,6 @@ public class Jump2View {
|
|
|
if(context instanceof BaseActivity){
|
|
if(context instanceof BaseActivity){
|
|
|
((BaseActivity) context).hideProgress();
|
|
((BaseActivity) context).hideProgress();
|
|
|
}
|
|
}
|
|
|
- if (BuildConfig.DEBUG)
|
|
|
|
|
- System.out.println("baseMessage onNext " + JSON.toJSONString(baseMessage));
|
|
|
|
|
Boolean wechatIsOpen;
|
|
Boolean wechatIsOpen;
|
|
|
if (baseMessage.getData() instanceof Boolean)
|
|
if (baseMessage.getData() instanceof Boolean)
|
|
|
wechatIsOpen = (Boolean) baseMessage.getData();
|
|
wechatIsOpen = (Boolean) baseMessage.getData();
|
|
@@ -399,8 +409,6 @@ public class Jump2View {
|
|
|
if(context instanceof BaseActivity){
|
|
if(context instanceof BaseActivity){
|
|
|
((BaseActivity) context).hideProgress();
|
|
((BaseActivity) context).hideProgress();
|
|
|
}
|
|
}
|
|
|
- if (BuildConfig.DEBUG)
|
|
|
|
|
- System.out.println("baseMessage onError " + JSON.toJSONString(baseMessage));
|
|
|
|
|
G.showToast(R.string.coming_soon);
|
|
G.showToast(R.string.coming_soon);
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
@@ -423,8 +431,6 @@ public class Jump2View {
|
|
|
if(context instanceof BaseActivity){
|
|
if(context instanceof BaseActivity){
|
|
|
((BaseActivity) context).hideProgress();
|
|
((BaseActivity) context).hideProgress();
|
|
|
}
|
|
}
|
|
|
- if(BuildConfig.DEBUG)
|
|
|
|
|
- System.out.println("baseMessage onNext "+JSON.toJSONString(baseMessage));
|
|
|
|
|
Jump2View.getInstance().goWeb(context, baseMessage.getData().toString(), "微信二维码辅助好友注册任务");
|
|
Jump2View.getInstance().goWeb(context, baseMessage.getData().toString(), "微信二维码辅助好友注册任务");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -433,8 +439,6 @@ public class Jump2View {
|
|
|
if(context instanceof BaseActivity){
|
|
if(context instanceof BaseActivity){
|
|
|
((BaseActivity) context).hideProgress();
|
|
((BaseActivity) context).hideProgress();
|
|
|
}
|
|
}
|
|
|
- if(BuildConfig.DEBUG)
|
|
|
|
|
- System.out.println("baseMessage onError "+JSON.toJSONString(baseMessage));
|
|
|
|
|
G.showToast(baseMessage);
|
|
G.showToast(baseMessage);
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
@@ -550,6 +554,7 @@ public class Jump2View {
|
|
|
intent.putExtra("is_from_task_list", true);
|
|
intent.putExtra("is_from_task_list", true);
|
|
|
activity.startActivityForResult(intent, ViewUtil.REQUEST_CODE_TASK_LIST);
|
|
activity.startActivityForResult(intent, ViewUtil.REQUEST_CODE_TASK_LIST);
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
public synchronized void goTaskDetailView(Context context, Object o, Object b){
|
|
public synchronized void goTaskDetailView(Context context, Object o, Object b){
|
|
|
Intent intent = new Intent(context, TaskDetailAct.class);
|
|
Intent intent = new Intent(context, TaskDetailAct.class);
|
|
|
if(o instanceof Integer){
|
|
if(o instanceof Integer){
|
|
@@ -771,16 +776,12 @@ public class Jump2View {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
- if(BuildConfig.DEBUG)
|
|
|
|
|
- System.out.println("baseMessage onNext "+JSON.toJSONString(baseMessage));
|
|
|
|
|
if(action1 != null)
|
|
if(action1 != null)
|
|
|
action1.call(null);
|
|
action1.call(null);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
public void onError(BaseMessage baseMessage) {
|
|
public void onError(BaseMessage baseMessage) {
|
|
|
- if(BuildConfig.DEBUG)
|
|
|
|
|
- System.out.println("baseMessage onError "+JSON.toJSONString(baseMessage));
|
|
|
|
|
if(action1 != null)
|
|
if(action1 != null)
|
|
|
action1.call(baseMessage.getErrorMsg());
|
|
action1.call(baseMessage.getErrorMsg());
|
|
|
}
|
|
}
|
|
@@ -980,7 +981,6 @@ public class Jump2View {
|
|
|
.subscribe(new SheepSubscriber<BaseMessage>(activity) {
|
|
.subscribe(new SheepSubscriber<BaseMessage>(activity) {
|
|
|
@Override
|
|
@Override
|
|
|
public void onNext(BaseMessage baseMessage) {
|
|
public void onNext(BaseMessage baseMessage) {
|
|
|
- LogUtil.println("baseMessage onNext "+ JSON.toJSONString(baseMessage));
|
|
|
|
|
List<Agreement> agreementList = baseMessage.getDatas(Agreement.class);
|
|
List<Agreement> agreementList = baseMessage.getDatas(Agreement.class);
|
|
|
if(agreementList.isEmpty()){
|
|
if(agreementList.isEmpty()){
|
|
|
if(action1 != null)
|
|
if(action1 != null)
|
|
@@ -995,7 +995,6 @@ public class Jump2View {
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
public void onError(BaseMessage baseMessage) {
|
|
public void onError(BaseMessage baseMessage) {
|
|
|
- LogUtil.println("baseMessage onError "+JSON.toJSONString(baseMessage));
|
|
|
|
|
if(action1 != null){
|
|
if(action1 != null){
|
|
|
String msg = baseMessage.getCode() == 404 ? "404" : baseMessage.getErrorMsg();
|
|
String msg = baseMessage.getCode() == 404 ? "404" : baseMessage.getErrorMsg();
|
|
|
action1.call(msg);
|
|
action1.call(msg);
|
|
@@ -1074,7 +1073,6 @@ public class Jump2View {
|
|
|
@Override
|
|
@Override
|
|
|
public void onError(BaseMessage baseMessage) {
|
|
public void onError(BaseMessage baseMessage) {
|
|
|
newbie_task.setVisibility(View.GONE);
|
|
newbie_task.setVisibility(View.GONE);
|
|
|
- System.out.println("baseMessage onError " + JSON.toJSONString(baseMessage));
|
|
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
@@ -1174,14 +1172,12 @@ public class Jump2View {
|
|
|
.subscribe(new SheepSubscriber<BaseMessage>(activity) {
|
|
.subscribe(new SheepSubscriber<BaseMessage>(activity) {
|
|
|
@Override
|
|
@Override
|
|
|
public void onNext(BaseMessage baseMessage) {
|
|
public void onNext(BaseMessage baseMessage) {
|
|
|
- LogUtil.println("baseMessage onNext " + JSON.toJSONString(baseMessage));
|
|
|
|
|
Advertising advertising = baseMessage.getData(Advertising.class);
|
|
Advertising advertising = baseMessage.getData(Advertising.class);
|
|
|
ViewUtil.showHalfScreenAd(activity, advertising, container);
|
|
ViewUtil.showHalfScreenAd(activity, advertising, container);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
public void onError(BaseMessage baseMessage) {
|
|
public void onError(BaseMessage baseMessage) {
|
|
|
- LogUtil.println("baseMessage onError " + JSON.toJSONString(baseMessage));
|
|
|
|
|
tryShowReservation(activity);
|
|
tryShowReservation(activity);
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
@@ -1193,7 +1189,6 @@ public class Jump2View {
|
|
|
.subscribe(new SheepSubscriber<BaseMessage>(activity) {
|
|
.subscribe(new SheepSubscriber<BaseMessage>(activity) {
|
|
|
@Override
|
|
@Override
|
|
|
public void onNext(BaseMessage baseMessage) {
|
|
public void onNext(BaseMessage baseMessage) {
|
|
|
- LogUtil.println("baseMessage onNext " + JSON.toJSONString(baseMessage));
|
|
|
|
|
if(baseMessage.getData() instanceof Integer){
|
|
if(baseMessage.getData() instanceof Integer){
|
|
|
if((int)baseMessage.getData() > 0){//该提示在弹窗广告后显示,且必须有可下载的游戏,弹出弹窗
|
|
if((int)baseMessage.getData() > 0){//该提示在弹窗广告后显示,且必须有可下载的游戏,弹出弹窗
|
|
|
ViewUtil.showMsgDialog(activity, new DialogConfig().setTitle("预约下载提示")
|
|
ViewUtil.showMsgDialog(activity, new DialogConfig().setTitle("预约下载提示")
|
|
@@ -1210,7 +1205,6 @@ public class Jump2View {
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
public void onError(BaseMessage baseMessage) {
|
|
public void onError(BaseMessage baseMessage) {
|
|
|
- LogUtil.println("baseMessage onError " + JSON.toJSONString(baseMessage));
|
|
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
@@ -1222,7 +1216,6 @@ public class Jump2View {
|
|
|
.subscribe(new SheepSubscriber<BaseMessage>(activity) {
|
|
.subscribe(new SheepSubscriber<BaseMessage>(activity) {
|
|
|
@Override
|
|
@Override
|
|
|
public void onNext(BaseMessage baseMessage) {
|
|
public void onNext(BaseMessage baseMessage) {
|
|
|
- LogUtil.println("baseMessage onNext "+JSON.toJSONString(baseMessage));
|
|
|
|
|
VersionInfo newVersionInfo = baseMessage.getData(VersionInfo.class);
|
|
VersionInfo newVersionInfo = baseMessage.getData(VersionInfo.class);
|
|
|
if(newVersionInfo != null && !TextUtils.isEmpty(newVersionInfo.getVersion_content())) {
|
|
if(newVersionInfo != null && !TextUtils.isEmpty(newVersionInfo.getVersion_content())) {
|
|
|
goLoadH5(activity, "新功能介绍", newVersionInfo.getVersion_content());
|
|
goLoadH5(activity, "新功能介绍", newVersionInfo.getVersion_content());
|
|
@@ -1232,7 +1225,6 @@ public class Jump2View {
|
|
|
}
|
|
}
|
|
|
@Override
|
|
@Override
|
|
|
public void onError(BaseMessage baseMessage) {
|
|
public void onError(BaseMessage baseMessage) {
|
|
|
- LogUtil.println("baseMessage onError "+JSON.toJSONString(baseMessage));
|
|
|
|
|
G.showToast(baseMessage);
|
|
G.showToast(baseMessage);
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
@@ -1251,7 +1243,6 @@ public class Jump2View {
|
|
|
.subscribe(new SheepSubscriber<BaseMessage>(SheepApp.getInstance()) {
|
|
.subscribe(new SheepSubscriber<BaseMessage>(SheepApp.getInstance()) {
|
|
|
@Override
|
|
@Override
|
|
|
public void onNext(BaseMessage baseMessage) {
|
|
public void onNext(BaseMessage baseMessage) {
|
|
|
- LogUtil.println("baseMessage onNext "+ JSON.toJSONString(baseMessage));
|
|
|
|
|
CheckUserLabel checkLabel = baseMessage.getData(CheckUserLabel.class);
|
|
CheckUserLabel checkLabel = baseMessage.getData(CheckUserLabel.class);
|
|
|
if(
|
|
if(
|
|
|
// BuildConfig.DEBUG ||
|
|
// BuildConfig.DEBUG ||
|
|
@@ -1264,7 +1255,6 @@ public class Jump2View {
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
public void onError(BaseMessage baseMessage) {
|
|
public void onError(BaseMessage baseMessage) {
|
|
|
- LogUtil.println("baseMessage onError "+JSON.toJSONString(baseMessage));
|
|
|
|
|
if(action1 != null) {
|
|
if(action1 != null) {
|
|
|
action1.call(baseMessage);
|
|
action1.call(baseMessage);
|
|
|
}
|
|
}
|
|
@@ -1322,9 +1312,6 @@ public class Jump2View {
|
|
|
@Override
|
|
@Override
|
|
|
public void onNext(BaseMessage baseMessage) {
|
|
public void onNext(BaseMessage baseMessage) {
|
|
|
final XianWanEntity xianWanEntity = baseMessage.getData(XianWanEntity.class);
|
|
final XianWanEntity xianWanEntity = baseMessage.getData(XianWanEntity.class);
|
|
|
-// Jump2View.getInstance().goXianwanWeb(context, xianWanEntity, null);
|
|
|
|
|
- if(BuildConfig.DEBUG)
|
|
|
|
|
- System.out.println("baseMessage onNext "+JSON.toJSONString(baseMessage));
|
|
|
|
|
if(action1 != null)
|
|
if(action1 != null)
|
|
|
action1.call(null);
|
|
action1.call(null);
|
|
|
|
|
|