增加链接包显示支付判断

This commit is contained in:
老皮
2024-10-14 13:56:23 +08:00
parent e50fbefdc1
commit 20b3c421e7
12 changed files with 132 additions and 47 deletions

View File

@@ -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();
}
}
//注册

View File

@@ -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);
}
}
}

View File

@@ -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<UserBean> 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);
}

View File

@@ -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<String, String> map_ekv = new HashMap<String, String>();
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<String, String> map_ekv = new HashMap<String, String>();
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<String, String> map_ekv = new HashMap<String, String>();
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<String, String> map_ekv = new HashMap<String, String>();
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));