hlf 1 gadu atpakaļ
vecāks
revīzija
ba6b1d24c1

+ 8 - 1
ims-service/ims-eval/src/main/java/com/ims/eval/controller/NoticeManagementController.java

@@ -266,7 +266,14 @@ public class NoticeManagementController {
 	 */
 	@GetMapping(value = "/filePreview")
 	public R convertToHtml(@RequestParam("url") String url) {
-		String httpUrl = "http://192.168.2.10:8098/office/" + url;
+		String os = System.getProperty("os.name");
+		String ip = "";
+		if (os.toLowerCase().startsWith("win")) {
+			ip = "192.168.2.10";
+		} else {
+			ip = "10.65.78.23";
+		}
+		String httpUrl = "http://" + ip + ":8098/office/" + url;
 		return R.ok().data(httpUrl);
 	}
 }