before(app){ ?app.get('/channel',function (req,res) { ? ?var channel='' ? ?var url=encodeURI('http://api.jisuapi.com/news/channel?appkey=ca05a06b9221f5d1') ? ?axios.get(url,{ ? ? ?headers:{ ? ? ? ?referer:'http:/api.jisuapi.com/', ? ? ? ?host:'api.jisuapi.com' ? ? ?}, ? ? ?params:req.query ? ?}).then(response=>{ ? ? ?red.json(response.data) ? ?}).catch(error=>{ ? ? ?consloe.log(error) ? ?}) ?})}
?用vue開發(fā)在如何在webpack.dev.conf發(fā)送axios請(qǐng)求
qq_我輸過但從未怕過_0
2018-03-09 14:22:24