|
@@ -268,15 +268,9 @@ public class NoticeManagementController {
|
|
|
*/
|
|
|
@GetMapping(value = "/filePreview")
|
|
|
public R convertToHtml(@RequestParam("url") String url) throws UnknownHostException {
|
|
|
- String os = System.getProperty("os.name");
|
|
|
- String ip = "";
|
|
|
- if (os.toLowerCase().startsWith("win")) {
|
|
|
- InetAddress localHost = InetAddress.getLocalHost();
|
|
|
- ip = localHost.getHostAddress();
|
|
|
- } else {
|
|
|
- ip = "10.65.78.23";
|
|
|
- }
|
|
|
- String httpUrl = "http://" + ip + ":8098/file/" + url;
|
|
|
+ InetAddress localHost = InetAddress.getLocalHost();
|
|
|
+ String ip = localHost.getHostAddress();
|
|
|
+ String httpUrl = "http://" + ip + ":28900/file/" + url;
|
|
|
return R.ok().data(httpUrl);
|
|
|
}
|
|
|
}
|