解决axios跨域时,发送post请求变options的问题

mounted() {
  let config = {
    headers : {
      'Content-Type':'application/json;charset=UTF-8'
    },
  };

  axios.post('http://scms.qccat.com/v1/statistic/info-stu.json',{
     token:"da48d456dede0eb5c3cb03f4ccf64c01",
     session_id:'1_stu_token_2',
     relation_type:'1',
     season_type:'1',
     page:'1',
     limit:'10',
   }.stringify(this.userInfo),config
  )
    .then(body =>{
      console.log(body.data);
      this.content=body.data;
    }
   ).catch(err=>{
    console.log(err);
  })

},

猜你喜欢

转载自blog.csdn.net/JEFF_luyiduan/article/details/88838923
今日推荐