You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 18, 2024. It is now read-only.
umi.5d7c2ec5.js:155 Fetch API cannot load app://./api/currentUser. URL scheme "app" is not supported.
tt @ umi.5d7c2ec5.js:155
umi.5d7c2ec5.js:155 Fetch API cannot load app://./api/login/account. URL scheme "app" is not supported.
api/currentUser:1 Failed to load resource: net::ERR_FILE_NOT_FOUND
POST app://./api/login/account net::ERR_FILE_NOT_FOUND
POST app://./api/login/account net::ERR_FILE_NOT_FOUND
The text was updated successfully, but these errors were encountered:
Access to fetch at 'https://xxxxxx.com/api/currentUser' from origin 'app://.' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
你好,
我在用ant design pro boilerplate.
https://pro.ant.design/
我写了:
$ yarn create umi my-app
Select the boilerplate type: Select Ant Design Pro
❯ ant-design-pro
Which language do you want to use? Select language you use
❯ TypeScript
JavaScript
$ cd my-app
$ yarn
$ yarn start # open browser and visit http://localhost:8000
然后:
yarn add umi-plugin-electron-builder --dev
yarn electron:init
我改变antpro的targets:
{
electron: 12,
chrome: false,
firefox: false,
safari: false,
edge: false,
ios: false,
}
yarn electron:build:linux 给我这个:
yarn electron:dev 没有问题
我找到那个:
https://gist.github.com/jarek-foksa/0f6e82bdaf8fb1962c9e14035a8725e4
改变 index.ts:
现在可以用 fetch,
可是 fetch 不用 网络 http api
The text was updated successfully, but these errors were encountered: