企业列表出来了
parent
1b601222bc
commit
b07cf2fcd9
|
@ -182,7 +182,7 @@
|
|||
<workItem from="1725517357652" duration="1395000" />
|
||||
<workItem from="1725528983357" duration="20000" />
|
||||
<workItem from="1725534330399" duration="6000" />
|
||||
<workItem from="1725535072504" duration="1666000" />
|
||||
<workItem from="1725535072504" duration="2629000" />
|
||||
</task>
|
||||
<task id="LOCAL-00001" summary="初始化">
|
||||
<created>1724047244829</created>
|
||||
|
@ -415,7 +415,14 @@
|
|||
<option name="project" value="LOCAL" />
|
||||
<updated>1725536412572</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="34" />
|
||||
<task id="LOCAL-00034" summary="企业列表出来了">
|
||||
<created>1725537357138</created>
|
||||
<option name="number" value="00034" />
|
||||
<option name="presentableId" value="LOCAL-00034" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1725537357138</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="35" />
|
||||
<servers />
|
||||
</component>
|
||||
<component name="TypeScriptGeneratedFilesManager">
|
||||
|
|
|
@ -31,7 +31,7 @@ public class SimpleWeatherConfig {
|
|||
params.put("city", cityName);
|
||||
params.put("key", API_KEY);
|
||||
String queryParams = urlencode(params);
|
||||
String msg = null;
|
||||
|
||||
String response = doGet(API_URL, queryParams);
|
||||
try {
|
||||
JSONObject jsonObject = JSONObject.fromObject(response);
|
||||
|
@ -49,15 +49,13 @@ public class SimpleWeatherConfig {
|
|||
System.out.printf("风向:%s%n", realtime.getString("direct"));
|
||||
System.out.printf("风力:%s%n", realtime.getString("power"));
|
||||
System.out.printf("空气质量:%s%n", realtime.getString("aqi"));
|
||||
|
||||
msg = String.valueOf(realtime);
|
||||
} else {
|
||||
System.out.println("调用接口失败:" + jsonObject.getString("reason"));
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return msg;
|
||||
return response;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
package com.muyu.market.config;
|
||||
|
||||
import net.sf.json.JSONObject;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.InputStreamReader;
|
||||
import java.net.HttpURLConnection;
|
||||
|
@ -33,10 +31,9 @@ public class ThirdPartyConfig {
|
|||
}
|
||||
in.close();
|
||||
connection.disconnect();
|
||||
JSONObject jsonObject = JSONObject.fromObject(response);
|
||||
JSONObject result = jsonObject.getJSONObject("result");
|
||||
|
||||
// 返回HTTP 200 OK状态码和响应体
|
||||
return String.valueOf(result);
|
||||
return response.toString();
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue