diff --git a/app/space/setting/collaboratorSetting/page.jsx b/app/space/setting/collaboratorSetting/page.jsx index da267a2..343dc85 100644 --- a/app/space/setting/collaboratorSetting/page.jsx +++ b/app/space/setting/collaboratorSetting/page.jsx @@ -27,6 +27,8 @@ import requireAPI from "@/utils/requireAPI"; import { useRouter, useSearchParams } from "next/navigation"; import OwnInput from "@/components/OwnInput"; import { get } from "@/utils/storeInfo"; +import baseRequest from "@/utils/baseRequest"; + export default function CollaboratorSetting() { const [data, setData] = useState(null); const [selfMid, setSelfMid] = useState(); @@ -58,7 +60,8 @@ export default function CollaboratorSetting() { const visitor_role = Number(searchParams.get("visitor_role")); try { setIsloading(true); - setSelfMid(zid); + const base = baseRequest(); + setSelfMid(base.b_mid); const body = { zid, visitor_role, @@ -195,16 +198,17 @@ export default function CollaboratorSetting() { const selfData = data?.list?.filter( (item) => item.collaborator_mid === selfMid ); + + if (isloading) { + return ( +
+ +
+ ); + } + return (
- {isloading && ( -
- -
- )} {/* 头部标题 */}
@@ -221,19 +225,21 @@ export default function CollaboratorSetting() {
{/* 内容 */}
- {searchParams.get("visitor_role") === 2 ? ( -
-
-

合伙人昵称:{selfData[0]?.collaborator_account?.name}

-

ID:{selfData[0]?.collaborator_account?.user_id}

-

- 分成比例: - {selfData[0]?.sharing_ratio - ? (selfData[0]?.sharing_ratio * 100).toFixed() - : 0} - % -

-
+ {searchParams.get("visitor_role") == 2 && selfData ? ( +
+

+ 合伙人昵称:{selfData[0]?.collaborator_account?.name} +

+

+ ID:{selfData[0]?.collaborator_account?.user_id} +

+

+ 分成比例: + {selfData[0]?.sharing_ratio + ? (selfData[0]?.sharing_ratio * 100).toFixed() + : 0} + % +

) : (