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

🐛 [Bug]: 数据源(datasource),出码与预览的数据格式和代码逻辑不一致 #772

Open
langyjn opened this issue Aug 29, 2024 · 3 comments
Labels
enhancement New feature or request question Further information is requested

Comments

@langyjn
Copy link

langyjn commented Aug 29, 2024

Environment

chrome

Version

latest

Version

latest

Link to minimal reproduction

none

Step to reproduce

  1. 预览时datasource的代码,返回格式是{ code: '', msg: '', data }
    1
  2. 出码后,如果使用datasource静态数据,返回格式是 data
    2

最后导致代码不一致产生错误

What is expected

No response

What is actually happening

No response

What is your project name

tiny-engine develop

Any additional comments (optional)

No response

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


Title: 🐛 [Bug]: Data source, the data format and code logic of code output and preview are inconsistent

@chilingling
Copy link
Member

当前页面预览数据源对接的是静态 mock 数据。出码数据源对接的是接口配置的,会请求接口拿到数据。
原因是页面预览时,业务方配置的接口请求可能会造成跨域。

后续可能规划:
提供拓展配置,解决跨域相关问题,让页面预览真正请求接口数据。(或者提供配置项,配置请求接口数据或者是返回 mock 数据)

如果您有更好的建议,欢迎反馈或者提PR。感谢对 TinyEngine开源的贡献
@langyjn

@chilingling chilingling added enhancement New feature or request question Further information is requested labels Aug 31, 2024
@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


The current page preview data source is connected to static mock data. The decoding data source is connected to the interface configuration and will request the interface to get the data.
The reason is that when the page is previewed, the interface request configured by the business party may cause cross-domain requests.

Possible follow-up plans:
Provide extended configuration to solve cross-domain related issues and allow page preview to truly request interface data. (Or provide configuration items, configure request interface data or return mock data)

If you have better suggestions, please provide feedback or PR. Thanks for your contribution to TinyEngine open source
@langyjn

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants