Browse Source

modify:

1. 移动端预览修改;
tags/24080901
WendyYang 3 months ago
parent
commit
710e2fdf78
1 changed files with 4 additions and 1 deletions
  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 View File

@@ -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…
Cancel
Save