This commit is contained in:
yezian 2025-03-20 13:49:20 +08:00
commit de03f2d837
15 changed files with 671 additions and 70 deletions

View File

@ -0,0 +1,447 @@
import React, { useState, useRef, useEffect } from "react";
import {
Form,
Input,
Button,
Space,
Table,
Modal,
message,
Select,
} from "antd";
import baseRequest from "../../utils/baseRequest";
import PagesManage from "../../components/PagesManage";
import { useMemo } from "react";
import dayjs from "dayjs";
import { ConfigProvider } from "antd";
import zhCN from "antd/es/locale/zh_CN";
const AutoAnwserContent = (props) => {
const [messageApi, contextHolder] = message.useMessage();
//modal
const [isModalOpen, setIsModalOpen] = useState(false);
const [isPagesModalOpen, setIsPagesModalOpen] = useState(false);
//
const [form] = Form.useForm();
const [pagesOptions, setPagesOptions] = useState([]);
const { TextArea } = Input;
//
const columns = [
{
title: "关键字",
dataIndex: "keyword",
key: "keyword",
width: 200,
render: (_, record) => {
console.log(record);
return (
<div>
<span>{record.keyword}</span>
</div>
);
},
},
{
title: "自动回复内容",
dataIndex: "message",
key: "message",
},
{
title: "优先级",
dataIndex: "priority",
key: "priority",
width: 120,
sorter: (a, b) => a.priority - b.priority,
defaultSortOrder: "ascend",
sortDirections: ["ascend", "descend"],
render: (value, record) => {
return (
<div>
<span>
{value}
{value > 6 ? "(不展示)" : ""}
</span>
</div>
);
},
},
{
title: "状态",
dataIndex: "status",
key: "status",
render: (value, record) => (
<span className={value === 1 ? "text-green-400" : "text-red-400"}>
{value === 1 ? "启用中" : "已关闭"}
</span>
),
},
{
title: "操作",
dataIndex: "opeartion",
key: "opeartion",
width: 200,
render: (_, record) => {
return (
<div>
<Space>
<Space.Compact direction="vertical">
<Button
style={{
background: record.status === 1 ? "#ff4d4f" : "#1677ff",
color: "#fff",
}}
onClick={() => {
// form.setFieldsValue(record);
// setIsModalOpen(true);
handleSubmit({
...record,
status: record.status === 1 ? 0 : 1,
});
}}
>
{!record.status ? "启动回复" : "关闭回复"}
</Button>
<Button
style={{ background: "#999", color: "#fff" }}
onClick={() => handleDeleteItem(record?.id)}
>
删除回复
</Button>
</Space.Compact>
</Space>
</div>
);
},
},
];
useEffect(() => {
getPages();
}, []);
//
const getPages = async () => {
try {
const base = baseRequest();
const response = await fetch("/op/frontend_route/list", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({
offset: 0,
limit: 10,
...base,
}),
});
const _data = await response.json();
if (_data.ret === -1) {
alert(_data.msg);
return;
}
setPagesOptions(_data.data.list);
} catch (error) {
console.error(error);
}
};
const handleEditItem = async (id, value) => {
try {
const base = baseRequest();
const response = await fetch("/op/auto_response/update", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({
id,
...value,
...base,
}),
});
const temData = await response.json();
if (temData.ret === -1) {
alert(temData.msg);
return;
}
message.success("更新成功");
getData();
} catch (error) {
console.error(error);
}
};
const handleDeleteItem = async (id) => {
try {
const base = baseRequest();
const response = await fetch("/op/auto_response/delete", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({
id,
...base,
}),
});
const temData = await response.json();
if (temData.ret === -1) {
alert(temData.msg);
return;
}
message.success("更新成功");
getData();
} catch (error) {
console.error(error);
}
};
//
const [data, setData] = useState([]);
const [offset, setOffset] = useState(0);
const [more, setMore] = useState(1);
const [total, setTotal] = useState(0);
const [formData, setFormData] = useState({
title: "",
message: "",
n_type: 0,
obj_user_ids: [],
push_time: dayjs(new Date()),
params: "",
pageName: null,
link: null,
action: null,
link_text: null,
thumbnail: null,
obj_type: "0",
});
const [currentPageName, setCurrentPageName] = useState("");
const [buttonAble, setButtonAble] = useState(false);
const currentPagesOptions = useMemo(() => {
if (!pagesOptions.length) return [];
const pages = pagesOptions
.filter((it) => it.desc === "达人空间")
.map((it) => {
return {
label: it.desc,
value: JSON.stringify(it),
};
});
return pages;
}, [pagesOptions, formData.action]);
const getData = async (offset) => {
if (!more && offset) return;
try {
const base = baseRequest();
const response = await fetch("/op/auto_response/list", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({
offset: 0,
limit: 20 + offset,
...base,
}),
});
const temData = await response.json();
console.log("response", temData);
if (temData.ret === -1) {
alert(temData.msg);
return;
}
const data = temData.data.list.map((it) => ({
keyword: it.keyword,
message: it.message,
priority: it.priority,
id: it.id,
status: it.status,
}));
setShowData(data);
if (temData.data.offset > total) {
setTotal(temData.data.offset);
}
setOffset(temData.data.offset);
setMore(temData.data.more);
} catch (error) {
console.error(error);
}
};
useEffect(() => {
getData(0);
}, []);
//
const [showData, setShowData] = useState(data);
//
const onFinishFailed = (errorInfo) => {
console.log("Failed:", errorInfo);
};
//
const handleCancelModal = () => {
form.setFieldsValue(formData);
setIsModalOpen(false);
};
const handleSubmit = async (value) => {
try {
const base = baseRequest();
const baseBody = {
...value,
};
if (value.id) {
baseBody.id = value.id;
baseBody.status = value.status;
}
const response = await fetch(
`/op/auto_response/${value.id ? "update" : "create"}`,
{
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({
...baseBody,
...base,
}),
}
);
const data = await response.json();
if (data.ret === -1) {
alert(data.msg);
return;
}
handleCancelModal();
message.success(`${value.id ? "更新" : "发布"}成功`);
getData(0);
} catch (error) {
console.error(error);
}
form.resetFields();
};
return (
<div style={{ marginLeft: 20, marginRight: 20 }}>
<div className="flex justify-between items-center">
<Button
type="primary"
className="mt-4 mb-4 float-right"
onClick={() => setIsModalOpen(true)}
>
新建自动回复内容+
</Button>
</div>
{contextHolder}
<ConfigProvider locale={zhCN}>
<Table
columns={columns}
dataSource={showData}
pagination={{
pageSize: 20,
showSizeChanger: false,
total: total,
}}
scroll={{ x: "max-content", y: window.innerHeight - 280 }}
footer={() => (
<div className="text-gray-400">获得总数{showData.length}</div>
)}
onScroll={(e) => {
const { scrollHeight, scrollTop, clientHeight } = e.currentTarget;
console.log(scrollHeight, scrollTop + clientHeight);
if (scrollTop + clientHeight + 5 >= scrollHeight) {
getData(offset);
}
}}
/>
</ConfigProvider>
{/* 重复判断isModalOpen是为了重新渲染ImageUploader和VideoUploader组件 */}
<Modal
title={
form.getFieldValue("id") ? "编辑自动回复消息" : "新建自动回复消息"
}
footer={null}
open={isModalOpen}
onCancel={handleCancelModal}
onChange={setFormData}
>
<Form
className="mt-4 flex flex-col"
form={form}
onFinish={(value) => {
handleSubmit(value, form.getFieldValue("id"));
}}
layout="vertical"
initialValues={formData}
onChange={setFormData}
>
<Form.Item
label="关键字"
name="keyword"
rules={[
{
required: true,
message: "请填写关键字",
},
]}
className="mb-6"
>
<Input maxLength={10} placeholder="字数上限为10" />
</Form.Item>
<Form.Item
label="回复内容上限250字"
name="message"
rules={[
{
required: true,
message: "请填写回复内容",
},
]}
className="mb-6"
>
<TextArea maxLength={250} showCount placeholder="字数上限为250" />
</Form.Item>
<Form.Item
label="优先级"
name="priority"
rules={[
{
required: true,
message: "请选择优先级",
},
]}
className="mb-6"
>
<Select placeholder="选择优先级">
<Select.Option value={1}>1</Select.Option>
<Select.Option value={2}>2</Select.Option>
<Select.Option value={3}>3</Select.Option>
<Select.Option value={4}>4</Select.Option>
<Select.Option value={5}>5</Select.Option>
<Select.Option value={6}>6</Select.Option>
<Select.Option value={0}>不展示</Select.Option>
</Select>
</Form.Item>
<Button type="primary" htmlType="submit" disabled={buttonAble}>
确认
</Button>
</Form>
</Modal>
<Modal
title="页面管理"
footer={null}
open={isPagesModalOpen}
style={{ minWidth: 800 }}
onCancel={() => setIsPagesModalOpen(false)}
>
<PagesManage />
</Modal>
</div>
);
};
export default function Notices() {
return (
<div>
<AutoAnwserContent />
</div>
);
}

