conv gbk to utf on webInterface

This commit is contained in:
OttoMao
2015-01-28 15:33:00 +08:00
parent de3ba93a61
commit 3dc255e4de
8 changed files with 49 additions and 18 deletions

View File

@@ -73,15 +73,16 @@ function Recorder(option){
if(!id || !info.resBody) return;
//add to body map
//do not save image data
//ignore image data
if(/image/.test(info.resHeader['content-type'])){
self.recordBodyMap[id] = "(image)";
}else{
self.recordBodyMap[id] = info.resBody.toString();
self.recordBodyMap[id] = info.resBody;
}
};
self.getBody = function(id){
if(id < 0){
return "";
@@ -90,6 +91,10 @@ function Recorder(option){
return self.recordBodyMap[id] || "";
};
self.getSingleRecord = function(id,cb){
db.find({_id:parseInt(id)},cb);
}
self.getSummaryList = function(cb){
db.find({},cb);
};