diff --git a/src/app/partner/page.tsx b/src/app/partner/page.tsx new file mode 100644 index 0000000..c57af0a --- /dev/null +++ b/src/app/partner/page.tsx @@ -0,0 +1,25 @@ +/** + * 邀请 分享页 + */ +'use client'; + +import { useEffect } from 'react'; + +async function fetchSourece(source: string) { + if (!source) return; + const res = await fetch(`${process.env.NEXT_PUBLIC_HOST}/comment/visit/count/o2o?source=${source}`); + return res.json(); +} + +export default function Invite() { + useEffect(() => { + const searchParams = new URLSearchParams(window.location.search); + fetchSourece((searchParams as any)?.get('source')) + .then(() => {}) + .finally(() => { + window.location.replace('/'); + }); + }, []); + + return
; +}