Commit 3c1caee8 authored by yanzg's avatar yanzg

Merge branch 'ver1.1' of http://192.168.0.204/yzg/yzg-util

parents c2c1c8a7 f13538e8
...@@ -198,14 +198,14 @@ public class UrlHelper { ...@@ -198,14 +198,14 @@ public class UrlHelper {
*/ */
public static String getFullUrl(String simpleUrl, String simpleBaseUrl, String defBaseUrl) { public static String getFullUrl(String simpleUrl, String simpleBaseUrl, String defBaseUrl) {
// 获取请求地址 // 获取请求地址
String tbdUrl = StringHelper.getFirst(simpleBaseUrl, defBaseUrl); String baseUrl = StringHelper.getFirst(simpleBaseUrl, defBaseUrl);
// 获取全路径 // 获取全路径
String toSimpleFullUrl = getFUllUrl(tbdUrl, simpleUrl); String toSimpleFullUrl = getFUllUrl(baseUrl, simpleUrl);
// 最终地址处理 // 最终地址处理
String toSimpleUrl; String toSimpleUrl;
if (!StringHelper.compare(simpleBaseUrl, simpleUrl) && toSimpleFullUrl.startsWith(defBaseUrl)) { if (!StringHelper.compare(simpleBaseUrl, defBaseUrl) && toSimpleFullUrl.startsWith(defBaseUrl)) {
String rightUrl = StringHelper.trimStart(toSimpleFullUrl, defBaseUrl); String rightUrl = StringHelper.trimStart(toSimpleFullUrl, defBaseUrl);
toSimpleUrl = getFUllUrl(tbdUrl, rightUrl); toSimpleUrl = getFUllUrl(baseUrl, rightUrl);
} else { } else {
toSimpleUrl = toSimpleFullUrl; toSimpleUrl = toSimpleFullUrl;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment