|
本帖最后由 yyyy 于 2016-1-7 16:22 编辑
- 为什么多行的代码放不进?????????????,求解
复制代码 ShellImpl.prototype.showLeft = function(){ return this.showPage(this.wingLeftXid);
}
ShellImpl.prototype.showRight = function(){
return this.showPage(this.wingRightXid);
};
//提供更好理解的api
ShellImpl.prototype.showPage = function(url,data,options){
... ...
// url 被转成对象了
if(typeof url == "string"){
url = { url:url};
}
.....
};
ShellImpl.prototype.preShowPage = function(params,data,owner){
// 因为是对象,所以永远不会进入
if(params === this.wingLeftXid || params === this.wingRightXid){
var _xid = params;
params = {xid:_xid};
}else{
// 参数进了这里了,开始序列化参数
// 因为url是地址,所以,被删除了
params = this.formatParam(params);
}
// 到了这里params 变成了 ''
// 因为空值,所以左侧栏永远也打不开了
}
文件路径:system/lib/portal/shellImpl.js行:499~568
ShellImpl.prototype.showLeft = function(){ // return this.showPage(this.wingLeftXid); return this.preShowPage(this.wingLeftXid); // 改
};
ShellImpl.prototype.showRight = function(){
// return this.showPage(this.wingRightXid); return this.preShowPage(this.wingRightXid); // 改
};
改成这样就可以打开了
|
|