修改服务端bug

This commit is contained in:
wushenghua
2016-02-24 11:49:53 +08:00
parent dca36711a2
commit 9470bc0c5e
2 changed files with 6 additions and 3 deletions
+2 -2
View File
@@ -40,8 +40,8 @@ export default class RandListView extends Component{
首页 首页
</Text> </Text>
), ),
event: function() { // event: function() {
}.bind(this) // }.bind(this)
} }
}) })
} }
+4 -1
View File
@@ -30,7 +30,10 @@ router.get('/list',function(req, res, next){
console.log(req.query); console.log(req.query);
// console.log(rest); // console.log(rest);
var topicUrls = []; var topicUrls = [];
if(typeof rest.text == 'undefined')return; if(typeof(rest.text) == 'undefined'){
res.json('');
return;
}
var $ = cheerio.load(rest.text); var $ = cheerio.load(rest.text);