mirror of
https://github.com/alibaba/anyproxy.git
synced 2025-07-27 07:45:41 +00:00
add replaceServerResDataAsync
This commit is contained in:
@@ -36,9 +36,6 @@ define("./detail",['$', 'gallery/underscore/1.6.0/underscore.js'],function(requi
|
||||
' <h4 class="subTitle">response body</h4>'+
|
||||
' <div class="detail">'+
|
||||
' <div class="J_responseBody resBodyContent"></div>'+
|
||||
// ' <form class="uk-form">'+
|
||||
// ' <textarea class="J_responseBody">loading...</textarea>'+
|
||||
// ' </form>'+
|
||||
' </div>'+
|
||||
' </section>'+
|
||||
' <% } %>';
|
||||
|
34
web/list.js
34
web/list.js
@@ -93,7 +93,7 @@ seajs.use(['$', 'Underscore', 'Backbone',"./detail"], function($, _, Backbone,De
|
||||
if(!isInApp){
|
||||
self.detailPanel.showDetail(detailData);
|
||||
}else{
|
||||
window.webkit.messageHandlers.list.postMessage(JSON.stringify(detailData))
|
||||
window.webkit.messageHandlers.list.postMessage(JSON.stringify(detailData));
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -174,7 +174,7 @@ seajs.use(['$', 'Underscore', 'Backbone',"./detail"], function($, _, Backbone,De
|
||||
var data = JSON.parse(event.data);
|
||||
|
||||
var reqDate = new Date(data.startTime);
|
||||
data.startTimeStr = reqDate.toLocaleTimeString() + "";
|
||||
data.startTimeStr = reqDate.format("hh:mm:ss") + "";
|
||||
|
||||
var previous;
|
||||
if(previous = recList.get(data.id)){
|
||||
@@ -238,19 +238,19 @@ seajs.use(['$', 'Underscore', 'Backbone',"./detail"], function($, _, Backbone,De
|
||||
|
||||
})();
|
||||
|
||||
// Date.prototype.Format = function (fmt) {
|
||||
// var o = {
|
||||
// "M+": this.getMonth() + 1, //月份
|
||||
// "d+": this.getDate(), //日
|
||||
// "h+": this.getHours(), //小时
|
||||
// "m+": this.getMinutes(), //分
|
||||
// "s+": this.getSeconds(), //秒
|
||||
// "q+": Math.floor((this.getMonth() + 3) / 3), //季度
|
||||
// "S": this.getMilliseconds() //毫秒
|
||||
// };
|
||||
// if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
|
||||
// for (var k in o) if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
|
||||
// return fmt;
|
||||
// }
|
||||
});
|
||||
|
||||
});
|
||||
Date.prototype.format = function (fmt) {
|
||||
var o = {
|
||||
"M+": this.getMonth() + 1, //月份
|
||||
"d+": this.getDate(), //日
|
||||
"h+": this.getHours(), //小时
|
||||
"m+": this.getMinutes(), //分
|
||||
"s+": this.getSeconds(), //秒
|
||||
"q+": Math.floor((this.getMonth() + 3) / 3), //季度
|
||||
"S": this.getMilliseconds() //毫秒
|
||||
};
|
||||
if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
|
||||
for (var k in o) if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
|
||||
return fmt;
|
||||
}
|
Reference in New Issue
Block a user