📌  相关文章
📜  无法读取未定义(读取“长度”)选择列表的属性反应本机 - Javascript代码示例

📅  最后修改于: 2022-03-11 15:04:07.199000             🧑  作者: Mango

代码示例1
fetch('https://obscure-reaches-65656.herokuapp.com/api/getCloseTime?city=Hsinchu&sTime=18&eTime=21')
.then(r => r.json())
.then(r => {
  const movieData = r.reduce((r,s) => {
    r.push({title: s.theater, data: s.movie});
    return r;
  }, []);

  this.setState({ movieData });
});