From dc5633bcb9c7d8abf87f5b054a52e20d9ca339cd Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Wed, 19 Apr 2023 10:16:56 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=9A=E8=AF=AD=E8=A8=80=E5=88=87=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/yunbao/common/utils/RouteUtil.java | 5 ++- config.gradle | 4 +-- .../live/activity/LiveAnchorActivity.java | 19 ++++++---- .../live/activity/WebViewActivityMedal.java | 5 ++- .../LiveTurnTableDialogFragment4Audience.java | 5 ++- .../LiveWishListDialogFragment4Audience.java | 5 ++- .../live/presenter/LiveGiftAnimPresenter.java | 5 +-- .../presenter/UserHomeSharePresenter.java | 5 ++- .../live/views/LiveContributeViewHolder.java | 5 ++- .../live/views/LiveMedalRankViewHolder.java | 5 ++- .../yunbao/live/views/LiveRoomViewHolder.java | 35 +++++++++++++------ .../live/views/TurnTableWebViewHolder.java | 5 ++- .../activity/LanguageSettingActivity.java | 2 +- .../yunbao/main/activity/MyCoinActivity.java | 6 ++-- .../main/activity/MyProfitActivity.java | 5 ++- .../views/MainHomeCommunityViewHolder.java | 11 +++--- .../yunbao/main/views/MainMeViewHolder.java | 3 +- 17 files changed, 90 insertions(+), 40 deletions(-) diff --git a/common/src/main/java/com/yunbao/common/utils/RouteUtil.java b/common/src/main/java/com/yunbao/common/utils/RouteUtil.java index c8a3c2645..e4231fe8b 100644 --- a/common/src/main/java/com/yunbao/common/utils/RouteUtil.java +++ b/common/src/main/java/com/yunbao/common/utils/RouteUtil.java @@ -10,6 +10,9 @@ import com.yunbao.common.CommonAppContext; import com.yunbao.common.Constants; import com.yunbao.common.HtmlConfig; import com.yunbao.common.bean.LiveBean; +import com.yunbao.common.manager.IMLoginManager; + +import java.util.Locale; /** * Created by cxf on 2019/2/25. @@ -109,7 +112,7 @@ public class RouteUtil { if (!"".equals(Constants.chatActionUrl)) { url = Constants.chatActionUrl; } - Constants.myUrl = url + "&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&t=" + System.currentTimeMillis(); + Constants.myUrl = url + "&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&t=" + System.currentTimeMillis() + "&isZh=" + ((IMLoginManager.get(context).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0"); ARouter.getInstance().build(PATH_MYWEBVIEWACTIVTITY) .withString(Constants.URL, url) .navigation(); diff --git a/config.gradle b/config.gradle index 82f2a343d..367862767 100644 --- a/config.gradle +++ b/config.gradle @@ -9,9 +9,9 @@ ext { ] manifestPlaceholders = [ //正式、 - serverHost : "https://napi.yaoulive.com", +// serverHost : "https://napi.yaoulive.com", //测试 -// serverHost : "https://ceshi.yaoulive.com", + serverHost : "https://ceshi.yaoulive.com", //腾讯地图 txMapAppKey : "EOZBZ-ASLCU-4XPV3-BDCHZ-4E3Q7-H4BWB", diff --git a/live/src/main/java/com/yunbao/live/activity/LiveAnchorActivity.java b/live/src/main/java/com/yunbao/live/activity/LiveAnchorActivity.java index f3d36ed6b..bbec22ae4 100644 --- a/live/src/main/java/com/yunbao/live/activity/LiveAnchorActivity.java +++ b/live/src/main/java/com/yunbao/live/activity/LiveAnchorActivity.java @@ -1,5 +1,9 @@ package com.yunbao.live.activity; +import static com.tencent.trtc.TRTCCloudDef.TRTC_VIDEO_MIRROR_TYPE_DISABLE; +import static com.tencent.trtc.TRTCCloudDef.TRTC_VIDEO_MIRROR_TYPE_ENABLE; +import static com.yunbao.live.views.LivePushTxViewHolder.mTRTCCloud; + import android.app.Dialog; import android.content.Context; import android.content.Intent; @@ -24,6 +28,7 @@ import com.tencent.trtc.TRTCCloudDef; import com.yunbao.common.CommonAppConfig; import com.yunbao.common.CommonAppContext; import com.yunbao.common.Constants; +import com.yunbao.common.bean.LiveBean; import com.yunbao.common.bean.UserBean; import com.yunbao.common.dialog.NotCancelableDialog; import com.yunbao.common.event.LoginInvalidEvent; @@ -32,14 +37,13 @@ import com.yunbao.common.http.CommonHttpUtil; import com.yunbao.common.http.HttpCallback; import com.yunbao.common.http.HttpClient; import com.yunbao.common.http.JsonBean; +import com.yunbao.common.manager.IMLoginManager; import com.yunbao.common.utils.DateFormatUtil; import com.yunbao.common.utils.DialogUitl; import com.yunbao.common.utils.L; import com.yunbao.common.utils.LogUtil; import com.yunbao.common.utils.ToastUtil; -import com.yunbao.common.utils.WordUtil; import com.yunbao.live.R; -import com.yunbao.common.bean.LiveBean; import com.yunbao.live.bean.LiveGuardInfo; import com.yunbao.live.bean.LiveKsyConfigBean; import com.yunbao.live.dialog.LiveBeautyDialogFragment; @@ -72,13 +76,10 @@ import org.greenrobot.eventbus.ThreadMode; import java.io.File; import java.util.List; +import java.util.Locale; import pl.droidsonroids.gif.GifImageView; -import static com.tencent.trtc.TRTCCloudDef.TRTC_VIDEO_MIRROR_TYPE_DISABLE; -import static com.tencent.trtc.TRTCCloudDef.TRTC_VIDEO_MIRROR_TYPE_ENABLE; -import static com.yunbao.live.views.LivePushTxViewHolder.mTRTCCloud; - /** * Created by cxf on 2018/10/7. * 主播直播间 @@ -276,7 +277,11 @@ public class LiveAnchorActivity extends LiveActivity implements LiveFunctionClic }); break; case Constants.LIVE_FUNC_WKS: - String url = CommonAppConfig.HOST + "/h5/activity/weekStar/index.html?&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&anchorUid=" + mLiveUid; + String url = CommonAppConfig.HOST + + "/h5/activity/weekStar/index.html?&uid=" + + CommonAppConfig.getInstance().getUid() + "&token=" + + CommonAppConfig.getInstance().getToken() + "&anchorUid=" + mLiveUid + + "&isZh=" + ((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0"); ZhuangBanActivity.forward(mContext, url, false); break; case Constants.LIVE_FUNC_LINK_MIC://连麦 diff --git a/live/src/main/java/com/yunbao/live/activity/WebViewActivityMedal.java b/live/src/main/java/com/yunbao/live/activity/WebViewActivityMedal.java index d2456827f..1f2dec0b1 100644 --- a/live/src/main/java/com/yunbao/live/activity/WebViewActivityMedal.java +++ b/live/src/main/java/com/yunbao/live/activity/WebViewActivityMedal.java @@ -31,6 +31,7 @@ import com.yunbao.common.activity.AbsActivity; import com.yunbao.common.bean.LiveBean; import com.yunbao.common.event.JavascriptInterfaceEvent; import com.yunbao.common.http.HttpCallback; +import com.yunbao.common.manager.IMLoginManager; import com.yunbao.common.utils.Bus; import com.yunbao.common.utils.DpUtil; import com.yunbao.common.utils.JavascriptInterfaceUtils; @@ -45,6 +46,8 @@ import com.yunbao.live.presenter.LiveRoomCheckLivePresenter; import org.greenrobot.eventbus.Subscribe; import org.greenrobot.eventbus.ThreadMode; +import java.util.Locale; + /** * Created by cxf on 2018/9/25. * 我的徽章 h5页面 @@ -152,7 +155,7 @@ public class WebViewActivityMedal extends AbsActivity { mIvQuestion.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { - MedalQuestionWebViewActivity.forward(mContext, HtmlConfig.MEDAL_QUESTION); + MedalQuestionWebViewActivity.forward(mContext, HtmlConfig.MEDAL_QUESTION + "&isZh=" + ((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0")); } }); } diff --git a/live/src/main/java/com/yunbao/live/dialog/LiveTurnTableDialogFragment4Audience.java b/live/src/main/java/com/yunbao/live/dialog/LiveTurnTableDialogFragment4Audience.java index 2e2945509..732de5034 100644 --- a/live/src/main/java/com/yunbao/live/dialog/LiveTurnTableDialogFragment4Audience.java +++ b/live/src/main/java/com/yunbao/live/dialog/LiveTurnTableDialogFragment4Audience.java @@ -12,6 +12,7 @@ import com.yunbao.common.Constants; import com.yunbao.common.HtmlConfig; import com.yunbao.common.bean.JsTurnTableBean; import com.yunbao.common.dialog.AbsDialogFragment; +import com.yunbao.common.manager.IMLoginManager; import com.yunbao.live.R; import com.yunbao.live.views.TurnTableWebViewHolder; @@ -19,6 +20,8 @@ import org.greenrobot.eventbus.EventBus; import org.greenrobot.eventbus.Subscribe; import org.greenrobot.eventbus.ThreadMode; +import java.util.Locale; + import cn.qqtheme.framework.util.ScreenUtils; @@ -73,7 +76,7 @@ public class LiveTurnTableDialogFragment4Audience extends AbsDialogFragment { if (mTurnTableViewHolder == null) { String url = HtmlConfig.TURNTABLE_URL; url += "&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" - + CommonAppConfig.getInstance().getToken() + "&liveUid=" + mLiveUid; + + CommonAppConfig.getInstance().getToken() + "&liveUid=" + mLiveUid + "&isZh=" + ((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0"); mTurnTableViewHolder = new TurnTableWebViewHolder(getActivity(), rlWebview, url); mTurnTableViewHolder.subscribeActivityLifeCycle(); mTurnTableViewHolder.addToParent(); diff --git a/live/src/main/java/com/yunbao/live/dialog/LiveWishListDialogFragment4Audience.java b/live/src/main/java/com/yunbao/live/dialog/LiveWishListDialogFragment4Audience.java index c1a4aafe4..168dfdf9e 100644 --- a/live/src/main/java/com/yunbao/live/dialog/LiveWishListDialogFragment4Audience.java +++ b/live/src/main/java/com/yunbao/live/dialog/LiveWishListDialogFragment4Audience.java @@ -11,6 +11,7 @@ import com.yunbao.common.Constants; import com.yunbao.common.HtmlConfig; import com.yunbao.common.bean.JsWishBean; import com.yunbao.common.dialog.AbsDialogFragment; +import com.yunbao.common.manager.IMLoginManager; import com.yunbao.common.utils.DpUtil; import com.yunbao.live.R; import com.yunbao.live.activity.LiveAudienceActivity; @@ -20,6 +21,8 @@ import org.greenrobot.eventbus.EventBus; import org.greenrobot.eventbus.Subscribe; import org.greenrobot.eventbus.ThreadMode; +import java.util.Locale; + /** * Created by cxf on 2018/10/19. * 观众查看 心愿单弹窗 @@ -69,7 +72,7 @@ public class LiveWishListDialogFragment4Audience extends AbsDialogFragment { if (mWishWebViewHolder == null) { String url = HtmlConfig.WISHLIST_URL; url += "&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" - + CommonAppConfig.getInstance().getToken() + "&liveUid=" + mLiveUid; + + CommonAppConfig.getInstance().getToken() + "&liveUid=" + mLiveUid + "&isZh=" + ((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0"); mWishWebViewHolder = new WishlistWebViewHolder(mContext, rlWebview, url); mWishWebViewHolder.subscribeActivityLifeCycle(); mWishWebViewHolder.addToParent(); diff --git a/live/src/main/java/com/yunbao/live/presenter/LiveGiftAnimPresenter.java b/live/src/main/java/com/yunbao/live/presenter/LiveGiftAnimPresenter.java index 4b31c8926..b91798350 100644 --- a/live/src/main/java/com/yunbao/live/presenter/LiveGiftAnimPresenter.java +++ b/live/src/main/java/com/yunbao/live/presenter/LiveGiftAnimPresenter.java @@ -72,6 +72,7 @@ import java.io.File; import java.io.FileInputStream; import java.lang.ref.SoftReference; import java.util.HashMap; +import java.util.Locale; import java.util.Map; import java.util.concurrent.ConcurrentLinkedQueue; @@ -339,7 +340,7 @@ public class LiveGiftAnimPresenter { mGifGiftTipGroupBuyZuoji.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { - WebViewActivity.forward(mContext, HtmlConfig.SHOP); + WebViewActivity.forward(mContext, HtmlConfig.SHOP + "&isZh=" + ((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0")); } }); } @@ -348,7 +349,7 @@ public class LiveGiftAnimPresenter { mGifGiftTipGroupBuyLiangName.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { - WebViewActivity.forward(mContext, HtmlConfig.SHOP); + WebViewActivity.forward(mContext, HtmlConfig.SHOP + "&isZh=" + ((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0")); } }); } diff --git a/live/src/main/java/com/yunbao/live/presenter/UserHomeSharePresenter.java b/live/src/main/java/com/yunbao/live/presenter/UserHomeSharePresenter.java index a132baac5..204ec3452 100644 --- a/live/src/main/java/com/yunbao/live/presenter/UserHomeSharePresenter.java +++ b/live/src/main/java/com/yunbao/live/presenter/UserHomeSharePresenter.java @@ -6,10 +6,13 @@ import android.content.Context; import android.text.TextUtils; import com.yunbao.common.HtmlConfig; +import com.yunbao.common.manager.IMLoginManager; import com.yunbao.common.utils.ToastUtil; import com.yunbao.common.utils.WordUtil; import com.yunbao.live.R; +import java.util.Locale; + /** * Created by cxf on 2018/10/30. */ @@ -56,7 +59,7 @@ public class UserHomeSharePresenter { return; } String link = HtmlConfig.SHARE_HOME_PAGE + mToUid; - ClipboardManager cm = (ClipboardManager) mContext.getSystemService(Context.CLIPBOARD_SERVICE); + ClipboardManager cm = (ClipboardManager) mContext.getSystemService(Context.CLIPBOARD_SERVICE + "&isZh=" + ((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0")); ClipData clipData = ClipData.newPlainText("text", link); cm.setPrimaryClip(clipData); ToastUtil.show(R.string.copy_success); diff --git a/live/src/main/java/com/yunbao/live/views/LiveContributeViewHolder.java b/live/src/main/java/com/yunbao/live/views/LiveContributeViewHolder.java index f79ddf200..6afd4c7f6 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveContributeViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveContributeViewHolder.java @@ -14,11 +14,14 @@ import android.widget.ProgressBar; import com.yunbao.common.CommonAppConfig; import com.yunbao.common.HtmlConfig; +import com.yunbao.common.manager.IMLoginManager; import com.yunbao.live.R; import com.yunbao.live.activity.LiveAudienceActivity; import com.yunbao.live.activity.LiveContributeActivity; import com.yunbao.common.utils.L; +import java.util.Locale; + /** * Created by cxf on 2018/10/15. * 直播间粉丝排行榜 @@ -79,7 +82,7 @@ public class LiveContributeViewHolder extends AbsLivePageViewHolder implements V public void loadData() { if (!mLoad) { mLoad = true; - mWebView.loadUrl(HtmlConfig.LIVE_LIST + mLiveUid); + mWebView.loadUrl(HtmlConfig.LIVE_LIST + mLiveUid + "&isZh=" + ((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0")); } else { mWebView.reload(); } diff --git a/live/src/main/java/com/yunbao/live/views/LiveMedalRankViewHolder.java b/live/src/main/java/com/yunbao/live/views/LiveMedalRankViewHolder.java index 1d8c2c1e1..b70223ee1 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveMedalRankViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveMedalRankViewHolder.java @@ -13,11 +13,14 @@ import android.widget.ProgressBar; import com.yunbao.common.CommonAppConfig; import com.yunbao.common.HtmlConfig; +import com.yunbao.common.manager.IMLoginManager; import com.yunbao.common.utils.L; import com.yunbao.live.R; import com.yunbao.live.activity.LiveAudienceActivity; import com.yunbao.live.activity.LiveContributeActivity; +import java.util.Locale; + /** * Created by cxf on 2018/10/15. * 直播间粉丝排行榜 @@ -78,7 +81,7 @@ public class LiveMedalRankViewHolder extends AbsLivePageViewHolder implements Vi public void loadData() { if (!mLoad) { mLoad = true; - mWebView.loadUrl(HtmlConfig.LIVE_FANS_MEDAL_RANKING + mLiveUid); + mWebView.loadUrl(HtmlConfig.LIVE_FANS_MEDAL_RANKING + mLiveUid + "&isZh=" + ((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0")); } else { mWebView.reload(); } diff --git a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java index 35fc45d1f..c451154f3 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java @@ -110,7 +110,6 @@ import com.yunbao.common.utils.ScreenDimenUtil; import com.yunbao.common.utils.SpUtil; import com.yunbao.common.utils.StringUtil; import com.yunbao.common.utils.ToastUtil; -import com.yunbao.common.utils.WordUtil; import com.yunbao.common.utils.formatBigNum; import com.yunbao.common.views.AbsViewHolder; import com.yunbao.common.views.weight.ClipPathCircleImage; @@ -1279,7 +1278,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis liveAudienceActivity.pausePlay(); if (code == 1008) {//余额不足 liveAudienceActivity.setCoinNotEnough(true); - DialogUitl.showSimpleDialog(mContext,mContext.getString(R.string.live_coin_not_enough), false, + DialogUitl.showSimpleDialog(mContext, mContext.getString(R.string.live_coin_not_enough), false, new DialogUitl.SimpleCallback2() { @Override public void onConfirmClick(Dialog dialog, String content) { @@ -1621,7 +1620,10 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis .append("&uid=") .append(userInfo.getId()) .append("&k=") - .append(System.currentTimeMillis()); + .append(System.currentTimeMillis()) + .append("&isZh=") + .append(((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0")); + } else { type = bean.getShow_type(); htmlUrl.append(bean.getLink()) @@ -1632,7 +1634,9 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis .append("&anchorUid=") .append(mLiveUid) .append("&t=") - .append(System.currentTimeMillis()); + .append(System.currentTimeMillis()) + .append("&isZh=") + .append(((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0")); } if (TextUtils.equals(type, "1")) { ZhuangBanActivity.forward(mContext, htmlUrl.toString(), false); @@ -1680,7 +1684,9 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis .append("&uid=") .append(userInfo.getId()) .append("&k=") - .append(System.currentTimeMillis()); + .append(System.currentTimeMillis()) + .append("&isZh=") + .append(((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0")); } else { type = bean.getShow_type(); htmlUrl.append(bean.getLink()) @@ -1694,7 +1700,9 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis .append(mLiveUid) .append("&t=") .append(System.currentTimeMillis()) - .append("&g=Appapi&m=Wish&a=index"); + .append("&g=Appapi&m=Wish&a=index") + .append("&isZh=") + .append(((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0")); } if (TextUtils.equals(type, "1")) { ZhuangBanActivity.forward(mContext, htmlUrl.toString(), false); @@ -1730,7 +1738,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis if (loadingDialog != null && loadingDialog.isShowing()) { return true; } - loadingDialog = DialogUitl.loadingDialog(mContext,mContext.getString(R.string.login_wait)); + loadingDialog = DialogUitl.loadingDialog(mContext, mContext.getString(R.string.login_wait)); loadingDialog.show(); new Handler(Looper.getMainLooper()).postDelayed(() -> { if (loadingDialog != null) { @@ -2024,7 +2032,8 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis } String url = CommonAppConfig.HOST + path; url += "&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" - + CommonAppConfig.getInstance().getToken() + "&anchorUid=" + mLiveUid; + + CommonAppConfig.getInstance().getToken() + "&anchorUid=" + mLiveUid + + "&isZh=" + ((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0"); bundle.putString("url", url); bundle.putInt("height", DpUtil.dp2px(500)); bundle.putInt("show_type", 0); @@ -2876,7 +2885,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis public void callback(Integer isAttention) { if (isAttention == 1) { LiveActivity.sendSystemMessage( - CommonAppConfig.getInstance().getUserBean().getUserNiceName() +Contexts.getString(R.string.live_follow_anchor)); + CommonAppConfig.getInstance().getUserBean().getUserNiceName() + Contexts.getString(R.string.live_follow_anchor)); } } }); @@ -4875,7 +4884,9 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis .append(mLiveUid) .append("&t=") .append(System.currentTimeMillis()) - .append("&g=Appapi&m=Wish&a=index"); + .append("&g=Appapi&m=Wish&a=index") + .append("&isZh=") + .append(((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0")); if (TextUtils.equals(type, "1")) { ZhuangBanActivity.forward(mContext, htmlUrl.toString(), false); } else { @@ -4948,7 +4959,9 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis .append(mLiveUid) .append("&t=") .append(System.currentTimeMillis()) - .append("&g=Appapi&m=Wish&a=index"); + .append("&g=Appapi&m=Wish&a=index") + .append("&isZh=") + .append(((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0")); if (TextUtils.equals(type, "1")) { ZhuangBanActivity.forward(mContext, htmlUrl.toString(), false); } else { diff --git a/live/src/main/java/com/yunbao/live/views/TurnTableWebViewHolder.java b/live/src/main/java/com/yunbao/live/views/TurnTableWebViewHolder.java index 74dd4981b..a433848ad 100644 --- a/live/src/main/java/com/yunbao/live/views/TurnTableWebViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/TurnTableWebViewHolder.java @@ -17,6 +17,7 @@ import com.yunbao.common.HtmlConfig; import com.yunbao.common.activity.WebViewActivity; import com.yunbao.common.bean.JsTurnTableBean; import com.yunbao.common.event.JavascriptInterfaceEvent; +import com.yunbao.common.manager.IMLoginManager; import com.yunbao.common.utils.Bus; import com.yunbao.common.utils.JavascriptInterfaceUtils; import com.yunbao.common.utils.L; @@ -26,6 +27,8 @@ import org.greenrobot.eventbus.EventBus; import org.greenrobot.eventbus.Subscribe; import org.greenrobot.eventbus.ThreadMode; +import java.util.Locale; + /** * Created by cxf on 2018/10/15. * 心愿单WebView @@ -125,7 +128,7 @@ public class TurnTableWebViewHolder extends AbsLivePageViewHolder implements Vie if (!TextUtils.isEmpty(event.getMethod())) { if (TextUtils.equals(event.getMethod(), "androidMethod")) { if (event.getData() != null && !event.getData().isEmpty()) { - WebViewActivity.forward(mContext, HtmlConfig.SHOP); + WebViewActivity.forward(mContext, HtmlConfig.SHOP + "&isZh=" + ((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0")); EventBus.getDefault().post(new JsTurnTableBean(event.getData())); } } diff --git a/main/src/main/java/com/yunbao/main/activity/LanguageSettingActivity.java b/main/src/main/java/com/yunbao/main/activity/LanguageSettingActivity.java index 02431ad32..c718c736a 100644 --- a/main/src/main/java/com/yunbao/main/activity/LanguageSettingActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/LanguageSettingActivity.java @@ -70,7 +70,7 @@ public class LanguageSettingActivity extends AbsActivity { Stack allActivityStacks = AppManager.getInstance().getAllActivityStacks(); for (int i = 0; i < allActivityStacks.size(); i++) { if (!(allActivityStacks.get(i) instanceof LanguageSettingActivity)) { - LanguageUtil.shiftLanguage(locale, allActivityStacks.get(i), mContext); + allActivityStacks.get(i).finish(); } } IMLoginManager.get(mContext).setLanguage(locale != Locale.SIMPLIFIED_CHINESE); diff --git a/main/src/main/java/com/yunbao/main/activity/MyCoinActivity.java b/main/src/main/java/com/yunbao/main/activity/MyCoinActivity.java index c6be2770f..c29b6f47a 100644 --- a/main/src/main/java/com/yunbao/main/activity/MyCoinActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/MyCoinActivity.java @@ -24,6 +24,7 @@ import com.yunbao.common.http.CommonHttpConsts; import com.yunbao.common.http.CommonHttpUtil; import com.yunbao.common.http.HttpCallback; import com.yunbao.common.interfaces.OnItemClickListener; +import com.yunbao.common.manager.IMLoginManager; import com.yunbao.common.pay.PayCallback; import com.yunbao.common.pay.PayPresenter; import com.yunbao.common.utils.StringUtil; @@ -38,6 +39,7 @@ import org.greenrobot.eventbus.Subscribe; import org.greenrobot.eventbus.ThreadMode; import java.util.List; +import java.util.Locale; /** * Created by cxf on 2018/10/23. @@ -295,10 +297,10 @@ public class MyCoinActivity extends AbsActivity implements OnItemClickListener