View File

@ -14,6 +14,9 @@ const CreateAndEditPostContent = (props) => {
key: "info",
render: (data) => (
<div>
<p>
主播id<span className="text-red-400">{data.user_id}</span>
</p>
<p>
动态id<span className="text-red-400">{data.id}</span>
</p>
@ -35,20 +38,25 @@ const CreateAndEditPostContent = (props) => {
title: "媒体",
dataIndex: "media",
key: "media",
width: 600,
render: (data) => (
<div>
<Image.PreviewGroup items={data?.images?.map((item) => item.urls[0])}>
{data?.images?.map((item, index) => (
<Image
key={index}
src={item.urls[0]}
width={150}
style={{ marginBottom: 10 }}
/>
))}
<div className="grid grid-cols-4 gap-2">
{data?.images?.map((item, index) => (
<Image
key={index}
src={item.urls[0]}
// width={150}
style={{ marginBottom: 10 }}
/>
))}
</div>
</Image.PreviewGroup>
{data?.videos?.map((item, index) => (
<VideoPlayer key={index} url={item.urls[0]} />
<div className="grid grid-cols-4 gap-2">
<VideoPlayer key={index} url={item.urls[0]} />
</div>
))}
</div>
),
@ -71,6 +79,9 @@ const CreateAndEditPostContent = (props) => {
),
},
];
const [total, setTotal] = useState(0);
const [offset, setOffset] = useState(0);
const [more, setMore] = useState(1);
//modal
const [isEditModalOpen, setIsEditModalOpen] = useState(false);
@ -200,6 +211,7 @@ const CreateAndEditPostContent = (props) => {
//
const getData = async () => {
if (!more) return;
try {
const base = baseRequest();
const response = await fetch("/op/moment/list", {
@ -219,12 +231,16 @@ const CreateAndEditPostContent = (props) => {
alert(temData.msg);
return;
}
setTotal(temData.data.offset);
setOffset(temData.data.offset);
setMore(temData.data.more);
//
const structedData = temData.data.list.map((item, index) => {
return {
key: index,
info: {
id: item.id,
user_id: item.streamer_ext.user_id,
like: item.thumbs_up_num,
ct: new Date(item.ct * 1000).toLocaleString(),
},
@ -243,6 +259,7 @@ const CreateAndEditPostContent = (props) => {
//
const search = async (value) => {
if (!more) return;
try {
const base = baseRequest();
const detailResponse = await fetch(`/op/streamer/list_ext_by_user_id`, {
@ -275,12 +292,16 @@ const CreateAndEditPostContent = (props) => {
alert(temData.msg);
return;
}
setTotal(temData.data.offset);
setOffset(temData.data.offset);
setMore(temData.data.more);
//
const structedData = temData.data.list.map((item, index) => {
return {
key: index,
info: {
id: item.id,
user_id: item.streamer_ext.user_id,
like: item.thumbs_up_num,
ct: new Date(item.ct * 1000).toLocaleString(),
},
@ -342,6 +363,7 @@ const CreateAndEditPostContent = (props) => {
};
//
const [form] = Form.useForm();
const [searchForm] = Form.useForm();
const handleSubmit = async (value) => {
if (!selectedUser) {
alert("还未选中用户");
@ -408,7 +430,15 @@ const CreateAndEditPostContent = (props) => {
return (
<div className="mt-4" style={{ marginLeft: 20, marginRight: 20 }}>
<Form name="search" onFinish={search} onFinishFailed={onFinishFailed}>
<Form
name="search"
onFinish={(value) => {
setMore(true);
search(value);
}}
form={searchForm}
onFinishFailed={onFinishFailed}
>
<Space style={{ marginBottom: 20 }}>
<Form.Item label="主播ID" name="userId" style={{ margin: 0 }}>
<Input type="number" />
@ -430,8 +460,28 @@ const CreateAndEditPostContent = (props) => {
<Table
columns={columns}
dataSource={showData}
pagination={{ pageSize: 20 }}
scroll={{ y: window.innerHeight - 300 }}
pagination={{
pageSize: 20,
showSizeChanger: false,
total: total,
}}
scroll={{ x: "max-content", y: window.innerHeight - 280 }}
footer={() => (
<div className="text-gray-400">获得总数{showData.length}</div>
)}
onScroll={(e) => {
const { scrollHeight, scrollTop, clientHeight } = e.currentTarget;
console.log(scrollHeight, scrollTop + clientHeight);
if (scrollTop + clientHeight + 5 >= scrollHeight) {
const hasSearch = searchForm.getFieldValue("userId");
if (hasSearch) {
search();
} else {
getData(offset);
}
}
}}
/>
</Form>
{/* 重复判断isModalOpen是为了重新渲染ImageUploader和VideoUploader组件 */}

View File

@ -63,13 +63,29 @@ const EditSpacePostContent = (props) => {
<Image.PreviewGroup
items={data.media.images?.map((item) => item.urls[0])}
>
{data.media.images.map((item, index) => (
<Image key={index} src={item.urls[0]} width={100} />
))}
<div
className={`grid ${
(data.media?.images[0]?.h <= data.media?.images[0]?.w &&
data.media?.images.length < 4) ||
data.media?.images.length === 0
? "grid-cols-2"
: "grid-cols-4"
} gap-2`}
>
{data.media.images.map((item, index) => (
<Image key={index} src={item.urls[0]} width={100} />
))}
</div>
</Image.PreviewGroup>
{data.media.videos.map((item, index) => (
<VideoPlayer key={index} url={item.urls[0]} />
))}
<div
className={`grid ${
data[0]?.h <= data[0]?.w ? "grid-cols-2" : "grid-cols-4"
} gap-2`}
>
{data.media.videos.map((item, index) => (
<VideoPlayer key={index} url={item.urls[0]} />
))}
</div>
</div>
</div>
),

View File

@ -33,18 +33,26 @@ const FeedbackContent = (props) => {
title: "辅助材料",
dataIndex: "credentials",
key: "credentials",
width: 500,
render: (data) => (
<div>
<div
className={`grid ${
(data.media?.images[0]?.h <= data.media?.images[0]?.w &&
data.media?.images.length < 4) ||
data.media?.images.length === 0
? "grid-cols-2"
: "grid-cols-4"
} gap-2`}
>
{data.images?.map((item, index) => (
<Image
key={index}
src={item.urls[0]}
width={150}
style={{ marginBottom: 10 }}
/>
<div className="self-start" key={index}>
<Image src={item.urls[0]} style={{ marginBottom: 10 }} />
</div>
))}
{data.videos?.map((item, index) => (
<VideoPlayer key={index} url={item.urls[0]} />
<div className="self-start" key={index}>
<VideoPlayer url={item.urls[0]} />
</div>
))}
</div>
),

View File

@ -342,8 +342,6 @@ const HotList = (props) => {
delete dataObj.st;
delete dataObj.et;
}
debugger;
if (
type === "stopStart" ||
dataObj.priority === selectedStreamer?.priority

View File

@ -526,8 +526,6 @@ const NoticesContent = (props) => {
return;
}
}
debugger;
try {
const base = baseRequest();
const response = await fetch(`/op/notification/create`, {

View File

@ -90,7 +90,10 @@ export default function Op() {
"manualRechargeAndWithdrawal",
<MoneyCollectOutlined />
),
getItem("消息通知推送", "notices", <NotificationOutlined />),
getItem("消息中心管理", "noticesManagement", <NotificationOutlined />, [
getItem("消息通知推送", "notices"),
getItem("自动回复消息预设", "autoAnswer"),
]),
getItem("排行榜管理", "hotManage", <TrophyOutlined />),
getItem("意见反馈", "feedback", <SoundOutlined />),
getItem("客服回复", "contact", <PhoneOutlined />),
@ -142,7 +145,9 @@ export default function Op() {
"manualRechargeAndWithdrawal",
<MoneyCollectOutlined />
),
getItem("消息通知推送", "notices", <NotificationOutlined />),
getItem("消息中心管理", "noticesManagement", <NotificationOutlined />, [
getItem("消息通知推送", "notices"),
]),
getItem("排行榜管理", "hotManage", <TrophyOutlined />),
getItem("意见反馈", "feedback", <SoundOutlined />),
getItem("客服回复", "contact", <PhoneOutlined />),

View File

@ -34,6 +34,7 @@ const PostMachineReviewContent = (props) => {
title: "动态内容",
dataIndex: "newMedia",
key: "newMedia",
width: 500,
render: (data) => (
<div className="flex flex-col">
<div>
@ -42,12 +43,24 @@ const PostMachineReviewContent = (props) => {
</p>
</div>
<p className="text-red-400">媒体</p>
<div className="flex flex-wrap gap-1">
<div
className={`grid ${
(data.media?.images[0]?.h <= data.media?.images[0]?.w &&
data.media?.images.length < 4) ||
data.media?.images.length === 0
? "grid-cols-2"
: "grid-cols-4"
} gap-2`}
>
{data.media?.images?.map((item, index) => (
<Image key={index} src={item.urls[0]} width={100} />
<div className="self-start" key={index}>
<Image src={item.urls[0]} />
</div>
))}
{data.media?.videos?.map((item, index) => (
<VideoPlayer key={index} url={item.urls[0]} width={150} />
<div className="self-start" key={index}>
<VideoPlayer url={item.urls[0]} />
</div>
))}
</div>
</div>

View File

@ -126,17 +126,25 @@ const StreamerInformationContent = () => {
title: "相册",
dataIndex: "displayGallery",
key: "displayGallery",
width: 500,
render: (data) => (
<div>
<Image.PreviewGroup items={data?.map((item) => item.urls[0])}>
{data.map((item) => (
<Image
key={item.urls[0]}
src={item.urls[0]}
width={100}
style={{ marginBottom: 10 }}
/>
))}
<div
className={`grid ${
(data.media?.images[0]?.h <= data.media?.images[0]?.w &&
data.media?.images.length < 4) ||
data.media?.images.length === 0
? "grid-cols-2"
: "grid-cols-4"
} gap-2`}
>
{data.map((item) => (
<div key={item.urls[0]} className="self-start">
<Image src={item.urls[0]} style={{ marginBottom: 10 }} />
</div>
))}
</div>
</Image.PreviewGroup>
</div>
),

View File

@ -8,7 +8,7 @@ import {
useLocation,
} from "react-router-dom";
import baseRequest from "../../utils/baseRequest";
import VideoPlayer from '../../components/VideoPlayer';
import VideoPlayer from "../../components/VideoPlayer";
const JoinContent = (props) => {
const { TextArea } = Input;
const current = props.current;
@ -104,23 +104,27 @@ const JoinContent = (props) => {
title: "封面视频",
dataIndex: "displayVideo",
key: "displayVideo",
render: (data) => <VideoPlayer url={data[0].urls[0]} width={150} />,
render: (data) => <VideoPlayer url={data[0].urls[0]} width={150} />,
},
{
title: "相册",
dataIndex: "displayGallery",
key: "displayGallery",
width: 500,
render: (data) => (
<div>
<Image.PreviewGroup items={data?.map((item) => item.urls[0])}>
{data.map((item) => (
<Image
key={item.urls[0]}
src={item.urls[0]}
width={100}
style={{ marginBottom: 10 }}
/>
))}
<div
className={`grid ${
data[0]?.h <= data[0]?.w ? "grid-cols-2" : "grid-cols-4"
} gap-2`}
>
{data.map((item) => (
<div className="self-start" key={item.urls[0]}>
<Image src={item.urls[0]} style={{ marginBottom: 10 }} />
</div>
))}
</div>
</Image.PreviewGroup>
</div>
),
@ -222,6 +226,7 @@ const JoinContent = (props) => {
title: "操作",
dataIndex: "opeartion",
key: "opeartion",
fixed: "right",
render: (_, record) => (
<div>
<Space>

View File

@ -8,7 +8,7 @@ import {
useLocation,
} from "react-router-dom";
import baseRequest from "../../utils/baseRequest";
import VideoPlayer from "../../components/VideoPlayer"
import VideoPlayer from "../../components/VideoPlayer";
const JoinContent = (props) => {
const { TextArea } = Input;
const current = props.current;
@ -133,23 +133,31 @@ const JoinContent = (props) => {
title: "封面视频",
dataIndex: "displayVideo",
key: "displayVideo",
render: (data) => <VideoPlayer url={data}/>,
render: (data) => <VideoPlayer url={data} />,
},
{
title: "相册",
dataIndex: "displayGallery",
key: "displayGallery",
width: 500,
render: (data) => (
<div>
<Image.PreviewGroup items={data?.map((item) => item.urls[0])}>
{data.map((item) => (
<Image
key={item.urls[0]}
src={item.urls[0]}
width={100}
style={{ marginBottom: 10 }}
/>
))}
<div
className={`grid ${
(data.media?.images[0]?.h <= data.media?.images[0]?.w &&
data.media?.images.length < 4) ||
data.media?.images.length === 0
? "grid-cols-2"
: "grid-cols-4"
} gap-2`}
>
{data.map((item) => (
<div key={item.urls[0]} className="self-start">
<Image src={item.urls[0]} style={{ marginBottom: 10 }} />
</div>
))}
</div>
</Image.PreviewGroup>
</div>
),

View File

@ -54,9 +54,12 @@ const TopPostsContent = (props) => {
//
const [showData, setShowData] = useState([]);
const [total, setTotal] = useState(0);
const [offset, setOffset] = useState(0);
const [more, setMore] = useState(1);
//
const getData = async () => {
if (!more) return;
try {
const base = baseRequest();
//id
@ -88,6 +91,8 @@ const TopPostsContent = (props) => {
},
body: JSON.stringify({
ids: intIds,
offset: 0,
limit: 20 + offset,
...base,
}),
});
@ -97,6 +102,11 @@ const TopPostsContent = (props) => {
alert(temData2.msg);
return;
}
if (temData.data.offset > total) {
setTotal(temData.data.offset);
}
setOffset(temData2.data.offset);
setMore(temData2.data.more);
//
const structedData = temData2.data.list.map((item, index) => {
return {
@ -169,8 +179,25 @@ const TopPostsContent = (props) => {
<Table
columns={columns}
dataSource={showData}
pagination={{ pageSize: 20 }}
scroll={{ y: window.innerHeight - 300 }}
// pagination={{ pageSize: 20 }}
// scroll={{ y: window.innerHeight - 300 }}
pagination={{
pageSize: 20,
showSizeChanger: false,
total: total,
}}
scroll={{ x: "max-content", y: window.innerHeight - 280 }}
footer={() => (
<div className="text-gray-400">获得总数{showData.length}</div>
)}
onScroll={(e) => {
const { scrollHeight, scrollTop, clientHeight } = e.currentTarget;
console.log(scrollHeight, scrollTop + clientHeight);
if (scrollTop + clientHeight + 5 >= scrollHeight) {
getData(offset);
}
}}
/>
<Modal footer={null} open={isModalOpen} onCancel={handleCancelModal}>
<p className="text-sm text-red-400 font-bold">

View File

@ -34,6 +34,7 @@ const ZonePostMachineReviewContent = (props) => {
title: "动态内容",
dataIndex: "content",
key: "content",
width: 500,
render: (data) => (
<div className="flex flex-col">
<div>
@ -47,16 +48,28 @@ const ZonePostMachineReviewContent = (props) => {
)}
</div>
<p className="text-red-400">媒体</p>
<div className="flex flex-wrap gap-1">
<div
className={`grid ${
(data.media?.images[0]?.h <= data.media?.images[0]?.w &&
data.media?.images.length < 4) ||
data.media?.images.length === 0
? "grid-cols-2"
: "grid-cols-4"
} gap-2`}
>
<Image.PreviewGroup
items={data.media.images?.map((item) => item.urls[0])}
>
{data.media.images.map((item, index) => (
<Image key={index} src={item.urls[0]} width={100} />
<div className="self-start" key={index}>
<Image src={item.urls[0]} />
</div>
))}
</Image.PreviewGroup>
{data.media.videos.map((item, index) => (
<VideoPlayer key={index} url={item.urls[0]} width={150} />
<div className="self-start" key={index}>
<VideoPlayer url={item.urls[0]} width={150} />
</div>
))}
</div>
</div>

View File

@ -8,6 +8,7 @@ import StreamerJoinNew from "../pages/StreamerJoinNew";
import StreamerInformationCompleteNew from "../pages/StreamerInformationCompleteNew";
import Feedback from "../pages/Feedback";
import Notices from "../pages/Notices";
import AutoAnwser from "../pages/AutoAnwser";
import HotManage from "../pages/HotManage";
import Contact from "../pages/Contact";
import UploadMedia from "../pages/UploadMedia";
@ -80,6 +81,10 @@ const routes = [
path: "notices/*",
element: <Notices />,
},
{
path: "autoAnswer/*",
element: <AutoAnwser />,
},
{
path: "hotManage/*",
element: <HotManage />,

View File

@ -6,7 +6,7 @@ export default function baseRequest() {
const account = cookies.get("account");
const b_ts = new Date().getTime();
const baseRequest = {
b_mid: account.mid,
b_mid: account?.mid,
b_ch: "op",
b_ts: b_ts,
b_token: token,