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