Browse Source

Merge pull request #326 in BA/design from ~LEE/design:dev to dev

* commit 'c1e3dbf04eb7a3efe92b1a840d243ec1b9bdf69d':
  ip部分 sitecenter加了一下
  防止初始化的时候没有值,在调用的时候去取值
  bugfix:从插件管理里面登录,用户名显示不了
master
superman 8 years ago
parent
commit
e1400c0719
  1. 4
      designer_base/src/com/fr/design/extra/LoginWebBridge.java
  2. 3
      designer_base/src/com/fr/design/extra/QQLoginWebPane.java
  3. 6
      designer_base/src/com/fr/design/extra/ucenter/Client.java

4
designer_base/src/com/fr/design/extra/LoginWebBridge.java

@ -254,7 +254,7 @@ public class LoginWebBridge {
String loginResult = login(username, password);
if (loginResult.equals(LOGININ)) {
updateUserInfo(username, password);
loginSuccess(username);
loginSuccess(username, uiLabel);
setUserName(username, uiLabel);
}
return loginResult;
@ -287,7 +287,7 @@ public class LoginWebBridge {
* 关闭窗口并且重新赋值
* @param username
*/
public void loginSuccess(String username) {
public void loginSuccess(String username, UILabel uiLabel) {
closeWindow();
uiLabel.setText(username);
}

3
designer_base/src/com/fr/design/extra/QQLoginWebPane.java

@ -150,7 +150,6 @@ public class QQLoginWebPane extends JFXPanel {
final BooleanProperty confirmationResult = new SimpleBooleanProperty();
// initialize the confirmation dialog
final Stage dialog = new Stage(StageStyle.UTILITY);
dialog.setTitle(Inter.getLocText("FR-Designer-BBSLogin_Switch-Account"));
dialog.setX(Toolkit.getDefaultToolkit().getScreenSize().getWidth()/2 - DEFAULT_CONFIRM_WIDTH / 2 + DEFAULT_OFFEST);
dialog.setY(Toolkit.getDefaultToolkit().getScreenSize().getHeight()/2 + DEFAULT_OFFEST);
dialog.setHeight(DEFAULT_CONFIRM_HEIGHT);
@ -162,7 +161,7 @@ public class QQLoginWebPane extends JFXPanel {
new Scene(
HBoxBuilder.create().styleClass("modal-dialog").children(
LabelBuilder.create().text(msg).build(),
ButtonBuilder.create().text(Inter.getLocText("")).defaultButton(true).onAction(new EventHandler<ActionEvent>() {
ButtonBuilder.create().text(Inter.getLocText("FR-Designer-BBSLogin_Switch-Account")).defaultButton(true).onAction(new EventHandler<ActionEvent>() {
@Override public void handle(ActionEvent actionEvent) {
// take action and close the dialog.
confirmationResult.set(true);

6
designer_base/src/com/fr/design/extra/ucenter/Client.java

@ -18,8 +18,8 @@ import java.util.Map;
*/
public class Client extends PHPFunctions{
public static String UC_IP = "211.149.195.54";
public static String UC_API = SiteCenter.getInstance().acquireUrlByKind("bbs.ucapi");
public static String UC_IP = "";
public static String UC_API = "";
public static String UC_CONNECT = "";
public static String UC_KEY = "Rc85U37411p4zdvcedm8D4t4D3l9Sa42H0kd98Gbd82aA99a61S2Z5LbQ9u430M0";
public static String UC_APPID = "4";
@ -86,6 +86,8 @@ public class Client extends PHPFunctions{
sep = "&";
}
String $postdata = uc_api_requestdata(module, action, str.toString(), "");
UC_API = SiteCenter.getInstance().acquireUrlByKind("bbs.ucapi");
UC_IP = SiteCenter.getInstance().acquireUrlByKind("bbs.ip");
return uc_fopen2(UC_API + "/index.php", 500000, $postdata, "", true, UC_IP, 20, true);
}

Loading…
Cancel
Save