Authored by xuhongyun

Merge branch 'dev-xuhongyun' into grey

... ... @@ -25,8 +25,10 @@ module.exports = {
console.info("搜索接口请求地址:"+url);
request({url: url}, function (error, response, body) {
if (error) {
console.info(error);
return callback(null, {msg: "error", code: 500});
} else {
console.info("调用接口成功。");
var data = {};
data.list = [];
try{
... ... @@ -50,6 +52,8 @@ module.exports = {
data.page = body.data.page;//页码
data.totalPage = 1;//body.data.page_total;
data.nums = data.list.length;//记录每一页数据量
console.info("---接口返回:");
console.info(data);
}catch(ex){
return callback(null, {data: data, code: 500});
}
... ...
... ... @@ -25,8 +25,10 @@ module.exports = {
console.info("搜索接口请求地址:"+url);
request({url: url}, function (error, response, body) {
if (error) {
console.info(error);
return callback(null, {msg: "error", code: 500});
} else {
console.info("调用接口成功。");
var data = {};
data.list = [];
try{
... ... @@ -50,6 +52,8 @@ module.exports = {
data.page = body.data.page;//页码
data.totalPage = 1;//body.data.page_total;
data.nums = data.list.length;//记录每一页数据量
console.info("---接口返回:");
console.info(data);
}catch(ex){
return callback(null, {data: data, code: 500});
}
... ...