import axios from 'axios'
const service = axios.create({
baseURL: '',
headers: {
// 'Content-Type': 'text/plain;charset=UTF-8'
}
})
用的地方
if (valid) {
service.request({
url: `http://192.168.1.21:8081/api/process/apply/union-apply/applyFor`,
method: 'post',
data: this.formData,
}).then((res) => {
if (res.data.code == 200) {
this.$message.success('操作成功!')
}
})
}
js 请求接口地址,不加前缀自己定义
最新推荐文章于 2024-08-15 08:55:57 发布