Vue-cli encapsulates post request

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

.
Jun.08,2022

 : 
 posta = (params) => { return axios.post('plugins/demo/i',QS.stringify(params)))}
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e4bc41-44e79.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e4bc41-44e79.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?