This commit is contained in:
PC-202306242200\Administrator
2024-11-04 10:59:19 +08:00
parent 8baab900d2
commit e3fed43cd6
9 changed files with 36 additions and 21 deletions

View File

@@ -84,8 +84,9 @@ export default defineConfig({
},
define: {
'process.env': {
API_URL: "http://guangdongadminapi.zhongshuai2023.com",
// API_URL: "https://iadminapi.zhongshuai2023.com",
API_URL: "http://192.168.1.63:1002",
// API_URL: "http://192.168.1.63:1002",
// API_URL: "http://192.168.1.54:1002",
WS_URL: "ws://lv.com",
STATIC_URL: "http://lv.com",

2
dist/index.html vendored
View File

@@ -8,6 +8,6 @@
</head>
<body>
<div id="root"></div>
<script src="/umi.fdb1a0d4.js"></script>
<script src="/umi.78c09f24.js"></script>
</body></html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -76,8 +76,13 @@ export const FilesManager = ({ fileType, count, defaultValue, mode, imagesShow =
};
const onCheckedFile = (item) => {
console.log(12345);
console.log(item.fileType);
console.log(fileType);
console.log(fileType,'提娜佳');
if(fileType && !item.fileType.includes(fileType)){
message.error(`请选择正确的格式`);
@@ -86,6 +91,8 @@ export const FilesManager = ({ fileType, count, defaultValue, mode, imagesShow =
const current = checkedFilesIds.indexOf(item.id);
//不存在添加
if (current === -1) {
setCheckedFilesIds((prev) => prev.concat(item.id));

View File

@@ -55,18 +55,25 @@ const RoleForm: React.FC = (props: any) => {
]
const onChange = async (e) => {
const videoExtensions = ['.mp4', '.mkv', '.avi', '.mov', '.wmv', '.flv', '.webm', '.m4v', '.3gp', '.3g2'];
// 将URL转换为小写以便进行不区分大小写的比较
const lowerCaseUrl = e.toLowerCase();
// 检查链接是否以任何一个视频扩展名结尾
if (videoExtensions.some(e => lowerCaseUrl.endsWith(e))) {
setEditorState(ContentUtils.insertMedias(editorState, [{
type: 'VIDEO',
url: e
}]));
} else {
setEditorState(ContentUtils.insertMedias(editorState, [{ type: 'IMAGE', url: e, },]))
}
var list = e.map((item, index) => {
return { type: 'IMAGE', url: item, }
})
setEditorState(ContentUtils.insertMedias(editorState, list))
// const videoExtensions = ['.mp4', '.mkv', '.avi', '.mov', '.wmv', '.flv', '.webm', '.m4v', '.3gp', '.3g2'];
// // 将URL转换为小写以便进行不区分大小写的比较
// const lowerCaseUrl = e.toLowerCase();
// // 检查链接是否以任何一个视频扩展名结尾
// if (videoExtensions.some(e => lowerCaseUrl.endsWith(e))) {
// setEditorState(ContentUtils.insertMedias(editorState, [{
// type: 'VIDEO',
// url: e
// }]));
// } else {
// setEditorState(ContentUtils.insertMedias(editorState, [{ type: 'IMAGE', url: e, },]))
// }
}
@@ -81,7 +88,7 @@ const RoleForm: React.FC = (props: any) => {
mode=""
imagesShow={false}
onChange={onChange}
count={1}
count={9}
/>, // 指定按钮文字此处可传入jsx若已指定html则text不会显示
onClick: () => {
console.log('Hello World!');