From 99d63d4912121baac6a97a0ce65ff3df0b7fae64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A5=87=E8=B6=A3=E4=BF=9D=E7=BD=97?= Date: Sun, 23 Jun 2024 01:35:47 +0800 Subject: [PATCH] Add productId data for toy, and fix submit form issues --- components/biz/toy/index.tsx | 7 ++++++- contents/bili.ts | 3 ++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/components/biz/toy/index.tsx b/components/biz/toy/index.tsx index 8148aab..9032f60 100644 --- a/components/biz/toy/index.tsx +++ b/components/biz/toy/index.tsx @@ -16,6 +16,7 @@ interface FormValue { sale: string; type: number; desc: string; + productId: string; } const getInfo = async () => { @@ -93,7 +94,7 @@ function Toy() { ))} -
+
@@ -122,6 +123,10 @@ function Toy() {
+
+ + +
diff --git a/contents/bili.ts b/contents/bili.ts index 0c4f92d..d4124e4 100644 --- a/contents/bili.ts +++ b/contents/bili.ts @@ -31,10 +31,11 @@ chrome.runtime.onMessage.addListener((req, sender, send) => { send({ name, - project, + project: project.replace(":", ":"), made: document.querySelector(".tagC-ip .tagC-ip-con-brand").innerText, sale: document.querySelector(".item-complex:nth-child(4) .item-complex-value").innerText.replace("-", "/"), images, + productId: new URLSearchParams(location.search).get("itemsId"), }); } else {