修复有草稿箱进去回答答案成功后无法刷新页面问题

This commit is contained in:
kehaoyuan
2017-12-29 18:24:31 +08:00
parent 3e37731d84
commit 926b2d070f
10 changed files with 131 additions and 77 deletions

View File

@ -103,39 +103,39 @@ public class TimestampUtils {
public static String addTimestamp(String url) {
// TODO: 22/12/17 刷新版
// if (TextUtils.isEmpty(url)) {
// return url;
// }
// if (url.contains("?")) {
// String u = url + "&timestamp=" + System.currentTimeMillis();
// return u;
// } else {
// String u = url + "?timestamp=" + System.currentTimeMillis();
// return u;
// }
if (TextUtils.isEmpty(url)) {
return url;
}
int cd = 0;
for (String key : getCdMap().keySet()) {
if (Pattern.matches(key, url)) {
cd = getCdMap().get(key);
break;
}
}
if (cd == 0) {
return url;
}
if (url.contains("?")) {
String u = url + "&timestamp=" + getTimestamp(url, cd);
// Utils.log("url = " + u);
String u = url + "&timestamp=" + System.currentTimeMillis();
return u;
} else {
String u = url + "?timestamp=" + getTimestamp(url, cd);
// Utils.log("url = " + u);
String u = url + "?timestamp=" + System.currentTimeMillis();
return u;
}
// if (TextUtils.isEmpty(url)) {
// return url;
// }
// int cd = 0;
// for (String key : getCdMap().keySet()) {
// if (Pattern.matches(key, url)) {
// cd = getCdMap().get(key);
// break;
// }
// }
// if (cd == 0) {
// return url;
// }
// if (url.contains("?")) {
// String u = url + "&timestamp=" + getTimestamp(url, cd);
//// Utils.log("url = " + u);
// return u;
// } else {
// String u = url + "?timestamp=" + getTimestamp(url, cd);
//// Utils.log("url = " + u);
// return u;
// }
}
private static ArrayMap<String, Integer> getCdMap() {