|
@@ -2,19 +2,18 @@ package com.sheep.gamegroup.util;
|
|
|
|
|
|
|
|
import android.app.Activity;
|
|
import android.app.Activity;
|
|
|
import android.content.Context;
|
|
import android.content.Context;
|
|
|
-import android.content.DialogInterface;
|
|
|
|
|
import android.content.Intent;
|
|
import android.content.Intent;
|
|
|
import android.content.pm.PackageManager;
|
|
import android.content.pm.PackageManager;
|
|
|
import android.net.Uri;
|
|
import android.net.Uri;
|
|
|
import android.os.Bundle;
|
|
import android.os.Bundle;
|
|
|
-import android.provider.Settings;
|
|
|
|
|
-import android.support.v7.app.AlertDialog;
|
|
|
|
|
import android.text.TextUtils;
|
|
import android.text.TextUtils;
|
|
|
import android.view.Gravity;
|
|
import android.view.Gravity;
|
|
|
import android.view.View;
|
|
import android.view.View;
|
|
|
|
|
|
|
|
-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;
|
|
@@ -36,13 +35,14 @@ import com.sheep.gamegroup.model.entity.UserEntity;
|
|
|
import com.sheep.gamegroup.model.entity.VersionInfo;
|
|
import com.sheep.gamegroup.model.entity.VersionInfo;
|
|
|
import com.sheep.gamegroup.model.entity.WebviewEntity;
|
|
import com.sheep.gamegroup.model.entity.WebviewEntity;
|
|
|
import com.sheep.gamegroup.model.entity.XianWanEntity;
|
|
import com.sheep.gamegroup.model.entity.XianWanEntity;
|
|
|
-import com.sheep.gamegroup.model.util.AutoTaskListUtil;
|
|
|
|
|
import com.sheep.gamegroup.model.util.SheepSubscriber;
|
|
import com.sheep.gamegroup.model.util.SheepSubscriber;
|
|
|
import com.sheep.gamegroup.view.activity.AccountAndSecurityAct;
|
|
import com.sheep.gamegroup.view.activity.AccountAndSecurityAct;
|
|
|
import com.sheep.gamegroup.view.activity.ActCreditCardTaskList;
|
|
import com.sheep.gamegroup.view.activity.ActCreditCardTaskList;
|
|
|
import com.sheep.gamegroup.view.activity.ActCreditCardWeb;
|
|
import com.sheep.gamegroup.view.activity.ActCreditCardWeb;
|
|
|
import com.sheep.gamegroup.view.activity.ActFindGame;
|
|
import com.sheep.gamegroup.view.activity.ActFindGame;
|
|
|
import com.sheep.gamegroup.view.activity.ActFindInformation;
|
|
import com.sheep.gamegroup.view.activity.ActFindInformation;
|
|
|
|
|
+import com.sheep.gamegroup.view.activity.ActGameAccount;
|
|
|
|
|
+import com.sheep.gamegroup.view.activity.ActGameAgencyRecharge;
|
|
|
import com.sheep.gamegroup.view.activity.ActGuide;
|
|
import com.sheep.gamegroup.view.activity.ActGuide;
|
|
|
import com.sheep.gamegroup.view.activity.ActGuideDeblocked;
|
|
import com.sheep.gamegroup.view.activity.ActGuideDeblocked;
|
|
|
import com.sheep.gamegroup.view.activity.ActGuideOnHook;
|
|
import com.sheep.gamegroup.view.activity.ActGuideOnHook;
|
|
@@ -53,12 +53,12 @@ import com.sheep.gamegroup.view.activity.ActNewAboutUs;
|
|
|
import com.sheep.gamegroup.view.activity.ActNewbieTaskList;
|
|
import com.sheep.gamegroup.view.activity.ActNewbieTaskList;
|
|
|
import com.sheep.gamegroup.view.activity.ActNotice;
|
|
import com.sheep.gamegroup.view.activity.ActNotice;
|
|
|
import com.sheep.gamegroup.view.activity.ActReservation;
|
|
import com.sheep.gamegroup.view.activity.ActReservation;
|
|
|
|
|
+import com.sheep.gamegroup.view.activity.ActSearchGame;
|
|
|
import com.sheep.gamegroup.view.activity.ActUnderstandSheep;
|
|
import com.sheep.gamegroup.view.activity.ActUnderstandSheep;
|
|
|
import com.sheep.gamegroup.view.activity.ActUserLabelList;
|
|
import com.sheep.gamegroup.view.activity.ActUserLabelList;
|
|
|
import com.sheep.gamegroup.view.activity.ActWeb;
|
|
import com.sheep.gamegroup.view.activity.ActWeb;
|
|
|
import com.sheep.gamegroup.view.activity.ActXinwanWeb;
|
|
import com.sheep.gamegroup.view.activity.ActXinwanWeb;
|
|
|
import com.sheep.gamegroup.view.activity.AskGetMoneyAct;
|
|
import com.sheep.gamegroup.view.activity.AskGetMoneyAct;
|
|
|
-import com.sheep.gamegroup.view.activity.BindDataAct;
|
|
|
|
|
import com.sheep.gamegroup.view.activity.BindOrChangeWeixinAct;
|
|
import com.sheep.gamegroup.view.activity.BindOrChangeWeixinAct;
|
|
|
import com.sheep.gamegroup.view.activity.ChangeTelAct;
|
|
import com.sheep.gamegroup.view.activity.ChangeTelAct;
|
|
|
import com.sheep.gamegroup.view.activity.ChangeWxOrTelAct;
|
|
import com.sheep.gamegroup.view.activity.ChangeWxOrTelAct;
|
|
@@ -97,7 +97,6 @@ import com.sheep.jiuyan.samllsheep.BuildConfig;
|
|
|
import com.sheep.jiuyan.samllsheep.R;
|
|
import com.sheep.jiuyan.samllsheep.R;
|
|
|
import com.sheep.jiuyan.samllsheep.SheepApp;
|
|
import com.sheep.jiuyan.samllsheep.SheepApp;
|
|
|
import com.sheep.jiuyan.samllsheep.service.FloatService;
|
|
import com.sheep.jiuyan.samllsheep.service.FloatService;
|
|
|
-import com.sheep.jiuyan.samllsheep.service.MonitorAppService;
|
|
|
|
|
import com.sheep.jiuyan.samllsheep.utils.G;
|
|
import com.sheep.jiuyan.samllsheep.utils.G;
|
|
|
import com.sheep.jiuyan.samllsheep.utils.SpUtils;
|
|
import com.sheep.jiuyan.samllsheep.utils.SpUtils;
|
|
|
|
|
|
|
@@ -113,7 +112,19 @@ import rx.android.schedulers.AndroidSchedulers;
|
|
|
import rx.functions.Action1;
|
|
import rx.functions.Action1;
|
|
|
import rx.schedulers.Schedulers;
|
|
import rx.schedulers.Schedulers;
|
|
|
|
|
|
|
|
|
|
+import static com.sheep.gamegroup.util.UMConfigUtils.Event.GAME_INSTEAD_OF_RECHARGE;
|
|
|
|
|
+import static com.sheep.gamegroup.util.UMConfigUtils.Event.RECHARGE;
|
|
|
|
|
+import static com.sheep.gamegroup.util.UMConfigUtils.Event.RECHARGE_QQ;
|
|
|
|
|
+import static com.sheep.gamegroup.util.UMConfigUtils.Event.SEARCH_GAME;
|
|
|
|
|
+import static com.sheep.gamegroup.util.UMConfigUtils.Event.USER_ABOUT_US;
|
|
|
|
|
+import static com.sheep.gamegroup.util.UMConfigUtils.Event.USER_ACCOUNT_SAFE;
|
|
|
|
|
+import static com.sheep.gamegroup.util.UMConfigUtils.Event.USER_FEEDBACK;
|
|
|
import static com.sheep.gamegroup.util.UMConfigUtils.Event.USER_FIND_APP_ORDER;
|
|
import static com.sheep.gamegroup.util.UMConfigUtils.Event.USER_FIND_APP_ORDER;
|
|
|
|
|
+import static com.sheep.gamegroup.util.UMConfigUtils.Event.USER_GAME_ACCOUNT;
|
|
|
|
|
+import static com.sheep.gamegroup.util.UMConfigUtils.Event.USER_INFO;
|
|
|
|
|
+import static com.sheep.gamegroup.util.UMConfigUtils.Event.USER_MY_MONEY;
|
|
|
|
|
+import static com.sheep.gamegroup.util.UMConfigUtils.Event.USER_NEW_VERSION;
|
|
|
|
|
+import static com.sheep.gamegroup.util.UMConfigUtils.Event.USER_TASK_RECORD;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* Created by ljy on 2018/3/18.
|
|
* Created by ljy on 2018/3/18.
|
|
@@ -177,9 +188,9 @@ public class Jump2View {
|
|
|
* @param o
|
|
* @param o
|
|
|
*/
|
|
*/
|
|
|
public void goAccountAndSecurit(Context context, Object o){
|
|
public void goAccountAndSecurit(Context context, Object o){
|
|
|
- UMConfigUtils.onEvent(UMConfigUtils.Event.USER_ACCOUNT_SAFE);
|
|
|
|
|
Intent intent = new Intent(context, AccountAndSecurityAct.class);
|
|
Intent intent = new Intent(context, AccountAndSecurityAct.class);
|
|
|
context.startActivity(intent);
|
|
context.startActivity(intent);
|
|
|
|
|
+ USER_ACCOUNT_SAFE.onEvent();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -234,18 +245,66 @@ public class Jump2View {
|
|
|
* 进入主页前需要检查协议或者用户标签
|
|
* 进入主页前需要检查协议或者用户标签
|
|
|
* @param activity
|
|
* @param activity
|
|
|
*/
|
|
*/
|
|
|
|
|
+ public void checkPhoneOrGoHomePage(final Activity activity) {
|
|
|
|
|
+ CommonUtil.getInstance().updateUserInfo(new Action1<UserEntity>() {
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public void call(UserEntity userEntity) {
|
|
|
|
|
+ if(userEntity != null && !TextUtils.isEmpty(userEntity.getShareLink())) {
|
|
|
|
|
+// GlideImageLoader.downLoadImage(userEntity.getShare_link().hashCode(), AppUtil.getQRLink(userEntity.getShare_link(), 800), null);
|
|
|
|
|
+// //PersionInfoAct.java与AskGetMoneyAct.java中分享二维码时的图片预下载
|
|
|
|
|
+ Glide.with(activity)
|
|
|
|
|
+ .load(AppUtil.getQRLink(userEntity.getShareLink(), 800))
|
|
|
|
|
+ .apply(new RequestOptions().diskCacheStrategy(DiskCacheStrategy.RESOURCE))
|
|
|
|
|
+ .preload(800, 800);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if(userEntity != null && userEntity.canBindMobile()
|
|
|
|
|
+ //&& !BuildConfig.DEBUG
|
|
|
|
|
+ ){//老用户没有绑定手机号
|
|
|
|
|
+ Jump2View.getInstance().goBindPhone(activity, 2);
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ Intent intent = new Intent(activity, ActMain.class);
|
|
|
|
|
+ activity.startActivity(intent);
|
|
|
|
|
+ activity.finish();
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 进入主页前需要检查是否需要绑定手机号、用户标签是否设置
|
|
|
|
|
+ * @param activity
|
|
|
|
|
+ */
|
|
|
private void checkOrGoHomePage(final Activity activity) {
|
|
private void checkOrGoHomePage(final Activity activity) {
|
|
|
//是否展示协议
|
|
//是否展示协议
|
|
|
// tryShowAgreement(activity, new Action1<String>() {
|
|
// tryShowAgreement(activity, new Action1<String>() {
|
|
|
// @Override
|
|
// @Override
|
|
|
// public void call(String msg) {
|
|
// public void call(String msg) {
|
|
|
// if(msg == null || TextUtils.equals(msg, "404")) {
|
|
// if(msg == null || TextUtils.equals(msg, "404")) {
|
|
|
- checkLabel(activity, new Action1<BaseMessage>() {
|
|
|
|
|
|
|
+ CommonUtil.getInstance().updateUserInfo(new Action1<UserEntity>() {
|
|
|
@Override
|
|
@Override
|
|
|
- public void call(BaseMessage baseMessage) {
|
|
|
|
|
- final Intent intent = new Intent(activity, ActMain.class);
|
|
|
|
|
- activity.startActivity(intent);
|
|
|
|
|
- activity.finish();
|
|
|
|
|
|
|
+ public void call(UserEntity userEntity) {
|
|
|
|
|
+ if(userEntity != null && !TextUtils.isEmpty(userEntity.getShareLink())) {
|
|
|
|
|
+// GlideImageLoader.downLoadImage(userEntity.getShare_link().hashCode(), AppUtil.getQRLink(userEntity.getShare_link(), 800), null);
|
|
|
|
|
+// //PersionInfoAct.java与AskGetMoneyAct.java中分享二维码时的图片预下载
|
|
|
|
|
+ Glide.with(activity)
|
|
|
|
|
+ .load(AppUtil.getQRLink(userEntity.getShareLink(), 800))
|
|
|
|
|
+ .apply(new RequestOptions().diskCacheStrategy(DiskCacheStrategy.RESOURCE))
|
|
|
|
|
+ .preload(800, 800);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if(userEntity != null && userEntity.canBindMobile()
|
|
|
|
|
+ //&& !BuildConfig.DEBUG
|
|
|
|
|
+ ){//老用户没有绑定手机号
|
|
|
|
|
+ Jump2View.getInstance().goBindPhone(activity, 1);
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ checkLabel(activity, new Action1<BaseMessage>() {
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public void call(BaseMessage baseMessage) {
|
|
|
|
|
+ goHomePageView(activity, null);
|
|
|
|
|
+ activity.finish();
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
// }else {
|
|
// }else {
|
|
@@ -256,6 +315,7 @@ public class Jump2View {
|
|
|
// });
|
|
// });
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* 跳到手机登录页面
|
|
* 跳到手机登录页面
|
|
|
* @param context
|
|
* @param context
|
|
@@ -356,8 +416,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();
|
|
@@ -375,8 +433,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);
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
@@ -399,8 +455,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(), "微信二维码辅助好友注册任务");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -409,8 +463,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);
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
@@ -466,17 +518,6 @@ public class Jump2View {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * 跳到绑定数据页面
|
|
|
|
|
- * @param context
|
|
|
|
|
- * @param o
|
|
|
|
|
- */
|
|
|
|
|
- public void goBindDataView(Context context, Object o) {
|
|
|
|
|
- Intent intent = new Intent(context, BindDataAct.class);
|
|
|
|
|
- intent.putExtra("stype", Integer.valueOf(o.toString()));
|
|
|
|
|
- ((Activity)context).startActivityForResult(intent, 0);
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- /**
|
|
|
|
|
* 跳出弹框页面
|
|
* 跳出弹框页面
|
|
|
* @param context
|
|
* @param context
|
|
|
* @param curTask
|
|
* @param curTask
|
|
@@ -526,13 +567,14 @@ 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){
|
|
|
intent.putExtra("task_id", (Integer) o);
|
|
intent.putExtra("task_id", (Integer) o);
|
|
|
}
|
|
}
|
|
|
- if(b instanceof Integer){
|
|
|
|
|
- intent.putExtra("game_id", (Integer) b);
|
|
|
|
|
|
|
+ if(b instanceof String){
|
|
|
|
|
+ intent.putExtra("game_id", (String) b);
|
|
|
}else
|
|
}else
|
|
|
if(b instanceof Boolean){
|
|
if(b instanceof Boolean){
|
|
|
intent.putExtra("btn_show", (Boolean) b);
|
|
intent.putExtra("btn_show", (Boolean) b);
|
|
@@ -546,8 +588,8 @@ public class Jump2View {
|
|
|
if(o instanceof Integer){
|
|
if(o instanceof Integer){
|
|
|
intent.putExtra("task_id", (Integer) o);
|
|
intent.putExtra("task_id", (Integer) o);
|
|
|
}
|
|
}
|
|
|
- if(b instanceof Integer){
|
|
|
|
|
- intent.putExtra("game_id", (Integer) b);
|
|
|
|
|
|
|
+ if(b instanceof String){
|
|
|
|
|
+ intent.putExtra("game_id", (String) b);
|
|
|
}else
|
|
}else
|
|
|
if(b instanceof Boolean){
|
|
if(b instanceof Boolean){
|
|
|
intent.putExtra("btn_show", (Boolean) b);
|
|
intent.putExtra("btn_show", (Boolean) b);
|
|
@@ -563,10 +605,11 @@ public class Jump2View {
|
|
|
* @param o
|
|
* @param o
|
|
|
*/
|
|
*/
|
|
|
public void goTaskList2View(Context context, TaskEty o){
|
|
public void goTaskList2View(Context context, TaskEty o){
|
|
|
- UMConfigUtils.onEvent(UMConfigUtils.Event.USER_TASK_RECORD);
|
|
|
|
|
Intent intent = new Intent(context, TaskListAct.class);
|
|
Intent intent = new Intent(context, TaskListAct.class);
|
|
|
intent.putExtra("task_entity", o);
|
|
intent.putExtra("task_entity", o);
|
|
|
- context.startActivity(intent);}
|
|
|
|
|
|
|
+ context.startActivity(intent);
|
|
|
|
|
+ USER_TASK_RECORD.onEvent();
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* 跳到已提现的列表
|
|
* 跳到已提现的列表
|
|
@@ -611,6 +654,7 @@ public class Jump2View {
|
|
|
Intent i = new Intent(context, PersionInfoAct.class);
|
|
Intent i = new Intent(context, PersionInfoAct.class);
|
|
|
i.putExtra("info", o);
|
|
i.putExtra("info", o);
|
|
|
context.startActivity(i);
|
|
context.startActivity(i);
|
|
|
|
|
+ USER_INFO.onEvent();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@@ -747,16 +791,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());
|
|
|
}
|
|
}
|
|
@@ -807,6 +847,7 @@ public class Jump2View {
|
|
|
public void goMyMoney(Context context, Object o){
|
|
public void goMyMoney(Context context, Object o){
|
|
|
Intent intent = new Intent(context, ActMyMoney.class);
|
|
Intent intent = new Intent(context, ActMyMoney.class);
|
|
|
context.startActivity(intent);
|
|
context.startActivity(intent);
|
|
|
|
|
+ USER_MY_MONEY.onEvent();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -823,24 +864,26 @@ public class Jump2View {
|
|
|
/**
|
|
/**
|
|
|
* 跳到充值页面
|
|
* 跳到充值页面
|
|
|
* @param context
|
|
* @param context
|
|
|
- * @param o
|
|
|
|
|
|
|
+ * @param from
|
|
|
*/
|
|
*/
|
|
|
- public void goRechargeAct(Context context, Object o){
|
|
|
|
|
|
|
+ public void goRechargeAct(Context context, String from){
|
|
|
Intent intent = new Intent(context, RechargeAct.class);
|
|
Intent intent = new Intent(context, RechargeAct.class);
|
|
|
context.startActivity(intent);
|
|
context.startActivity(intent);
|
|
|
|
|
+ RECHARGE.onEvent("from", from);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* 跳到绵羊币充值充值页面
|
|
* 跳到绵羊币充值充值页面
|
|
|
* @param context
|
|
* @param context
|
|
|
- * @param o
|
|
|
|
|
|
|
+ * @param from
|
|
|
*/
|
|
*/
|
|
|
- public void goRechargeQAct(Context context, Object o){
|
|
|
|
|
|
|
+ public void goRechargeQAct(Context context, String from){
|
|
|
if(!SheepApp.getInstance().isShowQB()){
|
|
if(!SheepApp.getInstance().isShowQB()){
|
|
|
- goRechargeAct(context, o);
|
|
|
|
|
|
|
+ goRechargeAct(context, from);
|
|
|
}else {
|
|
}else {
|
|
|
Intent intent = new Intent(context, RechargeQAct.class);
|
|
Intent intent = new Intent(context, RechargeQAct.class);
|
|
|
context.startActivity(intent);
|
|
context.startActivity(intent);
|
|
|
|
|
+ RECHARGE_QQ.onEvent("from", from);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
}
|
|
}
|
|
@@ -893,6 +936,7 @@ public class Jump2View {
|
|
|
public void goFeedbackAct(Context context) {
|
|
public void goFeedbackAct(Context context) {
|
|
|
Intent intent = new Intent(context, FeedbackAct.class);
|
|
Intent intent = new Intent(context, FeedbackAct.class);
|
|
|
context.startActivity(intent);
|
|
context.startActivity(intent);
|
|
|
|
|
+ USER_FEEDBACK.onEvent();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -956,7 +1000,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)
|
|
@@ -971,7 +1014,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);
|
|
@@ -1050,7 +1092,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));
|
|
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
@@ -1150,14 +1191,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);
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
@@ -1169,7 +1208,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("预约下载提示")
|
|
@@ -1186,19 +1224,18 @@ public class Jump2View {
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
public void onError(BaseMessage baseMessage) {
|
|
public void onError(BaseMessage baseMessage) {
|
|
|
- LogUtil.println("baseMessage onError " + JSON.toJSONString(baseMessage));
|
|
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public void goVersionChange(final Activity activity, String currentPkgVersionName) {
|
|
public void goVersionChange(final Activity activity, String currentPkgVersionName) {
|
|
|
|
|
+ USER_NEW_VERSION.onEvent();
|
|
|
SheepApp.getInstance().getNetComponent().getApiService().getVersionInfo(currentPkgVersionName)
|
|
SheepApp.getInstance().getNetComponent().getApiService().getVersionInfo(currentPkgVersionName)
|
|
|
.subscribeOn(Schedulers.io())
|
|
.subscribeOn(Schedulers.io())
|
|
|
.observeOn(AndroidSchedulers.mainThread())
|
|
.observeOn(AndroidSchedulers.mainThread())
|
|
|
.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());
|
|
@@ -1208,7 +1245,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);
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
@@ -1227,7 +1263,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 ||
|
|
@@ -1240,7 +1275,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);
|
|
|
}
|
|
}
|
|
@@ -1251,6 +1285,7 @@ public class Jump2View {
|
|
|
public void goNewAboutUs(Activity activity) {
|
|
public void goNewAboutUs(Activity activity) {
|
|
|
Intent intent = new Intent(activity, ActNewAboutUs.class);
|
|
Intent intent = new Intent(activity, ActNewAboutUs.class);
|
|
|
activity.startActivity(intent);
|
|
activity.startActivity(intent);
|
|
|
|
|
+ USER_ABOUT_US.onEvent();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -1298,9 +1333,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);
|
|
|
|
|
|
|
@@ -1340,6 +1372,7 @@ public class Jump2View {
|
|
|
intent.putExtra("id", item.getId());
|
|
intent.putExtra("id", item.getId());
|
|
|
intent.putExtra("title", item.getTitle());
|
|
intent.putExtra("title", item.getTitle());
|
|
|
activity.startActivity(intent);
|
|
activity.startActivity(intent);
|
|
|
|
|
+ USER_FIND_APP_ORDER.onEvent();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -1349,7 +1382,6 @@ public class Jump2View {
|
|
|
public void goActReservation(Activity activity) {
|
|
public void goActReservation(Activity activity) {
|
|
|
Intent intent = new Intent(activity, ActReservation.class);
|
|
Intent intent = new Intent(activity, ActReservation.class);
|
|
|
activity.startActivity(intent);
|
|
activity.startActivity(intent);
|
|
|
- USER_FIND_APP_ORDER.onEvent();
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public void tryShare(Activity activity, String shareUrlKey, String idName, int id) {
|
|
public void tryShare(Activity activity, String shareUrlKey, String idName, int id) {
|
|
@@ -1364,4 +1396,29 @@ public class Jump2View {
|
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 游戏帐号
|
|
|
|
|
+ */
|
|
|
|
|
+ public void goGameAccount(Activity activity, Object o){
|
|
|
|
|
+ Intent intent = new Intent(activity, ActGameAccount.class);
|
|
|
|
|
+ activity.startActivity(intent);
|
|
|
|
|
+ USER_GAME_ACCOUNT.onEvent();
|
|
|
|
|
+ }
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 游戏代充
|
|
|
|
|
+ */
|
|
|
|
|
+ public void goGameRecharge(Activity activity, Object o){
|
|
|
|
|
+ Intent intent = new Intent(activity, ActGameAgencyRecharge.class);
|
|
|
|
|
+ activity.startActivity(intent);
|
|
|
|
|
+ GAME_INSTEAD_OF_RECHARGE.onEvent();
|
|
|
|
|
+ }
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 游戏搜索
|
|
|
|
|
+ */
|
|
|
|
|
+ public void goGameSearch(Activity activity, Object o){
|
|
|
|
|
+ Intent intent = new Intent(activity, ActSearchGame.class);
|
|
|
|
|
+ activity.startActivity(intent);
|
|
|
|
|
+ SEARCH_GAME.onEvent();
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|