Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

升级到该版本后,登录页面的验证码无法正常加载 #1228

Closed
splayer2 opened this issue May 21, 2020 · 6 comments
Closed

升级到该版本后,登录页面的验证码无法正常加载 #1228

splayer2 opened this issue May 21, 2020 · 6 comments

Comments

@splayer2
Copy link

版本号:

2.2.0 2020-05-06

问题描述:

1、升级到该版本后,登录页面的验证码无法正常加载。原先版本中public\index.html文件中设置为 window._CONFIG['domianURL'] = 'http://localhost:8080/jeecgboot'; 时,映射到互联网的IP可以正常登录访问。升级到2.2.0版本后,使用上述配置时,登录页面的验证码无法正常加载。需将 http://localhost:8080/jeecgboot 中的 localhost设置为 互联网访问的IP,才可正常加载,如设置:window._CONFIG['domianURL'] = 'http://218.95.12.21:63002/jeecgboot'; (我这边web端口是8080,映射到互联网是 63002端口)。但若次设置,则本地环境又无法正常价值 验证码。反之,本机局域网内验证码加载正常,互联网加载失败。

截图&代码:
为什么上传的图片老是失败?

友情提示: 未按格式要求发帖,会直接删掉。

@zhangdaiscott
Copy link
Member

的确存在这个问题

@zhangdaiscott
Copy link
Member

方案:
修改
src/utils/request.js
取消用apiBaseUrl作为baseURL

const service = axios.create({
  baseURL: '/jeecg-boot',
  //baseURL: apiBaseUrl, // api base_url
  timeout: 9000 // 请求超时时间
})

这样就可以用vue.config.js 的代理功能了

@happy1836
Copy link

部署后无法加载验证码,localhost可以 根据上面的改baseURL 不行

@ProwDong
Copy link

部署后无法加载验证码,localhost可以 根据上面的改baseURL 不行

部署到内网服务器后需要使用ngix代理后台地址,不然也不行

@samposn
Copy link

samposn commented Apr 24, 2021

部署后无法加载验证码,localhost可以 根据上面的改baseURL 不行

如果使用的是 openjdk 也会出现获取验证码出错

@yingwu-zhang
Copy link

部署后无法加载验证码,localhost可以 根据上面的改baseURL 不行

我第一次使用Localhost可以正常显示,后面就不行了。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants