parent
9cda035fa5
commit
67b9dc16d8
@ -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 <main></main>;
|
||||
}
|
Loading…
Reference in new issue