修改空间分享链接
This commit is contained in:
parent
30b28e7f2a
commit
55ddf84323
|
@ -18,6 +18,7 @@ export default function ShareSpace({ data }) {
|
|||
const { mid } = useParams();
|
||||
const searchParams = useSearchParams();
|
||||
const webUrl = process.env.NEXT_PUBLIC_WEB_URL;
|
||||
const shareWebUrl = "https://share.duota.shop";
|
||||
const [streamerInfo, setStreamerInfo] = useState(null);
|
||||
useEffect(() => {
|
||||
getStreamerInfo(Number(mid)).then((res) => {
|
||||
|
@ -44,7 +45,7 @@ export default function ShareSpace({ data }) {
|
|||
|
||||
//复制邀请链接
|
||||
const copyShareUrl = () => {
|
||||
const shareCode = `${webUrl}/zone/${streamerInfo?.streamer_ext?.user_id}`;
|
||||
const shareCode = `${shareWebUrl}/zone/${streamerInfo?.streamer_ext?.user_id}`;
|
||||
// console.log("shareCode", shareCode);
|
||||
copy(shareCode);
|
||||
};
|
||||
|
|
|
@ -15,6 +15,7 @@ export default function Share() {
|
|||
const [data, setData] = useState({});
|
||||
const [qrcodeUrl, setQrcodeUrl] = useState("");
|
||||
const [isFetching, setIsFetching] = useState(true);
|
||||
const shareWebUrl = "https://share.duota.shop";
|
||||
const router = useRouter();
|
||||
const { user_id } = useParams();
|
||||
useEffect(() => {
|
||||
|
@ -34,12 +35,9 @@ export default function Share() {
|
|||
return;
|
||||
}
|
||||
setData(data.data.streamer_ext);
|
||||
QRCode.toDataURL(
|
||||
`https://tiefen.fun/zone/${user_id}`,
|
||||
function (err, url) {
|
||||
setQrcodeUrl(url);
|
||||
}
|
||||
);
|
||||
QRCode.toDataURL(`${shareWebUrl}/zone/${user_id}`, function (err, url) {
|
||||
setQrcodeUrl(url);
|
||||
});
|
||||
setIsFetching(false);
|
||||
} catch (error) {
|
||||
// console.error(error);
|
||||
|
@ -131,7 +129,7 @@ export default function Share() {
|
|||
|
||||
//复制链接
|
||||
const copyUrl = () => {
|
||||
clipboard(`https://tiefen.fun/zone/${user_id}`);
|
||||
clipboard(`${shareWebUrl}/zone/${user_id}`);
|
||||
Toast.show({
|
||||
icon: "success",
|
||||
content: "已复制到剪贴板",
|
||||
|
|
Loading…
Reference in New Issue