Skip to content

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

Closed
@splayer2

Description

@splayer2
版本号:

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端口)。但若次设置,则本地环境又无法正常价值 验证码。反之,本机局域网内验证码加载正常,互联网加载失败。

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

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

Activity

zhangdaiscott

zhangdaiscott commented on May 22, 2020

@zhangdaiscott
Member

的确存在这个问题

zhangdaiscott

zhangdaiscott commented on May 26, 2020

@zhangdaiscott
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

happy1836 commented on Nov 18, 2020

@happy1836

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

ProwDong

ProwDong commented on Apr 16, 2021

@ProwDong

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

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

samposn

samposn commented on Apr 24, 2021

@samposn

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

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

yingwu-zhang

yingwu-zhang commented on Jun 22, 2021

@yingwu-zhang

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @zhangdaiscott@samposn@ProwDong@happy1836@yingwu-zhang

        Issue actions

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