增加链接包显示支付判断
This commit is contained in:
parent
e50fbefdc1
commit
20b3c421e7
@ -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)) {
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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) {
|
||||
|
@ -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) {
|
||||
|
@ -1564,4 +1564,5 @@
|
||||
<string name="game_dialog_activity_achievements_5">5連桿</string>
|
||||
<string name="game_dialog_activity_achievements_6">6連桿</string>
|
||||
<string name="game_dialog_activity_achievements_7">7連桿</string>
|
||||
<string name="pay_type">充值維護中,請稍後再試</string>
|
||||
</resources>
|
||||
|
@ -1572,4 +1572,5 @@
|
||||
<string name="game_dialog_activity_achievements_5">5 Combo</string>
|
||||
<string name="game_dialog_activity_achievements_6">6 Combo</string>
|
||||
<string name="game_dialog_activity_achievements_7">7 Combo</string>
|
||||
<string name="pay_type">Recharge is under maintenance. Please try again later.</string>
|
||||
</resources>
|
||||
|
@ -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) {
|
||||
|
@ -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) {
|
||||
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
//注册
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user