var stream = weex.requireModule('stream') export default { data () { return { myimg:'unknown' } }, methods: { getStarCount (repo, callback) { return stream.fetch({ method: 'GET', type: 'json', url: 'https://c.sevenkids.cn/yzmm/account/knowledge/ajaxOpenSerachKnowledgeList' }, callback) } }, created () { this.getStarCount('11', res => { this.myimg = res.ok ?JSON.stringify(res):JSON.stringify(res) }) } } 这是请求头:Referer http://dotwe.org/raw/htmlVue/...User-Agent Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/602.4.8 (KHTML, like Gecko) Version/10.0.3 Safari/602.4.8Origin http://dotwe.org返回结果:{"status":-1,"ok":false,"statusText":"","data":""}是这里引用的‘stream’ 需要自己实现吗?var stream = weex.requireModule('stream')
- 2 回答
- 0 关注
- 1368 浏览
添加回答
举报
0/150
提交
取消