vue.config.js
proxy: {
'/dev-api': {
target: 'http://39.98.123.211:8170',
pathRewrite: { '^/dev-api': '' }
},
'/dev-enter': {
target: 'http://39.98.123.211:8510',
pathRewrite: { '^/dev-enter': '' }
}
trademark.js
export const reqTradeMarkList=(page,limit)=>request({
baseURL:process.env.VUE_APP_BASE_API_ENTER,
url:`/admin/product/baseTrademark/${page}/${limit}`,
method:'get'})
.env.development
# just a flag
ENV = 'development'
# base api
VUE_APP_BASE_API = '/dev-api'
VUE_APP_BASE_API_ENTER = '/dev-enter'