|
@@ -173,16 +173,20 @@ const App: FC<Props> = (props) => {
|
|
|
|
|
|
const [visible, setVisible] = useState(false);
|
|
|
|
|
|
+ const [BASE_URL, setBaseUrl] = useState("");
|
|
|
+
|
|
|
const todayModalRef = useRef<ModalProps>(null);
|
|
|
const totalModalRef = useRef<ModalProps>(null);
|
|
|
const { userInfo } = useUserInfoStore();
|
|
|
const token = getToken();
|
|
|
|
|
|
// 生成分享链接
|
|
|
- const BASE_URL = window.location.href.replace(pathname, "");
|
|
|
+ // const BASE_URL = window.location.href.replace(pathname, "");
|
|
|
+
|
|
|
const shareUrl = `${BASE_URL}/${userInfo ? userInfo.referrer_code : "xxxxxx"}`;
|
|
|
|
|
|
const url = encodeURIComponent(`${shareUrl}`);
|
|
|
+
|
|
|
const SHARE_SOURCE = [
|
|
|
{
|
|
|
icon: "/summary/Facebook.png",
|
|
@@ -330,6 +334,10 @@ const App: FC<Props> = (props) => {
|
|
|
Toast.show(t("receive"));
|
|
|
}
|
|
|
};
|
|
|
+
|
|
|
+ useEffect(() => {
|
|
|
+ setBaseUrl(window.location.href.replace(pathname, ""));
|
|
|
+ }, []);
|
|
|
return (
|
|
|
<div className="content">
|
|
|
<div className="summary referral-router-view">
|