Fix the port number
Browse files
backend/__pycache__/deep_convert.cpython-313.pyc
ADDED
Binary file (921 Bytes). View file
|
|
backend/__pycache__/puzzle_dataset.cpython-313.pyc
ADDED
Binary file (1.29 kB). View file
|
|
backend/__pycache__/solver.cpython-313.pyc
ADDED
Binary file (3.17 kB). View file
|
|
frontend/src/App.js
CHANGED
@@ -18,7 +18,7 @@ function App() {
|
|
18 |
|
19 |
// 前端先获取默认 sysContent
|
20 |
useEffect(() => {
|
21 |
-
fetch("http://localhost:
|
22 |
.then(res => res.json())
|
23 |
.then(data => {
|
24 |
if(data.success) {
|
@@ -30,7 +30,7 @@ function App() {
|
|
30 |
|
31 |
// 当 puzzleIndex 改变时,自动获取对应 puzzle
|
32 |
useEffect(() => {
|
33 |
-
fetch(`http://localhost:
|
34 |
.then(res => res.json())
|
35 |
.then(data => {
|
36 |
if(data.success) {
|
@@ -57,7 +57,7 @@ function App() {
|
|
57 |
sys_content: sysContent
|
58 |
};
|
59 |
|
60 |
-
fetch("http://localhost:
|
61 |
method: "POST",
|
62 |
headers: { "Content-Type": "application/json" },
|
63 |
body: JSON.stringify(payload)
|
|
|
18 |
|
19 |
// 前端先获取默认 sysContent
|
20 |
useEffect(() => {
|
21 |
+
fetch("http://localhost:7860/default_sys_content")
|
22 |
.then(res => res.json())
|
23 |
.then(data => {
|
24 |
if(data.success) {
|
|
|
30 |
|
31 |
// 当 puzzleIndex 改变时,自动获取对应 puzzle
|
32 |
useEffect(() => {
|
33 |
+
fetch(`http://localhost:7860/get_puzzle?index=${puzzleIndex}`)
|
34 |
.then(res => res.json())
|
35 |
.then(data => {
|
36 |
if(data.success) {
|
|
|
57 |
sys_content: sysContent
|
58 |
};
|
59 |
|
60 |
+
fetch("http://localhost:7860/solve", {
|
61 |
method: "POST",
|
62 |
headers: { "Content-Type": "application/json" },
|
63 |
body: JSON.stringify(payload)
|