提交 73b7be18 编写于 作者: NoSubject's avatar NoSubject

oauth修改

上级 ccd4ffc7
......@@ -725,7 +725,7 @@ MWF.xApplication.Profile.Main = new Class({
var node = new Element("a", {
"class":"mainColor_color",
"styles": {"font-size": "14px", "display": "block", "margin-bottom": "10px"},
"text": d.displayName,
"text": d.displayName || d.name,
"target": "_blank",
"href": "../x_desktop/oauth.html?oauth="+encodeURIComponent(d.name)+"&redirect="+"&method=oauthBind"
}).inject(this.ssoConfigAreaNode)
......
......@@ -121,7 +121,11 @@
r = r + "?oauth=" + oauth;
if (method) r = r + "&method=" + method;
if (redirect) r = r + "&redirect=" + redirect;
if (p.indexOf("{$redirect_uri}")!==-1){
p = p.replace("{$redirect_uri}", encodeURIComponent(r));
}else{
p = (p) ? p + "&redirect_uri=" + encodeURIComponent(r) : "&redirect_uri=" + encodeURIComponent(r);
}
url = (url.indexOf("?" === -1)) ? url + "?" + p : url + "&" + p;
window.location = url;
}.bind(this));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册