提交 a089851b 编写于 作者: L luojing 提交者: NoSubject

修复https导致的获取bbs地址错误


(cherry picked from commit 1643c4ff)

(cherry picked from commit b4b3b914)

(cherry picked from commit b5c8802b)
上级 5bcf694d
......@@ -119,6 +119,7 @@ MWF.xApplication.AppMarketV2.ApplicationsContent.Applications= new Class({
this.emptyLoadContent();
if (this.collectToken=="" || this.collectUrl==""){
//先登录collcect
debugger
this.actions.CollectAction.login(//平台封装好的方法
function( json ){ //服务调用成功的回调函数, json为服务传回的数据
if (json.type && json.type=="success"){
......@@ -168,7 +169,7 @@ MWF.xApplication.AppMarketV2.ApplicationsContent.Applications= new Class({
debugger;
var commenturl = content.collectUrl +'/o2_collect_assemble/jaxrs/collect/config/key/(0)?time='+(new Date()).getMilliseconds();
debugger;
var res = new Request.JSON({
/*var res = new Request.JSON({
url: commenturl,
headers : {'x-debugger' : true,'Authorization':content.collectToken,'c-token':content.collectToken},
secure: false,
......@@ -190,7 +191,16 @@ MWF.xApplication.AppMarketV2.ApplicationsContent.Applications= new Class({
o2.runCallback(callback, "error", [text, error]);
}.bind(this)
});
res.send();
res.send();*/
this.actions.CollectAction.bbs(//平台封装好的方法
function( json ){ //服务调用成功的回调函数, json为服务传回的数据
if (json.type && json.type=="success"){debugger;
data = json.data; //为变量data赋值
this.bbsUrlPath = data.bbsUrlPath;
this.bbsUrl = data.bbsUrl;
}
}.bind(this),null,false //同步执行
);
},
loadCommentsGrade: function(appdata){
debugger;
......
......@@ -79,37 +79,15 @@ MWF.xApplication.AppMarketV2.Application.Comment.ViewPage= new Class({
}
},
loadBbsInfo: function(content){
var json = null;
var commenturl = content.app.collectUrl +'/o2_collect_assemble/jaxrs/collect/config/key/(0)?time='+(new Date()).getMilliseconds();
debugger;
var res = new Request.JSON({
url: commenturl,
headers : {'x-debugger' : true,'Authorization':content.app.collectToken,'c-token':content.app.collectToken},
secure: false,
method: "get",
async: false,
withCredentials: true,
contentType : 'application/json',
crossDomain : true,
onSuccess: function(responseJSON, responseText){
json = responseJSON;
debugger;
this.bbsUrlPath = json.data.bbsUrlPath;
this.bbsUrl = json.data.bbsUrl;
/*if (typeOf(callback).toLowerCase() == 'function'){
callback(responseJSON);
}else{
o2.runCallback(callback, "success", [responseJSON, responseText]);
}*/
}.bind(this),
onFailure: function(xhr){
o2.runCallback(callback, "requestFailure", [xhr]);
}.bind(this),
onError: function(text, error){
o2.runCallback(callback, "error", [text, error]);
}.bind(this)
});
res.send();
this.actions.CollectAction.bbs(//平台封装好的方法
function( json ){ //服务调用成功的回调函数, json为服务传回的数据
if (json.type && json.type=="success"){debugger;
data = json.data; //为变量data赋值
this.bbsUrlPath = data.bbsUrlPath;
this.bbsUrl = data.bbsUrl;
}
}.bind(this),null,false //同步执行
);
},
loadCommentsGrade: function(content,callback){
this.loadBbsInfo(content);
......
......@@ -45,7 +45,7 @@ MWF.xApplication.AppMarketV2.Application.Main = new Class({
}.bind(this));
},
loadApplication: function(callback){
debugger
if (this.collectToken=="" || this.collectUrl==""){
//先登录collcect
this.actions.CollectAction.login(//平台封装好的方法
......@@ -185,33 +185,16 @@ debugger;
if (callback) callback();
},
loadBbsInfo: function(content){
var json = null;
debugger;
var commenturl = content.collectUrl +'/o2_collect_assemble/jaxrs/collect/config/key/(0)?time='+(new Date()).getMilliseconds();
debugger;
var res = new Request.JSON({
url: commenturl,
headers : {'x-debugger' : true,'Authorization':content.collectToken,'c-token':content.collectToken},
secure: false,
method: "get",
async: false,
withCredentials: true,
contentType : 'application/json',
crossDomain : true,
onSuccess: function(responseJSON, responseText){
json = responseJSON;
debugger;
this.bbsUrlPath = json.data.bbsUrlPath;
this.bbsUrl = json.data.bbsUrl;
}.bind(this),
onFailure: function(xhr){
o2.runCallback(callback, "requestFailure", [xhr]);
}.bind(this),
onError: function(text, error){
o2.runCallback(callback, "error", [text, error]);
}.bind(this)
});
res.send();
debugger;
this.actions.CollectAction.bbs(//平台封装好的方法
function( json ){ //服务调用成功的回调函数, json为服务传回的数据
if (json.type && json.type=="success"){debugger;
data = json.data; //为变量data赋值
this.bbsUrlPath = data.bbsUrlPath;
this.bbsUrl = data.bbsUrl;
}
}.bind(this),null,false //同步执行
);
},
loadCommentsGrade: function(appdata){
debugger;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册