瀏覽代碼

modify:

1. 移动端预览修改;
tags/24080901
WendyYang 5 月之前
父節點
當前提交
710e2fdf78
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. +4
    -1
      hz-pm-api/src/main/java/com/hz/pm/api/external/FilePreviewClient.java

+ 4
- 1
hz-pm-api/src/main/java/com/hz/pm/api/external/FilePreviewClient.java 查看文件

@@ -1,5 +1,6 @@
package com.hz.pm.api.external;

import cn.hutool.http.useragent.UserAgentUtil;
import com.hz.pm.api.meeting.entity.config.WebProps;
import com.ningdatech.basic.exception.BizException;
import com.ningdatech.file.entity.File;
@@ -43,7 +44,9 @@ public class FilePreviewClient {

public String getFilePreviewUrl(Long fileId, HttpServletRequest request) {
String serverName = request.getServerName();
if (serverName.contains("weixin")) {
log.info("serverName:{}", serverName);
if (serverName.contains("weixin") || serverName.contains("10.54.38.13")) {
// 浙政钉访问需要转换为互联网可访问的地址
String fileDownUrl = WebProps.zzdApiUrl + FILE_DOWN_NO_AUTH_URL + fileId;
File file = fileService.getById(fileId);
return String.format(PREVIEW_PATH_FMT, mhFilePreviewPublicUrl, fileDownUrl, file.getSuffix());


Loading…
取消
儲存