|
|
@@ -4,11 +4,13 @@ import android.app.Activity;
|
|
|
import android.content.Intent;
|
|
|
import android.provider.MediaStore;
|
|
|
import android.text.TextUtils;
|
|
|
+import android.view.View;
|
|
|
import android.webkit.JavascriptInterface;
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.sheep.gamegroup.absBase.AbsObserver;
|
|
|
import com.sheep.gamegroup.model.entity.BaseMessage;
|
|
|
+import com.sheep.gamegroup.model.entity.DialogConfig;
|
|
|
import com.sheep.gamegroup.model.util.SheepSubscriber;
|
|
|
import com.sheep.gamegroup.module.find.activity.ActFind;
|
|
|
import com.sheep.gamegroup.module.user.activity.ActVip;
|
|
|
@@ -24,9 +26,11 @@ import com.sheep.gamegroup.util.LogUtil;
|
|
|
import com.sheep.gamegroup.util.MainTab;
|
|
|
import com.sheep.gamegroup.util.QQUtil;
|
|
|
import com.sheep.gamegroup.util.SysAppUtil;
|
|
|
+import com.sheep.gamegroup.util.ViewUtil;
|
|
|
import com.sheep.gamegroup.util.share.ShareLinkConfig;
|
|
|
import com.sheep.gamegroup.view.activity.ActInvitation;
|
|
|
import com.sheep.gamegroup.view.activity.ActMain;
|
|
|
+import com.sheep.gamegroup.view.activity.ChangeWxOrTelAct;
|
|
|
import com.sheep.jiuyan.samllsheep.R;
|
|
|
import com.sheep.jiuyan.samllsheep.SheepApp;
|
|
|
import com.sheep.jiuyan.samllsheep.utils.G;
|
|
|
@@ -333,6 +337,24 @@ public class KFZSJs {
|
|
|
public void buyVip(int level, int pay_type) {
|
|
|
buyVip(activity, new BuyVipReq());
|
|
|
}
|
|
|
+ @JavascriptInterface
|
|
|
+ public void checkError(Object error, Object data, String errorMsg) {
|
|
|
+ // 部分余额需绑定手机号, 部分余额需先实名认证 ,部分余额需先绑定提现微信号
|
|
|
+ View.OnClickListener btnRightOnClickListener = null;
|
|
|
+ switch (errorMsg){
|
|
|
+ case "部分余额需绑定手机号":
|
|
|
+ btnRightOnClickListener = view -> Jump2View.getInstance().goBindPhone(activity, null);
|
|
|
+ break;
|
|
|
+ case "部分余额需先实名认证":
|
|
|
+ btnRightOnClickListener = view -> Jump2View.getInstance().goRealNameAuther(activity, DataUtil.getInstance().getUserEntity(), 1);
|
|
|
+ break;
|
|
|
+ case "部分余额需先绑定提现微信号":
|
|
|
+ btnRightOnClickListener = view -> Jump2View.getInstance().goNoBindWx(activity, ChangeWxOrTelAct.TYPE_NORMAL);
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ if(btnRightOnClickListener != null)
|
|
|
+ ViewUtil.showMsgDialog(activity, new DialogConfig().setTitle("提示").setMsg(errorMsg).setBtnRightOnClickListener(btnRightOnClickListener));
|
|
|
+ }
|
|
|
|
|
|
//购买vip
|
|
|
public static void buyVip(Activity activity, BuyVipReq item) {
|