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

在开发环境下,使用post请求一直在pending,而get请求则没有问题,不知道是不是我的配置问题 #247

Closed
cyj20142932 opened this issue Feb 6, 2021 · 1 comment

Comments

@cyj20142932
Copy link

cyj20142932 commented Feb 6, 2021

VITE_PORT = 3100

VITE_USE_MOCK = true

VITE_PUBLIC_PATH = /

VITE_PROXY=[["/api","https://localhost:8000/api"]]

VITE_DROP_CONSOLE = false

VITE_GLOB_API_URL=/api

VITE_GLOB_UPLOAD_URL=/upload

VITE_GLOB_API_URL_PREFIX=

只是修改了代理地址,以下就是写了个测试

const productPromise = defHttp.request({
        url: '/Admin/QueryProducts',
        method: 'POST',
      });
      productPromise.then((res) => {
        console.log(res);
      });

控制台有如下错误,不知道有没有关系

Error: write EPROTO 13536:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:c:\ws\deps\openssl\openssl\ssl\record\ssl3_record.c:332:

at WriteWrap.onWriteComplete [as oncomplete] (internal/stream_base_commons.js:94:16)

在之前的vite还在1.几版本的时候都没问题

后续用nginx代理后,问题消失了,可能和代理有关

@anncwb
Copy link
Collaborator

anncwb commented Feb 6, 2021

mock插件问题,升级到最新应该就可以了

@anncwb anncwb closed this as completed Feb 6, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Sep 29, 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

No branches or pull requests

2 participants