// var headers = new Headers();
    // headers.append('Authorization', localStorage.getItem('token'));
    fetch('/distributor/sidebar',{
      headers:{
        'Authorization':localStorage.getItem('token')
      }
    }).then(response => {
      return response.json();  // 先将结果转换为 JSON 对象
    })
    .then(data => {
      console.log(data);
      this.setState({
        name:data.info.dealer_name,
        phone:data.info.username
      });
    }).catch(function(error){
       console.log(error);
    });

  

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-28
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-10-14
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-28
  • 2021-04-14
相关资源
相似解决方案