|
@@ -260,7 +260,7 @@ const beforeUpload = async (file: File) => {
|
|
|
.substring(file.name.lastIndexOf("."))
|
|
|
.toUpperCase();
|
|
|
if (!DrawFormats.some((type) => type.toUpperCase() === fileType)) {
|
|
|
- ElMessage.error(`请上传${DrawFormats}`);
|
|
|
+ ElMessage.error(`请上传${DrawFormats}格式的文件`);
|
|
|
return false;
|
|
|
} else {
|
|
|
return true;
|
|
@@ -273,7 +273,7 @@ const checkSourceIsAudio = computed(() => (url: string) => {
|
|
|
return url.includes(".mp3") || url.includes(".aac") || url.includes(".wav");
|
|
|
});
|
|
|
const checkSourceIsImage = computed(() => (url: string) => {
|
|
|
- return url.includes(".jpg") || url.includes(".png") || url.includes(".gif");
|
|
|
+ return url.includes(".jpg") || url.includes(".png") || url.includes(".jpeg") || url.includes(".gif");
|
|
|
});
|
|
|
|
|
|
const getCoverUrl = computed(() => (url: string) => {
|
|
@@ -282,7 +282,7 @@ const getCoverUrl = computed(() => (url: string) => {
|
|
|
// return (
|
|
|
// url + "?x-oss-process=video/snapshot,t_0,f_jpg,w_0,h_0,m_fast,ar_auto"
|
|
|
// );
|
|
|
- case url.includes(".mp3") || url.includes(".aac") || url.includes(".wmv"):
|
|
|
+ case url.includes(".mp3") || url.includes(".aac") || url.includes(".wmv") || url.includes(".wav"):
|
|
|
return musicHeadphones;
|
|
|
default:
|
|
|
return url;
|
|
@@ -315,7 +315,7 @@ onMounted(async () => {
|
|
|
function getCaseScriptList() {
|
|
|
getCaseScriptInfo(caseId.value)
|
|
|
.then((res) => {
|
|
|
- project.title = res.name;
|
|
|
+ project.title = res.name || '我的脚本';
|
|
|
data.list = res.content || [];
|
|
|
data.newSortList = res.content || [];
|
|
|
const idList = data.list.map((ele) => ele.id);
|
|
@@ -324,7 +324,7 @@ function getCaseScriptList() {
|
|
|
console.log("getCaseScriptList", idList, active.value);
|
|
|
Array.from(data.list).forEach((item) => {
|
|
|
item.fileList.forEach(async (file: File, index) => {
|
|
|
- if ((file as any).url.includes(".mp4")) {
|
|
|
+ if ((file as any).url.includes(".mp4") || (file as any).url.includes(".m4v")) {
|
|
|
const res = await CaseScriptGetCover((file as any).url);
|
|
|
(item.fileList[index] as any).cover = res;
|
|
|
} else {
|