URL 跳转考虑是否存在?

This commit is contained in:
ningwenqiang
2024-11-02 14:57:48 +08:00
parent 1019bac085
commit 3f03230cd3
12 changed files with 66 additions and 26 deletions

View File

@@ -297,11 +297,19 @@ public class WebViewActivity extends AbsActivity {
mIsLive = isLive;
if (Constants.LoginKefu) {
if (addArgs) {
url += "&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&isZh=" + (WordUtil.isNewZh() ? "1" : 0);
}
if (url.contains("?")) {
url += "&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken();
} else {
url += "?uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken();
}}
}
if (url.contains("?")) {
url += "&isZh=" + ((IMLoginManager.get(CommonAppContext.sInstance.getBaseContext()).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0");
} else {
url += "?isZh=" + ((IMLoginManager.get(CommonAppContext.sInstance.getBaseContext()).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0");
}
Intent intent = new Intent(context, WebViewActivity.class);
intent.putExtra(Constants.URL, url + "&isZh=" + ((IMLoginManager.get(CommonAppContext.sInstance.getBaseContext()).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0"));
intent.putExtra(Constants.URL, url);
context.startActivity(intent);
}

View File

@@ -1493,4 +1493,5 @@ Limited ride And limited avatar frame</string>
<string name="interaction_type">Interaction</string>
<string name="system_msg">System Message</string>
<string name="user_login_account">Sign in with Phone number</string>
<string name="live_search_tips">Search for the hosts nickname or ID</string>
</resources>

View File

@@ -1623,4 +1623,5 @@
<string name="interaction_type">互動</string>
<string name="system_msg">系統消息</string>
<string name="user_login_account">使用手機號登錄</string>
<string name="live_search_tips">搜索主播暱稱或ID</string>
</resources>

View File

@@ -1432,6 +1432,6 @@ Limited ride And limited avatar frame</string>
<string name="system_msg">System Message</string>
<string name="user_login_account">Sign in with Phone number</string>
<string name="live_search_tips">Search for the hosts nickname or ID</string>
</resources>