0

我正在尝试将应用程序写入我的手机。我使用 react-native-rss-parser 示例中的代码。

    import * as rssParser from 'react-native-rss-parser';
 
return fetch('http://www.kbgau.ru/rss.php')
  .then((response) => response.text())
  .then((responseData) => rssParser.parse(responseData))
  .then((rss) => {
    console.log(rss.title);
    console.log(rss.items.length);
  });

如何正确显示 rss 中的文本到视图中的文本 需要显示 item.title、item.link、item、enclosure url image 帮助请!

4

1 回答 1

0

响应的价值是什么?试着安慰它

我认为这是因为您从 http 获取数据

尝试从使用 https 的站点获取数据

或者您可以尝试在 DEBUG 模式下进行设置

https://github.com/facebook/react-native/issues/24408#issuecomment-537081276

但是,不建议将此设置用于 RELEASE 模式,因为它存在安全风险

于 2020-12-23T12:14:14.910 回答