import axios from "axios"
import QS from "qs";
import baseURL from "./baseUrl"
axios.defaults.timeout = 5000;
axios.defaults.headers.post["Content-Type"] = "application/json";
axios.defaults.headers["ECP-COOKIE"] = window.localStorage.token
// request
axios.interceptors.request.use(
  config => {
    // 
    console.log("",config)
    return config;
  }, function (error) {
    // 
    return Promise.reject(error);
  });
// respone
axios.interceptors.response.use(
  response => {
    // 
    console.log("",response)
    return response;
  }, function (error) {
    // 
    return Promise.reject(error);
  });
export const posta = params =>axios.post("plugins/demo/i",QS.stringify(params)).then(res=>{res.data})
 then 
 import {posta} from". / api/http" 
 Vue.prototype.$post=posta; 
 in main.js, and then use 
 this.$post (). Then (res= > {console.log (res)}) 
 also wrote 
 this.$post ({}). Then (res= > {console.log (res)}) 
 both undefined 
the request address is no problem. The data has already come out in the respone interceptor. My method of encapsulating the request in the vue file is undefined. This is why I wrote it wrong. Thank you
.