|
楼主 |
发表于 2017-1-23 00:25:21
|
显示全部楼层
本帖最后由 fulcrumtech 于 2017-1-23 00:43 编辑
是UIserver build version : 5.3.6.5569 build time : 2016.10.21 19:25:48,加大测试范围后,发现android的公众号也卡死!chrome也卡死!只有我的调试信息,没有系统的调试信息输出!
index.w里使用了动态换肤:
Model.prototype.setupUrlSearch = function(urlSearch, key, value){ var reKey = key;
reKey = reKey.replace("\\", "\\\\");
reKey = reKey.replace("^", "\\^");
reKey = reKey.replace("$", "\\$");
reKey = reKey.replace("*", "\\*");
reKey = reKey.replace("+", "\\+");
reKey = reKey.replace(".", "\\.");
console.log("urlSearch=" + urlSearch);
var re = new RegExp("([?&])" + reKey + "=.*?(&|#|$)", "i");
if(urlSearch.match(re)){
urlSearch = urlSearch.replace(re, '$1' + key + "=" + value + '$2');
}else{
urlSearch += (urlSearch.indexOf('?') < 0 ? "?" : "&") + key + "=" + value;
}
console.log("urlSearch=" + urlSearch);
return urlSearch;
};
Model.prototype.redirect = function(sex_id, user_id, guest_id){
var skin = [];
skin[0] = "";
skin[1] = "superhero";
skin[2] = "united";
if("" === skin[sex_id]){
this.guest_id = guest_id;
this.user_id = user_id;
}else{
this.isRedirect = true;
window.location.search = this.setupUrlSearch(window.location.search, "$skin", skin[sex_id] + "&RM=index&UI=" + user_id + "&GI=" + guest_id);
}
};
Model.prototype.modelLoad = function(event){
console.log("index:modelLoad");
//测试数据开始
var sex_id = 0;
var user_id = 3;
var guest_id = 0;
//测试数据结束
this.isRedirect = false;
var rm = this.getContext().getRequestParameter("RM");
if("index" == rm){
this.user_id = this.getContext().getRequestParameter("UI");
this.guest_id = this.getContext().getRequestParameter("GI");
console.log("index:modelLoad:REDIRECT:user_id=" + this.user_id + ",guest_id=" + this.guest_id);
}else{
var code = this.getContext().getRequestParameter("code");
if("" !== code){
var self = this;
justep.Baas.sendRequest({
"url" : "/sOrder/weixin",
"action" : "getInfo4Index",
"async" : false,
"params" : {
"code" : code
},
"success" : function(result) {
var user_id = result.user_id;
var guest_id = result.guest_id;
var sex_id = result.wx_sex_id;
console.log("index:modelLoad:WEIXIN:user_id=" + user_id + ",guest_id=" + guest_id + ",sex_id=" + sex_id);
self.redirect(sex_id, user_id, guest_id);
},
"error" : function(msg) {
console.log("index:modelLoad:getInfo4Index:error=" + msg);
justep.Util.hint("系统忙,请稍候再试!");
self.comp("window").close();
}
});
}else if("default" == rm){
user_id = this.getContext().getRequestParameter("UI");
guest_id = this.getContext().getRequestParameter("GI");
sex_id = this.getContext().getRequestParameter("SI");
console.log("index:modelLoadEFAULT:user_id=" + user_id + ",guest_id=" + guest_id + ",sex_id=" + sex_id);
this.redirect(sex_id, user_id, guest_id);
}else{
console.log("index:modelLoad:TEST:user_id=" + user_id + ",guest_id=" + guest_id + ",sex_id=" + sex_id);
this.redirect(sex_id, user_id, guest_id);
}
}
};
这些代码在调试模式一切正常!
还有,“D:\WeX5\conf\server.xml”中<distributed>false</distributed>,是什么意思?
|
|