service worker请求不到 (已经解决)
来源:5-2 连接真实服务端 - 专属开发者⼯具介绍与安装

weixin_慕神2105054
2021-12-06
import React from "react";
import logo from "./logo.svg";
import "./App.css";
// import ProjectList from "./screens/project-list/index.tsx";
// import ApplyUseArray from "./screens/use/ApplyUseArray";
import LoginForm from "./screens/login/LoginForm";
import axios from "axios";
const apiUrl = process.env.REACT_APP_API_URL;
function App() {
// axios
// .post("http://localhost:3001/login", {
// data: {
// username: "123123",
// },
// })
// .then((res) => {
// console.log(res);
// });
fetch(`${apiUrl}/register`, {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({
username: "lcu",
password: "123123",
}),
}).then((res) => {
console.log(res);
debugger;
});
return (
<div className="App">
{/* <ProjectList></ProjectList> */}
{/* <ApplyUseArray></ApplyUseArray> */}
{/* <LoginForm></LoginForm> */}
</div>
);
}
export default App;
写回答
1回答
-
慕桂英8249857
2022-11-24
怎么解决的啊
00
相似问题