vue2 重新对封装好的axios的baseUrl赋值
api.js
import request from '@/base/service' const baseURL = process.env.VUE_APP_API const requestClue = (data) => { return request({ ...data, ...{ baseURL } }) } export function addComment(data) { return requestClue({ url: '/goodsPc/addComment', method: 'post', data }) }