diff --git a/components/common/DivText.tsx b/components/common/DivText.tsx index c5ef80fb..5074e60f 100644 --- a/components/common/DivText.tsx +++ b/components/common/DivText.tsx @@ -1,6 +1,5 @@ import classNames from "classnames"; import { FC } from "react"; -import { handleContentRender } from "utils"; interface TextType { textArray: { text: string; value: string | number; link?: string }[]; @@ -12,7 +11,7 @@ const DivText: FC = ({ textArray = [] }) => { {textArray.length && textArray.map((item, key) => { return ( -
+
{item.text}: {item.link ? ( = ({ textArray = [] }) => { {item.value} ) : ( - - {item.value} - + {item.value} )}
); diff --git a/components/common/productQrcode.tsx b/components/common/productQrcode.tsx index 1aab1b02..675ae07d 100644 --- a/components/common/productQrcode.tsx +++ b/components/common/productQrcode.tsx @@ -4,6 +4,8 @@ import QRCode from "qrcode.react"; export function ProductQrcode(p: any) { const { qrText, className, qrcodeDisable, data, orgName, name = "Certified" } = p; + console.log("data", data); + return (
@@ -19,11 +21,7 @@ export function ProductQrcode(p: any) {

{qrText ? qrText : `Product Carbon Footprint ${name} `}

- {qrcodeDisable ? ( - - ) : ( - - )} +
diff --git a/components/routes/blockchain.tsx b/components/routes/blockchain.tsx index 659fd058..c8c9ae5f 100644 --- a/components/routes/blockchain.tsx +++ b/components/routes/blockchain.tsx @@ -218,9 +218,7 @@ export function Blockchain() {
diff --git a/components/routes/car.tsx b/components/routes/car.tsx index 6ceeba00..967669dc 100644 --- a/components/routes/car.tsx +++ b/components/routes/car.tsx @@ -413,14 +413,16 @@ export function Car() { return (
-
- -
-
{dealResult(pcfResult)}
+
+ +
+
+ {pcfResult} +
二氧化碳等效排放
-
+
产品信息 @@ -428,7 +430,7 @@ export function Car() {
-
+
产品碳足迹评价信息 diff --git a/components/routes/carbon/tag.tsx b/components/routes/carbon/tag.tsx index abfc29a0..40e2a2a7 100644 --- a/components/routes/carbon/tag.tsx +++ b/components/routes/carbon/tag.tsx @@ -53,35 +53,6 @@ function Card(p: { ); } -const tagData = [ - { - title: "完成[AT01]系列培训-双碳基础 认证", - icon: , - by: "2023年4月30日签发 by AIAG", - id: "144095402", - qrcodeDisable: true, - link: [ - { text: "标签信息", href: "" }, - { text: "在区块链浏览器查看", target: "", href: "" }, - ], - }, - { - title: "完成[AI09]产品碳足迹测算", - icon: , - by: "2023年4月30日签发 by AIAG", - id: "144049913", - qrcodeDisable: false, - link: [ - { text: "标签信息", href: "/car?vin=1500101202311001" }, - { - text: "在区块链浏览器查看", - target: "_blank", - href: "/blockchain?tokenId=1000000", - }, - ], - }, -]; - export function Tag() { const [tagList, setTagList] = useState(); const [current, setCurrent] = useState(""); @@ -108,7 +79,7 @@ export function Tag() { ], tokenId, orgName, - qrCode: `${current || "https://aicp.gtech-cn.co"}/car?vin=${uuid}`, + qrCode: `${current || "https://aicp.gtech.world"}/car?vin=${uuid}`, }; }, ) as any; @@ -120,7 +91,7 @@ export function Tag() { setCurrent(window?.location?.origin); }, []); - console.log("current", current); + console.log("current", tagList); return ( @@ -128,7 +99,6 @@ export function Tag() { {(tagList?.records || []).map((v: any, i) => { return ; })} - {`${current || "https://aicp.gtech-cn.co"}/car?vin=`}
); diff --git a/components/routes/tools/inventoryResult.tsx b/components/routes/tools/inventoryResult.tsx index 930887c1..f7d03b31 100644 --- a/components/routes/tools/inventoryResult.tsx +++ b/components/routes/tools/inventoryResult.tsx @@ -242,8 +242,8 @@ export function InventoryResult() {
) : ( -
-
+
+