fix#防止重复调用

This commit is contained in:
wujifei
2021-01-13 21:40:16 +08:00
parent 7d49c83e19
commit dd8ea0bf19

View File

@@ -67,6 +67,7 @@ public class V2XRefreshModel {
private Context mContext;
private V2XApiService mV2XApiService;
private static V2XRefreshModel mV2XRefreshModel;
long startTime = 0l;
private V2XRefreshModel() {
}
@@ -682,6 +683,10 @@ public class V2XRefreshModel {
Logger.d("V2XRefreshModel", "主页没有显示");
return;
}
if (System.currentTimeMillis() - startTime < 1000 * 60) {
return;
}
startTime = System.currentTimeMillis();
if (mV2XApiService != null) {
Map<String, Object> map = new ParamsProvider.Builder(mContext).build();
map.put("sn", sn);