Browse Source

Pull request #6730: REPORT-60154 && REPORT-62780 【阻塞】【接触点优化】收起筛选面板,开始轮播加载时,最新版本会提示网络连接失败导致无法正常轮播;【来源于迭代任务】【V3.1.0】【无需适配】复用组件接触点优化二期

Merge in DESIGN/design from ~KERRY/design_10.0:feature/x to feature/x

* commit 'f81fc8d004823e8b5d264284306fb02402fc916c':
  REPORT-62780【阻塞】【接触点优化】收起筛选面板,开始轮播加载时,最新版本会提示网络连接失败导致无法正常轮播
  REPORT-60154【来源于迭代任务】【V3.1.0】【无需适配】复用组件接触点优化二期
feature/x
kerry 3 years ago
parent
commit
dd59957f3c
  1. 14
      designer-base/src/main/java/com/fr/design/mainframe/reuse/ComponentReuseNotificationInfo.java
  2. 11
      designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/embed/OnlineEmbedFilterSelectPane.java

14
designer-base/src/main/java/com/fr/design/mainframe/reuse/ComponentReuseNotificationInfo.java

@ -9,6 +9,7 @@ import com.fr.stable.xml.XMLableReader;
*/ */
public class ComponentReuseNotificationInfo implements XMLable { public class ComponentReuseNotificationInfo implements XMLable {
public static final String XML_TAG = "ComponentReuseNotificationInfo"; public static final String XML_TAG = "ComponentReuseNotificationInfo";
private static final int INVALID_NUM = -1;
private static final ComponentReuseNotificationInfo INSTANCE = new ComponentReuseNotificationInfo(); private static final ComponentReuseNotificationInfo INSTANCE = new ComponentReuseNotificationInfo();
@ -86,6 +87,19 @@ public class ComponentReuseNotificationInfo implements XMLable {
this.historyCreatedReuses = historyCreatedReuses; this.historyCreatedReuses = historyCreatedReuses;
} }
//兼容老版本云端埋点的记录
public long getLastNotifyTime() {
return INVALID_NUM;
}
public int getNotifiedNumber() {
return INVALID_NUM;
}
public long getLastGuidePopUpTime() {
return INVALID_NUM;
}
@Override @Override
public void readXML(XMLableReader reader) { public void readXML(XMLableReader reader) {
this.setClickedWidgetLib(reader.getAttrAsBoolean("clickedWidgetLib", false)); this.setClickedWidgetLib(reader.getAttrAsBoolean("clickedWidgetLib", false));

11
designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/embed/OnlineEmbedFilterSelectPane.java

@ -7,9 +7,13 @@ import com.fr.design.mainframe.share.ui.online.CarouselStateManger;
import com.fr.design.mainframe.share.ui.widgetfilter.FilterPane; import com.fr.design.mainframe.share.ui.widgetfilter.FilterPane;
import com.fr.form.share.base.DataLoad; import com.fr.form.share.base.DataLoad;
import com.fr.form.share.bean.OnlineShareWidget; import com.fr.form.share.bean.OnlineShareWidget;
import com.fr.form.share.constants.ShareComponentConstants;
import com.fr.form.share.exception.NetWorkFailedException; import com.fr.form.share.exception.NetWorkFailedException;
import com.fr.general.http.HttpClient; import com.fr.general.http.HttpClient;
import com.fr.log.FineLoggerFactory;
import com.fr.module.ModuleContext; import com.fr.module.ModuleContext;
import com.fr.stable.EncodeConstants;
import com.fr.third.springframework.web.util.UriUtils;
import javax.imageio.ImageIO; import javax.imageio.ImageIO;
import javax.swing.JPanel; import javax.swing.JPanel;
@ -22,6 +26,7 @@ import java.awt.Rectangle;
import java.awt.event.AWTEventListener; import java.awt.event.AWTEventListener;
import java.awt.event.MouseEvent; import java.awt.event.MouseEvent;
import java.io.IOException; import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.HttpURLConnection; import java.net.HttpURLConnection;
import java.util.concurrent.CountDownLatch; import java.util.concurrent.CountDownLatch;
import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.ScheduledExecutorService;
@ -96,6 +101,12 @@ public class OnlineEmbedFilterSelectPane extends AbstractOnlineWidgetSelectPane
} }
private Image getPreviewImage(String url) throws NetWorkFailedException { private Image getPreviewImage(String url) throws NetWorkFailedException {
try {
url = UriUtils.encodePath(url, EncodeConstants.ENCODING_UTF_8);
} catch (UnsupportedEncodingException e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e);
return ShareComponentConstants.DEFAULT_COVER;
}
HttpClient httpClient = new HttpClient(url); HttpClient httpClient = new HttpClient(url);
httpClient.setTimeout(CAROUSE_IMAGE_LOAD_TIMEOUT); httpClient.setTimeout(CAROUSE_IMAGE_LOAD_TIMEOUT);
httpClient.asGet(); httpClient.asGet();

Loading…
Cancel
Save