Browse Source

问题修改

hlf 1 year ago
parent
commit
5a7e2ed4fc

+ 3 - 9
ims-service/ims-eval/src/main/java/com/ims/eval/controller/NoticeManagementController.java

@@ -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);
 	}
 }