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

站内支持API接口地址切换 #3162

Merged
merged 3 commits into from
Oct 23, 2023
Merged

站内支持API接口地址切换 #3162

merged 3 commits into from
Oct 23, 2023

Conversation

luchanan
Copy link

_app.config.js上线后修改API地址,需要在此这里改有点不方面;有时候不想部署多套环境或者临时使用其他环境,希望可以直接在站内切换API换成其他环境。

@likui628
Copy link
Collaborator

在线更改api接口地址的场景不多吧
部署多套环境的时候通过CLI处理应该就可以

@wangjue666
Copy link
Collaborator

切换接口地址这种功能,用后台网关代理转发更合适,前台做的话, 你扩展个新地址或调整地址的话还要重新部署

@luchanan
Copy link
Author

个人见解:确定几个环境之后,基本上这些API地址不会变了;如果通过CI是不是要部署多套环境呢,会不会慢(实际上我只需要看某个环境的结果)?转发的话,每次临时请求一个API地址后,是不是要打开终端去改呢? 这样的话,操作时间是不是长了点呢?

@wangjue666
Copy link
Collaborator

@luchanan vben这个框架主要还是提供通用的解决方案示例,你提供的实现思路不错,但得确保在实际使用时真的需要这样的解决方案

@wangjue666
Copy link
Collaborator

@luchanan 现在vben主要在维护以往的bug处理内置封装的组件的一些扩展,如果你有兴趣的话,这些PR会非常欢迎

@luchanan
Copy link
Author

@luchanan 现在vben主要在维护以往的bug处理内置封装的组件的一些扩展,如果你有兴趣的话,这些PR会非常欢迎

ok,明白。这就看实际情况吧。

@jinmao88
Copy link
Collaborator

@luchanan 作为可选功能扩展 没什么问题,config内增加个开关,处理一下冲突

@jinmao88 jinmao88 merged commit 00bf5d5 into vbenjs:main Oct 23, 2023
2 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Aug 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants