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

在vercel中部署,如何启用商业模式? #15

Closed
52yaoer opened this issue May 7, 2023 · 7 comments
Closed

在vercel中部署,如何启用商业模式? #15

52yaoer opened this issue May 7, 2023 · 7 comments

Comments

@52yaoer
Copy link

52yaoer commented May 7, 2023

如何进行限制必须登录后才能使用里面的功能?

@52yaoer
Copy link
Author

52yaoer commented May 7, 2023

我在vercel中部署后,右上角的登录注册按钮没有了,

@79W
Copy link

79W commented May 7, 2023

我在vercel中部署后,右上角的登录注册按钮没有了,

那样就需要你 fork 我项目需要修改配置文件 选择商业模式(注意:商业模式目前还不完善~)

@52yaoer
Copy link
Author

52yaoer commented May 7, 2023

上面的已经弄好了。

如果登录要换自己的服务器验证。好像有跨域的问题,跨域问题怎么解决?

[Error] Origin http://localhost:5173 is not allowed by Access-Control-Allow-Origin. Status code: 200

[Error] Fetch API cannot load http://127.0.0.1/chat/login due to access control checks.

[Error] Failed to load resource: Origin http://localhost:5173 is not allowed by Access-Control-Allow-Origin. Status code: 200 (login, line 0)

[Error] Warning: [antd: notification] Static function can not consume context like dynamic theme. Please use 'App' component instead.

warning (chunk-6BXEYDVV.js:1463)
call (chunk-6BXEYDVV.js:1482)
warningOnce (chunk-6BXEYDVV.js:1487)
warning4 (chunk-QPZWPJG3.js:6698)
(匿名函数) (chunk-QPZWPJG3.js:8088)
open2 (chunk-QPZWPJG3.js:59549)
(匿名函数) (index.ts:70)
interceptorsErrorResponse (index.ts:69)
(匿名函数) (index.ts:138)
(匿名函数) (index.ts:128)

@79W
Copy link

79W commented May 7, 2023

需要你在你自己服务器处理下跨域 你服务器那边设置请求头允许就可以

@52yaoer
Copy link
Author

52yaoer commented May 7, 2023

解决了。 vite.config.ts 里面配置了代理

@52yaoer
Copy link
Author

52yaoer commented May 7, 2023

新问题,,vite.config.ts 里面想读取 .env.production 和 .env.development里面的数据,达到部署的时候代理里面的target文件可以动态根据环境变化,这个咋弄?

@79E
Copy link
Owner

79E commented May 7, 2023

新问题,,vite.config.ts 里面想读取 .env.production 和 .env.development里面的数据,达到部署的时候代理里面的target文件可以动态根据环境变化,这个咋弄?

没有太理解是什么意思

@79E 79E closed this as completed May 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants