testnet0 / testnet-vue3

Other
11 stars 6 forks source link

前端项目启动后接口提示defined #2

Closed alchu4n closed 1 month ago

alchu4n commented 1 month ago

clone 后端项目 https://github.com/testnet0/testnet-java 使用IDEA启动项目 image

clone前端项目https://github.com/testnet0/testnet-vue3

使用 pnpm install 安装依赖 image

项目根目录创建 .env.development 配置文件

#后台接口父地址(必填)
VITE_GLOB_API_URL=/jeecgboot

# 跨域代理,您可以配置多个 ,请注意,没有换行符
VITE_PROXY = [["/jeecgboot","http://localhost:8080/jeecg-boot/"],["/upload","http://localhost:3300/upload"]]
#后台接口全路径地址(必填)
VITE_GLOB_DOMAIN_URL=http://localhost:8080/jeecg-boot/

执行命令启动 pnpm dev

image

项目启动后,接口为 http://localhost:3100/jeecgbootundefined/sys/randomImage/1629428467008?_t=1725758471680

testnet0 commented 1 month ago

已修复