Git Product home page Git Product logo

Comments (12)

lerry903 avatar lerry903 commented on May 19, 2024

目前不支持,不过spring boot对跨域设置比较简单。可自行配置

from ruoyi.

Erik5169 avatar Erik5169 commented on May 19, 2024

系统登录后, 所有的接口请求都必须传递哪些字段呢? 系统接口的swg页面中没有对必填非必填参数做说明, 在浏览器调试中,发现Cookie中带了一些值,Cookie: pgv_pvi=1136267264; pgv_si=s9633105920; JSESSIONID=0741d5b0-bcd1-41d4-8cf5-b2ef0a85a07e ,这些值哪些是必须的呢?

from ruoyi.

lerry903 avatar lerry903 commented on May 19, 2024

JSESSIONID是必须的参数

from ruoyi.

Erik5169 avatar Erik5169 commented on May 19, 2024

JSESSIONID ,是后端登录的时候传给前端的吗, 前端想跨域访问后端的接口的话, 需要后端服务设置跨域, 前端拿到JSESSIONID,放到Cookie中,以后每次请求都带上, 就能拿到接口数据了吧

from ruoyi.

lerry903 avatar lerry903 commented on May 19, 2024

老哥。你是没基础么?

from ruoyi.

Erik5169 avatar Erik5169 commented on May 19, 2024

我不懂后端, 我写前端的哈

from ruoyi.

lerry903 avatar lerry903 commented on May 19, 2024

OK,这个JSESSIONID是后端给前端的,前端每次请求的时候不需要做特殊处理,调用后端的时候会自动带上这个ID。另外,跨域的设置可以在后端设置也可以在前端通过jsonp的形式访问,不过这有限制。当然也可用反向代理的方式来解决跨域。方法有多种,看自己的方便

from ruoyi.

Erik5169 avatar Erik5169 commented on May 19, 2024

现在写了一套系统管理的前端单页应用,参考博主的, 想用博主的后端接口

from ruoyi.

lerry903 avatar lerry903 commented on May 19, 2024

那还有一种方式,将自己的前端页面替换现在系统里面的前端页面。这样前端和后端都部署在一起,所以自然也不会有跨域的问题了

from ruoyi.

Erik5169 avatar Erik5169 commented on May 19, 2024

好的, 谢谢博主

from ruoyi.

lerry903 avatar lerry903 commented on May 19, 2024

没啥事

from ruoyi.

Erik5169 avatar Erik5169 commented on May 19, 2024

hello , 博主, 我前端通过反向代理, 访问您这个项目的接口, 访问登陆接口的时候, 总是报500 的错误,能帮忙看一下吗?
屏幕快照 2019-03-19 上午11 32 12
屏幕快照 2019-03-19 上午11 32 29
屏幕快照 2019-03-19 上午11 32 23
屏幕快照 2019-03-19 上午11 32 35

from ruoyi.

Related Issues (15)

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.