|
|
@@ -2,10 +2,12 @@ package com.sheep.gamegroup.util;
|
|
|
|
|
|
import android.content.Context;
|
|
|
import android.content.Intent;
|
|
|
+import android.text.TextUtils;
|
|
|
|
|
|
import com.kfzs.duanduan.ActMain;
|
|
|
import com.kfzs.duanduan.bean.KFIntentKeys;
|
|
|
import com.sheep.gamegroup.model.entity.TaskEty;
|
|
|
+import com.sheep.gamegroup.model.entity.UserEntity;
|
|
|
import com.sheep.gamegroup.model.entity.WXOnHookAccount;
|
|
|
import com.sheep.gamegroup.view.activity.AccountAndSecurityAct;
|
|
|
import com.sheep.gamegroup.view.activity.ActGuideOnHook;
|
|
|
@@ -47,6 +49,10 @@ public class Jump2View {
|
|
|
* @param o
|
|
|
*/
|
|
|
public void goWithdrawal(Context context, Object o){
|
|
|
+ if(!isBindWeixin(context)){
|
|
|
+ goBindOrChangeWeixinView(context, o);
|
|
|
+ return;
|
|
|
+ }
|
|
|
Intent intent = new Intent(context, WithdrawalAct.class);
|
|
|
context.startActivity(intent);
|
|
|
}
|
|
|
@@ -134,12 +140,13 @@ public class Jump2View {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 跳到提现结果页面
|
|
|
+ * 跳到绑定微信果页面
|
|
|
* @param context
|
|
|
- * @param o
|
|
|
+ * @param o false:绑定 true:切换
|
|
|
*/
|
|
|
public void goBindOrChangeWeixinView(Context context, Object o){
|
|
|
Intent intent = new Intent(context, BindOrChangeWeixinAct.class);
|
|
|
+ intent.putExtra("type",(boolean)o);
|
|
|
context.startActivity(intent);
|
|
|
}
|
|
|
|
|
|
@@ -262,4 +269,22 @@ public class Jump2View {
|
|
|
context.startActivity(intent);
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 是否绑定微信号
|
|
|
+ */
|
|
|
+ public boolean isBindWeixin(Context context){
|
|
|
+ try{
|
|
|
+ UserEntity userEntity = MyDbManager.getInstance().dbFindUser();
|
|
|
+ if(userEntity != null){
|
|
|
+ if(!TextUtils.isEmpty(userEntity.getWx_openid())){
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }catch (Exception e){
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
}
|