Update background message name

This commit is contained in:
2024-04-24 13:14:30 +08:00
parent 8bf22edbda
commit 46d7d4b26f
6 changed files with 37 additions and 38 deletions
+8 -9
View File
@@ -42,23 +42,22 @@ function Toy() {
const submitForm = (body: FormValue) => {
sendToBackground({
name: "bili",
name: "toy",
body: {
action: "submitAddForm",
action: "addToy",
values: {
...body,
imageUrl: imgs[0],
},
},
}).then((res) => {
if (res.status === "Success") {
add({
content: res.msg,
});
}).catch((e) => {
if (e instanceof Error) {
add({
content: "提交成功",
});
}
else {
add({
content: res.msg,
content: e.message,
});
}
});