修复bug
This commit is contained in:
parent
43a04ea427
commit
54c7c213a3
|
@ -334,7 +334,6 @@ const StreamerSpaceContent = () => {
|
|||
}),
|
||||
});
|
||||
const detailData = await detailResponse.json();
|
||||
console.log(detailData);
|
||||
if (detailData.ret === -1) {
|
||||
alert(detailData.msg);
|
||||
return;
|
||||
|
@ -535,7 +534,6 @@ const StreamerSpaceContent = () => {
|
|||
}),
|
||||
});
|
||||
const _data = await _response.json();
|
||||
console.log(_data);
|
||||
if (_data.ret === -1) {
|
||||
alert(_data.msg);
|
||||
return;
|
||||
|
@ -648,7 +646,6 @@ const StreamerSpaceContent = () => {
|
|||
}),
|
||||
});
|
||||
const _data = await _response.json();
|
||||
console.log(_data);
|
||||
if (_data.ret === -1) {
|
||||
alert(_data.msg);
|
||||
return;
|
||||
|
@ -676,7 +673,6 @@ const StreamerSpaceContent = () => {
|
|||
}),
|
||||
});
|
||||
const detailData = await detailResponse.json();
|
||||
console.log(detailData);
|
||||
if (detailData.ret === -1) {
|
||||
alert(detailData.msg);
|
||||
return;
|
||||
|
@ -875,223 +871,83 @@ const StreamerSpaceContent = () => {
|
|||
</Form>
|
||||
</Modal>
|
||||
{/* 添加代运营Modal是否可见 */}
|
||||
<Modal
|
||||
footer={null}
|
||||
open={isAddAgencyModalOpen}
|
||||
onCancel={handleAddAgencyModalCancel}
|
||||
>
|
||||
<div className="flex flex-col overflow-y-scroll">
|
||||
<div className="flex flex-row mb-4">
|
||||
<Image
|
||||
width={80}
|
||||
height={80}
|
||||
className="rounded-full"
|
||||
src={defaultValues?.baseInfo?.avatar}
|
||||
/>
|
||||
<div className="flex flex-col justify-between ml-2">
|
||||
<p className="font-bold">ID:{defaultValues?.baseInfo?.id}</p>
|
||||
<p className="font-bold">昵称:{defaultValues?.baseInfo?.name}</p>
|
||||
<p className="font-bold">
|
||||
创建时间:{defaultValues?.baseInfo?.ct}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<Form name="modal_search" onFinish={modalSearch}>
|
||||
<Space style={{ marginBottom: 20 }}>
|
||||
<Form.Item
|
||||
label="ID"
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
message: "请填写代运营ID",
|
||||
},
|
||||
]}
|
||||
name="userId"
|
||||
style={{ margin: 0 }}
|
||||
>
|
||||
<Input type="number" />
|
||||
</Form.Item>
|
||||
<Button type="primary" htmlType="submit">
|
||||
搜索
|
||||
</Button>
|
||||
</Space>
|
||||
</Form>
|
||||
{userInfo && (
|
||||
<div
|
||||
className={`flex flex-row mb-4 items-center p-2 rounded-xl ${
|
||||
selectedUser ? "bg-green-300" : "bg-gray-300"
|
||||
}`}
|
||||
>
|
||||
{isAddAgencyModalOpen && (
|
||||
<Modal
|
||||
footer={null}
|
||||
open={isAddAgencyModalOpen}
|
||||
onCancel={handleAddAgencyModalCancel}
|
||||
>
|
||||
<div className="flex flex-col overflow-y-scroll">
|
||||
<div className="flex flex-row mb-4">
|
||||
<Image
|
||||
src={userInfo?.avatar?.images[0]?.urls[0]}
|
||||
width={80}
|
||||
height={80}
|
||||
className="rounded-full"
|
||||
src={defaultValues?.baseInfo?.avatar}
|
||||
/>
|
||||
<div className="flex flex-col justify-center mx-4">
|
||||
<p className="text-lg font-bold">ID:{userInfo?.user_id}</p>
|
||||
<p className="text-lg font-bold">昵称:{userInfo?.name}</p>
|
||||
<div className="flex flex-col justify-between ml-2">
|
||||
<p className="font-bold">ID:{defaultValues?.baseInfo?.id}</p>
|
||||
<p className="font-bold">
|
||||
昵称:{defaultValues?.baseInfo?.name}
|
||||
</p>
|
||||
<p className="font-bold">
|
||||
创建时间:{defaultValues?.baseInfo?.ct}
|
||||
</p>
|
||||
</div>
|
||||
<Button
|
||||
type={selectedUser ? "default" : "primary"}
|
||||
onClick={handleSelected}
|
||||
>
|
||||
{selectedUser ? "取消选中" : "选中用户"}
|
||||
</Button>
|
||||
</div>
|
||||
)}
|
||||
<Form
|
||||
name="add_agency"
|
||||
onFinish={handleSubmitAddAgencySetting}
|
||||
onFinishFailed={onModalFormFinishFailed}
|
||||
autoComplete="off"
|
||||
>
|
||||
<Form.Item
|
||||
name="sharing_ratio"
|
||||
label="代运营分成比例"
|
||||
initialValue={"1"}
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
message: "请选择代运营分成比例",
|
||||
},
|
||||
]}
|
||||
>
|
||||
<select
|
||||
style={{
|
||||
height: 32,
|
||||
padding: "4px 11px",
|
||||
border: "1px solid #d9d9d9",
|
||||
borderRadius: 4,
|
||||
outline: "none",
|
||||
}}
|
||||
<Form name="modal_search" onFinish={modalSearch}>
|
||||
<Space style={{ marginBottom: 20 }}>
|
||||
<Form.Item
|
||||
label="ID"
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
message: "请填写代运营ID",
|
||||
},
|
||||
]}
|
||||
name="userId"
|
||||
style={{ margin: 0 }}
|
||||
>
|
||||
<Input type="number" />
|
||||
</Form.Item>
|
||||
<Button type="primary" htmlType="submit">
|
||||
搜索
|
||||
</Button>
|
||||
</Space>
|
||||
</Form>
|
||||
{userInfo && (
|
||||
<div
|
||||
className={`flex flex-row mb-4 items-center p-2 rounded-xl ${
|
||||
selectedUser ? "bg-green-300" : "bg-gray-300"
|
||||
}`}
|
||||
>
|
||||
{rates.map((item, index) => (
|
||||
<option key={index} value={item.value}>
|
||||
{item.label}
|
||||
</option>
|
||||
))}
|
||||
</select>
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
name="is_hided"
|
||||
label="是否对主播隐藏代运营"
|
||||
initialValue={"0"}
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
message: "请选择是否对主播隐藏代运营选项",
|
||||
},
|
||||
]}
|
||||
>
|
||||
<select
|
||||
style={{
|
||||
height: 32,
|
||||
padding: "4px 11px",
|
||||
border: "1px solid #d9d9d9",
|
||||
borderRadius: 4,
|
||||
outline: "none",
|
||||
}}
|
||||
>
|
||||
<option value={1}>是</option>
|
||||
<option value={0}>否</option>
|
||||
</select>
|
||||
</Form.Item>
|
||||
<Button className="w-full" type="primary" htmlType="submit">
|
||||
确认
|
||||
</Button>
|
||||
</Form>
|
||||
</div>
|
||||
</Modal>
|
||||
{/* 编辑代运营Modal是否可见 */}
|
||||
<Modal
|
||||
footer={null}
|
||||
open={isAgencyModalOpen}
|
||||
onCancel={handleAgencyModalCancel}
|
||||
>
|
||||
<div className="flex flex-col overflow-y-scroll">
|
||||
<div className="flex flex-row mb-4">
|
||||
<Image
|
||||
width={80}
|
||||
height={80}
|
||||
className="rounded-full"
|
||||
src={defaultValues?.baseInfo?.avatar}
|
||||
/>
|
||||
<div className="flex flex-col justify-between ml-2">
|
||||
<p className="font-bold">ID:{defaultValues?.baseInfo?.id}</p>
|
||||
<p className="font-bold">昵称:{defaultValues?.baseInfo?.name}</p>
|
||||
<p className="font-bold">
|
||||
创建时间:{defaultValues?.baseInfo?.ct}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<Button
|
||||
className="mb-4"
|
||||
type="primary"
|
||||
danger
|
||||
onClick={handleDeleteAgency}
|
||||
>
|
||||
【慎点】删除代运营
|
||||
</Button>
|
||||
<Form name="modal_search" onFinish={modalSearch}>
|
||||
<Space style={{ marginBottom: 20 }}>
|
||||
<Form.Item
|
||||
label="ID"
|
||||
initialValue={
|
||||
defaultValues?.ratio?.zone_third_partner
|
||||
?.third_partner_account?.user_id
|
||||
}
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
message: "请填写代运营ID",
|
||||
},
|
||||
]}
|
||||
name="userId"
|
||||
style={{ margin: 0 }}
|
||||
>
|
||||
<Input type="number" />
|
||||
</Form.Item>
|
||||
<Button type="primary" htmlType="submit">
|
||||
搜索
|
||||
</Button>
|
||||
</Space>
|
||||
</Form>
|
||||
{userInfo && (
|
||||
<div
|
||||
className={`flex flex-row mb-4 items-center p-2 rounded-xl ${
|
||||
selectedUser ? "bg-green-300" : "bg-gray-300"
|
||||
}`}
|
||||
>
|
||||
<Image
|
||||
src={userInfo?.avatar?.images[0]?.urls[0]}
|
||||
width={80}
|
||||
height={80}
|
||||
/>
|
||||
<div className="flex flex-col justify-center mx-4">
|
||||
<p className="text-lg font-bold">ID:{userInfo?.user_id}</p>
|
||||
<p className="text-lg font-bold">昵称:{userInfo?.name}</p>
|
||||
<Image
|
||||
src={userInfo?.avatar?.images[0]?.urls[0]}
|
||||
width={80}
|
||||
height={80}
|
||||
/>
|
||||
<div className="flex flex-col justify-center mx-4">
|
||||
<p className="text-lg font-bold">ID:{userInfo?.user_id}</p>
|
||||
<p className="text-lg font-bold">昵称:{userInfo?.name}</p>
|
||||
</div>
|
||||
<Button
|
||||
type={selectedUser ? "default" : "primary"}
|
||||
onClick={handleSelected}
|
||||
>
|
||||
{selectedUser ? "取消选中" : "选中用户"}
|
||||
</Button>
|
||||
</div>
|
||||
<Button
|
||||
type={selectedUser ? "default" : "primary"}
|
||||
onClick={handleSelected}
|
||||
>
|
||||
{selectedUser ? "取消选中" : "选中用户"}
|
||||
</Button>
|
||||
</div>
|
||||
)}
|
||||
<Form
|
||||
name="agency"
|
||||
onFinish={handleSubmitAgencySetting}
|
||||
onFinishFailed={onModalFormFinishFailed}
|
||||
autoComplete="off"
|
||||
>
|
||||
<div className="flex flex-col">
|
||||
)}
|
||||
<Form
|
||||
name="add_agency"
|
||||
onFinish={handleSubmitAddAgencySetting}
|
||||
onFinishFailed={onModalFormFinishFailed}
|
||||
autoComplete="off"
|
||||
>
|
||||
<Form.Item
|
||||
name="sharing_ratio"
|
||||
label="代运营分成比例"
|
||||
initialValue={
|
||||
defaultValues?.ratio?.zone_third_partner?.sharing_ratio * 100
|
||||
}
|
||||
initialValue={"1"}
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
|
@ -1118,9 +974,7 @@ const StreamerSpaceContent = () => {
|
|||
<Form.Item
|
||||
name="is_hided"
|
||||
label="是否对主播隐藏代运营"
|
||||
initialValue={
|
||||
defaultValues?.ratio?.zone_third_partner?.is_hided
|
||||
}
|
||||
initialValue={"0"}
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
|
@ -1141,13 +995,164 @@ const StreamerSpaceContent = () => {
|
|||
<option value={0}>否</option>
|
||||
</select>
|
||||
</Form.Item>
|
||||
<Button type="primary" htmlType="submit">
|
||||
<Button className="w-full" type="primary" htmlType="submit">
|
||||
确认
|
||||
</Button>
|
||||
</Form>
|
||||
</div>
|
||||
</Modal>
|
||||
)}
|
||||
{/* 编辑代运营Modal是否可见 */}
|
||||
{isAgencyModalOpen && (
|
||||
<Modal
|
||||
footer={null}
|
||||
open={isAgencyModalOpen}
|
||||
onCancel={handleAgencyModalCancel}
|
||||
>
|
||||
<div className="flex flex-col overflow-y-scroll">
|
||||
<div className="flex flex-row mb-4">
|
||||
<Image
|
||||
width={80}
|
||||
height={80}
|
||||
className="rounded-full"
|
||||
src={defaultValues?.baseInfo?.avatar}
|
||||
/>
|
||||
<div className="flex flex-col justify-between ml-2">
|
||||
<p className="font-bold">ID:{defaultValues?.baseInfo?.id}</p>
|
||||
<p className="font-bold">
|
||||
昵称:{defaultValues?.baseInfo?.name}
|
||||
</p>
|
||||
<p className="font-bold">
|
||||
创建时间:{defaultValues?.baseInfo?.ct}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</Form>
|
||||
</div>
|
||||
</Modal>
|
||||
<Button
|
||||
className="mb-4"
|
||||
type="primary"
|
||||
danger
|
||||
onClick={handleDeleteAgency}
|
||||
>
|
||||
【慎点】删除代运营
|
||||
</Button>
|
||||
<Form name="modal_search" onFinish={modalSearch}>
|
||||
<Space style={{ marginBottom: 20 }}>
|
||||
<Form.Item
|
||||
label="ID"
|
||||
initialValue={
|
||||
defaultValues?.ratio?.zone_third_partner
|
||||
?.third_partner_account?.user_id
|
||||
}
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
message: "请填写代运营ID",
|
||||
},
|
||||
]}
|
||||
name="userId"
|
||||
style={{ margin: 0 }}
|
||||
>
|
||||
<Input type="number" />
|
||||
</Form.Item>
|
||||
<Button type="primary" htmlType="submit">
|
||||
搜索
|
||||
</Button>
|
||||
</Space>
|
||||
</Form>
|
||||
{userInfo && (
|
||||
<div
|
||||
className={`flex flex-row mb-4 items-center p-2 rounded-xl ${
|
||||
selectedUser ? "bg-green-300" : "bg-gray-300"
|
||||
}`}
|
||||
>
|
||||
<Image
|
||||
src={userInfo?.avatar?.images[0]?.urls[0]}
|
||||
width={80}
|
||||
height={80}
|
||||
/>
|
||||
<div className="flex flex-col justify-center mx-4">
|
||||
<p className="text-lg font-bold">ID:{userInfo?.user_id}</p>
|
||||
<p className="text-lg font-bold">昵称:{userInfo?.name}</p>
|
||||
</div>
|
||||
<Button
|
||||
type={selectedUser ? "default" : "primary"}
|
||||
onClick={handleSelected}
|
||||
>
|
||||
{selectedUser ? "取消选中" : "选中用户"}
|
||||
</Button>
|
||||
</div>
|
||||
)}
|
||||
<Form
|
||||
name="agency"
|
||||
onFinish={handleSubmitAgencySetting}
|
||||
onFinishFailed={onModalFormFinishFailed}
|
||||
autoComplete="off"
|
||||
>
|
||||
<div className="flex flex-col">
|
||||
<Form.Item
|
||||
name="sharing_ratio"
|
||||
label="代运营分成比例"
|
||||
initialValue={
|
||||
defaultValues?.ratio?.zone_third_partner?.sharing_ratio *
|
||||
100
|
||||
}
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
message: "请选择代运营分成比例",
|
||||
},
|
||||
]}
|
||||
>
|
||||
<select
|
||||
style={{
|
||||
height: 32,
|
||||
padding: "4px 11px",
|
||||
border: "1px solid #d9d9d9",
|
||||
borderRadius: 4,
|
||||
outline: "none",
|
||||
}}
|
||||
>
|
||||
{rates.map((item, index) => (
|
||||
<option key={index} value={item.value}>
|
||||
{item.label}
|
||||
</option>
|
||||
))}
|
||||
</select>
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
name="is_hided"
|
||||
label="是否对主播隐藏代运营"
|
||||
initialValue={
|
||||
defaultValues?.ratio?.zone_third_partner?.is_hided
|
||||
}
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
message: "请选择是否对主播隐藏代运营选项",
|
||||
},
|
||||
]}
|
||||
>
|
||||
<select
|
||||
style={{
|
||||
height: 32,
|
||||
padding: "4px 11px",
|
||||
border: "1px solid #d9d9d9",
|
||||
borderRadius: 4,
|
||||
outline: "none",
|
||||
}}
|
||||
>
|
||||
<option value={1}>是</option>
|
||||
<option value={0}>否</option>
|
||||
</select>
|
||||
</Form.Item>
|
||||
<Button type="primary" htmlType="submit">
|
||||
确认
|
||||
</Button>
|
||||
</div>
|
||||
</Form>
|
||||
</div>
|
||||
</Modal>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue