diff --git a/designer-base/src/main/java/com/fr/design/DesignerEnvManager.java b/designer-base/src/main/java/com/fr/design/DesignerEnvManager.java index de83d6d7b4..97b4d0f6ce 100644 --- a/designer-base/src/main/java/com/fr/design/DesignerEnvManager.java +++ b/designer-base/src/main/java/com/fr/design/DesignerEnvManager.java @@ -199,6 +199,8 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter { private DesignerLoginConfigManager designerLoginConfigManager = DesignerLoginConfigManager.getInstance(); + private boolean showTemplateMissingPlugin = true; + /** * DesignerEnvManager. */ @@ -315,8 +317,8 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter { } LogHandler handler = new LogHandler() { final FileAppender appender = new FileAppender( - new com.fr.third.apache.log4j.PatternLayout("%d{HH:mm:ss} %t %p [%c] %m%n"), - fileName + new com.fr.third.apache.log4j.PatternLayout("%d{HH:mm:ss} %t %p [%c] %m%n"), + fileName ); @Override @@ -621,6 +623,24 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter { this.templateTreePaneExpanded = templateTreePaneExpanded; } + /** + * 是否提示模板缺少插件 + * + * @return 提示返回true + */ + public boolean isShowTemplateMissingPlugin() { + return showTemplateMissingPlugin; + } + + /** + * 设置是否提示模板缺少插件 + * + * @param showTemplateMissingPlugin 是否提示 + */ + public void setShowTemplateMissingPlugin(boolean showTemplateMissingPlugin) { + this.showTemplateMissingPlugin = showTemplateMissingPlugin; + } + /** * 知否自动备份 * @@ -1698,7 +1718,7 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter { } } - private void readComponentReuseNotificationInfo(XMLableReader reader){ + private void readComponentReuseNotificationInfo(XMLableReader reader) { reader.readXMLObject(this.notificationInfo); } @@ -1792,6 +1812,7 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter { this.setRecentSelectedConnection(tmpVal); } this.setEmbedServerLazyStartup(reader.getAttrAsBoolean("embedServerLazyStartup", false)); + this.setShowTemplateMissingPlugin(reader.getAttrAsBoolean("showTemplateMissingPlugin", true)); } private void readReportPaneAttributions(XMLableReader reader) { @@ -2060,6 +2081,9 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter { if (this.isEmbedServerLazyStartup()) { writer.attr("embedServerLazyStartup", this.isEmbedServerLazyStartup()); } + if (!this.isShowTemplateMissingPlugin()) { + writer.attr("showTemplateMissingPlugin", this.isShowTemplateMissingPlugin()); + } writer.end(); } @@ -2212,11 +2236,12 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter { enum XmlHandler { Self; + public void handle(Throwable throwable) { ErrorDialog dialog = new ErrorDialog(null, - Toolkit.i18nText("Fine-Design_Error_Start_Apology_Message"), - Toolkit.i18nText("Fine-Design_Error_Start_Report"), - throwable.getMessage()) { + Toolkit.i18nText("Fine-Design_Error_Start_Apology_Message"), + Toolkit.i18nText("Fine-Design_Error_Start_Report"), + throwable.getMessage()) { @Override protected void okEvent() { dispose(); @@ -2232,5 +2257,5 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter { dialog.setVisible(true); DesignerExiter.getInstance().execute(); } - }; + } } diff --git a/designer-base/src/main/java/com/fr/design/EnvChangeEntrance.java b/designer-base/src/main/java/com/fr/design/EnvChangeEntrance.java index f386437376..14145d1197 100644 --- a/designer-base/src/main/java/com/fr/design/EnvChangeEntrance.java +++ b/designer-base/src/main/java/com/fr/design/EnvChangeEntrance.java @@ -96,8 +96,9 @@ public class EnvChangeEntrance { * @param envName 目标工作目录名称 */ public void switch2Env(final String envName) { - switch2Env(envName, PopTipStrategy.LATER); - VersionCheckUtils.showVersionCheckDialog(envName); + if (switch2Env(envName, PopTipStrategy.LATER)) { + VersionCheckUtils.showVersionCheckDialog(envName); + } } /** @@ -445,9 +446,12 @@ public class EnvChangeEntrance { @Override public void doOk() { - envListOkAction(envListPane, PopTipStrategy.LATER); + boolean changeResult = envListOkAction(envListPane, PopTipStrategy.LATER); // 切换完成后清理密码 updateNotRememberPwdEnv(); + if (changeResult) { + VersionCheckUtils.showVersionCheckDialog(envListPane.updateEnvManager()); + } } @Override @@ -479,6 +483,7 @@ public class EnvChangeEntrance { DesignerExiter.getInstance().execute(); } else { updateNotRememberPwdEnv(); + VersionCheckUtils.showVersionCheckDialog(envListPane.updateEnvManager()); } } diff --git a/designer-base/src/main/java/com/fr/design/actions/community/TemplateStoreAction.java b/designer-base/src/main/java/com/fr/design/actions/community/TemplateStoreAction.java index ac0d71fb2f..eec904ebd6 100644 --- a/designer-base/src/main/java/com/fr/design/actions/community/TemplateStoreAction.java +++ b/designer-base/src/main/java/com/fr/design/actions/community/TemplateStoreAction.java @@ -2,6 +2,7 @@ package com.fr.design.actions.community; import com.fr.base.BaseUtils; import com.fr.design.actions.UpdateAction; +import com.fr.design.login.AbstractDesignerSSO; import com.fr.design.mainframe.share.collect.ComponentCollector; import com.fr.design.menu.MenuKeySet; import com.fr.design.utils.BrowseUtils; @@ -13,7 +14,7 @@ import java.awt.event.ActionEvent; /** * created by Harrison on 2020/03/24 **/ -public class TemplateStoreAction extends UpdateAction { +public class TemplateStoreAction extends AbstractDesignerSSO { public TemplateStoreAction() { @@ -44,9 +45,8 @@ public class TemplateStoreAction extends UpdateAction { }; @Override - public void actionPerformed(ActionEvent e) { + public String getJumpUrl() { ComponentCollector.getInstance().collectTepMenuEnterClick(); - String url = CloudCenter.getInstance().acquireUrlByKind("design.market.template", "https://market.fanruan.com/template"); - BrowseUtils.browser(url); + return CloudCenter.getInstance().acquireUrlByKind("design.market.template", "https://market.fanruan.com/template"); } } diff --git a/designer-base/src/main/java/com/fr/design/actions/file/PreferencePane.java b/designer-base/src/main/java/com/fr/design/actions/file/PreferencePane.java index 5afe58ad30..133bbb03f2 100644 --- a/designer-base/src/main/java/com/fr/design/actions/file/PreferencePane.java +++ b/designer-base/src/main/java/com/fr/design/actions/file/PreferencePane.java @@ -40,7 +40,6 @@ import com.fr.general.log.Log4jConfig; import com.fr.locale.InterProviderFactory; import com.fr.log.FineLoggerFactory; import com.fr.stable.Constants; -import com.fr.stable.StableUtils; import com.fr.stable.os.OperatingSystem; import com.fr.third.apache.log4j.Level; import com.fr.transaction.Configurations; @@ -141,6 +140,8 @@ public class PreferencePane extends BasicPane { private UIComboBox maxUndoLimit; //是非支持自动计算父格 private UICheckBox supportDefaultParentCalculateCheckBox; + //打开模板是否提示缺少插件 + private UICheckBox showTemplateMissingPlugin; //是否自动转化为公式 private UICheckBox supportStringToFormulaBox; @@ -361,6 +362,11 @@ public class PreferencePane extends BasicPane { supportDefaultParentCalculateCheckBox = new UICheckBox( i18nText("Fine-Design_Basic_Preference_Support_Default_Parent_Calculate")); functionPane.add(supportDefaultParentCalculateCheckBox); + + //添加是否展示打开模板提示缺少插件选择项 + showTemplateMissingPlugin = new UICheckBox( + i18nText("Fine-Design_Basic_Preference_Show-Template-Missing-Plugin")); + functionPane.add(showTemplateMissingPlugin); } private void createEditPane(JPanel generalPane) { @@ -644,6 +650,8 @@ public class PreferencePane extends BasicPane { supportDefaultParentCalculateCheckBox.setSelected(designerEnvManager.isSupportDefaultParentCalculate()); + showTemplateMissingPlugin.setSelected(designerEnvManager.isShowTemplateMissingPlugin()); + supportStringToFormulaBox.setSelected(designerEnvManager.isSupportStringToFormula()); shortCutLabel.setText(getDisplayShortCut(designerEnvManager.getAutoCompleteShortcuts())); @@ -744,6 +752,8 @@ public class PreferencePane extends BasicPane { designerEnvManager.setSupportDefaultParentCalculate(supportDefaultParentCalculateCheckBox.isSelected()); + designerEnvManager.setShowTemplateMissingPlugin(showTemplateMissingPlugin.isSelected()); + designerEnvManager.setSupportStringToFormula(supportStringToFormulaBox.isSelected()); designerEnvManager.setDefaultStringToFormula(defaultStringToFormulaBox.isSelected()); diff --git a/designer-base/src/main/java/com/fr/design/extra/WebViewDlgHelper.java b/designer-base/src/main/java/com/fr/design/extra/WebViewDlgHelper.java index 88bfdecbdb..f35fbdf116 100644 --- a/designer-base/src/main/java/com/fr/design/extra/WebViewDlgHelper.java +++ b/designer-base/src/main/java/com/fr/design/extra/WebViewDlgHelper.java @@ -207,7 +207,7 @@ public class WebViewDlgHelper { UIDialog dlg = new ShopDialog(DesignerContext.getDesignerFrame(), managerPane); PluginWebBridge.getHelper().setDialogHandle(dlg); dlg.setVisible(true); - DesignerLoginUtils.showPluginRemindOnFirstLaunch(); + DesignerLoginUtils.showPluginRemindOnFirstLaunch(dlg); } catch (Exception e) { // ignored FineLoggerFactory.getLogger().error(e.getMessage(), e); diff --git a/designer-base/src/main/java/com/fr/design/login/utils/DesignerLoginUtils.java b/designer-base/src/main/java/com/fr/design/login/utils/DesignerLoginUtils.java index 5dd49a00bb..26e095df6a 100644 --- a/designer-base/src/main/java/com/fr/design/login/utils/DesignerLoginUtils.java +++ b/designer-base/src/main/java/com/fr/design/login/utils/DesignerLoginUtils.java @@ -8,6 +8,7 @@ import com.fr.general.log.MessageFormatter; import com.fr.json.JSONObject; import com.fr.log.FineLoggerFactory; import com.fr.third.org.bouncycastle.util.encoders.Hex; +import java.awt.Window; import java.security.SecureRandom; import java.util.HashMap; import java.util.Map; @@ -32,14 +33,15 @@ public class DesignerLoginUtils { return map4Tpl; } - public static void showPluginRemindOnFirstLaunch() { + public static void showPluginRemindOnFirstLaunch(Window parent) { DesignerEnvManager manager = DesignerEnvManager.getEnvManager(); int uid = manager.getDesignerLoginUid(); if (uid > 0) { boolean pluginRemindOnFirstLaunch = manager.isPluginRemindOnFirstLaunch(); if (pluginRemindOnFirstLaunch) { DesignerToastMsgUtil.toastWarning( - com.fr.design.i18n.Toolkit.i18nText("Fine-Designer_Plugin_Tip") + com.fr.design.i18n.Toolkit.i18nText("Fine-Designer_Plugin_Tip"), + parent ); manager.setPluginRemindOnFirstLaunch(false); } diff --git a/designer-base/src/main/java/com/fr/design/mainframe/ComponentReuseNotifyUtil.java b/designer-base/src/main/java/com/fr/design/mainframe/ComponentReuseNotifyUtil.java index 4ab10194ce..2175804dcf 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/ComponentReuseNotifyUtil.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/ComponentReuseNotifyUtil.java @@ -18,7 +18,7 @@ public class ComponentReuseNotifyUtil { } - public static void enterWidgetLibExtraAction(boolean needValidRead) { + public static void enterWidgetLibExtraAction() { if (ComponentReuseNotificationInfo.getInstance().isClickedWidgetLib()) { return; } @@ -28,7 +28,7 @@ public class ComponentReuseNotifyUtil { return COMPONENT_SNAP_CHAT_KEY; } }); - if (snapChat.hasRead() && needValidRead) { + if (snapChat.hasRead()) { DesignerToastMsgUtil.toastPrompt(Toolkit.i18nText("Fine-Design_Component_Reuse_Merge_Prompt")); } ComponentReuseNotificationInfo.getInstance().setClickedWidgetLib(true); diff --git a/designer-base/src/main/java/com/fr/design/mainframe/EastRegionContainerPane.java b/designer-base/src/main/java/com/fr/design/mainframe/EastRegionContainerPane.java index 3047ca99ca..847a2dcba3 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/EastRegionContainerPane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/EastRegionContainerPane.java @@ -315,7 +315,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer { @Override public void actionPerformed(ActionEvent e) { ComponentCollector.getInstance().collectCmpBoardClick(); - ComponentReuseNotifyUtil.enterWidgetLibExtraAction(true); + ComponentReuseNotifyUtil.enterWidgetLibExtraAction(); } }); // 权限编辑 diff --git a/designer-base/src/main/java/com/fr/design/mainframe/toast/DesignerToastMsgUtil.java b/designer-base/src/main/java/com/fr/design/mainframe/toast/DesignerToastMsgUtil.java index e77cf8b864..4e69c34c56 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/toast/DesignerToastMsgUtil.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/toast/DesignerToastMsgUtil.java @@ -6,6 +6,9 @@ import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.mainframe.DesignerContext; import com.fr.stable.Constants; +import java.awt.Dialog; +import java.awt.Frame; +import java.awt.Window; import javax.swing.BorderFactory; import javax.swing.Icon; import javax.swing.JEditorPane; @@ -30,12 +33,15 @@ public class DesignerToastMsgUtil { public static void toastPrompt(JPanel contendPane) { - toastPane(PROMPT_ICON, contendPane); + toastPane(PROMPT_ICON, contendPane, DesignerContext.getDesignerFrame()); } public static void toastWarning(JPanel contendPane) { - toastPane(WARNING_ICON, contendPane); + toastPane(WARNING_ICON, contendPane, DesignerContext.getDesignerFrame()); + } + public static void toastWarning(JPanel contendPane, Window parent) { + toastPane(WARNING_ICON, contendPane, parent); } public static void toastPrompt(String promptInfo) { @@ -46,6 +52,10 @@ public class DesignerToastMsgUtil { toastWarning(toastPane(warningInfo)); } + public static void toastWarning(String warningInfo, Window parent) { + toastWarning(toastPane(warningInfo), parent); + } + private static JPanel toastPane(String text) { UILabel promptLabel = new UILabel("" + text + ""); JPanel jPanel = FRGUIPaneFactory.createBorderLayout_S_Pane(); @@ -58,7 +68,7 @@ public class DesignerToastMsgUtil { return jPanel; } - private static void toastPane(Icon icon, JPanel contendPane) { + private static void toastPane(Icon icon, JPanel contendPane, Window parent) { JPanel pane = FRGUIPaneFactory.createBorderLayout_S_Pane(); UILabel uiLabel = new UILabel(icon); uiLabel.setVerticalAlignment(SwingConstants.TOP); @@ -67,7 +77,12 @@ public class DesignerToastMsgUtil { pane.add(contendPane, BorderLayout.CENTER); pane.setBorder(BorderFactory.createEmptyBorder(8, 15, 8, 15)); contendPane.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 0)); - ToastMsgDialog dialog = new ToastMsgDialog(DesignerContext.getDesignerFrame(), pane); + ToastMsgDialog dialog; + if (parent instanceof Dialog) { + dialog = new ToastMsgDialog((Dialog) parent, pane); + } else { + dialog = new ToastMsgDialog((Frame) parent, pane); + } dialog.setVisible(true); } diff --git a/designer-base/src/main/java/com/fr/design/mainframe/toast/ToastMsgDialog.java b/designer-base/src/main/java/com/fr/design/mainframe/toast/ToastMsgDialog.java index 8fee83378c..00f4f95ead 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/toast/ToastMsgDialog.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/toast/ToastMsgDialog.java @@ -5,6 +5,7 @@ import com.fr.design.dialog.UIDialog; import com.fr.design.mainframe.DesignerContext; import com.fr.module.ModuleContext; +import java.awt.Dialog; import javax.swing.JPanel; import java.awt.Dimension; import java.awt.Frame; @@ -26,14 +27,23 @@ public class ToastMsgDialog extends UIDialog { public ToastMsgDialog(Frame parent, JPanel panel) { super(parent); + init(panel); + } + + public ToastMsgDialog(Dialog parent, JPanel panel) { + super(parent); + init(panel); + } + + private void init(JPanel panel) { setFocusable(false); setAutoRequestFocus(false); setUndecorated(true); contentPane = panel; - initComponent(parent); + initComponent(); } - private void initComponent(Frame parent) { + private void initComponent() { this.getContentPane().setLayout(null); this.getContentPane().add(contentPane); Dimension dimension = calculatePreferSize(); @@ -42,7 +52,7 @@ public class ToastMsgDialog extends UIDialog { contentPane.setSize(dimension); setLocationRelativeTo(DesignerContext.getDesignerFrame().getContentFrame()); int positionY = DesignerContext.getDesignerFrame().getContentFrame().getLocationOnScreen().y + 10; - setLocation((parent.getWidth() - dimension.width) / 2, positionY); + setLocation((DesignerContext.getDesignerFrame().getWidth() - dimension.width) / 2, positionY); addMouseEvent(contentPane); } diff --git a/designer-base/src/main/java/com/fr/design/notification/NotificationCenter.java b/designer-base/src/main/java/com/fr/design/notification/NotificationCenter.java index 7ca868db59..3faadf795a 100644 --- a/designer-base/src/main/java/com/fr/design/notification/NotificationCenter.java +++ b/designer-base/src/main/java/com/fr/design/notification/NotificationCenter.java @@ -26,12 +26,12 @@ public class NotificationCenter { } public void removeNotification(int index){ - notifications.remove(index); - NotificationCenterPane.getNotificationCenterPane().refreshButton(); + notifications.remove(index); + NotificationCenterPane.getNotificationCenterPane().refreshButton(); } public Notification getNotification(int index){ - return notifications.get(index); + return notifications.get(index); } public void clearAllNotifications(){ diff --git a/designer-base/src/main/java/com/fr/design/notification/ui/NotificationCenterDialog.java b/designer-base/src/main/java/com/fr/design/notification/ui/NotificationCenterDialog.java index 62b2f9d69b..10e10ecdbb 100644 --- a/designer-base/src/main/java/com/fr/design/notification/ui/NotificationCenterDialog.java +++ b/designer-base/src/main/java/com/fr/design/notification/ui/NotificationCenterDialog.java @@ -2,7 +2,6 @@ package com.fr.design.notification.ui; import com.fr.design.gui.ilable.UILabel; import com.fr.design.layout.FRGUIPaneFactory; -import com.fr.design.mainframe.DesignerContext; import com.fr.design.notification.Notification; import com.fr.design.notification.NotificationCenter; import java.awt.BorderLayout; @@ -26,9 +25,8 @@ public class NotificationCenterDialog extends JDialog { private UILabel deleteLabel; private static final int NOTIFICATIONCOUNT = 5; - private static NotificationCenterDialog instance; - private NotificationCenterDialog(Frame parent) { + public NotificationCenterDialog(Frame parent) { super(parent); setTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Notification")); setResizable(false); @@ -42,13 +40,6 @@ public class NotificationCenterDialog extends JDialog { initComponents(); } - public static NotificationCenterDialog getInstance() { - if (instance == null) { - instance = new NotificationCenterDialog(DesignerContext.getDesignerFrame()); - } - return instance; - } - private void initComponents() { centerPanel = FRGUIPaneFactory.createNColumnGridInnerContainer_S_Pane(1); addNotification(); @@ -89,14 +80,15 @@ public class NotificationCenterDialog extends JDialog { return deleteLabel; } - public void showDialog() { - this.setVisible(true); - } public void hideDialog() { this.dispose(); } + public void showDialog() { + this.setVisible(true); + } + public void addNotification() { notificationNeedShow.clear(); diff --git a/designer-base/src/main/java/com/fr/design/notification/ui/NotificationCenterPane.java b/designer-base/src/main/java/com/fr/design/notification/ui/NotificationCenterPane.java index dfc89cce29..3ec5a53a98 100644 --- a/designer-base/src/main/java/com/fr/design/notification/ui/NotificationCenterPane.java +++ b/designer-base/src/main/java/com/fr/design/notification/ui/NotificationCenterPane.java @@ -4,6 +4,7 @@ import com.fr.design.constants.UIConstants; import com.fr.design.dialog.BasicPane; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.i18n.Toolkit; +import com.fr.design.mainframe.DesignerContext; import com.fr.design.notification.NotificationCenter; import com.fr.general.IOUtils; import java.awt.BorderLayout; @@ -27,7 +28,8 @@ public class NotificationCenterPane extends BasicPane { notificationCenterButton.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { - NotificationCenterDialog.getInstance().showDialog(); + NotificationCenterDialog notificationCenterDialog = new NotificationCenterDialog(DesignerContext.getDesignerFrame()); + notificationCenterDialog.showDialog(); } }); this.setBackground(UIConstants.TEMPLATE_TAB_PANE_BACKGROUND); diff --git a/designer-base/src/main/java/com/fr/design/upm/UpmFinder.java b/designer-base/src/main/java/com/fr/design/upm/UpmFinder.java index 74bbcb73fd..2ea539faf1 100644 --- a/designer-base/src/main/java/com/fr/design/upm/UpmFinder.java +++ b/designer-base/src/main/java/com/fr/design/upm/UpmFinder.java @@ -98,7 +98,7 @@ public class UpmFinder { dialog = new UpmShowDialog(DesignerContext.getDesignerFrame(), upmPane); } dialog.setVisible(true); - DesignerLoginUtils.showPluginRemindOnFirstLaunch(); + DesignerLoginUtils.showPluginRemindOnFirstLaunch(dialog); } } diff --git a/designer-base/src/main/resources/com/fr/design/login/login.js b/designer-base/src/main/resources/com/fr/design/login/login.js index 03ebdac30a..8691cf1e57 100644 --- a/designer-base/src/main/resources/com/fr/design/login/login.js +++ b/designer-base/src/main/resources/com/fr/design/login/login.js @@ -1 +1 @@ -!function(e){var t={};function i(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,i),o.l=!0,o.exports}i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)i.d(n,o,function(t){return e[t]}.bind(null,o));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=4)}([function(e,t,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,i,n){n===undefined&&(n=i),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[i]}})}:function(e,t,i,n){n===undefined&&(n=i),e[n]=t[i]}),o=this&&this.__exportStar||function(e,t){for(var i in e)"default"===i||t.hasOwnProperty(i)||n(t,e,i)};Object.defineProperty(t,"__esModule",{value:!0}),o(i(5),t)},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=window.DesignerLoginHelper,o=function(){function e(){}return e.prototype.getParams=function(){return{designerLoginSource:window.designerLoginSource||"0",lastLoginType:window.lastLoginType||"-1",lastLoginAccount:window.lastLoginAccount||""}},e.prototype.closeWindow=function(e){n&&n.closeWindow(e)},e.prototype.serviceHref=function(){n?n.serviceHref():window.open("https://bbs.fanruan.com/thread-102821-1-1.html")},e.prototype.forgetHref=function(){n?n.forgetHref():window.open("https://id.fanruan.com/forget/forget.php?clue=activityf")},e.prototype.normalLogin=function(e,t,i){n?n.normalLogin(e,t,i):i(-1)},e.prototype.sendCaptcha=function(e,t,i){n?n.sendCaptcha(e,t,i):i(-1)},e.prototype.smsLogin=function(e,t,i,o){n?n.smsLogin(e,t,i,o):o(null)},e.prototype.smsRegister=function(e,t,i,o,s){n?n.smsRegister(e,t,i,o,s):s(-1)},e.prototype.resize=function(e,t){n&&n.resize(e,t)},e}();t["default"]=new o},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BBS_ERROR_CODE=t.NORMAL_LOGIN_RESULT=t.REGION=t.LOGIN=void 0,t.LOGIN={NORMAL_METHOD:"normal",SMS_METHOD:"sms",TABS:{LOGIN:"login",FORGET_PASSWORD:"forget",RESET_PASSWORD:"reset",REGISTER:"register"}},t.REGION=[{value:"+86",text:"Designer-Basic_Chinese_Mainland"},{value:"+886",text:"Designer-Basic_Chinese_Taiwan"},{value:"+852",text:"Designer-Basic_Chinese_Hong_Kong"},{value:"+853",text:"Designer-Basic_Chinese_Macao"},{value:"+90",text:"Designer-Basic_Turkey"},{value:"+82",text:"Designer-Basic_South_Korea"},{value:"+81",text:"Designer-Basic_Japan"},{value:"+65",text:"Designer-Basic_Singapore"},{value:"+60",text:"Designer-Basic_Malaysia"}],t.NORMAL_LOGIN_RESULT=[{status:0,message:"Designer-Login_Internal_Error"},{status:-1,message:"Designer-Login_Store_User_Not_Exist"},{status:-2,message:"Designer-Login_Store_User_Password_Error"},{status:-3,message:"Designer-Login_Unexpected_Error"},{status:-4,message:"Designer-Login_Network_Connected_Failed"}],t.BBS_ERROR_CODE=[{status:0,message:"Designer-Login_Internal_Error"},{status:-1,message:"Designer-BBS_Register_Timeout"},{status:-2,message:"Designer-BBS_Phone_Is_Register"},{status:-3,message:"Designer-BBS_Captcha_Send_Exceed_Limit"},{status:-4,message:"Designer-BBS_Phone_Format_Error"},{status:-100,message:"Designer-BBS_Captcha_Out_Of_Date"},{status:-101,message:"Designer-BBS_Captcha_Try_Exceed_Limit"},{status:-102,message:"Designer-BBS_Captcha_Error"},{status:-104,message:"Designer-BBS_Username_Format_Error"},{status:-103,message:"Designer-BBS_Please_Enter_Correct_Phone"},{status:-105,message:"Designer-BBS_Username_Too_Short"},{status:-106,message:"Designer-BBS_Username_Too_Long"},{status:-107,message:"Designer-BBS_Phone_Is_Register"},{status:-108,message:"Designer-BBS_Username_Is_Register"}]},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getError=void 0,t.getError=function(e,t){var i=BI.find(e,(function(e,i){return i.status===t}));return i&&i.message?i.message:""}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(0),o=i(6);BI.addI18n(Store.i18n),BI.createWidget({type:n.Vertical,element:"body",items:[{type:o["default"]}]})},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ListView=t.VirtualGroup=t.LeftRightVerticalAdapt=t.Left=t.Horizontal=t.Vertical=t.Absolute=t.Layout=t.Htape=t.CenterAdapt=t.Vtape=t.HorizontalAdapt=t.VerticalAdapt=t.BubbleCombo=t.Img=t.Tab=t.SingleSelectInsertCombo=t.SingleSelectRadioItem=t.MultiTreePopupView=t.Editor=t.NicEditor=t.RichEditor=t.MultiTreeCombo=t.DynamicDateTimeCombo=t.DynamicDateCombo=t.BarPopOver=t.MultiSelectItem=t.TextAreaEditor=t.AllValueChooserCombo=t.ButtonGroup=t.MultiSelectInsertCombo=t.TextEditor=t.Button=t.SignEditor=t.MultiFileEditor=t.SmallTextEditor=t.HtmlLabel=t.Label=t.DownListCombo=t.TextButton=t.IconChangeButton=t.IconButton=t.IconTextIconItem=t.IconTextItem=void 0,t.IconTextItem="bi.icon_text_item",t.IconTextIconItem="bi.icon_text_icon_item",t.IconButton="bi.icon_button",t.IconChangeButton="bi.icon_change_button",t.TextButton="bi.text_button",t.DownListCombo="bi.down_list_combo",t.Label="bi.label",t.HtmlLabel="bi.html_label",t.SmallTextEditor="bi.small_text_editor",t.MultiFileEditor="bi.multifile_editor",t.SignEditor="bi.sign_editor",t.Button="bi.button",t.TextEditor="bi.text_editor",t.MultiSelectInsertCombo="bi.multi_select_insert_combo",t.ButtonGroup="bi.button_group",t.AllValueChooserCombo="bi.all_value_chooser_combo",t.TextAreaEditor="bi.textarea_editor",t.MultiSelectItem="bi.multi_select_item",t.BarPopOver="bi.bar_popover",t.DynamicDateCombo="bi.dynamic_date_combo",t.DynamicDateTimeCombo="bi.dynamic_date_time_combo",t.MultiTreeCombo="bi.multi_tree_combo",t.RichEditor="bi.rich_editor",t.NicEditor="bi.nic_editor",t.Editor="bi.editor",t.MultiTreePopupView="bi.multi_tree_popup_view",t.SingleSelectRadioItem="bi.single_select_radio_item",t.SingleSelectInsertCombo="bi.single_select_insert_combo",t.Tab="bi.tab",t.Img="bi.img",t.BubbleCombo="bi.bubble_combo",t.VerticalAdapt="bi.vertical_adapt",t.HorizontalAdapt="bi.horizontal_adapt",t.Vtape="bi.vtape",t.CenterAdapt="bi.center_adapt",t.Htape="bi.htape",t.Layout="bi.layout",t.Absolute="bi.absolute",t.Vertical="bi.vertical",t.Horizontal="bi.horizontal",t.Left="bi.left",t.LeftRightVerticalAdapt="bi.left_right_vertical_adapt",t.VirtualGroup="bi.virtual_group",t.ListView="bi.list_view"},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Widget=t.className=void 0;var n=i(0),o=i(7),s=i(8),r=i(9),a=i(11);i(24),t.className="designer.login.login",t.Widget=BI.inherit(BI.Widget,{props:{baseCls:"designer-login-login",width:420},_store:function(){return BI.Models.getModel(o["default"])},watch:{loading:function(e){this.loading.setVisible(e)}},render:function(){return{type:n.Vertical,cls:"designer-login",items:[{el:{type:n.HorizontalAdapt,items:[{type:s["default"],rgap:14,tgap:14}]}},{el:{type:n.Vertical,items:[{type:r["default"]},{type:a["default"]}]},lgap:15,rgap:15,bgap:15}]}}}),BI.shortcut(t.className,t.Widget),t["default"]=t.className},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});BI.model("designer.login.login.model",BI.inherit(Fix.Model,{childContext:["loading"],state:function(){return{loading:!1}}})),t["default"]="designer.login.login.model"},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Widget=t.className=void 0;var n=i(0),o=i(1);t.className="designer.login.login.close.button",t.Widget=BI.inherit(BI.Widget,{render:function(){return{type:n.TextButton,text:String.fromCharCode(10005),cls:"background-login-close",width:18.38,height:18.38,handler:function(){o["default"].closeWindow(!1)}}}}),BI.shortcut(t.className,t.Widget),t["default"]=t.className},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Widget=t.className=void 0;var n=i(0);i(10),t.className="designer.login.login.title",t.Widget=BI.inherit(BI.Widget,{props:{baseCls:"designer-login-login-title"},render:function(){return{type:n.Label,text:BI.i18nText("Designer-Login_Title"),cls:"bi-font-bold",bgap:10}}}),BI.shortcut(t.className,t.Widget),t["default"]=t.className},function(e,t,i){},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Widget=t.className=void 0;var n=i(0),o=i(12);i(13);var s=i(14),r=i(16),a=i(18),l=i(2),u=i(1),g=249.64,c=331.64,d=422,f=478,p=560;t.className="designer.login.login.body",t.Widget=BI.inherit(BI.Widget,{props:{baseCls:"designer-login-login-body"},_store:function(){return BI.Stores.getStore(o["default"])},watch:{loginMethod:function(e){this.tabOption.setValue(e),this.tab.setSelect(e),this.foot.setLoginMethod(e),this.refreshLoginButton(),e===l.LOGIN.NORMAL_METHOD?(this.tab.setHeight(g),u["default"].resize(d,f)):this.model.expand&&(u["default"].resize(d,p),this.tab.setHeight(c))},approve:function(e){this.refreshLoginButton()},expand:function(e){e&&(u["default"].resize(d,p),this.tab.setHeight(c))}},render:function(){var e=this;return{type:n.Vertical,cls:"designer-login-body",items:[{type:n.ButtonGroup,value:this.model.loginMethod,ref:function(t){e.tabOption=t},layouts:[{type:n.HorizontalAdapt}],items:[{cls:"designer-login-change-mode bi-list-item-effect bi-border-bottom bi-font-bold",width:70,height:28,value:l.LOGIN.SMS_METHOD,text:BI.i18nText("Designer-Login_Sms")},{cls:"designer-login-change-mode bi-list-item-effect bi-border-bottom bi-font-bold",width:70,height:28,value:l.LOGIN.NORMAL_METHOD,text:BI.i18nText("Designer-Login_Normal")}],listeners:[{eventName:BI.ButtonGroup.EVENT_CHANGE,action:function(t){e.store.setLoginMethod(t)}}],tgap:24,lgap:75,rgap:75},{type:n.CenterAdapt,tgap:35,items:[{type:n.Tab,cardCreator:BI.bind(this.createCard,this),showIndex:this.model.loginMethod,ref:function(t){e.tab=t},height:g,width:280}]},{type:s["default"],lgap:50,rgap:50,bgap:30,ref:function(t){e.foot=t},refreshStatus:function(t){e.store.setApprove(t)}}]}},mounted:function(){var e=u["default"].getParams(),t=e.designerLoginSource,i=e.lastLoginType;if("2"===t){var n="0"===i?l.LOGIN.NORMAL_METHOD:l.LOGIN.SMS_METHOD;this.store.setLoginMethod(n)}},createCard:function(e){var t=this;switch(e){case l.LOGIN.NORMAL_METHOD:return{type:r["default"],ref:function(e){t.normalMethod=e}};case l.LOGIN.SMS_METHOD:default:return{type:a["default"],ref:function(e){t.smsMethod=e},expand:function(){t.store.setExpand(!0)}}}},refreshLoginButton:function(){this.model.loginMethod===l.LOGIN.NORMAL_METHOD?this.normalMethod.setApprove(this.model.approve):this.smsMethod.setApprove(this.model.approve)}}),BI.shortcut(t.className,t.Widget),t["default"]=t.className},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Model=t.className=void 0;var n=i(2);t.className="designer.login.model.login.body",t.Model=BI.inherit(Fix.Model,{context:["loading"],state:function(){return{loginMethod:n.LOGIN.SMS_METHOD,approve:!0,expand:!1}},actions:{setLoginMethod:function(e){this.model.loginMethod=e},setApprove:function(e){this.model.approve=e},setExpand:function(e){this.model.expand=e}}}),BI.store(t.className,t.Model),t["default"]=t.className},function(e,t,i){},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Widget=t.className=void 0;var n=i(1),o=i(0);i(15);var s=i(2);t.className="designer.login.login.foot",t.Widget=BI.inherit(BI.Widget,{props:{baseCls:"designer-login-login-foot"},render:function(){var e=this,t=this.options;return{type:o.LeftRightVerticalAdapt,items:{left:[{type:o.MultiSelectItem,width:30,selected:!0,handler:function(){t.refreshStatus(this.isSelected())}},{type:o.Label,cls:"login-foot-text",textAlign:"left",text:BI.i18nText("Designer-Login_I_Have_Read")},{type:o.Label,cls:"login-foot-text",textAlign:"left",text:"《"},{type:o.TextButton,cls:"login-link",textAlign:"left",text:BI.i18nText("Designer-Login_Service_Terms"),handler:function(){n["default"].serviceHref()}},{type:o.Label,cls:"login-foot-text",textAlign:"left",text:"》"}],right:[{type:o.TextButton,cls:"login-link",textAlign:"right",text:BI.i18nText("Designer-Login_Forget_Password"),invisible:!0,ref:function(t){e.forgetPassword=t},handler:function(){n["default"].forgetHref()}}]}}},setLoginMethod:function(e){e===s.LOGIN.NORMAL_METHOD?this.forgetPassword.setVisible(!0):this.forgetPassword.setVisible(!1)}}),BI.shortcut(t.className,t.Widget),t["default"]=t.className},function(e,t,i){},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Widget=t.className=void 0;var n=i(0),o=i(3),s=i(1),r=i(17),a=i(2);t.className="designer.login.login.normal",t.Widget=BI.inherit(BI.Widget,{props:{baseCls:"designer-login-login-body"},_store:function(){return BI.Stores.getStore(r["default"])},watch:{errMessage:function(e){this.errMessage.setText(e)}},render:function(){var e=this;return{type:n.Vertical,items:[{type:n.Label,textAlign:"left",cls:"designer-login-text",text:BI.i18nText("Designer-Login_User_Name"),bgap:3},{type:n.Editor,cls:"bi-border-bottom designer-login-editor-username",watermark:BI.i18nText("Designer-Login_User_Name_Hint"),inputType:"text",allowBlank:!0,height:40,ref:function(t){e.userName=t},listeners:[{eventName:"EVENT_CHANGE",action:function(){e.store.setErrMessage("")}}]},{type:n.Label,textAlign:"left",cls:"designer-login-text",text:BI.i18nText("Designer-Login_Password"),bgap:3},{type:n.Editor,cls:"bi-border-bottom designer-login-editor-password",watermark:BI.i18nText("Designer-Login_Password_Hint"),inputType:"password",allowBlank:!0,height:40,ref:function(t){e.password=t},listeners:[{eventName:"EVENT_CHANGE",action:function(){e.store.setErrMessage("")}}]},{type:n.Label,cls:"designer-login-error-message",textAlign:"center",text:"",height:20,bgap:10,ref:function(t){e.errMessage=t}},{type:n.Button,cls:"login-login-button bi-font-bold",text:BI.i18nText("Designer-Login"),level:"common",height:40,ref:function(t){e.loginButton=t},handler:function(){e.login()}}]}},mounted:function(){var e=this;this.element.keyup((function(t){13===t.keyCode&&e.login()}));var t=s["default"].getParams(),i=t.designerLoginSource,n=t.lastLoginType,o=t.lastLoginAccount;"2"===i&&"0"===n&&e.userName.setValue(o)},checkUsername:function(){var e=this.userName.getValue();e&&this.userName.setValue(e.replace(/\s+/g,""))},login:function(){var e=this;e.checkUsername();var t=this.userName.getValue(),i=this.password.getValue();t?i?s["default"].normalLogin(t,i,(function(t){var i=parseInt(t,10);if(i>0)s["default"].closeWindow(!0);else{var n=o.getError(a.NORMAL_LOGIN_RESULT,i);n&&e.store.setErrMessage(BI.i18nText(n))}})):this.store.setErrMessage(BI.i18nText("Designer-Login_Password_Not_Null")):this.store.setErrMessage(BI.i18nText("Designer-Login_Username_Not_Null"))},setApprove:function(e){this.loginButton.setEnable(e)}}),BI.shortcut(t.className,t.Widget),t["default"]=t.className},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Model=t.className=void 0,t.className="designer.login.model.normal_method",t.Model=BI.inherit(Fix.Model,{context:[""],state:function(){return{errMessage:""}},actions:{setErrMessage:function(e){this.model.errMessage=e}}}),BI.store(t.className,t.Model),t["default"]=t.className},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Widget=t.className=void 0;var n=i(0),o=i(19),s=i(21),r=i(22),a=i(2),l=i(23),u=i(1),g=i(3);t.className="designer.login.login.sms",t.Widget=BI.inherit(BI.Widget,{props:{baseCls:"designer-login-login-body"},_store:function(){return BI.Stores.getStore(l["default"])},watch:{errMessage:function(e){this.errMessage.setText(e)},isRegister:function(e){var t=this.options;e&&(t.expand(),this.password.setVisible(!0),this.passwordLabel.setVisible(!0))}},render:function(){var e=this,t=this;return{type:n.Vertical,items:[{type:n.Label,textAlign:"left",cls:"designer-login-text",text:BI.i18nText("Designer-Login_Phone"),bgap:3},{type:n.HorizontalAdapt,bgap:7,items:[{type:o["default"],height:42,textFormatter:function(e){var i=t.getNumberTypeItem(e);return{value:i.value,text:BI.i18nText(i.text)}},value:a.REGION[0].value,items:BI.map(a.REGION,(function(e,t){return{type:s["default"],value:t.value,label:BI.i18nText(t.text),text:t.value}})),ref:function(t){e.regionCode=t}},{type:n.Editor,cls:"bi-border-bottom designer-login-editor-username",watermark:BI.i18nText("Designer-Login_Phone_Hint"),inputType:"text",allowBlank:!0,height:40,ref:function(t){e.phone=t},listeners:[{eventName:"EVENT_CHANGE",action:function(){e.store.setErrMessage("")}}]}]},{type:n.Label,textAlign:"left",cls:"designer-login-text",text:BI.i18nText("Designer-Login_Code"),bgap:3},{type:n.Horizontal,bgap:7,items:[{type:n.Editor,cls:"bi-border-bottom designer-login-editor-password",watermark:BI.i18nText("Designer-Login_Code_Hint"),inputType:"text",allowBlank:!0,height:40,width:190,ref:function(t){e.code=t},listeners:[{eventName:"EVENT_CHANGE",action:function(){e.store.setErrMessage("")}}]},{type:r["default"],height:40,width:90,ref:function(t){e.accountCaptcha=t},listeners:[{eventName:"EVENT_SEND",action:function(){t.sendCaptcha()}}]}]},{type:n.Label,textAlign:"left",cls:"designer-login-text",text:BI.i18nText("Designer-Login_Password"),bgap:3,invisible:!0,ref:function(t){e.passwordLabel=t}},{type:n.Editor,cls:"bi-border-bottom designer-login-editor-password",watermark:BI.i18nText("Designer-Login_Password_Setting_Hint"),inputType:"password",allowBlank:!0,height:40,invisible:!0,ref:function(t){e.password=t},listeners:[{eventName:"EVENT_CHANGE",action:function(){e.store.setErrMessage("")}}]},{type:n.Label,cls:"designer-login-error-message",textAlign:"center",text:"",height:20,bgap:11,ref:function(t){e.errMessage=t}},{type:n.Button,cls:"login-login-button bi-font-bold",text:BI.i18nText("Designer-Login_Register_Or_Login"),level:"common",height:40,ref:function(t){e.loginButton=t},handler:function(){e.login()}}]}},mounted:function(){var e=this;this.element.keyup((function(t){13===t.keyCode&&e.login()}));var t=u["default"].getParams(),i=t.designerLoginSource,n=t.lastLoginType,o=t.lastLoginAccount;if("2"===i&&"1"===n){var s=o.split("-")[0],r=o.split("-")[1];e.regionCode.setValue(s),e.phone.setValue(r)}},getNumberTypeItem:function(e){return BI.find(a.REGION,(function(t,i){return e===i.value}))||{}},checkPhone:function(){var e=this.phone.getValue();e&&this.phone.setValue(e.replace(/\s+/g,""))},login:function(){var e=this,t=this;t.checkPhone();var i=this.phone.getValue(),n=this.code.getValue();if(i)if(n)if(6==n.length){var o=this.regionCode.getValue();if(this.model.isRegister){var s=this.password.getValue();if(!s)return void this.store.setErrMessage(BI.i18nText("Designer-Login_Password_Not_Null"));var r=this.model.regToken;if(!r)return void this.store.setErrMessage(BI.i18nText("Designer-Login_Token_Request_Failed"));u["default"].smsRegister(o,i,s,r,(function(e){var i=parseInt(e,10);if(i>0)u["default"].closeWindow(!0);else{var n=g.getError(a.BBS_ERROR_CODE,i);n&&t.store.setErrMessage(BI.i18nText(n))}}))}else u["default"].smsLogin(o,i,n,(function(i){var n=JSON.parse(i);if(n.status>0)if(!0===n.register){var o=n.regtoken;o?(t.store.setRegister(!0),t.store.setRegToken(o)):e.store.setErrMessage(BI.i18nText("Designer-Login_Token_Request_Failed"))}else u["default"].closeWindow(!0);else{var s=g.getError(a.BBS_ERROR_CODE,n.status);s&&t.store.setErrMessage(BI.i18nText(s))}}))}else this.store.setErrMessage(BI.i18nText("Designer-BBS_Captcha_Error"));else this.store.setErrMessage(BI.i18nText("Designer-Login_Code_Not_Null"));else this.store.setErrMessage(BI.i18nText("Designer-Login_Phone_Not_Null"))},sendCaptcha:function(){var e=this;e.checkPhone();var t=this.phone.getValue();if(!t)return e.accountCaptcha.setButtonEnable(!0),void this.store.setErrMessage(BI.i18nText("Designer-Login_Phone_Not_Null"));var i=this.regionCode.getValue();u["default"].sendCaptcha(i,t,(function(t){var i=parseInt(t,10);if(1===i)e.accountCaptcha.regainCaptcha();else{if(e.accountCaptcha.setButtonEnable(!0),0===i)return void e.store.setErrMessage(BI.i18nText("Designer-BBS_Please_Enter_Correct_Phone"));var n=g.getError(a.BBS_ERROR_CODE,i);n&&e.store.setErrMessage(BI.i18nText(n))}}))},setApprove:function(e){this.loginButton.setEnable(e)}}),BI.shortcut(t.className,t.Widget),t["default"]=t.className},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Widget=t.className=void 0;var n=i(20);t.className="designer.left_right_text_value_combo",t.Widget=BI.inherit(BI.Widget,{props:{baseCls:"",height:24,chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,textFormatter:function(e){return e},value:""},render:function(){var e=this,t=this.options;return{type:"bi.combo",container:t.container,adjustLength:2,ref:function(t){e.combo=t},el:{type:n["default"],cls:"text-value-trigger",items:t.items,height:t.height-2,value:t.textFormatter(t.value),ref:function(t){e.trigger=t}},popup:{el:{type:"bi.text_value_combo_popup",chooseType:t.chooseType,value:t.value,items:t.items,ref:function(t){e.popup=t},listeners:[{eventName:BI.TextValueComboPopup.EVENT_CHANGE,action:function(){e.setValue(e.getValue()),e.combo.hideView(),e.fireEvent("EVENT_CHANGE",arguments)}},{eventName:BI.Controller.EVENT_CHANGE,action:function(){e.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}}]},value:t.value,maxHeight:240,minHeight:25}}},setValue:function(e){this.combo.setValue(e),this.trigger.setValue(this.options.textFormatter(e))},getValue:function(){var e=this.combo.getValue();return BI.isNull(e)?"":BI.isArray(e)?e[0]:e},populate:function(e){this.options.items=e,this.combo.populate(e)}}),BI.shortcut(t.className,t.Widget),t["default"]=t.className},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Widget=t.className=void 0,t.className="designer.left_right_text_value_combo_trigger",t.Widget=BI.inherit(BI.Trigger,{props:{baseCls:"",value:{}},render:function(){var e=this,t=this.options,i=t.value;return{type:"bi.htape",cls:"bi-border-bottom bi-border-radius",items:[{type:"bi.label",text:i.text,title:function(){return e.textRow.getText()},height:t.height,hgap:3,textAlign:"left",ref:function(t){e.textRow=t}},{type:"bi.label",text:i.value,height:t.height,width:32,textAlign:"right",ref:function(t){e.valueRow=t}},{type:"bi.trigger_icon_button",width:t.triggerWidth||t.height}]}},setValue:function(e){this.textRow.setText(e.text),this.valueRow.setText(e.value)},setText:function(e){this.textRow.setText(e)}}),BI.shortcut(t.className,t.Widget),t["default"]=t.className},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Widget=t.className=void 0,t.className="designer.components.phone.editor.item",t.Widget=BI.inherit(BI.BasicButton,{props:{baseCls:"designer-login-login-body",label:"",text:""},render:function(){var e=this.options;return{type:"bi.htape",items:[{el:{type:"bi.label",text:e.label,title:e.label,textAlign:"left"},lgap:10,rgap:5},{el:{type:"bi.label",text:e.text,textAlign:"right"},width:32,rgap:10}]}},doClick:function(){BI.SingleSelectItem.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent("EVENT_CHANGE",this.isSelected(),this)},setSelected:function(e){BI.SingleSelectItem.superclass.setSelected.apply(this,arguments)},getValue:function(){return this.options.value}}),BI.shortcut(t.className,t.Widget),t["default"]=t.className},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Widget=t.className=void 0;var n=i(0);t.className="designer.user.account.setting.captcha",t.Widget=BI.inherit(BI.Widget,{props:{baseCls:"designer-login-login-body"},render:function(){var e=this;this.options;return{type:n.TextButton,text:BI.i18nText("Designer-Login_Code_Request"),cls:"designer-login-border-bottom designer-login-code-text",handler:function(){e.setButtonEnable(!1),e.fireEvent("EVENT_SEND")},ref:function(t){e.getButton=t}}},setButtonEnable:function(e){this.captchaTime&&(e=!1),this.getButton.setEnable(e)},regainCaptcha:function(){var e=this,t=0;window.clearInterval(e.captchaTime),this.captchaTime=window.setInterval((function(){if(60===t)return window.clearInterval(e.captchaTime),e.captchaTime=null,e.getButton.setText(BI.i18nText("Designer-Login_Code_Request")),void e.setButtonEnable(!0);e.getButton.setText(BI.i18nText("Designer-Login_Code_Request_Again")+"("+(60-t)+")"),t++}),1e3),this.setButtonEnable(!1)}}),BI.shortcut(t.className,t.Widget),t["default"]=t.className},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Model=t.className=void 0,t.className="designer.login.model.sms_method",t.Model=BI.inherit(Fix.Model,{context:[""],state:function(){return{errMessage:"",isRegister:!1,regToken:""}},actions:{setErrMessage:function(e){this.model.errMessage=e},setRegister:function(e){this.model.isRegister=e},setRegToken:function(e){this.model.regToken=e}}}),BI.store(t.className,t.Model),t["default"]=t.className},function(e,t,i){}]); \ No newline at end of file +!function(e){var t={};function i(o){if(t[o])return t[o].exports;var s=t[o]={i:o,l:!1,exports:{}};return e[o].call(s.exports,s,s.exports,i),s.l=!0,s.exports}i.m=e,i.c=t,i.d=function(e,t,o){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(i.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var s in e)i.d(o,s,function(t){return e[t]}.bind(null,s));return o},i.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=4)}([function(e,t,i){"use strict";var o=this&&this.__createBinding||(Object.create?function(e,t,i,o){o===undefined&&(o=i),Object.defineProperty(e,o,{enumerable:!0,get:function(){return t[i]}})}:function(e,t,i,o){o===undefined&&(o=i),e[o]=t[i]}),s=this&&this.__exportStar||function(e,t){for(var i in e)"default"===i||t.hasOwnProperty(i)||o(t,e,i)};Object.defineProperty(t,"__esModule",{value:!0}),s(i(5),t)},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=window.DesignerLoginHelper,s=function(){function e(){}return e.prototype.getParams=function(){return{designerLoginSource:window.designerLoginSource||"0",lastLoginType:window.lastLoginType||"-1",lastLoginAccount:window.lastLoginAccount||""}},e.prototype.closeWindow=function(e){o&&o.closeWindow(e)},e.prototype.serviceHref=function(){o?o.serviceHref():window.open("https://bbs.fanruan.com/thread-102821-1-1.html")},e.prototype.forgetHref=function(){o?o.forgetHref():window.open("https://id.fanruan.com/forget/forget.php?clue=activityf")},e.prototype.normalLogin=function(e,t,i){o?o.normalLogin(e,t,i):i(-1)},e.prototype.sendCaptcha=function(e,t,i){o?o.sendCaptcha(e,t,i):i(-1)},e.prototype.smsLogin=function(e,t,i,s){o?o.smsLogin(e,t,i,s):s(null)},e.prototype.smsRegister=function(e,t,i,s,n){o?o.smsRegister(e,t,i,s,n):n(-1)},e.prototype.resize=function(e,t){o&&o.resize(e,t)},e}();t["default"]=new s},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BBS_ERROR_CODE=t.NORMAL_LOGIN_RESULT=t.REGION=t.LOGIN=void 0,t.LOGIN={NORMAL_METHOD:"normal",SMS_METHOD:"sms",TABS:{LOGIN:"login",FORGET_PASSWORD:"forget",RESET_PASSWORD:"reset",REGISTER:"register"}},t.REGION=[{value:"+86",text:"Designer-Basic_Chinese_Mainland"},{value:"+886",text:"Designer-Basic_Chinese_Taiwan"},{value:"+852",text:"Designer-Basic_Chinese_Hong_Kong"},{value:"+853",text:"Designer-Basic_Chinese_Macao"},{value:"+90",text:"Designer-Basic_Turkey"},{value:"+82",text:"Designer-Basic_South_Korea"},{value:"+81",text:"Designer-Basic_Japan"},{value:"+65",text:"Designer-Basic_Singapore"},{value:"+60",text:"Designer-Basic_Malaysia"}],t.NORMAL_LOGIN_RESULT=[{status:0,message:"Designer-Login_Internal_Error"},{status:-1,message:"Designer-Login_Store_User_Not_Exist"},{status:-2,message:"Designer-Login_Store_User_Password_Error"},{status:-3,message:"Designer-Login_Unexpected_Error"},{status:-4,message:"Designer-Login_Network_Connected_Failed"}],t.BBS_ERROR_CODE=[{status:0,message:"Designer-Login_Internal_Error"},{status:-1,message:"Designer-BBS_Register_Timeout"},{status:-2,message:"Designer-BBS_Phone_Is_Register"},{status:-3,message:"Designer-BBS_Captcha_Send_Exceed_Limit"},{status:-4,message:"Designer-BBS_Phone_Format_Error"},{status:-100,message:"Designer-BBS_Captcha_Out_Of_Date"},{status:-101,message:"Designer-BBS_Captcha_Try_Exceed_Limit"},{status:-102,message:"Designer-BBS_Captcha_Error"},{status:-104,message:"Designer-BBS_Username_Format_Error"},{status:-103,message:"Designer-BBS_Please_Enter_Correct_Phone"},{status:-105,message:"Designer-BBS_Username_Too_Short"},{status:-106,message:"Designer-BBS_Username_Too_Long"},{status:-107,message:"Designer-BBS_Phone_Is_Register"},{status:-108,message:"Designer-BBS_Username_Is_Register"}]},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getError=void 0,t.getError=function(e,t){var i=BI.find(e,(function(e,i){return i.status===t}));return i&&i.message?i.message:""}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=i(0),s=i(6);BI.addI18n(Store.i18n),BI.createWidget({type:o.Vertical,element:"body",items:[{type:s["default"]}]})},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ListView=t.VirtualGroup=t.LeftRightVerticalAdapt=t.Left=t.Horizontal=t.Vertical=t.Absolute=t.Layout=t.Htape=t.CenterAdapt=t.Vtape=t.HorizontalAdapt=t.VerticalAdapt=t.BubbleCombo=t.Img=t.Tab=t.SingleSelectInsertCombo=t.SingleSelectRadioItem=t.MultiTreePopupView=t.Editor=t.NicEditor=t.RichEditor=t.MultiTreeCombo=t.DynamicDateTimeCombo=t.DynamicDateCombo=t.BarPopOver=t.MultiSelectItem=t.TextAreaEditor=t.AllValueChooserCombo=t.ButtonGroup=t.MultiSelectInsertCombo=t.TextEditor=t.Button=t.SignEditor=t.MultiFileEditor=t.SmallTextEditor=t.HtmlLabel=t.Label=t.DownListCombo=t.TextButton=t.IconChangeButton=t.IconButton=t.IconTextIconItem=t.IconTextItem=void 0,t.IconTextItem="bi.icon_text_item",t.IconTextIconItem="bi.icon_text_icon_item",t.IconButton="bi.icon_button",t.IconChangeButton="bi.icon_change_button",t.TextButton="bi.text_button",t.DownListCombo="bi.down_list_combo",t.Label="bi.label",t.HtmlLabel="bi.html_label",t.SmallTextEditor="bi.small_text_editor",t.MultiFileEditor="bi.multifile_editor",t.SignEditor="bi.sign_editor",t.Button="bi.button",t.TextEditor="bi.text_editor",t.MultiSelectInsertCombo="bi.multi_select_insert_combo",t.ButtonGroup="bi.button_group",t.AllValueChooserCombo="bi.all_value_chooser_combo",t.TextAreaEditor="bi.textarea_editor",t.MultiSelectItem="bi.multi_select_item",t.BarPopOver="bi.bar_popover",t.DynamicDateCombo="bi.dynamic_date_combo",t.DynamicDateTimeCombo="bi.dynamic_date_time_combo",t.MultiTreeCombo="bi.multi_tree_combo",t.RichEditor="bi.rich_editor",t.NicEditor="bi.nic_editor",t.Editor="bi.editor",t.MultiTreePopupView="bi.multi_tree_popup_view",t.SingleSelectRadioItem="bi.single_select_radio_item",t.SingleSelectInsertCombo="bi.single_select_insert_combo",t.Tab="bi.tab",t.Img="bi.img",t.BubbleCombo="bi.bubble_combo",t.VerticalAdapt="bi.vertical_adapt",t.HorizontalAdapt="bi.horizontal_adapt",t.Vtape="bi.vtape",t.CenterAdapt="bi.center_adapt",t.Htape="bi.htape",t.Layout="bi.layout",t.Absolute="bi.absolute",t.Vertical="bi.vertical",t.Horizontal="bi.horizontal",t.Left="bi.left",t.LeftRightVerticalAdapt="bi.left_right_vertical_adapt",t.VirtualGroup="bi.virtual_group",t.ListView="bi.list_view"},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Widget=t.className=void 0;var o=i(0),s=i(7),n=i(8),r=i(9),a=i(11);i(25),t.className="designer.login.login",t.Widget=BI.inherit(BI.Widget,{props:{baseCls:"designer-login-login",width:420},_store:function(){return BI.Models.getModel(s["default"])},watch:{loading:function(e){this.loading.setVisible(e)}},render:function(){return{type:o.Vertical,cls:"designer-login",items:[{el:{type:o.HorizontalAdapt,items:[{type:n["default"],rgap:14,tgap:14}]}},{el:{type:o.Vertical,items:[{type:r["default"]},{type:a["default"]}]},lgap:15,rgap:15,bgap:15}]}}}),BI.shortcut(t.className,t.Widget),t["default"]=t.className},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});BI.model("designer.login.login.model",BI.inherit(Fix.Model,{childContext:["loading"],state:function(){return{loading:!1}}})),t["default"]="designer.login.login.model"},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Widget=t.className=void 0;var o=i(0),s=i(1);t.className="designer.login.login.close.button",t.Widget=BI.inherit(BI.Widget,{render:function(){return{type:o.TextButton,text:String.fromCharCode(10005),cls:"background-login-close",width:18.38,height:18.38,handler:function(){s["default"].closeWindow(!1)}}}}),BI.shortcut(t.className,t.Widget),t["default"]=t.className},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Widget=t.className=void 0;var o=i(0);i(10),t.className="designer.login.login.title",t.Widget=BI.inherit(BI.Widget,{props:{baseCls:"designer-login-login-title"},render:function(){return{type:o.Label,text:BI.i18nText("Designer-Login_Title"),cls:"bi-font-bold",bgap:10}}}),BI.shortcut(t.className,t.Widget),t["default"]=t.className},function(e,t,i){},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Widget=t.className=void 0;var o=i(0),s=i(12);i(13);var n=i(14),r=i(16),a=i(18),l=i(2),u=i(1),d=249.64,g=331.64,c=422,p=478,h=560;t.className="designer.login.login.body",t.Widget=BI.inherit(BI.Widget,{props:{baseCls:"designer-login-login-body"},_store:function(){return BI.Stores.getStore(s["default"])},watch:{loginMethod:function(e){this.tabOption.setValue(e),this.tab.setSelect(e),this.foot.setLoginMethod(e),this.refreshLoginButton(),e===l.LOGIN.NORMAL_METHOD?(this.tab.setHeight(d),u["default"].resize(c,p)):this.model.expand&&(u["default"].resize(c,h),this.tab.setHeight(g))},approve:function(e){this.refreshLoginButton()},expand:function(e){e&&(u["default"].resize(c,h),this.tab.setHeight(g))}},render:function(){var e=this;return{type:o.Vertical,cls:"designer-login-body",items:[{type:o.ButtonGroup,value:this.model.loginMethod,ref:function(t){e.tabOption=t},layouts:[{type:o.HorizontalAdapt}],items:[{cls:"designer-login-change-mode bi-list-item-effect bi-border-bottom bi-font-bold",width:70,height:28,value:l.LOGIN.SMS_METHOD,text:BI.i18nText("Designer-Login_Sms")},{cls:"designer-login-change-mode bi-list-item-effect bi-border-bottom bi-font-bold",width:70,height:28,value:l.LOGIN.NORMAL_METHOD,text:BI.i18nText("Designer-Login_Normal")}],listeners:[{eventName:BI.ButtonGroup.EVENT_CHANGE,action:function(t){e.store.setLoginMethod(t)}}],tgap:24,lgap:75,rgap:75},{type:o.CenterAdapt,tgap:35,items:[{type:o.Tab,cardCreator:BI.bind(this.createCard,this),showIndex:this.model.loginMethod,ref:function(t){e.tab=t},height:d,width:280}]},{type:n["default"],lgap:50,rgap:50,bgap:30,ref:function(t){e.foot=t},refreshStatus:function(t){e.store.setApprove(t)}}]}},mounted:function(){var e=u["default"].getParams(),t=e.designerLoginSource,i=e.lastLoginType;if("2"===t){var o="0"===i?l.LOGIN.NORMAL_METHOD:l.LOGIN.SMS_METHOD;this.store.setLoginMethod(o)}},createCard:function(e){var t=this;switch(e){case l.LOGIN.NORMAL_METHOD:return{type:r["default"],ref:function(e){t.normalMethod=e}};case l.LOGIN.SMS_METHOD:default:return{type:a["default"],ref:function(e){t.smsMethod=e},expand:function(){t.store.setExpand(!0)}}}},refreshLoginButton:function(){this.model.loginMethod===l.LOGIN.NORMAL_METHOD?this.normalMethod.setApprove(this.model.approve):this.smsMethod.setApprove(this.model.approve)}}),BI.shortcut(t.className,t.Widget),t["default"]=t.className},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Model=t.className=void 0;var o=i(2);t.className="designer.login.model.login.body",t.Model=BI.inherit(Fix.Model,{context:["loading"],state:function(){return{loginMethod:o.LOGIN.SMS_METHOD,approve:!0,expand:!1}},actions:{setLoginMethod:function(e){this.model.loginMethod=e},setApprove:function(e){this.model.approve=e},setExpand:function(e){this.model.expand=e}}}),BI.store(t.className,t.Model),t["default"]=t.className},function(e,t,i){},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Widget=t.className=void 0;var o=i(1),s=i(0);i(15);var n=i(2);t.className="designer.login.login.foot",t.Widget=BI.inherit(BI.Widget,{props:{baseCls:"designer-login-login-foot"},render:function(){var e=this,t=this.options;return{type:s.LeftRightVerticalAdapt,items:{left:[{type:s.MultiSelectItem,width:30,selected:!0,handler:function(){t.refreshStatus(this.isSelected())}},{type:s.Label,cls:"login-foot-text",textAlign:"left",text:BI.i18nText("Designer-Login_I_Have_Read")},{type:s.Label,cls:"login-foot-text",textAlign:"left",text:"《"},{type:s.TextButton,cls:"login-link",textAlign:"left",text:BI.i18nText("Designer-Login_Service_Terms"),handler:function(){o["default"].serviceHref()}},{type:s.Label,cls:"login-foot-text",textAlign:"left",text:"》"}],right:[{type:s.TextButton,cls:"login-link",textAlign:"right",text:BI.i18nText("Designer-Login_Forget_Password"),invisible:!0,tgap:2,ref:function(t){e.forgetPassword=t},handler:function(){o["default"].forgetHref()}}]}}},setLoginMethod:function(e){e===n.LOGIN.NORMAL_METHOD?this.forgetPassword.setVisible(!0):this.forgetPassword.setVisible(!1)}}),BI.shortcut(t.className,t.Widget),t["default"]=t.className},function(e,t,i){},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Widget=t.className=void 0;var o=i(0),s=i(3),n=i(1),r=i(17),a=i(2);t.className="designer.login.login.normal",t.Widget=BI.inherit(BI.Widget,{props:{baseCls:"designer-login-login-body"},_store:function(){return BI.Stores.getStore(r["default"])},watch:{errMessage:function(e){this.errMessage.setText(e)}},render:function(){var e=this;return{type:o.Vertical,items:[{type:o.Label,textAlign:"left",cls:"designer-login-text",text:BI.i18nText("Designer-Login_User_Name"),bgap:3},{type:o.Editor,cls:"bi-border-bottom designer-login-editor-username",watermark:BI.i18nText("Designer-Login_User_Name_Hint"),inputType:"text",allowBlank:!0,height:40,ref:function(t){e.userName=t},listeners:[{eventName:"EVENT_CHANGE",action:function(){e.store.setErrMessage("")}}]},{type:o.Label,textAlign:"left",cls:"designer-login-text",text:BI.i18nText("Designer-Login_Password"),bgap:3},{type:o.Editor,cls:"bi-border-bottom designer-login-editor-password",watermark:BI.i18nText("Designer-Login_Password_Hint"),inputType:"password",allowBlank:!0,height:40,ref:function(t){e.password=t},listeners:[{eventName:"EVENT_CHANGE",action:function(){e.store.setErrMessage("")}}]},{type:o.Label,cls:"designer-login-error-message",textAlign:"center",text:"",height:20,bgap:10,ref:function(t){e.errMessage=t}},{type:o.Button,cls:"login-login-button bi-font-bold",text:BI.i18nText("Designer-Login"),level:"common",height:40,ref:function(t){e.loginButton=t},handler:function(){e.login()}}]}},mounted:function(){var e=this;this.element.keyup((function(t){13===t.keyCode&&e.login()}));var t=n["default"].getParams(),i=t.designerLoginSource,o=t.lastLoginType,s=t.lastLoginAccount;"2"===i&&"0"===o&&e.userName.setValue(s)},checkUsername:function(){var e=this.userName.getValue();e&&this.userName.setValue(e.replace(/\s+/g,""))},login:function(){var e=this;e.checkUsername();var t=this.userName.getValue(),i=this.password.getValue();t?i?n["default"].normalLogin(t,i,(function(t){var i=parseInt(t,10);if(i>0)n["default"].closeWindow(!0);else{var o=s.getError(a.NORMAL_LOGIN_RESULT,i);o&&e.store.setErrMessage(BI.i18nText(o))}})):this.store.setErrMessage(BI.i18nText("Designer-Login_Password_Not_Null")):this.store.setErrMessage(BI.i18nText("Designer-Login_Username_Not_Null"))},setApprove:function(e){this.loginButton.setEnable(e)}}),BI.shortcut(t.className,t.Widget),t["default"]=t.className},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Model=t.className=void 0,t.className="designer.login.model.normal_method",t.Model=BI.inherit(Fix.Model,{context:[""],state:function(){return{errMessage:""}},actions:{setErrMessage:function(e){this.model.errMessage=e}}}),BI.store(t.className,t.Model),t["default"]=t.className},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Widget=t.className=void 0;var o=i(0),s=i(19),n=i(22),r=i(23),a=i(2),l=i(24),u=i(1),d=i(3);t.className="designer.login.login.sms",t.Widget=BI.inherit(BI.Widget,{props:{baseCls:"designer-login-login-body"},_store:function(){return BI.Stores.getStore(l["default"])},watch:{errMessage:function(e){this.errMessage.setText(e)},isRegister:function(e){var t=this.options;e&&(t.expand(),this.password.setVisible(!0),this.passwordLabel.setVisible(!0))}},render:function(){var e=this,t=this;return{type:o.Vertical,items:[{type:o.Label,textAlign:"left",cls:"designer-login-text",text:BI.i18nText("Designer-Login_Phone"),bgap:3},{type:o.HorizontalAdapt,bgap:7,items:[{type:s["default"],height:42,textFormatter:function(e){var i=t.getNumberTypeItem(e);return{value:i.value,text:BI.i18nText(i.text)}},value:a.REGION[0].value,items:BI.map(a.REGION,(function(e,t){return{type:n["default"],value:t.value,label:BI.i18nText(t.text),text:t.value}})),ref:function(t){e.regionCode=t}},{type:o.Editor,cls:"bi-border-bottom designer-login-editor-username",watermark:BI.i18nText("Designer-Login_Phone_Hint"),inputType:"text",allowBlank:!0,height:40,ref:function(t){e.phone=t},listeners:[{eventName:"EVENT_CHANGE",action:function(){e.store.setErrMessage("")}}]}]},{type:o.Label,textAlign:"left",cls:"designer-login-text",text:BI.i18nText("Designer-Login_Code"),bgap:3},{type:o.Horizontal,bgap:7,items:[{type:o.Editor,cls:"bi-border-bottom designer-login-editor-password",watermark:BI.i18nText("Designer-Login_Code_Hint"),inputType:"text",allowBlank:!0,height:40,width:190,ref:function(t){e.code=t},listeners:[{eventName:"EVENT_CHANGE",action:function(){e.store.setErrMessage("")}}]},{type:r["default"],height:40,width:90,ref:function(t){e.accountCaptcha=t},listeners:[{eventName:"EVENT_SEND",action:function(){t.sendCaptcha()}}]}]},{type:o.Label,textAlign:"left",cls:"designer-login-text",text:BI.i18nText("Designer-Login_Password"),bgap:3,invisible:!0,ref:function(t){e.passwordLabel=t}},{type:o.Editor,cls:"bi-border-bottom designer-login-editor-password",watermark:BI.i18nText("Designer-Login_Password_Setting_Hint"),inputType:"password",allowBlank:!0,height:40,invisible:!0,ref:function(t){e.password=t},listeners:[{eventName:"EVENT_CHANGE",action:function(){e.store.setErrMessage("")}}]},{type:o.Label,cls:"designer-login-error-message",textAlign:"center",text:"",height:20,bgap:11,ref:function(t){e.errMessage=t}},{type:o.Button,cls:"login-login-button bi-font-bold",text:BI.i18nText("Designer-Login_Register_Or_Login"),level:"common",height:40,ref:function(t){e.loginButton=t},handler:function(){e.login()}}]}},mounted:function(){var e=this;this.element.keyup((function(t){13===t.keyCode&&e.login()}));var t=u["default"].getParams(),i=t.designerLoginSource,o=t.lastLoginType,s=t.lastLoginAccount;if("2"===i&&"1"===o){var n=s.split("-")[0],r=s.split("-")[1];e.regionCode.setValue(n),e.phone.setValue(r)}},getNumberTypeItem:function(e){return BI.find(a.REGION,(function(t,i){return e===i.value}))||{}},checkPhone:function(){var e=this.phone.getValue();e&&this.phone.setValue(e.replace(/\s+/g,""))},login:function(){var e=this,t=this;t.checkPhone();var i=this.phone.getValue(),o=this.code.getValue();if(i)if(o)if(6==o.length){var s=this.regionCode.getValue();if(this.model.isRegister){var n=this.password.getValue();if(!n)return void this.store.setErrMessage(BI.i18nText("Designer-Login_Password_Not_Null"));var r=this.model.regToken;if(!r)return void this.store.setErrMessage(BI.i18nText("Designer-Login_Token_Request_Failed"));u["default"].smsRegister(s,i,n,r,(function(e){var i=parseInt(e,10);if(i>0)u["default"].closeWindow(!0);else{var o=d.getError(a.BBS_ERROR_CODE,i);o&&t.store.setErrMessage(BI.i18nText(o))}}))}else u["default"].smsLogin(s,i,o,(function(i){var o=JSON.parse(i);if(o.status>0)if(!0===o.register){var s=o.regtoken;s?(t.store.setRegister(!0),t.store.setRegToken(s)):e.store.setErrMessage(BI.i18nText("Designer-Login_Token_Request_Failed"))}else u["default"].closeWindow(!0);else{var n=d.getError(a.BBS_ERROR_CODE,o.status);n&&t.store.setErrMessage(BI.i18nText(n))}}))}else this.store.setErrMessage(BI.i18nText("Designer-BBS_Captcha_Error"));else this.store.setErrMessage(BI.i18nText("Designer-Login_Code_Not_Null"));else this.store.setErrMessage(BI.i18nText("Designer-Login_Phone_Not_Null"))},sendCaptcha:function(){var e=this;e.checkPhone();var t=this.phone.getValue();if(!t)return e.accountCaptcha.setButtonEnable(!0),void this.store.setErrMessage(BI.i18nText("Designer-Login_Phone_Not_Null"));var i=this.regionCode.getValue();u["default"].sendCaptcha(i,t,(function(t){var i=parseInt(t,10);if(1===i)e.accountCaptcha.regainCaptcha();else{if(e.accountCaptcha.setButtonEnable(!0),0===i)return void e.store.setErrMessage(BI.i18nText("Designer-BBS_Please_Enter_Correct_Phone"));var o=d.getError(a.BBS_ERROR_CODE,i);o&&e.store.setErrMessage(BI.i18nText(o))}}))},setApprove:function(e){this.loginButton.setEnable(e)}}),BI.shortcut(t.className,t.Widget),t["default"]=t.className},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Widget=t.className=void 0;var o=i(20),s=i(21);t.className="designer.left_right_text_value_combo",t.Widget=BI.inherit(BI.Widget,{props:{baseCls:"",height:24,chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,textFormatter:function(e){return e},value:""},render:function(){var e=this,t=this.options;return{type:s["default"],container:t.container,adjustLength:2,ref:function(t){e.combo=t},el:{type:o["default"],cls:"text-value-trigger",items:t.items,height:t.height-2,value:t.textFormatter(t.value),ref:function(t){e.trigger=t}},popup:{el:{type:"bi.text_value_combo_popup",chooseType:t.chooseType,value:t.value,items:t.items,ref:function(t){e.popup=t},listeners:[{eventName:BI.TextValueComboPopup.EVENT_CHANGE,action:function(){e.setValue(e.getValue()),e.combo.hideView(),e.fireEvent("EVENT_CHANGE",arguments)}},{eventName:BI.Controller.EVENT_CHANGE,action:function(){e.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}}]},value:t.value,maxHeight:240,minHeight:25}}},setValue:function(e){this.combo.setValue(e),this.trigger.setValue(this.options.textFormatter(e))},getValue:function(){var e=this.combo.getValue();return BI.isNull(e)?"":BI.isArray(e)?e[0]:e},populate:function(e){this.options.items=e,this.combo.populate(e)}}),BI.shortcut(t.className,t.Widget),t["default"]=t.className},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Widget=t.className=void 0,t.className="designer.left_right_text_value_combo_trigger",t.Widget=BI.inherit(BI.Trigger,{props:{baseCls:"",value:{}},render:function(){var e=this,t=this.options,i=t.value;return{type:"bi.htape",cls:"bi-border-bottom bi-border-radius",items:[{type:"bi.label",text:i.text,title:function(){return e.textRow.getText()},height:t.height,hgap:3,textAlign:"left",ref:function(t){e.textRow=t}},{type:"bi.label",text:i.value,height:t.height,width:32,textAlign:"right",ref:function(t){e.valueRow=t}},{type:"bi.trigger_icon_button",width:t.triggerWidth||t.height}]}},setValue:function(e){this.textRow.setText(e.text),this.valueRow.setText(e.value)},setText:function(e){this.textRow.setText(e)}}),BI.shortcut(t.className,t.Widget),t["default"]=t.className},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Widget=t.className=void 0;var o={};t.className="designer.login_combo",t.Widget=BI.inherit(BI.Widget,{_defaultConfig:function(){var e=BI.Combo.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.baseCls||"")+" bi-combo"+(BI.isIE()?" hack":""),attributes:{tabIndex:-1},trigger:"click",toggle:!0,direction:"bottom",logic:{dynamic:!0},container:null,isDefaultInit:!1,destroyWhenHide:!1,hideWhenAnotherComboOpen:!1,isNeedAdjustHeight:!0,isNeedAdjustWidth:!0,stopEvent:!1,stopPropagation:!1,adjustLength:0,adjustXOffset:0,adjustYOffset:0,hideChecker:BI.emptyFn,offsetStyle:"left",el:{},popup:{},comboClass:"bi-combo-popup",hoverClass:"bi-combo-hover",belowMouse:!1})},_init:function(){BI.Combo.superclass._init.apply(this,arguments);var e=this,t=this.options;this._initCombo(),this._initPullDownAction(),this.combo.on(BI.Controller.EVENT_CHANGE,(function(t,i,o){e.isEnabled()&&e.isValid()&&(t===BI.Events.EXPAND&&e._popupView(),t===BI.Events.COLLAPSE&&e._hideView(),t===BI.Events.EXPAND&&(e.fireEvent(BI.Controller.EVENT_CHANGE,arguments),e.fireEvent(BI.Combo.EVENT_EXPAND)),t===BI.Events.COLLAPSE&&(e.fireEvent(BI.Controller.EVENT_CHANGE,arguments),e.isViewVisible()&&e.fireEvent(BI.Combo.EVENT_COLLAPSE)),t===BI.Events.CLICK&&e.fireEvent(BI.Combo.EVENT_TRIGGER_CHANGE,o))})),e.element.on("mouseenter."+e.getName(),(function(i){e.isEnabled()&&e.isValid()&&e.combo.isEnabled()&&e.combo.isValid()&&e.element.addClass(t.hoverClass)})),e.element.on("mouseleave."+e.getName(),(function(i){e.isEnabled()&&e.isValid()&&e.combo.isEnabled()&&e.combo.isValid()&&e.element.removeClass(t.hoverClass)})),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("vertical",BI.extend(t.logic,{items:[{el:this.combo}]})))),t.isDefaultInit&&this._assertPopupView(),BI.Resizers.add(this.getName(),BI.bind((function(e){this.isViewVisible()&&(BI.isNotNull(e)?this._hideIf(e):this._hideView())}),this))},_toggle:function(e){this._assertPopupViewRender(),this.popupView.isVisible()?this._hideView(e):this.isEnabled()&&this._popupView(e)},_initPullDownAction:function(){var e=this,t=this.options,i=(this.options.trigger||"").split(","),o=function(e){t.stopEvent&&e.stopEvent(),t.stopPropagation&&e.stopPropagation()},s=!1;function n(i){e.isEnabled()&&e.isValid()&&e.combo.isEnabled()&&e.combo.isValid()&&!0===t.toggle&&(e._hideView(i),e.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.COLLAPSE,"",e.combo),e.fireEvent(BI.Combo.EVENT_COLLAPSE)),e.popupView&&e.popupView.element.off("mouseenter."+e.getName()).off("mouseleave."+e.getName()),s=!1}BI.each(i,(function(i,r){switch(r){case"hover":e.element.on("mouseenter."+e.getName(),(function(t){e.isEnabled()&&e.isValid()&&e.combo.isEnabled()&&e.combo.isValid()&&(e._popupView(t),e.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EXPAND,"",e.combo),e.fireEvent(BI.Combo.EVENT_EXPAND))})),e.element.on("mouseleave."+e.getName(),(function(t){e.popupView&&(e.popupView.element.on("mouseenter."+e.getName(),(function(t){s=!0,e.popupView.element.on("mouseleave."+e.getName(),(function(e){n(e)})),e.popupView.element.off("mouseenter."+e.getName())})),BI.defer((function(){s||n(t)}),50))}));break;case"click":var a=BI.debounce((function(i){e.isEnabled()&&e.isValid()&&e.combo.isEnabled()&&e.combo.isValid()&&(t.toggle?e._toggle(i):e._popupView(i),e.isViewVisible()?(e.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EXPAND,"",e.combo),e.fireEvent(BI.Combo.EVENT_EXPAND)):(e.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.COLLAPSE,"",e.combo),e.fireEvent(BI.Combo.EVENT_COLLAPSE)))}),BI.EVENT_RESPONSE_TIME,{leading:!0,trailing:!1});e.element.off(r+"."+e.getName()).on(r+"."+e.getName(),(function(e){a(e),o(e)}));break;case"click-hover":a=BI.debounce((function(t){e.isEnabled()&&e.isValid()&&e.combo.isEnabled()&&e.combo.isValid()&&(e._popupView(t),e.isViewVisible()&&(e.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EXPAND,"",e.combo),e.fireEvent(BI.Combo.EVENT_EXPAND)))}),BI.EVENT_RESPONSE_TIME,{leading:!0,trailing:!1});e.element.off("click."+e.getName()).on("click."+e.getName(),(function(e){a(e),o(e)})),e.element.on("mouseleave."+e.getName(),(function(t){e.popupView&&(e.popupView.element.on("mouseenter."+e.getName(),(function(t){s=!0,e.popupView.element.on("mouseleave."+e.getName(),(function(e){n(e)})),e.popupView.element.off("mouseenter."+e.getName())})),BI.delay((function(){s||n(t)}),50))}))}}))},_initCombo:function(){this.combo=BI.createWidget(this.options.el,{value:this.options.value})},_assertPopupView:function(){var e=this,t=this.options;null==this.popupView&&(this.popupView=BI.createWidget(this.options.popup,{type:"bi.popup_view",value:t.value},this),this.popupView.on(BI.Controller.EVENT_CHANGE,(function(t,i,o){t===BI.Events.CLICK&&(e.combo.setValue(e.getValue()),e.fireEvent(BI.Combo.EVENT_CHANGE,i,o)),e.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})),this.popupView.setVisible(!1),BI.nextTick((function(){e.fireEvent(BI.Combo.EVENT_AFTER_INIT)})))},_assertPopupViewRender:function(){this._assertPopupView(),this._rendered||(BI.createWidget({type:"bi.vertical",scrolly:!1,element:this.options.container||this,items:[{el:this.popupView}]}),this._rendered=!0)},_hideIf:function(e,t){if(e&&(!0!==t&&this.element.find(e.target).length>0||this.popupView&&this.popupView.element.find(e.target).length>0||"CodeMirror-cursor"===e.target.className||BI.Widget._renderEngine.createElement(e.target).closest(".CodeMirror-hints").length>0)){var i=this.options.direction.split(",");(BI.contains(i,"innerLeft")||BI.contains(i,"innerRight"))&&(this.adjustWidth(),this.adjustHeight())}else{if(!1!==this.options.hideChecker.apply(this,[e]))return this._hideView(),!0}},_hideView:function(){this.fireEvent(BI.Combo.EVENT_BEFORE_HIDEVIEW),!0===this.options.destroyWhenHide?(this.popupView&&this.popupView.destroy(),this.popupView=null,this._rendered=!1):this.popupView&&this.popupView.invisible(),this.element.removeClass(this.options.comboClass),delete o[this.getName()],BI.Widget._renderEngine.createElement(document).unbind("mousedown."+this.getName()).unbind("mousewheel."+this.getName()),this.fireEvent(BI.Combo.EVENT_AFTER_HIDEVIEW)},_popupView:function(e){var t=this;this._assertPopupViewRender(),this.fireEvent(BI.Combo.EVENT_BEFORE_POPUPVIEW),this.popupView.css({left:-999999999,top:-99999999}),this.popupView.visible(),BI.each(o,(function(i,s){i!==t.getName()&&s&&!0===s._hideIf(e,!0)&&delete o[i]})),this.options.hideWhenAnotherComboOpen&&(o[this.getName()]=this),this.adjustWidth(e),this.adjustHeight(e),this.element.addClass(this.options.comboClass),BI.Widget._renderEngine.createElement(document).unbind("mousedown."+this.getName()).unbind("mousewheel."+this.getName()),BI.Widget._renderEngine.createElement(document).bind("mousedown."+this.getName(),BI.bind(this._hideIf,this)).bind("mousewheel."+this.getName(),BI.bind(this._hideIf,this)),this.fireEvent(BI.Combo.EVENT_AFTER_POPUPVIEW)},adjustWidth:function(e){var t=this.options;if(this.popupView&&!0===t.isNeedAdjustWidth){this.resetListWidth("");var i=this.popupView.element.outerWidth(),o=this.element.outerWidth()||t.width;i>o+80?o+=80:i>o&&(o=i),this.resetListWidth(o<100?100:o)}},adjustHeight:function(e){var t=this.options,i={top:0,adaptHeight:0,left:0};if(this.popupView){var o=this.popupView.isVisible();this.popupView.visible();var s=t.belowMouse&&BI.isNotNull(e)?{element:{offset:function(){return{left:e.pageX,top:e.pageY}},bounds:function(){return{x:e.offsetX,y:e.offsetY,width:0,height:24}},outerWidth:function(){return 0},outerHeight:function(){return 24}}}:this.combo;switch(t.direction){case"bottom":case"bottom,right":i=BI.DOM.getComboPosition(s,this.popupView,t.adjustXOffset,t.adjustYOffset||t.adjustLength,t.isNeedAdjustHeight,["bottom","top","right","left"],t.offsetStyle);break;case"top":case"top,right":i=BI.DOM.getComboPosition(s,this.popupView,t.adjustXOffset,t.adjustYOffset||t.adjustLength,t.isNeedAdjustHeight,["top","bottom","right","left"],t.offsetStyle);break;case"left":case"left,bottom":i=BI.DOM.getComboPosition(s,this.popupView,t.adjustXOffset||t.adjustLength,t.adjustYOffset,t.isNeedAdjustHeight,["left","right","bottom","top"],t.offsetStyle);break;case"right":case"right,bottom":i=BI.DOM.getComboPosition(s,this.popupView,t.adjustXOffset||t.adjustLength,t.adjustYOffset,t.isNeedAdjustHeight,["right","left","bottom","top"],t.offsetStyle);break;case"top,left":i=BI.DOM.getComboPosition(s,this.popupView,t.adjustXOffset,t.adjustYOffset||t.adjustLength,t.isNeedAdjustHeight,["top","bottom","left","right"],t.offsetStyle);break;case"bottom,left":i=BI.DOM.getComboPosition(s,this.popupView,t.adjustXOffset,t.adjustYOffset||t.adjustLength,t.isNeedAdjustHeight,["bottom","top","left","right"],t.offsetStyle);break;case"left,top":i=BI.DOM.getComboPosition(s,this.popupView,t.adjustXOffset||t.adjustLength,t.adjustYOffset,t.isNeedAdjustHeight,["left","right","top","bottom"],t.offsetStyle);break;case"right,top":i=BI.DOM.getComboPosition(s,this.popupView,t.adjustXOffset||t.adjustLength,t.adjustYOffset,t.isNeedAdjustHeight,["right","left","top","bottom"],t.offsetStyle);break;case"right,innerRight":i=BI.DOM.getComboPosition(s,this.popupView,t.adjustXOffset||t.adjustLength,t.adjustYOffset,t.isNeedAdjustHeight,["right","left","innerRight","innerLeft","bottom","top"],t.offsetStyle);break;case"right,innerLeft":i=BI.DOM.getComboPosition(s,this.popupView,t.adjustXOffset||t.adjustLength,t.adjustYOffset,t.isNeedAdjustHeight,["right","left","innerLeft","innerRight","bottom","top"],t.offsetStyle);break;case"innerRight":i=BI.DOM.getComboPosition(s,this.popupView,t.adjustXOffset||t.adjustLength,t.adjustYOffset,t.isNeedAdjustHeight,["innerRight","innerLeft","right","left","bottom","top"],t.offsetStyle);break;case"innerLeft":i=BI.DOM.getComboPosition(s,this.popupView,t.adjustXOffset||t.adjustLength,t.adjustYOffset,t.isNeedAdjustHeight,["innerLeft","innerRight","left","right","bottom","top"],t.offsetStyle);break;case"top,custom":case"custom,top":i=BI.DOM.getTopAdaptPosition(s,this.popupView,t.adjustYOffset||t.adjustLength,t.isNeedAdjustHeight);break;case"custom,bottom":case"bottom,custom":i=BI.DOM.getBottomAdaptPosition(s,this.popupView,t.adjustYOffset||t.adjustLength,t.isNeedAdjustHeight);break;case"left,custom":case"custom,left":delete(i=BI.DOM.getLeftAdaptPosition(s,this.popupView,t.adjustXOffset||t.adjustLength)).top,delete i.adaptHeight;break;case"custom,right":case"right,custom":delete(i=BI.DOM.getRightAdaptPosition(s,this.popupView,t.adjustXOffset||t.adjustLength)).top,delete i.adaptHeight}"adaptHeight"in i&&this.resetListHeight(i.adaptHeight),"left"in i&&this.popupView.element.css({left:i.left}),"top"in i&&this.popupView.element.css({top:i.top}),this.position=i,this.popupView.setVisible(o)}},resetListHeight:function(e){this._assertPopupView(),this.popupView.resetHeight&&this.popupView.resetHeight(e)},resetListWidth:function(e){this._assertPopupView(),this.popupView.resetWidth&&this.popupView.resetWidth(e)},populate:function(e){this._assertPopupView(),this.popupView.populate.apply(this.popupView,arguments),this.combo.populate&&this.combo.populate.apply(this.combo,arguments)},_setEnable:function(e){BI.Combo.superclass._setEnable.apply(this,arguments),!0===e?this.element.removeClass("base-disabled disabled"):!1===e&&this.element.addClass("base-disabled disabled"),!e&&this.element.removeClass(this.options.hoverClass),!e&&this.isViewVisible()&&this._hideView()},setValue:function(e){this.combo.setValue(e),BI.isNull(this.popupView)?this.options.popup.value=e:this.popupView.setValue(e)},getValue:function(){return BI.isNull(this.popupView)?this.options.popup.value:this.popupView.getValue()},isViewVisible:function(){return this.isEnabled()&&this.combo.isEnabled()&&!!this.popupView&&this.popupView.isVisible()},showView:function(e){this.isEnabled()&&this.combo.isEnabled()&&!this.isViewVisible()&&this._popupView(e)},hideView:function(){this._hideView()},getView:function(){return this.popupView},getPopupPosition:function(){return this.position},toggle:function(){this._toggle()},destroyed:function(){BI.Widget._renderEngine.createElement(document).unbind("click."+this.getName()).unbind("mousedown."+this.getName()).unbind("mousewheel."+this.getName()).unbind("mouseenter."+this.getName()).unbind("mousemove."+this.getName()).unbind("mouseleave."+this.getName()).unbind("blur."+this.getName()),BI.Resizers.remove(this.getName()),this.popupView&&this.popupView._destroy(),delete o[this.getName()]}}),BI.Combo.EVENT_TRIGGER_CHANGE="EVENT_TRIGGER_CHANGE",BI.Combo.EVENT_CHANGE="EVENT_CHANGE",BI.Combo.EVENT_EXPAND="EVENT_EXPAND",BI.Combo.EVENT_COLLAPSE="EVENT_COLLAPSE",BI.Combo.EVENT_AFTER_INIT="EVENT_AFTER_INIT",BI.Combo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.Combo.EVENT_AFTER_POPUPVIEW="EVENT_AFTER_POPUPVIEW",BI.Combo.EVENT_BEFORE_HIDEVIEW="EVENT_BEFORE_HIDEVIEW",BI.Combo.EVENT_AFTER_HIDEVIEW="EVENT_AFTER_HIDEVIEW",BI.shortcut(t.className,t.Widget),t["default"]=t.className},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Widget=t.className=void 0,t.className="designer.components.phone.editor.item",t.Widget=BI.inherit(BI.BasicButton,{props:{baseCls:"designer-login-login-body",label:"",text:""},render:function(){var e=this.options;return{type:"bi.htape",items:[{el:{type:"bi.label",text:e.label,title:e.label,textAlign:"left"},lgap:10,rgap:5},{el:{type:"bi.label",text:e.text,textAlign:"right"},width:32,rgap:10}]}},doClick:function(){BI.SingleSelectItem.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent("EVENT_CHANGE",this.isSelected(),this)},setSelected:function(e){BI.SingleSelectItem.superclass.setSelected.apply(this,arguments)},getValue:function(){return this.options.value}}),BI.shortcut(t.className,t.Widget),t["default"]=t.className},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Widget=t.className=void 0;var o=i(0);t.className="designer.user.account.setting.captcha",t.Widget=BI.inherit(BI.Widget,{props:{baseCls:"designer-login-login-body"},render:function(){var e=this;this.options;return{type:o.TextButton,text:BI.i18nText("Designer-Login_Code_Request"),cls:"designer-login-border-bottom designer-login-code-text",handler:function(){e.setButtonEnable(!1),e.fireEvent("EVENT_SEND")},ref:function(t){e.getButton=t}}},setButtonEnable:function(e){this.captchaTime&&(e=!1),this.getButton.setEnable(e)},regainCaptcha:function(){var e=this,t=0;window.clearInterval(e.captchaTime),this.captchaTime=window.setInterval((function(){if(60===t)return window.clearInterval(e.captchaTime),e.captchaTime=null,e.getButton.setText(BI.i18nText("Designer-Login_Code_Request")),void e.setButtonEnable(!0);e.getButton.setText(BI.i18nText("Designer-Login_Code_Request_Again")+"("+(60-t)+")"),t++}),1e3),this.setButtonEnable(!1)}}),BI.shortcut(t.className,t.Widget),t["default"]=t.className},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Model=t.className=void 0,t.className="designer.login.model.sms_method",t.Model=BI.inherit(Fix.Model,{context:[""],state:function(){return{errMessage:"",isRegister:!1,regToken:""}},actions:{setErrMessage:function(e){this.model.errMessage=e},setRegister:function(e){this.model.isRegister=e},setRegToken:function(e){this.model.regToken=e}}}),BI.store(t.className,t.Model),t["default"]=t.className},function(e,t,i){}]); \ No newline at end of file diff --git a/designer-form/src/main/java/com/fr/design/mainframe/FormWidgetDetailPane.java b/designer-form/src/main/java/com/fr/design/mainframe/FormWidgetDetailPane.java index 8fbc4d06db..2c47e1e072 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/FormWidgetDetailPane.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/FormWidgetDetailPane.java @@ -3,17 +3,24 @@ package com.fr.design.mainframe; import com.fr.base.BaseUtils; import com.fr.design.dialog.BasicPane; import com.fr.design.gui.ibutton.UIHeadGroup; +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.i18n.Toolkit; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.mainframe.reuse.ComponentReuseNotificationInfo; import com.fr.design.mainframe.share.collect.ComponentCollector; import com.fr.design.mainframe.share.ui.local.LocalWidgetRepoPane; import com.fr.design.mainframe.share.ui.online.OnlineWidgetRepoPane; +import javax.swing.BorderFactory; import javax.swing.Icon; import javax.swing.JPanel; import javax.swing.JScrollPane; +import javax.swing.SwingConstants; import java.awt.BorderLayout; import java.awt.CardLayout; +import java.awt.Color; +import java.awt.Dimension; +import java.awt.FlowLayout; import java.util.ArrayList; import java.util.List; @@ -30,6 +37,8 @@ public class FormWidgetDetailPane extends FormDockView{ private UIHeadGroup headGroup; private List paneList; + private boolean isEmptyPane = false; + public static FormWidgetDetailPane getInstance() { if (HOLDER.singleton == null) { HOLDER.singleton = new FormWidgetDetailPane(); @@ -53,7 +62,7 @@ public class FormWidgetDetailPane extends FormDockView{ } public String getViewTitle() { - return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Widget_Tree_And_Table"); + return Toolkit.i18nText("Fine-Design_Form_Widget_Tree_And_Table"); } @Override @@ -65,6 +74,9 @@ public class FormWidgetDetailPane extends FormDockView{ * 初始化 */ public void refreshDockingView(){ + if (isEmptyPane) { + return; + } FormDesigner designer = this.getEditingFormDesigner(); removeAll(); if (designer == null) { @@ -95,6 +107,10 @@ public class FormWidgetDetailPane extends FormDockView{ this.add(centerPane, BorderLayout.CENTER); } + public void resetEmptyPane(){ + this.isEmptyPane = false; + } + /** * 清除数据 @@ -105,10 +121,34 @@ public class FormWidgetDetailPane extends FormDockView{ this.add(psp, BorderLayout.CENTER); } + public void switch2Empty(){ + isEmptyPane = true; + this.removeAll(); + JPanel panel = FRGUIPaneFactory.createVerticalFlowLayout_Pane(true, FlowLayout.LEADING, 0, 5); + UILabel imagePanel = new UILabel(BaseUtils.readIcon("/com/fr/base/images/share/version_not_match.png")); + imagePanel.setPreferredSize(new Dimension(240, 96)); + imagePanel.setHorizontalAlignment(SwingConstants.CENTER); + panel.add(imagePanel); + UILabel uiLabel1 = tipLabel(Toolkit.i18nText("Fine-Design_Share_Version_Not_Match_Tip1")); + UILabel uiLabel2 = tipLabel(Toolkit.i18nText("Fine-Design_Share_Version_Not_Match_Tip2")); + panel.add(uiLabel1); + panel.add(uiLabel2); + panel.setBorder(BorderFactory.createEmptyBorder(240, 0, 0, 0)); + this.add(panel, BorderLayout.CENTER); + } + + private UILabel tipLabel(String text) { + UILabel tipLabel = new UILabel(text); + tipLabel.setHorizontalAlignment(SwingConstants.CENTER); + tipLabel.setPreferredSize(new Dimension(240, 20)); + tipLabel.setForeground(Color.decode("#8F8F92")); + return tipLabel; + } + public void enterWidgetLib() { + ComponentReuseNotifyUtil.enterWidgetLibExtraAction(); EastRegionContainerPane.getInstance().switchTabTo(EastRegionContainerPane.KEY_WIDGET_LIB); - ComponentReuseNotifyUtil.enterWidgetLibExtraAction(false); } /** diff --git a/designer-form/src/main/java/com/fr/design/mainframe/share/ui/local/LocalWidgetRepoPane.java b/designer-form/src/main/java/com/fr/design/mainframe/share/ui/local/LocalWidgetRepoPane.java index 487a414e51..fad64627f8 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/share/ui/local/LocalWidgetRepoPane.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/share/ui/local/LocalWidgetRepoPane.java @@ -5,6 +5,7 @@ import com.fr.design.gui.icontainer.UIScrollPane; import com.fr.design.i18n.Toolkit; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.VerticalFlowLayout; +import com.fr.design.mainframe.FormWidgetDetailPane; import com.fr.design.mainframe.share.sort.WidgetSortType; import com.fr.design.mainframe.share.ui.widgetfilter.LocalWidgetFilter; import com.fr.design.mainframe.share.util.InstallComponentHelper; @@ -213,6 +214,7 @@ public class LocalWidgetRepoPane extends BasicPane { Thread.currentThread().interrupt(); } catch (ExecutionException e) { FineLoggerFactory.getLogger().error(e.getMessage(), e); + FormWidgetDetailPane.getInstance().switch2Empty(); } finally { isRefreshing.set(false); } diff --git a/designer-form/src/main/java/com/fr/design/mainframe/share/util/InstallComponentHelper.java b/designer-form/src/main/java/com/fr/design/mainframe/share/util/InstallComponentHelper.java index d2846d93cd..8c88de20b1 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/share/util/InstallComponentHelper.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/share/util/InstallComponentHelper.java @@ -46,9 +46,14 @@ public class InstallComponentHelper { } private static boolean needPreInstallComponent() { - //老用户或者组件库里已有组件,不预装组件 - SnapChat snapChat = SnapChatFactory.createSnapChat(false, SnapChatKeys.COMPONENT); - return !snapChat.hasRead() && !hasComponentInstalled(); + try { + //老用户或者组件库里已有组件,不预装组件 + SnapChat snapChat = SnapChatFactory.createSnapChat(false, SnapChatKeys.COMPONENT); + return !snapChat.hasRead() && !hasComponentInstalled(); + } catch (Throwable e) { + FineLoggerFactory.getLogger().error(e.getMessage(), e); + } + return false; } /** diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/app/DesignerAppUtils.java b/designer-realize/src/main/java/com/fr/design/mainframe/app/DesignerAppUtils.java index 7fb16a56b2..4680a8a258 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/app/DesignerAppUtils.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/app/DesignerAppUtils.java @@ -77,6 +77,11 @@ public class DesignerAppUtils { * @return 格式化后的多行插件错误信息详情 */ public static String dealWithErrorDetailMultiLineAndCache(String key) { + if (!DesignerEnvManager.getEnvManager().isShowTemplateMissingPlugin()) { + // 直接清空不提示 + TemplateIOErrorContextHolder.reset(); + return StringUtils.EMPTY; + } Multimap pendingPlugins = TemplateIOErrorContextHolder.getPendingPlugin(); if (pendingPlugins.isEmpty()) { return StringUtils.EMPTY; diff --git a/designer-realize/src/main/java/com/fr/design/share/SharableManager.java b/designer-realize/src/main/java/com/fr/design/share/SharableManager.java index 0e3a1c41e8..b84349be40 100644 --- a/designer-realize/src/main/java/com/fr/design/share/SharableManager.java +++ b/designer-realize/src/main/java/com/fr/design/share/SharableManager.java @@ -3,6 +3,7 @@ package com.fr.design.share; import com.fr.design.base.clipboard.ClipboardFilter; import com.fr.design.designer.creator.XCreator; import com.fr.design.designer.creator.XLayoutContainer; +import com.fr.design.mainframe.FormWidgetDetailPane; import com.fr.design.mainframe.JForm; import com.fr.design.mainframe.JTemplate; import com.fr.design.mainframe.share.collect.ComponentCollector; @@ -55,6 +56,7 @@ public class SharableManager { GeneralContext.addEnvChangedListenerToLast(new EnvChangedListener() { @Override public void envChanged() { + FormWidgetDetailPane.getInstance().resetEmptyPane(); LocalWidgetRepoPane.getInstance().refreshPane(); } });