1,下载axios
npm install axios
2, main.js中引入axios
import axios from "axios";
Vue.prototype.$axios = axios
3,组件中使用axios发请求
this.$axios.get("http://localhost:8088/upload/"+this.form.number+"/"+this.form.name+"/"+this.form.core).then(
(res)=>{
this.$message({
message: "更改成功",
type: "success",
});
console.log(res)
},
(error)=>{
console.log("更改页面报错",error)
}
)