We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
我通过修改src/config/request.ts文件使用不同的后端api地址:
const request: AxiosInstance = axios.create({ timeout: 200000, headers: { 'Content-Type': 'application/json' }, baseURL: `https://api-yearning.XXXX.com/`, })
首页地址是yearning.XXXX.com, 后端地址是api-yearning.XXXX.com
src/socket/index.ts
constructor(prefix: string, token: string) { let baseURL = "" import.meta.env.MODE === "dev" ? baseURL = "127.0.0.1:8000" : baseURL = document.location.host
document.location.host的值和baseURL的值不相等, 导致wss的地址拼接不是预料中的情况。
The text was updated successfully, but these errors were encountered:
更改地址 需要变更这两个地方 因为axios 仅是http请求的封装 不支持ws ws需要自己实现
Sorry, something went wrong.
No branches or pull requests
我通过修改src/config/request.ts文件使用不同的后端api地址:
首页地址是yearning.XXXX.com, 后端地址是api-yearning.XXXX.com
src/socket/index.ts
document.location.host的值和baseURL的值不相等, 导致wss的地址拼接不是预料中的情况。
The text was updated successfully, but these errors were encountered: