diff --git a/Share/src/main/java/com/yunbao/share/bean/ShareBuilder.java b/Share/src/main/java/com/yunbao/share/bean/ShareBuilder.java index bfe1da282..e5f60206d 100644 --- a/Share/src/main/java/com/yunbao/share/bean/ShareBuilder.java +++ b/Share/src/main/java/com/yunbao/share/bean/ShareBuilder.java @@ -3,11 +3,14 @@ package com.yunbao.share.bean; import androidx.annotation.NonNull; import com.yunbao.common.CommonAppConfig; +import com.yunbao.common.CommonAppContext; +import com.yunbao.common.manager.IMLoginManager; import com.yunbao.common.utils.StringUtil; import java.io.File; import java.io.UnsupportedEncodingException; import java.net.URLEncoder; +import java.util.Locale; public class ShareBuilder { public static final int APP_FACEBOOK = 0; @@ -35,12 +38,13 @@ public class ShareBuilder { URLEncoder.encode(anchorName, "UTF-8"), URLEncoder.encode(anchorAvatar, "UTF-8"), CommonAppConfig.IS_GOOGLE_PLAY ? "1" : "0" - ); + ) ; } catch (UnsupportedEncodingException e) { throw new RuntimeException(e); } } - public static String createInviteLink(String shareUid){ + + public static String createInviteLink(String shareUid) { return String.format("https://www.pdlive.com/public/app/download/index.html?user_id=%s&isGoogle=%s", shareUid, CommonAppConfig.IS_GOOGLE_PLAY ? "1" : "0" diff --git a/common/src/main/java/com/yunbao/common/activity/WebViewActivity.java b/common/src/main/java/com/yunbao/common/activity/WebViewActivity.java index 17c8a6c13..cd2fd7c58 100644 --- a/common/src/main/java/com/yunbao/common/activity/WebViewActivity.java +++ b/common/src/main/java/com/yunbao/common/activity/WebViewActivity.java @@ -23,9 +23,11 @@ import android.widget.ProgressBar; import androidx.annotation.RequiresApi; import com.yunbao.common.CommonAppConfig; +import com.yunbao.common.CommonAppContext; import com.yunbao.common.Constants; import com.yunbao.common.R; import com.yunbao.common.event.JavascriptInterfaceEvent; +import com.yunbao.common.manager.IMLoginManager; import com.yunbao.common.utils.AndroidBug5497Workaround; import com.yunbao.common.utils.Bus; import com.yunbao.common.utils.DeviceUtils; @@ -38,6 +40,8 @@ import com.yunbao.common.utils.WordUtil; import org.greenrobot.eventbus.Subscribe; import org.greenrobot.eventbus.ThreadMode; +import java.util.Locale; + /** * Created by cxf on 2018/9/25. */ @@ -236,12 +240,12 @@ public class WebViewActivity extends AbsActivity { } } Intent intent = new Intent(context, WebViewActivity.class); - intent.putExtra(Constants.URL, url); + intent.putExtra(Constants.URL, url+ "&isZh=" + ((IMLoginManager.get(CommonAppContext.sInstance.getBaseContext()).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0")); context.startActivity(intent); } public static void forward(Context context, String url) { - forward(context, url, true); + forward(context, url+ "&isZh=" + ((IMLoginManager.get(CommonAppContext.sInstance.getBaseContext()).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0"), true); } @Override diff --git a/common/src/main/res/layout/view_title.xml b/common/src/main/res/layout/view_title.xml index ae73a9d7b..dee8fcc61 100644 --- a/common/src/main/res/layout/view_title.xml +++ b/common/src/main/res/layout/view_title.xml @@ -49,7 +49,7 @@ android:textColor="@color/textColor" android:textSize="13sp" android:layout_marginRight="25dp" - android:text="充值未到账?" + android:text="@string/not_received" android:visibility="gone" android:textStyle="bold" /> diff --git a/common/src/main/res/values-en-rUS/string.xml b/common/src/main/res/values-en-rUS/string.xml index 32c917fe3..0e1fb97ec 100644 --- a/common/src/main/res/values-en-rUS/string.xml +++ b/common/src/main/res/values-en-rUS/string.xml @@ -1139,4 +1139,5 @@ Limited ride And limited avatar frame Get live notification after opening PK Ladder Race Confirm whether to go to the other party\'s studio? + Not received? diff --git a/common/src/main/res/values-zh-rHK/strings.xml b/common/src/main/res/values-zh-rHK/strings.xml index 31a341994..dc76ee77b 100644 --- a/common/src/main/res/values-zh-rHK/strings.xml +++ b/common/src/main/res/values-zh-rHK/strings.xml @@ -1140,4 +1140,5 @@ 開啟後獲得直播通知 PK天梯赛 是否確認前往對方直播間? + 充值未到账? diff --git a/common/src/main/res/values-zh-rTW/strings.xml b/common/src/main/res/values-zh-rTW/strings.xml index 08b911021..df309f357 100644 --- a/common/src/main/res/values-zh-rTW/strings.xml +++ b/common/src/main/res/values-zh-rTW/strings.xml @@ -1139,4 +1139,5 @@ 開播通知 開啟後獲得直播通知 PK天梯赛 + 充值未到账? diff --git a/common/src/main/res/values-zh/strings.xml b/common/src/main/res/values-zh/strings.xml index 31a341994..dc76ee77b 100644 --- a/common/src/main/res/values-zh/strings.xml +++ b/common/src/main/res/values-zh/strings.xml @@ -1140,4 +1140,5 @@ 開啟後獲得直播通知 PK天梯赛 是否確認前往對方直播間? + 充值未到账? diff --git a/common/src/main/res/values/strings.xml b/common/src/main/res/values/strings.xml index 55ed22eda..bb1f0ca22 100644 --- a/common/src/main/res/values/strings.xml +++ b/common/src/main/res/values/strings.xml @@ -1146,4 +1146,5 @@ Limited ride And limited avatar frame PK Ladder Race Get live notification after opening Confirm whether to go to the other party\'s studio? + Not received? 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 24f5555bf..2d85ea59b 100644 --- a/main/src/main/java/com/yunbao/main/activity/MyWalletActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/MyWalletActivity.java @@ -14,6 +14,7 @@ import androidx.annotation.NonNull; import androidx.fragment.app.Fragment; import androidx.fragment.app.FragmentPagerAdapter; import androidx.viewpager.widget.ViewPager; + import com.alibaba.android.arouter.facade.annotation.Route; import com.android.billingclient.api.BillingResult; import com.android.billingclient.api.Purchase; @@ -23,10 +24,10 @@ import com.yunbao.common.activity.AbsActivity; import com.yunbao.common.fragment.LoadingDialog; import com.yunbao.common.http.CommonHttpUtil; import com.yunbao.common.http.HttpCallback; +import com.yunbao.common.manager.IMLoginManager; import com.yunbao.common.utils.GoogleBillingUtilNew; import com.yunbao.common.utils.RouteUtil; import com.yunbao.common.utils.ToastUtil; -import com.yunbao.common.utils.WordUtil; import com.yunbao.main.R; import com.yunbao.main.utils.HXLinePagerIndicator; @@ -41,6 +42,7 @@ import net.lucode.hackware.magicindicator.buildins.commonnavigator.indicators.Li import net.lucode.hackware.magicindicator.buildins.commonnavigator.titles.ColorTransitionPagerTitleView; import java.util.List; +import java.util.Locale; @Route(path = RouteUtil.PATH_COIN) public class MyWalletActivity extends AbsActivity { @@ -107,32 +109,32 @@ public class MyWalletActivity extends AbsActivity { }); }); - final String[] titles = {mContext.getString(R.string.diamond),mContext.getString(R.string.coins),mContext.getString(R.string.golden_beans)}; + final String[] titles = {mContext.getString(R.string.diamond), mContext.getString(R.string.coins), mContext.getString(R.string.golden_beans)}; if (getIntent().getStringExtra("tag") != null) { Log.i("tss", "首充"); if (CommonAppConfig.IS_GOOGLE_PLAY == false) { //链接版本 - fragments = new Fragment[]{new GoogleFragment(CommonAppConfig.HOST + "/index.php?g=Appapi&first_page=1&m=Mall&a=walletcoin&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&package_name=pd"), - new GoogleFragment(CommonAppConfig.HOST + "/index.php?g=Appapi&m=Mall&first_page=1&a=walletgold&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&package_name=pd"), - new WalletFragment(this, CommonAppConfig.HOST + "/index.php?g=Appapi&m=Mall&first_page=1&a=walletbean&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&package_name=pd")}; + fragments = new Fragment[]{new GoogleFragment(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")), + new GoogleFragment(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")), + new WalletFragment(this, 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"))}; } else { rView.setVisibility(View.VISIBLE); - fragments = new Fragment[]{new GoogleFragment(CommonAppConfig.HOST + "/index.php?g=Appapi&m=Mall&a=googlepaycoin&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&package_name=pd"), - new GoogleFragment( CommonAppConfig.HOST + "/index.php?g=Appapi&m=Mall&a=googlepaygole&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&package_name=pd"), - new WalletFragment(this, CommonAppConfig.HOST + "/index.php?g=Appapi&m=Mall&first_page=1&a=walletbean&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken())}; + fragments = new Fragment[]{new GoogleFragment(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")), + new GoogleFragment(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")), + new WalletFragment(this, 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"))}; } } else { if (CommonAppConfig.IS_GOOGLE_PLAY == false) { Log.i("tss", "不是首充"); //链接版本 - fragments = new Fragment[]{new GoogleFragment(CommonAppConfig.HOST + "/index.php?g=Appapi&m=Mall&a=walletcoin&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&package_name=pd"), - new GoogleFragment(CommonAppConfig.HOST + "/index.php?g=Appapi&m=Mall&a=walletgold&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&package_name=pd"), - new WalletFragment(this, CommonAppConfig.HOST + "/index.php?g=Appapi&m=Mall&a=walletbean&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&package_name=pd")}; + fragments = new Fragment[]{new GoogleFragment(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")), + new GoogleFragment(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")), + new WalletFragment(this, 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"))}; } else { rView.setVisibility(View.VISIBLE); - fragments = new Fragment[]{new GoogleFragment(CommonAppConfig.HOST + "/index.php?g=Appapi&m=Mall&a=googlepaycoin&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&package_name=pd"), - new GoogleFragment(CommonAppConfig.HOST + "/index.php?g=Appapi&m=Mall&a=googlepaygole&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&package_name=pd"), - new WalletFragment(this, CommonAppConfig.HOST + "/index.php?g=Appapi&m=Mall&first_page=1&a=walletbean&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken())}; + fragments = new Fragment[]{new GoogleFragment(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")), + new GoogleFragment(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")), + new WalletFragment(this, 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"))}; } } MagicIndicator magicIndicator = (MagicIndicator) findViewById(R.id.magic_indicator); diff --git a/main/src/main/java/com/yunbao/main/activity/RewardActivity.java b/main/src/main/java/com/yunbao/main/activity/RewardActivity.java index d5a1f0650..204e8e4d1 100644 --- a/main/src/main/java/com/yunbao/main/activity/RewardActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/RewardActivity.java @@ -33,6 +33,7 @@ import com.tencent.imsdk.v2.V2TIMCallback; import com.tencent.imsdk.v2.V2TIMManager; import com.tencent.imsdk.v2.V2TIMUserFullInfo; import com.yunbao.common.CommonAppConfig; +import com.yunbao.common.CommonAppContext; import com.yunbao.common.Constants; import com.yunbao.common.activity.AbsActivity; import com.yunbao.common.bean.UserBean; @@ -41,6 +42,7 @@ import com.yunbao.common.http.HttpCallback; import com.yunbao.common.interfaces.ActivityResultCallback; import com.yunbao.common.interfaces.CommonCallback; import com.yunbao.common.interfaces.ImageResultCallback; +import com.yunbao.common.manager.IMLoginManager; import com.yunbao.common.utils.DpUtil; import com.yunbao.common.utils.JavascriptInterfaceUtils; import com.yunbao.common.utils.L; @@ -58,6 +60,7 @@ import org.greenrobot.eventbus.ThreadMode; import java.io.File; import java.net.MalformedURLException; import java.net.URL; +import java.util.Locale; @Route(path = RouteUtil.PATH_REWARD) public class RewardActivity extends AbsActivity { @@ -322,7 +325,7 @@ public class RewardActivity extends AbsActivity { } public static void forward(Context context, String url) { - forward(context, url, true); + forward(context, url+ "&isZh=" + ((IMLoginManager.get(CommonAppContext.sInstance.getBaseContext()).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0"), true); } @Override diff --git a/main/src/main/java/com/yunbao/main/activity/ZhuangBanActivity.java b/main/src/main/java/com/yunbao/main/activity/ZhuangBanActivity.java index 5faf2af1c..b4769ab38 100644 --- a/main/src/main/java/com/yunbao/main/activity/ZhuangBanActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/ZhuangBanActivity.java @@ -31,9 +31,11 @@ import com.opensource.svgaplayer.SVGAImageView; import com.opensource.svgaplayer.SVGAParser; import com.opensource.svgaplayer.SVGAVideoEntity; import com.yunbao.common.CommonAppConfig; +import com.yunbao.common.CommonAppContext; import com.yunbao.common.Constants; import com.yunbao.common.activity.AbsActivity; import com.yunbao.common.event.JavascriptInterfaceEvent; +import com.yunbao.common.manager.IMLoginManager; import com.yunbao.common.utils.Bus; import com.yunbao.common.utils.DpUtil; import com.yunbao.common.utils.JavascriptInterfaceUtils; @@ -49,6 +51,7 @@ import org.greenrobot.eventbus.ThreadMode; import java.net.MalformedURLException; import java.net.URL; +import java.util.Locale; @Route(path = RouteUtil.PATH_ZHUANGBANACTIVITY) public class ZhuangBanActivity extends AbsActivity { @@ -287,7 +290,7 @@ public class ZhuangBanActivity extends AbsActivity { } public static void forward(Context context, String url) { - forward(context, url, true); + forward(context, url+ "&isZh=" + ((IMLoginManager.get(CommonAppContext.sInstance.getBaseContext()).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0"), true); } @Override 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 2e874486f..d58bf92a4 100644 --- a/main/src/main/java/com/yunbao/main/views/MainMeViewHolder.java +++ b/main/src/main/java/com/yunbao/main/views/MainMeViewHolder.java @@ -28,6 +28,7 @@ import com.opensource.svgaplayer.SVGAImageView; import com.opensource.svgaplayer.SVGAParser; import com.opensource.svgaplayer.SVGAVideoEntity; import com.yunbao.common.CommonAppConfig; +import com.yunbao.common.CommonAppContext; import com.yunbao.common.Constants; import com.yunbao.common.HtmlConfig; import com.yunbao.common.activity.WebViewActivity; @@ -372,7 +373,7 @@ public class MainMeViewHolder extends AbsMainViewHolder implements OnItemClickLi tv_level.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { - String url = CommonAppConfig.HOST + "/h5/Grade/index.html?" + "token=" + CommonAppConfig.getInstance().getToken() + "&uid=" + CommonAppConfig.getInstance().getUid(); + String url = CommonAppConfig.HOST + "/h5/Grade/index.html?" + "token=" + CommonAppConfig.getInstance().getToken() + "&uid=" + CommonAppConfig.getInstance().getUid()+ "&isZh=" + ((IMLoginManager.get(CommonAppContext.sInstance.getBaseContext()).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0"); ZhuangBanActivity.forward(mContext, url); } });