//package.json(跨域设置)

"proxy": "http://10.0.0.36",

  

//打包路径出错修改
package.json中
"homepage": "./",

  

//axios设置

import axios from 'axios'
import qs from 'qs'
import {path} from './com'

export function request(url,params,method="post"){
  
  return axios({
    method,
    url:path+url,
    data:qs.stringify(params),
   
  })
}

  

 

posted on 2021-01-16 13:42  chenlw101  阅读(450)  评论(0编辑  收藏  举报