修复inviter问题
This commit is contained in:
parent
5ec7cb005f
commit
a6a55e75b2
|
@ -0,0 +1,24 @@
|
|||
import requireAPI from "@/utils/requireAPI";
|
||||
import { Toast } from "antd-mobile";
|
||||
export const getStreamer = async (userId) => {
|
||||
try {
|
||||
const data = await requireAPI("POST", "/api/streamer/list_ext_by_user_id", {
|
||||
body: {
|
||||
user_id:userId,
|
||||
},
|
||||
});
|
||||
if (data.ret === -1) {
|
||||
Toast.show({
|
||||
icon: "fail",
|
||||
content: data.msg,
|
||||
position: "top",
|
||||
});
|
||||
return;
|
||||
}
|
||||
return {
|
||||
...data.data,
|
||||
};
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
}
|
||||
};
|
|
@ -430,7 +430,7 @@ const LoginBtn = ({ loginInfo, setLoginInfo, type, handleSubmit }) => {
|
|||
size="middle"
|
||||
block
|
||||
onClick={() => handleSubmit(type)}
|
||||
style={{ "--background-color": "#FF669E", color: "#FFFFFF" }}
|
||||
style={{ "--background-color": "#FF669E", color: "#FFFFFF",marginTop:"1rem" }}
|
||||
className="mt-4 py-2"
|
||||
>
|
||||
登录
|
||||
|
|
|
@ -125,7 +125,7 @@ export default function Home() {
|
|||
>
|
||||
<FontAwesomeIcon icon={faRefresh} size="xl" />
|
||||
</div>
|
||||
<StreamerNavigator visible={visible} setVisible={setVisible} mid={Number(get("inviter"))}/>
|
||||
<StreamerNavigator visible={visible} setVisible={setVisible} userId={Number(get("inviter"))}/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
@ -182,7 +182,7 @@ const RecommPostList = forwardRef(({ scrollHeight }, ref) => {
|
|||
return (
|
||||
<div className="px-4 pb-20">
|
||||
<List>
|
||||
{loading && (
|
||||
{loading && !commenPostList.length && (
|
||||
<div>
|
||||
<PostItemSkeleton />
|
||||
<PostItemSkeleton />
|
||||
|
@ -282,7 +282,7 @@ const FollowPostList = forwardRef(({ scrollHeight }, ref) => {
|
|||
<div className="px-4 pb-20">
|
||||
{/* <PullToRefresh onRefresh={doRefresh}> */}
|
||||
<List>
|
||||
{loading && (
|
||||
{loading && !followPostList.length && (
|
||||
<div className="my-[31px]">
|
||||
<PostItemSkeleton />
|
||||
<PostItemSkeleton />
|
||||
|
|
|
@ -401,7 +401,7 @@ export default function PersonSpace() {
|
|||
>
|
||||
<div className="overflow-y-auto scrollbarBox_hidden px-1">
|
||||
<List>
|
||||
{loading && (
|
||||
{loading && !postList.length && (
|
||||
<>
|
||||
<PostItemSkeleton />
|
||||
<PostItemSkeleton />
|
||||
|
|
|
@ -264,7 +264,7 @@ export default function Space() {
|
|||
{!!activeIndex && (
|
||||
<div className="px-4 pb-20" ref={scrollRef}>
|
||||
<List className="scrollbarBox_hidden">
|
||||
{loading && (
|
||||
{loading && !dataList.length && (
|
||||
<>
|
||||
<PostItemSkeleton />
|
||||
<PostItemSkeleton />
|
||||
|
|
|
@ -6,7 +6,7 @@ import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
|||
import { faAngleUp, faClose } from "@fortawesome/free-solid-svg-icons";
|
||||
import { useRouter } from "next/navigation";
|
||||
import baseRequest from "@/utils/baseRequest";
|
||||
import Player from 'next-video/player';
|
||||
import Player from "next-video/player";
|
||||
export default function Photos({
|
||||
isUnlocked,
|
||||
mediaVisibleRange,
|
||||
|
@ -83,18 +83,19 @@ export default function Photos({
|
|||
Dialog.show({
|
||||
title: "",
|
||||
content: (
|
||||
<div className="flex flex-col gap-2">
|
||||
<div className="flex w-full justify-end">
|
||||
<div
|
||||
className="flex w-12 h-12 justify-center items-center bg-[#33333348] rounded-full"
|
||||
key="closeBtn"
|
||||
onClick={() => Dialog.clear()}
|
||||
>
|
||||
<FontAwesomeIcon icon={faClose} size="2xl" />
|
||||
<div className="h-screen flex justify-center items-center">
|
||||
<div className="flex flex-col gap-2 -mt-12">
|
||||
<div className="flex w-full justify-end">
|
||||
<div
|
||||
className="flex w-12 h-12 justify-center items-center bg-[#33333348] rounded-full"
|
||||
key="closeBtn"
|
||||
onClick={() => Dialog.clear()}
|
||||
>
|
||||
<FontAwesomeIcon icon={faClose} size="2xl" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="my-4">
|
||||
{/* <video
|
||||
<div className="my-4">
|
||||
{/* <video
|
||||
width="100%"
|
||||
height="100%"
|
||||
controls
|
||||
|
@ -106,27 +107,28 @@ export default function Photos({
|
|||
<source src={video.mp4} type="video/mp4" />
|
||||
您的浏览器不支持 Video 标签。
|
||||
</video> */}
|
||||
{/* <Video as={ReactPlayer} src={video.mp4} /> */}
|
||||
<Player
|
||||
src={video.mp4}
|
||||
poster={video?.url.src}
|
||||
blurDataURL={video?.url.blurDataURL}
|
||||
autoPlay={true}
|
||||
style={{height:"500px"}}
|
||||
/>
|
||||
{/* <Player
|
||||
{/* <Video as={ReactPlayer} src={video.mp4} /> */}
|
||||
<Player
|
||||
src={video.mp4}
|
||||
poster={video?.url.src}
|
||||
blurDataURL={video?.url.blurDataURL}
|
||||
autoPlay={true}
|
||||
style={{ height: "500px",width:"100vw" }}
|
||||
/>
|
||||
{/* <Player
|
||||
src="https://www.mydomain.com/remote-video.mp4"
|
||||
poster="https://www.mydomain.com/remote-poster.webp"
|
||||
blurDataURL="data:image/webp;base64,UklGRlA..."
|
||||
/> */}
|
||||
</div>
|
||||
{/* <div
|
||||
</div>
|
||||
{/* <div
|
||||
className="flex w-12 h-12 justify-center items-center bg-[#33333348] rounded-full"
|
||||
key="closeBtn"
|
||||
onClick={() => saveFile(video.mp4)}
|
||||
>
|
||||
<FontAwesomeIcon icon={faSave} size="2xl" />
|
||||
</div> */}
|
||||
</div>
|
||||
</div>
|
||||
),
|
||||
bodyStyle: {
|
||||
|
|
|
@ -2,19 +2,19 @@
|
|||
|
||||
import React, { useEffect, useState } from "react";
|
||||
import { Mask, Image,Button } from "antd-mobile";
|
||||
import {getStreamerInfo} from "@/api/space";
|
||||
import {getStreamer} from "@/api/streamer";
|
||||
import { useRouter } from "next/navigation";
|
||||
import {remove} from "@/utils/storeInfo"
|
||||
export default function StreamerNavigator({
|
||||
visible,
|
||||
mid,
|
||||
userId,
|
||||
setVisible
|
||||
}) {
|
||||
const [streamerInfo,setStreamerInfo] = useState(null);
|
||||
const router = useRouter();
|
||||
|
||||
useEffect(()=>{
|
||||
getStreamerInfo(mid).then(res=>{
|
||||
getStreamer(userId).then(res=>{
|
||||
setStreamerInfo(res);
|
||||
})
|
||||
},[])
|
||||
|
|
Loading…
Reference in New Issue