diff --git a/common/src/main/java/com/yunbao/common/CommonAppConfig.java b/common/src/main/java/com/yunbao/common/CommonAppConfig.java index 708e04195..2b1226828 100644 --- a/common/src/main/java/com/yunbao/common/CommonAppConfig.java +++ b/common/src/main/java/com/yunbao/common/CommonAppConfig.java @@ -141,6 +141,15 @@ public class CommonAppConfig { private int mAppIconRes; private String mAppName; private Boolean mTiBeautyEnable;//是否使用萌颜 true使用萌颜 false 使用基础美颜 + private int pay_type; // 1、三方支付,2:官方支付,3:无响应 + + public int getPay_type() { + return pay_type; + } + + public void setPay_type(int pay_type) { + this.pay_type = pay_type; + } public String getUid() { if (TextUtils.isEmpty(mUid)) { diff --git a/common/src/main/java/com/yunbao/common/bean/UserBean.java b/common/src/main/java/com/yunbao/common/bean/UserBean.java index ea81b93bc..e488fa8e2 100644 --- a/common/src/main/java/com/yunbao/common/bean/UserBean.java +++ b/common/src/main/java/com/yunbao/common/bean/UserBean.java @@ -76,6 +76,17 @@ public class UserBean implements Parcelable { private boolean isRequest = false; + // 支付方式 1、三方支付,2:官方支付,3:无响应 + private int pay_type; + + public int getPay_type() { + return pay_type; + } + + public void setPay_type(int pay_type) { + this.pay_type = pay_type; + } + public boolean isRequest() { return isRequest; } diff --git a/common/src/main/java/com/yunbao/common/manager/IMLoginManager.java b/common/src/main/java/com/yunbao/common/manager/IMLoginManager.java index ab73d2cf8..60c633431 100644 --- a/common/src/main/java/com/yunbao/common/manager/IMLoginManager.java +++ b/common/src/main/java/com/yunbao/common/manager/IMLoginManager.java @@ -521,6 +521,7 @@ public class IMLoginManager extends BaseCacheManager { HttpClient.getInstance().get("User.getBaseInfos", "getBaseInfo") .params("uid", uid) .params("token", token) + .params("key1","6tnym1br6lhu7") .execute(new HttpCallback() { @Override public void onSuccess(int code, String msg, String[] info) { diff --git a/common/src/main/java/com/yunbao/common/utils/JavascriptInterfaceUtils.java b/common/src/main/java/com/yunbao/common/utils/JavascriptInterfaceUtils.java index fcc3a49a8..b20a0eaf2 100644 --- a/common/src/main/java/com/yunbao/common/utils/JavascriptInterfaceUtils.java +++ b/common/src/main/java/com/yunbao/common/utils/JavascriptInterfaceUtils.java @@ -661,6 +661,7 @@ public class JavascriptInterfaceUtils { HttpClient.getInstance().get("User.getBaseInfos", "getBaseInfo") .params("uid", IMLoginManager.get(mContext).getUserInfo().getId()) .params("token", IMLoginManager.get(mContext).getUserInfo().getToken()) + .params("key1","6tnym1br6lhu7") .execute(new HttpCallback() { @Override public void onSuccess(int code, String msg, String[] info) { diff --git a/common/src/main/res/values-zh/strings.xml b/common/src/main/res/values-zh/strings.xml index 7025e1357..50794f32f 100644 --- a/common/src/main/res/values-zh/strings.xml +++ b/common/src/main/res/values-zh/strings.xml @@ -1564,4 +1564,5 @@ 5連桿 6連桿 7連桿 + 充值維護中,請稍後再試 diff --git a/common/src/main/res/values/strings.xml b/common/src/main/res/values/strings.xml index 31ff8afe0..bbfb62618 100644 --- a/common/src/main/res/values/strings.xml +++ b/common/src/main/res/values/strings.xml @@ -1572,4 +1572,5 @@ 5 Combo 6 Combo 7 Combo + Recharge is under maintenance. Please try again later. diff --git a/live/src/main/java/com/yunbao/live/dialog/LiveGiftDialogFragment.java b/live/src/main/java/com/yunbao/live/dialog/LiveGiftDialogFragment.java index 12783029f..82e2fbf18 100644 --- a/live/src/main/java/com/yunbao/live/dialog/LiveGiftDialogFragment.java +++ b/live/src/main/java/com/yunbao/live/dialog/LiveGiftDialogFragment.java @@ -413,6 +413,7 @@ public class LiveGiftDialogFragment extends AbsDialogFragment implements View.On HttpClient.getInstance().get("User.getBaseInfos", "getBaseInfo") .params("uid", IMLoginManager.get(mContext).getUserInfo().getId()) .params("token", IMLoginManager.get(mContext).getUserInfo().getToken()) + .params("key1","6tnym1br6lhu7") .execute(new HttpCallback() { @Override public void onSuccess(int code, String msg, String[] info) { diff --git a/live/src/main/java/com/yunbao/live/dialog/LiveGiftPopup.java b/live/src/main/java/com/yunbao/live/dialog/LiveGiftPopup.java index f2d2868ab..43041e9e4 100644 --- a/live/src/main/java/com/yunbao/live/dialog/LiveGiftPopup.java +++ b/live/src/main/java/com/yunbao/live/dialog/LiveGiftPopup.java @@ -516,6 +516,7 @@ public class LiveGiftPopup extends AbsDialogFragment { HttpClient.getInstance().get("User.getBaseInfos", "getBaseInfo") .params("uid", IMLoginManager.get(mContext).getUserInfo().getId()) .params("token", IMLoginManager.get(mContext).getUserInfo().getToken()) + .params("key1","6tnym1br6lhu7") .execute(new HttpCallback() { @Override public void onSuccess(int code, String msg, String[] info) { diff --git a/main/src/main/java/com/yunbao/main/activity/LoginActivity.java b/main/src/main/java/com/yunbao/main/activity/LoginActivity.java index 1ad1c7c07..2f03b9e95 100644 --- a/main/src/main/java/com/yunbao/main/activity/LoginActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/LoginActivity.java @@ -168,26 +168,27 @@ public class LoginActivity extends AbsActivity { public void loginClick(View v) { - ViewClicksAntiShake.clicksAntiShake(v, new ViewClicksAntiShake.ViewClicksCallBack() { + // 去掉防抖 + /* ViewClicksAntiShake.clicksAntiShake(v, new ViewClicksAntiShake.ViewClicksCallBack() { @Override public void onViewClicks() { - int i = v.getId(); - if (i == R.id.btn_login) { - //Intent intent = new Intent(LoginActivity.this, NewLiveActivity.class); - //startActivity(intent); - login(); - } else if (i == R.id.btn_register) { - register(); - } else if (i == R.id.btn_forget_pwd) { - forgetPwd(); - - } else if (i == R.id.btn_tip) { - forwardTip(); - } } - }); + });*/ + int i = v.getId(); + if (i == R.id.btn_login) { + //Intent intent = new Intent(LoginActivity.this, NewLiveActivity.class); + //startActivity(intent); + login(); + } else if (i == R.id.btn_register) { + register(); + } else if (i == R.id.btn_forget_pwd) { + forgetPwd(); + + } else if (i == R.id.btn_tip) { + forwardTip(); + } } //注册 diff --git a/main/src/main/java/com/yunbao/main/activity/MyWalletActivity.java b/main/src/main/java/com/yunbao/main/activity/MyWalletActivity.java index a89ec5c31..297e04af1 100644 --- a/main/src/main/java/com/yunbao/main/activity/MyWalletActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/MyWalletActivity.java @@ -228,20 +228,42 @@ public class MyWalletActivity extends AbsActivity { bundle2.putString("url", CommonAppConfig.HOST + "/themes/simplebootx/appapi/mall/samsungpaygole.html?uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&package_name=pd" + "&isZh=" + ((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0")); samsungFragment2.setArguments(bundle2); } else { - walletFragment = new WalletFragment(); - Bundle bundle = new Bundle(); - bundle.putString("url", CommonAppConfig.HOST + "/index.php?g=Appapi&m=Mall&first_page=1&a=walletbean&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&package_name=pd" + "&isZh=" + ((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0")); - walletFragment.setArguments(bundle); - googleFragment1 = new GoogleFragment(); - Bundle bundle1 = new Bundle(); - bundle1.putString("url", CommonAppConfig.HOST + "/index.php?g=Appapi&first_page=1&m=Mall&a=walletcoin&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&package_name=pd" + "&isZh=" + ((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0")); - googleFragment1.setArguments(bundle1); + // 链接包 + if (CommonAppConfig.getInstance().getPay_type() == 1) { + // 三方支付 + walletFragment = new WalletFragment(); + Bundle bundle = new Bundle(); + bundle.putString("url", CommonAppConfig.HOST + "/index.php?g=Appapi&m=Mall&first_page=1&a=walletbean&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&package_name=pd" + "&isZh=" + ((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0")); + walletFragment.setArguments(bundle); - googleFragment2 = new GoogleFragment(); - Bundle bundle2 = new Bundle(); - bundle2.putString("url", CommonAppConfig.HOST + "/index.php?g=Appapi&m=Mall&first_page=1&a=walletgold&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&package_name=pd" + "&isZh=" + ((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0")); - googleFragment2.setArguments(bundle2); + googleFragment1 = new GoogleFragment(); + Bundle bundle1 = new Bundle(); + bundle1.putString("url", CommonAppConfig.HOST + "/index.php?g=Appapi&first_page=1&m=Mall&a=walletcoin&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&package_name=pd" + "&isZh=" + ((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0")); + googleFragment1.setArguments(bundle1); + + googleFragment2 = new GoogleFragment(); + Bundle bundle2 = new Bundle(); + bundle2.putString("url", CommonAppConfig.HOST + "/index.php?g=Appapi&m=Mall&first_page=1&a=walletgold&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&package_name=pd" + "&isZh=" + ((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0")); + googleFragment2.setArguments(bundle2); + } else if (CommonAppConfig.getInstance().getPay_type()== 2) { + // Google支付 + rView.setVisibility(View.VISIBLE); + walletFragment = new WalletFragment(); + Bundle bundle = new Bundle(); + bundle.putString("url", CommonAppConfig.HOST + "/index.php?g=Appapi&m=Mall&first_page=1&a=walletbean&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&isZh=" + ((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0")); + walletFragment.setArguments(bundle); + + googleFragment1 = new GoogleFragment(); + Bundle bundle1 = new Bundle(); + bundle1.putString("url", CommonAppConfig.HOST + "/index.php?g=Appapi&m=Mall&a=googlepaycoin&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&package_name=pd" + "&isZh=" + ((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0")); + googleFragment1.setArguments(bundle1); + + googleFragment2 = new GoogleFragment(); + Bundle bundle2 = new Bundle(); + bundle2.putString("url", CommonAppConfig.HOST + "/index.php?g=Appapi&m=Mall&a=googlepaygole&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&package_name=pd" + "&isZh=" + ((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0")); + googleFragment2.setArguments(bundle2); + } } } else { if (CommonAppConfig.IS_GOOGLE_PLAY == 1) { @@ -297,21 +319,41 @@ public class MyWalletActivity extends AbsActivity { } else { Log.i("tss", "不是首充"); //链接版本 + if (CommonAppConfig.getInstance().getPay_type() == 1) { + // 三方支付 + walletFragment = new WalletFragment(); + Bundle bundle = new Bundle(); + bundle.putString("url", CommonAppConfig.HOST + "/index.php?g=Appapi&m=Mall&a=walletbean&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&package_name=pd" + "&isZh=" + ((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0")); + walletFragment.setArguments(bundle); - walletFragment = new WalletFragment(); - Bundle bundle = new Bundle(); - bundle.putString("url", CommonAppConfig.HOST + "/index.php?g=Appapi&m=Mall&a=walletbean&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&package_name=pd" + "&isZh=" + ((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0")); - walletFragment.setArguments(bundle); + googleFragment1 = new GoogleFragment(); + Bundle bundle1 = new Bundle(); + bundle1.putString("url", CommonAppConfig.HOST + "/index.php?g=Appapi&m=Mall&a=walletcoin&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&package_name=pd" + "&isZh=" + ((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0")); + googleFragment1.setArguments(bundle1); - googleFragment1 = new GoogleFragment(); - Bundle bundle1 = new Bundle(); - bundle1.putString("url", CommonAppConfig.HOST + "/index.php?g=Appapi&m=Mall&a=walletcoin&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&package_name=pd" + "&isZh=" + ((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0")); - googleFragment1.setArguments(bundle1); + googleFragment2 = new GoogleFragment(); + Bundle bundle2 = new Bundle(); + bundle2.putString("url", CommonAppConfig.HOST + "/index.php?g=Appapi&m=Mall&a=walletgold&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&package_name=pd" + "&isZh=" + ((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0")); + googleFragment2.setArguments(bundle2); + } else if (CommonAppConfig.getInstance().getPay_type()== 2) { + // Google支付 + rView.setVisibility(View.VISIBLE); - googleFragment2 = new GoogleFragment(); - Bundle bundle2 = new Bundle(); - bundle2.putString("url", CommonAppConfig.HOST + "/index.php?g=Appapi&m=Mall&a=walletgold&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&package_name=pd" + "&isZh=" + ((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0")); - googleFragment2.setArguments(bundle2); + walletFragment = new WalletFragment(); + Bundle bundle = new Bundle(); + bundle.putString("url", CommonAppConfig.HOST + "/index.php?g=Appapi&m=Mall&first_page=1&a=walletbean&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&isZh=" + ((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0")); + walletFragment.setArguments(bundle); + + googleFragment1 = new GoogleFragment(); + Bundle bundle1 = new Bundle(); + bundle1.putString("url", CommonAppConfig.HOST + "/index.php?g=Appapi&m=Mall&a=googlepaycoin&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&package_name=pd" + "&isZh=" + ((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0")); + googleFragment1.setArguments(bundle1); + + googleFragment2 = new GoogleFragment(); + Bundle bundle2 = new Bundle(); + bundle2.putString("url", CommonAppConfig.HOST + "/index.php?g=Appapi&m=Mall&a=googlepaygole&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&package_name=pd" + "&isZh=" + ((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0")); + googleFragment2.setArguments(bundle2); + } } } diff --git a/main/src/main/java/com/yunbao/main/http/MainHttpUtil.java b/main/src/main/java/com/yunbao/main/http/MainHttpUtil.java index eef8e6b27..b508860ae 100644 --- a/main/src/main/java/com/yunbao/main/http/MainHttpUtil.java +++ b/main/src/main/java/com/yunbao/main/http/MainHttpUtil.java @@ -52,6 +52,7 @@ public class MainHttpUtil { .params("lastlogindevice", "Android") .params("uuid_Device", uuid) .params("langue", WordUtil.isNewZh()?"chinese":"english") + .params("key1", "6tnym1br6lhu7") .execute(callback); } @@ -263,6 +264,7 @@ public class MainHttpUtil { */ public static void getBaseInfo(String uid, String token, final CommonCallback commonCallback) { HttpClient.getInstance().get("User.getBaseInfos", MainHttpConsts.GET_BASE_INFO) + .params("key1","6tnym1br6lhu7") .execute(new HttpCallback() { @Override public void onSuccess(int code, String msg, String[] info) { @@ -273,6 +275,7 @@ public class MainHttpUtil { bean.setMedalName(obj.getString("medal_name")); bean.setMedalLevel(obj.getIntValue("medal_level")); CommonAppConfig.getInstance().setUserBean(bean); + CommonAppConfig.getInstance().setPay_type(bean.getPay_type()); CommonAppConfig.getInstance().setUserItemList(obj.getString("list")); bean.seUserInfoComplete(obj.getIntValue("user_info_complete")); SpUtil.getInstance().setStringValue(SpUtil.USER_INFO, info[0]); @@ -298,6 +301,7 @@ public class MainHttpUtil { public static void getBaseInfos(String uid, String token, HttpCallback callback) { HttpClient.getInstance().get("User.getBaseInfos", MainHttpConsts.GET_BASE_INFO) + .params("key1","6tnym1br6lhu7") .execute(callback); } diff --git a/main/src/main/java/com/yunbao/main/views/MainMeViewHolder.java b/main/src/main/java/com/yunbao/main/views/MainMeViewHolder.java index 6ff717a41..9c40f9d7d 100644 --- a/main/src/main/java/com/yunbao/main/views/MainMeViewHolder.java +++ b/main/src/main/java/com/yunbao/main/views/MainMeViewHolder.java @@ -528,15 +528,27 @@ public class MainMeViewHolder extends AbsMainViewHolder implements OnItemClickLi } else if (i == R.id.signature) { mContext.startActivity(new Intent(mContext, EditProfileActivity.class)); } else if (i == R.id.lt_star_coin) { - Map map_ekv = new HashMap(); - map_ekv.put("from", "xb"); - MobclickAgent.onEvent(mContext, "my_recharge", map_ekv); - mContext.startActivity(new Intent(mContext, MyWalletActivity.class).putExtra("p", 1)); + // 星币充值 + if (CommonAppConfig.IS_GOOGLE_PLAY == 0 && CommonAppConfig.getInstance().getPay_type() == 3) { + // 链接包并且设置不能点击跳转 + ToastUtil.show(R.string.pay_type); + }else { + Map map_ekv = new HashMap(); + map_ekv.put("from", "xb"); + MobclickAgent.onEvent(mContext, "my_recharge", map_ekv); + mContext.startActivity(new Intent(mContext, MyWalletActivity.class).putExtra("p", 1)); + } } else if (i == R.id.btn_coin) { - Map map_ekv = new HashMap(); - map_ekv.put("from", "zs"); - MobclickAgent.onEvent(mContext, "my_recharge", map_ekv); - mContext.startActivity(new Intent(mContext, MyWalletActivity.class).putExtra("p", 0)); + // 钻石充值 + if (CommonAppConfig.IS_GOOGLE_PLAY == 0 && CommonAppConfig.getInstance().getPay_type() == 3) { + // 链接包并且设置不能点击跳转 + ToastUtil.show(R.string.pay_type); + }else { + Map map_ekv = new HashMap(); + map_ekv.put("from", "zs"); + MobclickAgent.onEvent(mContext, "my_recharge", map_ekv); + mContext.startActivity(new Intent(mContext, MyWalletActivity.class).putExtra("p", 0)); + } } else if (i == R.id.btn_gold) { MobclickAgent.onEvent(mContext, "my_receive", "充值旁边领取金豆的按钮"); // mContext.startActivity(new Intent(mContext, MyWalletActivity.class).putExtra("p", 2));