请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

正在回答 回答被采纳积分+3

2回答

Parry 2017-03-16 09:06:10

你那参数是什么情况。

0 回复 有任何疑惑可以回复我~
  • 提问者 一个随便的名字 #1
    什么参数啊,fetch那里试过直接把源代码复制过来还是错了。
    回复 有任何疑惑可以回复我~ 2017-03-16 10:27:33
  • Parry 回复 提问者 一个随便的名字 #2
    你看看你请求的参数 uniquekey  是什么???
    回复 有任何疑惑可以回复我~ 2017-03-16 16:18:06
  • 提问者 一个随便的名字 回复 Parry #3
    fetch("http://newsapi.gugujiankong.com/Handler.ashx?action=uc&userid=" + localStorage.userid + "&uniquekey=" + this.props.uniquekey, myFetchOptions)
    回复 有任何疑惑可以回复我~ 2017-03-16 17:19:49
提问者 一个随便的名字 2017-03-16 17:19:12

addUserCollection() {

var myFetchOptions = {

method: 'GET'

};

fetch("http://newsapi.gugujiankong.com/Handler.ashx?action=uc&userid=" + localStorage.userid + "&uniquekey=" + this.props.uniquekey, myFetchOptions).then(response => response.json()).then(json => {

//收藏成功以后进行一下全局的提醒

notification['success']({message: 'ReactNews提醒', description: '收藏此文章成功'});

});

};


0 回复 有任何疑惑可以回复我~
问题已解决,确定采纳
还有疑问,暂不采纳
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号