提交 7395f90a 编写于 作者: F fancy

修复O2云链接修改账号密码等功能的问题

上级 0129a614
......@@ -10,9 +10,11 @@ import com.x.base.core.project.http.ActionResult;
import com.x.base.core.project.jaxrs.WrapBoolean;
import com.x.base.core.project.logger.Logger;
import com.x.base.core.project.logger.LoggerFactory;
import com.x.base.core.project.tools.DefaultCharset;
import org.apache.commons.lang3.StringUtils;
import java.lang.reflect.Type;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.List;
......@@ -30,7 +32,8 @@ public class ActionAndroidRePack extends BaseAction {
if (StringUtils.isEmpty(token)) {
throw new ExceptionNoToken();
}
String url = Config.collect().appPackServerApi(String.format(Collect.ADDRESS_APPPACK_INFO_RESTART, Config.collect().getName()));
String collectNameEncode = URLEncoder.encode(Config.collect().getName(), DefaultCharset.name);
String url = Config.collect().appPackServerApi(String.format(Collect.ADDRESS_APPPACK_INFO_RESTART, collectNameEncode));
List<NameValuePair> header = new ArrayList<>();
header.add(new NameValuePair("token", token));
String json = HttpConnection.postAsString(url, header, "{}");
......
......@@ -10,10 +10,12 @@ import com.x.base.core.project.gson.XGsonBuilder;
import com.x.base.core.project.http.ActionResult;
import com.x.base.core.project.logger.Logger;
import com.x.base.core.project.logger.LoggerFactory;
import com.x.base.core.project.tools.DefaultCharset;
import org.apache.commons.lang3.StringUtils;
import java.lang.reflect.Type;
import java.net.URLEncoder;
import java.util.ArrayList;
/**
......@@ -42,7 +44,8 @@ public class ActionPackInfo extends BaseAction {
private Wo getPackInfo(String token) {
try {
logger.info("打包服务器token:" + token);
String url = Config.collect().appPackServerApi(String.format(Collect.ADDRESS_APPPACK_INFO, Config.collect().getName()));
String collectNameEncode = URLEncoder.encode(Config.collect().getName(), DefaultCharset.name);
String url = Config.collect().appPackServerApi(String.format(Collect.ADDRESS_APPPACK_INFO, collectNameEncode));
logger.info("打包信息请求,url:" + url);
ArrayList<NameValuePair> heads = new ArrayList<>();
heads.add(new NameValuePair("token", token));
......
......@@ -681,7 +681,7 @@ MWF.xApplication.Collect.RegisterForm = new Class({
this.collect.showContent("checkContentNode");
this.collect.backNode.setStyle("display", "none");
window.setTimeout(function(){
this.check.recheck();
this.collect.check.recheck();
}.bind(this), 1000);
}.bind(this), function(xhr, text, error){
var errorText = error+":"+text;
......@@ -921,6 +921,7 @@ MWF.xApplication.Collect.ModifyForm = new Class({
this.errorNode.empty();
}else{
this.errorInput(this.codeNode, this.lp.errorCode);
this.nextStepWaited();
}
}.bind(this), function(xhr, text, error){
if (xhr){
......@@ -958,7 +959,7 @@ MWF.xApplication.Collect.ModifyForm = new Class({
this.firstStep();
this.collect.showContent("checkContentNode");
this.collect.backNode.setStyle("display", "none");
this.check.recheck();
this.collect.check.recheck();
}.bind(this), function(xhr, text, error){
var errorText = error+":"+text;
if (xhr) errorText = xhr.responseText;
......@@ -1112,6 +1113,7 @@ MWF.xApplication.Collect.ModifyPwdForm = new Class({
this.errorNode.empty();
}else{
this.errorInput(this.codeNode, this.lp.errorCode);
this.nextStepWaited();
}
}.bind(this), function(xhr, text, error){
if (xhr){
......@@ -1145,7 +1147,7 @@ MWF.xApplication.Collect.ModifyPwdForm = new Class({
this.firstStep();
this.collect.showContent("checkContentNode");
this.collect.backNode.setStyle("display", "none");
this.check.recheck();
this.collect.check.recheck();
}.bind(this), function(xhr, text, error){
var errorText = error+":"+text;
if (xhr) errorText = xhr.responseText;
......
MWF.xApplication.Collect.LP = {
"title": "Connect O2Cloud",
"title": "O2Cloud Config",
"collectConnected": "You can already connect to O2 Cloud!",
"collectDisconnect": "Your server cannot connect to O2 Cloud!",
"checking": "Checking……",
......
MWF.xApplication.Collect.LP = {
"title": "连接到O2云",
"title": "O2云配置",
"collectConnected": "您已经可以连接到O2云了!",
"collectDisconnect": "您的服务器无法连接到O2云!",
"checking": "检测中……",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册