Open bobian29c6e opened 12 months ago
export function adminlist(data) {
return request({
url: '/user/adminlist',
method: 'post',
data
})
}
不需要写死地址。可以利用不同的启动命令去启动不同环境。
# just a flag
ENV = 'development'
# base api
VUE_APP_BASE_API = 'http://127.0.0.1:8000/api/'
挂到生产环境上去后。在去用nginx反向代理。可以解决跨域问题。
你的Java跨域不正确,如果有使用第三方鉴权框架例如 Shiro或者Sa-token等需要额外配置 对应的跨域配置
前端使用代理试试
后端是不是用Spring Security了?用了拦截器这样配置是不生效的
555真的没辙了哎 ![Uploading 截屏2023-10-05 16.55.06.png…]()