GithubHelp home page GithubHelp logo

Comments (11)

GYFgaoyuefei avatar GYFgaoyuefei commented on August 17, 2024

from springboot-shiro-vue.

15638817940 avatar 15638817940 commented on August 17, 2024

企业微信截图_16832660518211
企业微信截图_16832660854842
我打本地的包是没问题的 可以通过127.0.0.1:8066访问, 我问题下放到服务器上是不是 也是 http://192.168.3.xxx:8066/ 这样访问的

from springboot-shiro-vue.

Heeexy avatar Heeexy commented on August 17, 2024

BASE_URL 这个参数是axios请求后端用到的。

部署到服务器上你就看你请求后端接口用啥地址。 你用 http://192.168.3.xxx:8066/ 是遇到什么报错了么

const service = axios.create({
  baseURL: process.env.BASE_URL, // api的base_url
  timeout: 15000                  // 请求超时时间
})

from springboot-shiro-vue.

15638817940 avatar 15638817940 commented on August 17, 2024

还没部署我就不确定 部署的话这个base_url 这么写对不对,因为我在本地就是 base_url 这么写的 127.0.0.1:8066

from springboot-shiro-vue.

15638817940 avatar 15638817940 commented on August 17, 2024

加入我在 192.168.xxx 这个服务器上部署 base_url 要怎么写, 配置文件里需要写服务器的ip嘛?

from springboot-shiro-vue.

Heeexy avatar Heeexy commented on August 17, 2024

最好用 "/" , 如果项目挂在域名下有path前缀, 那就 "/前缀"

让浏览器去自动给你补全前面的协议、域名、端口。

from springboot-shiro-vue.

15638817940 avatar 15638817940 commented on August 17, 2024

BASE_URL 直接 一个/ 就可以是吧?配置文件里不需要写 服务器ip 啥的嘛?

from springboot-shiro-vue.

Heeexy avatar Heeexy commented on August 17, 2024

尽量别写,写了就定死了只能部署在这个ip上了。 换服务器部署你还得改配置重新打包

from springboot-shiro-vue.

15638817940 avatar 15638817940 commented on August 17, 2024

好的 谢谢,我试试
image
还有如果前段开启这个 mode: 'history' 我请求的时候 一次没问题 后面他请求的时候就多加了路径, 404, 这个要怎么处理啊。

from springboot-shiro-vue.

Heeexy avatar Heeexy commented on August 17, 2024

前端的我也不熟,还是自己去查下哈

from springboot-shiro-vue.

15638817940 avatar 15638817940 commented on August 17, 2024

好的好的 谢谢了

from springboot-shiro-vue.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.